Gravar-mail: Inferring hidden structure in multilayered neural circuits