Tag: Neural circuits

  • Scheffer, L. K. et al. A connectome and analysis of the adult Drosophila central brain. eLife 9, e57443 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Takemura, S.-Y. et al. A visual motion detection circuit suggested by Drosophila connectomics. Nature 500, 175–181 (2013).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Takemura, S., Nern, A., Chklovskii, D. B. & Scheffer, L. K. The comprehensive connectome of a neural substrate for ‘ON’ motion detection in Drosophila. eLife 6, e24394 (2017).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • MICrONS Consortium. Functional connectomics spanning multiple areas of mouse visual cortex. Preprint at bioRxiv https://doi.org/10.1101/2021.07.28.454025 (2021).

  • Shapson-Coe, A. et al. A petavoxel fragment of human cerebral cortex reconstructed at nanoscale resolution. Science 384, eadk4858 (2024).

  • Loomba, S. et al. Connectomic comparison of mouse and human cortex. Science 377, eabo0924 (2022).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Buhmann, J. et al. Automatic detection of synaptic partners in a whole-brain Drosophila electron microscopy data set. Nat. Methods 18, 771–774 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Dorkenwald, S. et al. FlyWire: online community for whole-brain connectomics. Nat. Methods 19, 119–128 (2022).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Zheng, Z. et al. A complete electron microscopy volume of the brain of adult Drosophila melanogaster. Cell 174, 730–743.e22 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Eckstein, N. et al. Neurotransmitter classification from electron microscopy images at synaptic sites in Drosophila melanogaster. Cell 187, 2574–2594.e23 (2024).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Matsliah, A. et al. Neuronal parts list and wiring diagram for a visual system. Nature https://doi.org/10.1038/s41586-024-07981-1 (2024).

  • Schlegel, P. et al. Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature https://doi.org/10.1038/s41586-024-07686-5 (2024).

  • Ma, X., Hou, X., Edgecombe, G. D. & Strausfeld, N. J. Complex brain and optic lobes in an early Cambrian arthropod. Nature 490, 258–261 (2012).

  • Sporns, O., Tononi, G. & Kötter, R. The human connectome: a structural description of the human brain. PLoS Comput. Biol. 1, e42 (2005).

    Article 
    ADS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Costandi, M. Anti-connectome-ism. The Guardian (21 September 2012).

  • Lichtman, J. W. & Denk, W. The big and the small: challenges of imaging the brain’s circuits. Science 334, 618–623 (2011).

    Article 
    ADS 
    CAS 
    PubMed 

    Google Scholar
     

  • Briggman, K. L. & Bock, D. D. Volume electron microscopy for neuronal circuit reconstruction. Curr. Opin. Neurobiol. 22, 154–161 (2012).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Coen, P. et al. Dynamic sensory cues shape song structure in Drosophila. Nature 507, 233–237 (2014).

    Article 
    ADS 
    CAS 
    PubMed 

    Google Scholar
     

  • Fisher, Y. E. Flexible navigational computations in the Drosophila central complex. Curr. Opin. Neurobiol. 73, 102514 (2022).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Cognigni, P., Felsenberg, J. & Waddell, S. Do the right thing: neural network mechanisms of memory formation, expression and update in Drosophila. Curr. Opin. Neurobiol. 49, 51–58 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Schretter, C. E. et al. Cell types and neuronal circuitry underlying female aggression in Drosophila. eLife 9, e58942 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Deutsch, D. et al. The neural basis for a persistent internal state in Drosophila females. eLife 9, e59502 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Li, F. et al. The connectome of the adult Drosophila mushroom body provides insights into function. eLife 9, e62576 (2020).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Hulse, B. K. et al. A connectome of the Drosophila central complex reveals network motifs suitable for flexible navigation and context-dependent action selection. eLife 10, e66039 (2021).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Baker, C. A. et al. Neural network organization for courtship-song feature detection in Drosophila. Curr. Biol. 32, 3317–3333.e7 (2022).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Schlegel, P., Bates, A. S., Stürner, T. & Jagannathan, S. R. Information flow, cell types and stereotypy in a full olfactory connectome. eLife 10, e66018 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Borst, A. & Helmstaedter, M. Common circuit design in fly and mammalian motion vision. Nat. Neurosci. 18, 1067–1076 (2015).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Farris, S. M. Are mushroom bodies cerebellum-like structures? Arthropod Struct. Dev. 40, 368–379 (2011).

    Article 
    PubMed 

    Google Scholar
     

  • Pacheco, D. A., Thiberge, S. Y., Pnevmatikakis, E. & Murthy, M. Auditory activity is diverse and widespread throughout the central brain of Drosophila. Nat. Neurosci. 24, 93–104 (2021).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Brezovec, B. E. et al. Mapping the neural dynamics of locomotion across the Drosophila brain. Curr. Biol. 34, 710–726.e4 (2024).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • White, J. G., Southgate, E., Thomson, J. N. & Brenner, S. The structure of the nervous system of the nematode Caenorhabditis elegans. Philos. Trans. R. Soc. Lond. B 314, 1–340 (1986).

    Article 
    ADS 
    CAS 

    Google Scholar
     

  • Cook, S. J. et al. Whole-animal connectomes of both Caenorhabditis elegans sexes. Nature 571, 63–71 (2019).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Winding, M. et al. The connectome of an insect brain. Science 379, eadd9330 (2023).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Shiu, P. K. et al. A Drosophila computational brain model reveals sensorimotor processing. Nature https://doi.org/10.1038/s41586-024-07763-9 (2024).

  • Eichler, K. et al. Somatotopic organization among parallel sensory pathways that promote a grooming sequence in Drosophila. eLife 12, RP87602 (2024).

  • Stürner, T. et al. Comparative connectomics of the descending and ascending neurons of the Drosophila nervous system: stereotypy and sexual dimorphism. Preprint at bioRxiv https://doi.org/10.1101/2024.06.04.596633 (2024).

  • Garner, D. et al. Connectome reconstruction predicts visual features used for navigation. Nature https://doi.org/10.1038/s41586-024-07967-z (2024).

  • Ganguly, I., Heckman, E. L., Litwin-Kumar, A., Clowney, E. J. & Behnia, R. Diversity of visual inputs to Kenyon cells of the Drosophila mushroom body. Nat. Commun. 15, 5698 (2024).

  • Pospisil, D. A. et al. The fly connectome reveals a path to the effectome. Nature https://doi.org/10.1038/s41586-024-07982-0 (2024).

  • Reinhard, N., Fukuda, A., Manoli, G., Derksen, E. & Saito, A. Synaptic and peptidergic connectomes of the Drosophila circadian clock. Preprint at bioRxiv https://doi.org/10.1101/2023.09.11.557222 (2023).

  • Christenson, M. P. et al. Hue selectivity from recurrent circuitry in Drosophila. Nat. Neurosci. 27, 1137–1147 (2024).

  • Lin, A. et al. Network statistics of the whole-brain connectome of Drosophila. Nature https://doi.org/10.1038/s41586-024-07968-y (2024).

  • Sapkal, N. et al. Neural circuit mechanisms underlying context-specific halting in Drosophila. Nature https://doi.org/10.1038/s41586-024-07854-7 (2024).

  • Seung, H. S. Predicting visual function by interpreting a neuronal wiring diagram. Nature https://doi.org/10.1038/s41586-024-07953-5 (2024).

  • Cornean, J. et al. Heterogeneity of synaptic connectivity in the fly visual system. Nat. Commun. 15, 1570 (2024).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Cachero, S., Ostrovsky, A. D., Jai, Y. Y. & Dickson, B. J. Sexual dimorphism in the fly brain. Curr. Biol. 20, 1589–1601 (2010).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Murthy, M., Fiete, I. & Laurent, G. Testing odor response stereotypy in the Drosophila mushroom body. Neuron 59, 1009–1023 (2008).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Zheng, Z. et al. Structured sampling of olfactory input by the fly mushroom body. Curr. Biol. 32, 3334–3349.e6 (2022).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Lin, A. et al. Network statistics of the whole-brain connectome of Drosophila. Preprint at bioRxiv https://doi.org/10.1101/2023.07.29.551086 (2023).

  • Dorkenwald, S. et al. CAVE: Connectome Annotation Versioning Engine. Preprint at bioRxiv https://doi.org/10.1101/2023.07.26.550598 (2023).

  • Schüz, A. & Palm, G. Density of neurons and synapses in the cerebral cortex of the mouse. J. Comp. Neurol. 286, 442–455 (1989).

    Article 
    PubMed 

    Google Scholar
     

  • Dorkenwald, S. et al. Automated synaptic connectivity inference for volume electron microscopy. Nat. Methods 14, 435–442 (2017).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Schneider-Mizell, C. M. et al. Quantitative neuroanatomy for connectomics in Drosophila. eLife 5, e12059 (2016).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Phelps, J. S. et al. Reconstruction of motor control circuits in adult Drosophila using automated transmission electron microscopy. Cell 184, 759–774.e18 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Takemura, S.-Y. et al. A connectome of the male Drosophila ventral nerve cord. eLife 13, RP97769 (2024).

  • Marin, E. C. et al. Systematic annotation of a complete adult male Drosophila nerve cord connectome reveals principles of functional organisation. Preprint at bioRxiv https://doi.org/10.1101/2023.06.05.543407 (2023).

  • Kim, H. et al. Wiring patterns from auditory sensory neurons to the escape and song-relay pathways in fruit flies. J. Comp. Neurol. 528, 2068–2098 (2020).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Sterne, G. R., Otsuna, H., Dickson, B. J. & Scott, K. Classification and genetic targeting of cell types in the primary taste and premotor center of the adult Drosophila brain. eLife 10, e71679 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Azevedo, A. et al. Connectomic reconstruction of a female Drosophila ventral nerve cord. Nature 631, 360–368 (2024).

  • Wu, M. et al. Visual projection neurons in the Drosophila lobula link feature detection to distinct behavioral programs. eLife 5, e21022 (2016).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Otsuna, H. & Ito, K. Systematic analysis of the visual projection neurons of Drosophila melanogaster. I. Lobula-specific pathways. J. Comp. Neurol. 497, 928–958 (2006).

    Article 
    PubMed 

    Google Scholar
     

  • Zhao, A. et al. A comprehensive neuroanatomical survey of the Drosophila lobula plate tangential neurons with predictions for their optic flow sensitivity. Preprint at bioRxiv https://doi.org/10.1101/2023.10.16.562634 (2023).

  • Repérant, J. et al. The centrifugal visual system of vertebrates: a comparative analysis of its functional anatomical organization. Brain Res. Rev. 52, 1–57 (2006).

    Article 
    PubMed 

    Google Scholar
     

  • Karuppudurai, T. et al. A hard-wired glutamatergic circuit pools and relays UV signals to mediate spectral preference in Drosophila. Neuron 81, 603–615 (2014).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Meinertzhagen, I. A. Of what use is connectomics? A personal perspective on the Drosophila connectome. J. Exp. Biol. 221, jeb164954 (2018).

    Article 
    PubMed 

    Google Scholar
     

  • Chklovskii, D. B. Synaptic connectivity and neuronal morphology: two sides of the same coin. Neuron 43, 609–617 (2004).

    CAS 
    PubMed 

    Google Scholar
     

  • Kremer, M. C., Jung, C., Batelli, S., Rubin, G. M. & Gaul, U. The glia of the adult Drosophila nervous system. Glia 65, 606–638 (2017).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Ohyama, T. et al. A multilevel multimodal circuit enhances action selection in Drosophila. Nature 520, 633–639 (2015).

    Article 
    ADS 
    CAS 
    PubMed 

    Google Scholar
     

  • Hong, E. J. & Wilson, R. I. Simultaneous encoding of odors by channels with diverse sensitivity to inhibition. Neuron 85, 573–589 (2015).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Meier, M. & Borst, A. Extreme compartmentalization in a Drosophila amacrine cell. Curr. Biol. 29, 1545–1550.e2 (2019).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Croset, V., Treiber, C. D. & Waddell, S. Cellular diversity in the Drosophila midbrain revealed by single-cell transcriptomics. eLife 7, e34550 (2018).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Molina-Obando, S. et al. ON selectivity in the Drosophila visual system is a multisynaptic process involving both glutamatergic and GABAergic inhibition. eLife 8, e49373 (2019).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Liu, W. W. & Wilson, R. I. Glutamate is an inhibitory neurotransmitter in the Drosophila olfactory system. Proc. Natl Acad. Sci. USA 110, 10294–10299 (2013).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Zingg, B. et al. Neural networks of the mouse neocortex. Cell 156, 1096–1111 (2014).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Oh, S. W. et al. A mesoscale connectome of the mouse brain. Nature 508, 207–214 (2014).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Markov, N. T. et al. A weighted and directed interareal connectivity matrix for macaque cerebral cortex. Cereb. Cortex 24, 17–36 (2014).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Meissner, G. W. et al. A searchable image resource of Drosophila GAL4 driver expression patterns with single neuron resolution. eLife 12, e80660 (2023).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Chiang, A.-S. et al. Three-dimensional reconstruction of brain-wide wiring networks in Drosophila at single-cell resolution. Curr. Biol. 21, 1–11 (2011).

    Article 
    MathSciNet 
    CAS 
    PubMed 

    Google Scholar
     

  • Kasthuri, N. & Lichtman, J. W. The rise of the ‘projectome’. Nat. Methods 4, 307–308 (2007).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Ito, K. et al. A systematic nomenclature for the insect brain. Neuron 81, 755–765 (2014).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Fischbach, K.-F. & Dittrich, A. P. M. The optic lobe of Drosophila melanogaster. I. A Golgi analysis of wild-type structure. Cell Tissue Res. 258, 441–475 (1989).

    Article 

    Google Scholar
     

  • Nern, A., Pfeiffer, B. D. & Rubin, G. M. Optimized tools for multicolor stochastic labeling reveal diverse stereotyped cell arrangements in the fly visual system. Proc. Natl Acad. Sci. USA 112, E2967–E2976 (2015).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Bae, J. A. et al. Digital museum of retinal ganglion cells with dense anatomy and physiology. Cell 173, 1293–1306.e19 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Shinomiya, K., Nern, A., Meinertzhagen, I. A., Plaza, S. M. & Reiser, M. B. Neuronal circuits integrating visual motion information in Drosophila melanogaster. Curr. Biol. 32, 3529–3544.e2 (2022).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Lappalainen, J. K. et al. Connectome-constrained networks predict neural activity across the fly visual system. Nature https://doi.org/10.1038/s41586-024-07939-3 (2024).

  • Snell, N. J. et al. Complex representation of taste quality by second-order gustatory neurons in Drosophila. Curr. Biol. 32, 3758–3772.e4 (2022).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Vogt, K. et al. Direct neural pathways convey distinct visual information to Drosophila mushroom bodies. eLife 5, e14009 (2016).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Mu, S. et al. 3D reconstruction of cell nuclei in a full Drosophila brain. Preprint at bioRxiv https://doi.org/10.1101/2021.11.04.467197 (2021).

  • Hofbauer, A. & Buchner, E. Does Drosophila have seven eyes? Naturwissenschaften 76, 335–336 (1989).

    Article 
    ADS 

    Google Scholar
     

  • Hu, K. G., Reichert, H. & Stark, W. S. Electrophysiological characterization of Drosophila ocelli. J. Comp. Physiol. 126, 15–24 (1978).

    Article 

    Google Scholar
     

  • Stark, W. S., Sapp, R. & Carlson, S. D. Ultrastructure of the ocellar visual system in normal and mutant Drosophila melanogaster. J. Neurogenet. 5, 127–153 (1989).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Stange, G., Stowe, S., Chahl, J. S. & Massaro, A. Anisotropic imaging in the dragonfly median ocellus: a matched filter for horizon detection. J. Comp. Physiol. A 188, 455–467 (2002).

    Article 
    CAS 

    Google Scholar
     

  • Cheong, H. S. J. et al. Transforming descending input into behavior: the organization of premotor circuits in the Drosophila male adult nerve cord connectome. Preprint at bioRxiv https://doi.org/10.1101/2023.06.07.543976 (2023).

  • Suver, M. P., Huda, A., Iwasaki, N., Safarik, S. & Dickinson, M. H. An array of descending visual interneurons encoding self-motion in Drosophila. J. Neurosci. 36, 11768–11780 (2016).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Haag, J., Wertz, A. & Borst, A. Integration of lobula plate output signals by DNOVS1, an identified premotor descending neuron. J. Neurosci. 27, 1992–2000 (2007).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Kim, A. J., Fenk, L. M., Lyu, C. & Maimon, G. Quantitative predictions orchestrate visual signaling in Drosophila. Cell 168, 280–294.e12 (2017).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Braitenberg, V. Vehicles: Experiments in Synthetic Psychology (MIT Press, 1984).

  • Seung, H. S. Connectome: How the Brain’s Wiring Makes Us Who We Are (Houghton Mifflin Harcourt, 2012).

  • Davis, F. P. et al. A genetic, genomic, and computational resource for exploring neural circuit function. eLife 9, e50901 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Groschner, L. N., Malis, J. G., Zuidinga, B. & Borst, A. A biophysical account of multiplication by a single neuron. Nature 603, 119–123 (2022).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Ammer, G. et al. Multilevel visual motion opponency in Drosophila. Nat. Neurosci. 26, 1894–1905 (2023).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Knott, G., Marchman, H., Wall, D. & Lich, B. Serial section scanning electron microscopy of adult brain tissue using focused ion beam milling. J. Neurosci. 28, 2959–2964 (2008).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Xu, C. S. et al. Enhanced FIB-SEM systems for large-volume 3D imaging. eLife 6, e25916 (2017).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Hayworth, K. J. et al. Gas cluster ion beam SEM for imaging of large tissue samples with 10 nm isotropic resolution. Nat. Methods 17, 68–71 (2020).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Denk, W. & Horstmann, H. Serial block-face scanning electron microscopy to reconstruct three-dimensional tissue nanostructure. PLoS Biol. 2, e329 (2004).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Leighton, S. B. SEM images of block faces, cut by a miniature microtome within the SEM – a technical note. Scan. Electron Microsc. 1981, 73–76 (1981).


    Google Scholar
     

  • Macrina, T. et al. Petascale neural circuit reconstruction: automated methods. Preprint at bioRxiv https://doi.org/10.1101/2021.08.04.455162 (2021).

  • Popovych, S. et al. Petascale pipeline for precise alignment of images from serial section electron microscopy. Nat. Commun. 15, 289 (2024).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Januszewski, M. et al. High-precision automated reconstruction of neurons with flood-filling networks. Nat. Methods 15, 605–610 (2018).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Jain, V. et al. Supervised learning of image restoration with convolutional networks. In Proc. 2007 IEEE 11th International Conference on Computer Vision 636–643 (IEEE, 2007).

  • Turaga, S. C. et al. Convolutional networks can learn to generate affinity graphs for image segmentation. Neural Comput. 22, 511–538 (2010).

    Article 
    PubMed 

    Google Scholar
     

  • Maitin-Shepard, J. Neuroglancer. https://github.com/google/neuroglancer (2020).

  • Verasztó, C. et al. Whole-animal connectome and cell-type complement of the three-segmented Platynereis dumerilii larva. Preprint at bioRxiv https://doi.org/10.1101/2020.08.21.260984 (2020).

  • Schoofs, A. et al. Serotonergic reinforcement of a complete swallowing circuit. Preprint at bioRxiv https://doi.org/10.1101/2023.05.26.542464 (2023).

  • Ngai, J. BRAIN 2.0: transforming neuroscience. Cell 185, 4–8 (2022).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Jefferis, G., Collinson, L., Bosch, C., Costa, M. & Schlegel, P. Scaling up Connectomics: the road to a whole mouse brain connectome (Wellcome, 2023).

  • Collins, F. S., Morgan, M. & Patrinos, A. The Human Genome Project: lessons from large-scale biology. Science 300, 286–290 (2003).

    Article 
    ADS 
    CAS 
    PubMed 

    Google Scholar
     

  • Heinrich, L., Funke, J., Pape, C., Nunez-Iglesias, J. & Saalfeld, S. Synaptic cleft segmentation in non-isotropic volume electron microscopy of the complete Drosophila brain. In Medical Image Computing and Computer Assisted Intervention – MICCAI 2018 (eds Frangi, A. F. et al.) 317–325 (Springer, 2018).

  • Bates, A. S. et al. The natverse, a versatile toolbox for combining and analysing neuroanatomical data. eLife 9, e53350 (2020).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Mitchell, E., Keselj, S., Popovych, S., Buniatyan, D. & Seung, H. S. Siamese encoding and alignment by multiscale learning with self-supervision. Preprint at https://doi.org/10.48550/arXiv.1904.02643 (2019).

  • Lee, K., Zung, J., Li, P., Jain, V. & Seung, H. S. Superhuman accuracy on the SNEMI3D Connectomics Challenge. Preprint at https://doi.org/10.48550/arXiv.1706.00120 (2017).

  • Lu, R., Zlateski, A. & Seung, H. S. Large-scale image segmentation based on distributed clustering algorithms. Preprint at https://doi.org/10.48550/arXiv.2106.10795 (2021).

  • Lapraz, F. et al. Asymmetric activity of NetrinB controls laterality of the Drosophila brain. Nat. Commun. 14, 1052 (2023).

    Article 
    ADS 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Dorkenwald, S. et al. Binary and analog variation of synapses between cortical pyramidal neurons. eLife 11, e76120 (2022).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Kim, J. S. et al. Space-time wiring specificity supports direction selectivity in the retina. Nature 509, 331–336 (2014).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Brittin, C. A., Cook, S. J., Hall, D. H., Emmons, S. W. & Cohen, N. A multi-scale brain map derived from whole-brain volumetric reconstructions. Nature 591, 105–110 (2021).

    Article 
    ADS 
    CAS 
    PubMed 

    Google Scholar
     

  • Sato, M., Bitter, I., Bender, M. A., Kaufman, A. E. & Nakajima, M. TEASAR: tree-structure extraction algorithm for accurate and robust skeletons. In Proc. 8th Pacific Conference on Computer Graphics and Applications (eds Barsky, B. A. A. et al.) (IEEE, 2000); https://doi.org/10.1109/PCCGA.2000.883951.

  • Schlegel, P. et al. navis-org/navis: version 1.5.0. Zenodo https://doi.org/10.5281/ZENODO.8191725 (2023).

  • McInnes, L., Healy, J. & Melville, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at https://doi.org/10.48550/arXiv.1802.03426 (2018).

[ad_2]

Source link

  • Calcium-permeable AMPA receptors govern PV neuron feature selectivity

    [ad_1]

    Mice and marmosets

    All procedures were approved by the Johns Hopkins Animal Care and Use Committee and conducted per the guidelines of the National Institutes of Health and the Society for Neuroscience. Hippocampal imaging experiments were carried out according to German national and institutional guidelines and approved by the ‘Tierversuchskommission’ of the Regierungspräsidium Freiburg (license number G16/037). Marmoset post-mortem tissue was obtained from terminal experiments approved by NIH Institutional Animal Care and Use Committees. The following mouse lines were used: PV-Cre30 (Jackson Laboratory (JAX), 008069), lsl-eGFP51 (JAX, 010701), lsl-eGFP-GluA2 (Extended Data Fig. 5), GluA2 KO39 (JAX, 002913), and GluA1 KO52 (JAX, 024422). We generated the ROSA26-lsl-eGFP-GluA2 mouse line by electroporating mouse embryonic stem (ES) cells with an engineered construct containing ROSA26-CAG-loxP-STOP-loxP-eGFP-Gria2-WPRE (adapted from targeting vector used to generate Ai14 mice53) and homologous recombination (Extended Data Fig. 5). We generated PV-Cre;lsl-eGFP-GluA2 (and PV-Cre;lsl-eGFP) mice from crosses with PV-Cre mice, born at Mendelian ratios. GluA2/– pups displayed lower body weight compared with wild-type littermates. They displayed occasional mortality, mitigated by separating the littermates from the parents to reduce litter sizes39. All lines were maintained on a mixed background composed primarily of C57BL/6J, and mice of both sexes were used for experiments. We maintained all animals on a 12-h light–dark cycle at 20–26 °C and 30–70% relative humidity.

    Constructs

    We used Q/R and R/G RNA-edited flip-isoform short c-tail rat Gria2 cDNA sequences for mutant animal generation and viruses unless otherwise stated. SEP-GluA2 and GFP-GluA2 fusion constructs were generated by amino-terminal insertion of SEP or GFP at four amino acids after the signal peptide padded with linker sequences, as in previously published constructs54. We generated the FUW-Cre construct by replacing the eGFP in FUGW with the Cre recombinase gene.

    pAAV.Syn.Flex.NES-jRGECO1a.WPRE.SV40 (ref. 55) was a gift from D. Kim and the GENIE Project (Addgene, plasmid 100853). The loxP/lox2272 sequences in the Flex cassette were inverted or exchanged with lox511/loxFAS to mitigate compatibility with other DIO AAVs. pAAV-CW3SL-eGFP56 was a gift from B.-K. Kaang (Addgene, plasmid 61463).

    To deliver large genes, such as the SEP-GluA2 fusion gene, with the high tropism and low cytotoxicity provided by AAV vectors, we heavily optimized vector components to allow larger transgene size. Using the short hSyn1 promoter (469 bp), abbreviated linker sequences and DIO sequences and an optimized WPRE+polyA signal (CW3SL, 425 bp)56, we generated a pan-neuronal Cre-dependent AAV expression vector with a minimal backbone (1,350 bp from inverted terminal repeat (ITR) to ITR without cargo) and large cargo capacity size (about 3.65 kb; based on an earlier estimation of 5 kb AAV genome size limit57; 3.85 kb when Cre dependency is not required). The loxP/lox2272 sites were spaced by a minimal 64 bp (5′ end-to-5′ end) to set the second recombination event distance (128 bp) above 118 bp, at which inefficient recombination has been reported, but at an exact multiple of the helical repeat length (10.6 bp). This repeat length allowed better-aligned loxP sites after DNA looping, thereby maximizing the efficiency of Cre-mediated excision58.

    As proof of principle, this study showed that SEP-GluA2 (3,378 bp), a large fusion protein previously only expressed through electroporation or lentiviral transfection, can be strongly expressed with this vector both in vitro and in vivo (Extended Data Fig. 7). The DIO-SEP-GluA2Q vector harboured Gria2 cDNA unedited at the Q/R editing site (R607Q)59. GluA2 Q/R RNA editing occurs at the pre-mRNA stage and requires a hairpin structure in the adjacent intron, which is absent in this vector. This structure bypasses RNA editing and expression of a calcium-permeable GluA2Q subunit. The DIO-eGFP control virus was similarly generated, replacing SEP-GluA2 with eGFP, for use as a control. These plasmids have been deposited to Addgene for distribution to the scientific community.

    AAV was produced by HHMI-Janelia Viral Tools using a PEI triple transfection protocol into AAV293T cells (an ITR-containing plasmid, 2/9 capsid helper from UPenn Vector Core and the E1-deleted pHelper plasmid from Agilent). The cells were grown under serum-free conditions (three 150 mm culture dishes at about 3 × 107 cells per dish for each 100 µl batch), purified by two rounds of CsCl density gradient centrifugation and exchanged into storage buffer (1× PBS, 5% sorbitol and 350 mM NaCl). Virus titres (GC per ml) were determined by qPCR targeting the AAV ITRs.

    Stereotaxic cranial surgeries

    We used stereotaxic surgery to inject viruses and to implant 4 mm square cranial windows over the left V1. Mice of mixed sex (>6 weeks old) were given carprofen (5 mg kg–1) or buprenorphine (sustained release; 0.5–1.0 mg kg–1) and dexamethasone (4 mg kg–1) for analgesia and were anaesthetized using avertin or isoflurane (1.5–2.5%). We made a craniotomy with a number 11 scalpel blade centred at 2.5 mm lateral and 3.4 mm posterior to bregma.

    For AAV injections, viruses were diluted with sterile PBS to 1–5 × 1013 GC per ml. We injected the solution at 5–10 sites spanning the posterior central area of the craniotomy (corresponding to the V1) with about 100 nl injections at each site at 250 μm below the dura surface. Injections were made using a bevelled glass pipette and a custom mineral oil-based injection system over 2–4 min. We left the pipette in place for another 2–3 min to allow diffusion and to prevent backflow.

    We placed a 4 mm square glass coverslip over the craniotomy and attached a stainless-steel head bar to the skull during surgery to allow rigid head-fixation during imaging. We allowed mice to recover for 1–2 weeks before imaging and handled them extensively to alleviate experiment-related stress.

    For hippocampal experiments, virus injections and cortical excavation or window implantation were done in separate surgeries. We made a small craniotomy over the hippocampus and injected 500 nl of AAV into the CA1 (anterior–posterior (AP): −2.0 mm; medial–lateral (ML) 2.0 mm; dorsal–ventral (DV): −1.4 mm). In the same surgical session, we implanted mice with a stainless-steel head plate (25 × 10 × 0.8 mm with an 8 mm central aperture) horizontally. We allowed mice to recover from surgery for at least 5 days before training sessions. We continued postoperative analgesic treatment with carprofen (5 mg kg–1 body weight) for 3 days after surgery.

    Cortical excavation and hippocampal imaging window implantation were performed >10 days after the initial virus injection per published protocols41. We made a craniotomy (diameter 3 mm) centred at AP −1.5 mm and ML −1.5 mm. Parts of the somatosensory cortex and posterior parietal association cortex were gently aspirated while irrigating with chilled saline. We continued aspiration until the external capsule was exposed. We then gently peeled away the outer part of the external capsule using fine forceps, leaving the inner capsule and the hippocampus undamaged. The imaging window implant consisted of a 3 mm diameter coverslip (CS-3R, Warner Instruments) glued to the bottom of a stainless-steel cannula (3 mm diameter 1.2–1.5 mm height). The window was gradually lowered into the craniotomy using forceps until the glass was in contact with the external capsule. The implant was then affixed to the skull using cyanoacrylate. We allowed mice to recover from window implantation for 2–3 days.

    Awake in vivo 2P fluorescence imaging

    We performed retinotopic mapping60,61 to verify the location of the V1 using optimized protocols and software (https://github.com/ingiehong/retinotopy). We conducted awake in vivo 2P imaging with a custom-built, resonant/galvo 2P laser-scanning microscope (Sutter Instrument) controlled by ScanImage (Vidrio Technologies) and light-proofed to allow imaging in ambient light during visual stimulation. The designs for the head-fixed imaging platform and lightproofing apparatus are available online (https://github.com/ingiehong/StackGPS). We imaged neurons in the L2/3 of monocular V1 expressing eGFP or SEP and jRGECO1a using a ×20/1.0 NA water-immersion objective (Zeiss) and a Ti:Sapphire laser (Coherent Chameleon Ultra; Spectra-Physics Insight X3) tuned at 930 nm or 1,040 nm, respectively, with 20–100 mW of power delivered to the back-aperture of the objective.

    We corrected the lateral motion of acquired image sequences using a rigid motion correction algorithm (NoRMCorre62). Neuronal somata with calcium transients were segmented using a constrained non-negative matrix factorization algorithm63. The source-separated GCaMP or jRGECO1a signal from each neuron was used to estimate various visual response properties of L2/3 neurons.

    Visual stimulation

    Visual stimuli were presented on a gamma-corrected 27″ LED monitor placed 22 cm in front of the centre of the eye contralateral to the hemisphere in which imaging was performed. The visual stimuli consisted of full-screen drifting gratings (4 s of duration, sinusoidal, 0.05 cycles per degree, 1 Hz, 100% contrast) following a 4-s iso-luminant grey screen. Six orientation gratings spaced at 30° were presented drifting in both directions orthogonal to the gratings (total of 12 directions) in a pseudo-randomized order to characterize sensory tuning using Psychtoolbox-3 (ref. 64) and FocusStack/Stimserver65. We used the average response during the 4 s of stimuli across 9–11 presentations to calculate visual responsiveness and orientation and direction selectivity. Visually responsive neurons were defined as cells with significant stimulus-related fluorescence changes (ANOVA across blank and 12 direction periods, P < 0.05)66.

    The orientation and direction tuning curve was constructed by measuring the mean ΔF/F, averaged over the stimulus period for each grating drifting direction θ, denoted as R(θ). The OSI was calculated for visually responsive units21,66,67 with slight modifications on previous definitions67 to avoid values outside the intended interval ([0 1]) and to accommodate occasional bona fide negative responses68,69,70. The preferred drifting direction (θpref) of the cell was determined as the stimuli that induced the greatest responses, \(R({\theta }_{{\rm{pref}}})\) and \({R(\theta }_{{\rm{oppo}}})\), as a sum where \({\theta }_{{\rm{oppo}}}={\theta }_{{\rm{pref}}+18{0}^{^\circ }}\), \(R({\theta }_{{\rm{pref}}}) > R({\theta }_{{\rm{oppo}}})\). The OSI was defined as follows:

    $$\begin{array}{c}{\rm{OSI}}=\frac{R({\theta }_{{\rm{pref}}})+R({\theta }_{{\rm{oppo}}})-R({\theta }_{{\rm{ortho}}+})-R({\theta }_{{\rm{ortho}}-})}{R({\theta }_{{\rm{pref}}})+R({\theta }_{{\rm{oppo}}})},\end{array}$$

    where θorth+ = θpref+90°, θorth– = θpref–90°. All response values were subtracted by the most negative R(θ) when negative responses were present (Rcorrected), which effectively ensured that the relative dynamic range of responses were reflected in the index for which they would otherwise distort the index (leading to values outside [0 1]), or be clipped (when negative values were discarded). Formally,

    $${R}_{{\rm{corrected}}}(\theta )=R(\theta )-\min (0,R({\theta }_{{\rm{pref}}}),R({\theta }_{{\rm{oppo}}}),R({\theta }_{{\rm{orth}}+}),R({\theta }_{{\rm{orth}}-}))$$

    Empirically, this modified index correlates tightly with the OSI calculated using the previous definition67 of orientation index and OSI, is bounded by [0 1] and accommodates tuning curves that are partially or entirely negative. Notably, the trends and results of statistical comparisons in this work did not change with the choice of index definition. The DSI, global OSI (gOSI) and global DSI (gDSI) were defined as follows:

    $${\rm{DSI}}=\frac{R({\theta }_{{\rm{pref}}})-R({\theta }_{{\rm{oppo}}})}{R({\theta }_{{\rm{pref}}})}$$

    $${\rm{gOSI}}=\frac{\left|{\sum }_{k}R({\theta }_{k}){e}^{i2{{\theta }}_{k}}\right|}{{\sum }_{k}R({{\theta }}_{k})}$$

    $${\rm{gDSI}}=\frac{\left|{\sum }_{k}R\left({\theta }_{k}\right){e}^{i{\theta }_{k}}\right|}{{\sum }_{k}R({\theta }_{k})}$$

    gOSI and gDSI gave the same conclusions as OSI and DSI (data not shown). Note that \({R}_{{\rm{corrected}}}\left(\theta \right)\) can also be used in gOSI and gDSI, with the same benefits.

    Head-fixed navigation and hippocampal imaging

    Mice implanted with hippocampal imaging windows were subjected to a custom head-fixed virtual reality environment as previously described41. It consisted of a spherical treadmill monitored by an optical sensor that translated motion on the treadmill into forward motion through the virtual environment. We adjusted the forward gain so that 4 m of distance travelled along the circumference of the treadmill equalled one full traversal along a simulated linear track displayed on monitors surrounding the mouse. The track consisted of textured walls, floors and other 3D-rendered objects at the sides of the track as visual cues. To motivate consistent behaviour, we administered soy-milk rewards (4 µl) when the animal traversed certain locations that were spread at fixed distances along the track, and animals were trained for 5–10 days until they displayed consistent running behaviour before commencing imaging experiments.

    Imaging was performed using a resonant/galvo high-speed laser scanning 2P microscope (Neurolabware) with a frame rate of 30 Hz for bidirectional scanning and a power of 5–20 mW measured at the objective front aperture. The microscope had an electrically tunable, fast z-focusing lens (Optotune, Edmund optics) to switch between z planes within less than a millisecond. Images were acquired through a ×16 objective (Nikon, 0.8 N.A., 3 mm WD). eGFP and jRGECO1a were excited at 930 nm or 1,040 nm, respectively, with a femtosecond-pulsed 2P laser (Mai Tai DeepSee, Spectra-Physics). We scanned 3 imaging planes (about 25 µm z spacing between planes) in rapid alternation so that each plane was sampled at 10 Hz. The planes spanned 300–500 µm in the x/y direction and were placed so that as many labelled neurons as possible were captured. We attached the animal’s head plate to the bottom of an opaque imaging chamber before each experiment to block ambient light from the photodetectors. We fixed the chamber in the behavioural apparatus with the animal. A ring of black foam rubber between the imaging chamber and the microscope objective blocked any remaining stray light.

    Spatial tuning analysis

    We motion-corrected all imaging data line-by-line71 with a 2D hidden Markov model using the software package SIMA71 or with block-wise non-rigid registration through the software package Suite2P72. If no suitable motion correction could be achieved, we discarded the data. To segment interneuron somata, regions of interest (ROIs) were manually drawn using ImageJ (NIH) or automatically drawn by applying Suite2P72. For automated ROI settings, the experimenter subsequently inspected individual ROIs. The average jRGECO1a signal over time was then obtained from each ROI for all runs. We restricted our analysis to mouse running periods with a minimum speed of 5 cm s−1. To obtain baseline-normalized ΔF/F calcium traces, we examined the fluorescence value distribution of the jRGECO1a signal and subtracted and divided the entire trace by the eighth percentile value of this distribution73. In rare instances, individual datapoints were below zero after baseline subtraction, and we set these negative values to zero for further calculations.

    To compute spatial vector tuning, we plotted the mean activity (ΔF/F) of each spatial bin at its respective angle from the start position on the circular track into a polar coordinate system (Fig. 4e and Extended Data Fig. 15c). We then computed the circular mean of this distribution to obtain the mean tuning vector length and angle of the cell. Spatial coherence (Fig. 4f) was determined as the correlation (Pearson’s R) between the mean fluorescence value in each 5-cm bin on the track and its two nearest neighbours, measuring the local smoothness of the spatial tuning curve74. To calculate spatial information (SI; Extended Data Fig. 15e), we computed the average calcium activity (mean ΔF/F) for each 5-cm-wide bin along the linear track to approximate the average firing rate of neurons in that location. SI was then calculated for each cell as \({\rm{SI}}=(\,{\sum }_{i=1}^{N}{\lambda }_{i}{\log }_{2}\frac{{\lambda }_{i}}{\lambda }{p}_{i})\) / λ, where λi and pi are the average calcium activity and fraction of time spent in the ith bin, respectively, λ is the overall calcium activity averaged over the entire linear track, and N is the number of bins on the track. Given the distribution of the underlying values, we plotted the log10 of SI values and compared them statistically (Extended Data Fig. 15e).

    To assess the stability of the spatial representation of a cell within a session, we divided the track into 5-cm bins and calculated the mean ΔF/F value for each bin while the animal was moving on the track with a speed >5 cm s–1 to obtain activity maps for each individual cell. This mapping was done separately for the first and second half of the recording session. We then computed the within-session stability as the cross-correlation between the mean activity maps of the first and second half of the session (Extended Data Fig. 15b,f). We also computed population vector correlations as a function of position in the first and second half of the recording (Extended Data Fig. 15g) to visualize the local similarity of population activity across time. Before computing these correlations, we re-normalized the map of each neuron by subtracting the mean over space and dividing by the standard deviation (z scoring) to mitigate the potential effects of mean rate differences between cells on assessing local population vector similarity.

    Quantification of Gria2 mRNA A-to-I editing rates

    We mapped the raw sequencing reads from a mouse brain scRNA-seq dataset (n = 1,679)14 to the mouse reference genome (GRCm38) with a gene annotation, GENCODE (v.M16)75, using STAR76. The uniquely mapped reads whose sequencing qualities (Phred score) were greater than 20 were counted for the QR and RG RNA-editing sites in Gria2. We filtered out samples if the proportions of the sequencing read with A or G alleles together accounted for less than 95% to avoid potential sequencing errors. We defined the RNA-editing rate for a given site as a ratio of the number of sequencing reads showing G relative to the number of reads with either A or G.

    FACS-assisted RNA-seq of PV interneurons

    To assess transcriptional changes specifically in PV interneurons after removing CP-AMPARs with RNA-seq, we sorted dissociated cortical PV interneurons by their GFP fluorescence using FACS. Dissociation of adult mouse brain neurons leads to a rapid decimation of viable PV interneurons77,78,79, which potentially biases downstream analyses to a select subpopulation of PV interneurons. Various proposed methods to mitigate PV interneuron loss failed to recover them at native cell frequencies in adult mice80. Several fixation-based FACS approaches have been proposed to target immune cells and neurons, but crosslinking leads to lower RNA yield for RNA-seq.

    We developed and used a brain-slice optimized workflow, FICSR-seq (Extended Data Fig. 11a), which recovers PV interneurons vulnerable to dissociation at native cell frequencies. We cut brain slices from adult mice (113.1 ± 11.6 days old) in NMDG cutting solution + trehalose77 and diced them into small pieces <1 mm3. Extracellular proteins were digested with pronase (2 mg ml–1; 8 U µl–1) at 34–37 °C, after which the slice pieces were fixed in 4% paraformaldehyde (PFA) in PBS (with 0.1 U ml–1 RNase inhibitor, Promega) for 15 min and dissociated into single cells through careful trituration. We filtered the single cells through a 40-μm filter, labelled them with the cell-permeable nuclear dye DRAQ5 (1:1,000 dilution) to identify nuclei-containing cells and then subjected them to FACS. DRAQ5+GFP+ or DRAQ5+GFP cells were sorted, and more than 20,000 cells were collected per mouse cortex to provide extensive coverage of low-expressing PV interneuron transcripts.

    We treated the fixed cells with proteinase K before RNA extraction (RecoverAll Total Nucleic Acid Isolation kit for FFPE, Thermo Fisher Scientific) to liberate RNA from protein–protein and protein–nucleic acid crosslinks generated by fixation. We prepared cDNA libraries from GFP+ and GFP samples (NEBNext Ultra RNA Library Prep kit for Illumina, NEB) from RNA enriched with mRNA through bead-based polyA selection. cDNA libraries were barcoded and sequenced together on an Illumina Hiseq 2500 sequencer, generating 150-bp paired-end reads. We processed RNA-seq reads with bcbio-nextgen (v.1.2.3; https://doi.org/10.5281/zenodo.3564938)81, aligning to GRCm38 with the STAR aligner76 and quantifying counts per gene with Sailfish82 using the Ensembl annotation. We used DESeq2 (ref. 83) to analyse differential expression.

    Brain slice preparation and whole-cell patch-clamp recordings

    To test post-critical period electrophysiological properties and to maintain consistency within experiments, we used mice of either sex, aged postnatal day 32 (P32)–P62 for studies of synaptic properties and aged P69–P77 for studies of intrinsic properties. We first anaesthetized mice of either sex using isoflurane. We rapidly removed their brains in an ice-cold sucrose solution containing the following (in mM): 76 NaCl, 25 NaHCO3, 25 glucose, 75 sucrose, 2.5 KCl, 1.25 NaH2PO4, 0.5 CaCl2 and 7 MgSO4, pH 7.3, 315 mOsm. We hemisected the brain along the midline and mounted one or both hemispheres on a 30° ramp. We then sectioned acute parasagittal slices of the visual cortex, 300-μm thick, in the same ice-cold sucrose-cutting solution using a vibratome (VT-1200s, Leica). Slices were incubated in warm (32–35 °C) sucrose solution for 30 min and then transferred to warm (32–35 °C) artificial cerebrospinal fluid (aCSF) composed of the following (in mM): 125 NaCl, 26 NaHCO3, 2.5 KCl, 1.25 NaH2PO4, 1 MgSO4, 20 d-(+)-glucose, 2 CaCl2, 0.4 ascorbic acid, 2 pyruvic acid and 4 l-lactic acid, pH 7.3, 315 mOsm. Slices were then allowed to cool to room temperature. For rectification measurements, we cut coronal slices with a NMDG-based cutting solution and incubated them for >15 min. Then we transferred them to aCSF (see the section ‘Analysis of AMPAR rectification’). All solutions were continuously equilibrated with 95% O2 and 5% CO2.

    We transferred slices to a submersion chamber on an upright microscope (Zeiss AxioExaminer; ×40 objective, 1.0 NA) and continuously superfused (2–4 ml min–1) them with warm (about 32–34 °C) oxygenated aCSF. We visualized neurons with a CCD camera (Sensicam QE, Cooke) using either infrared differential interference contrast (IR-DIC) microscopy or epifluorescence. The visual cortex was identified based on the relative position of the cortex and hippocampus and the anatomical borderline between the visual cortex and retrosplenial dysgranular cortex. We selected slices in which the apical dendrites of infragranular pyramidal neurons ran parallel to the plane of the slice up through L2/3 in the area targeted for recording. PV interneurons were targeted for recording based on eGFP or SEP-GluA2 expression along with unlabelled L2/3 pyramidal neurons. We filled patch pipettes (2–4 MΩ) pulled (P-97, Sutter Instrument) from borosilicate capillary glass (Sutter Instrument) with an internal solution containing (in mM): 2.7 KCl, 120 KMeSO3, 9 HEPES, 0.18 EGTA, 4 ATP magnesium salt, 0.3 GTP sodium salt and 20 phosphocreatine disodium salt, adjusted to pH 7.3, 295 mOsm. For recordings of PV interneurons, the internal solution included 0.25% w/v biocytin. Whole-cell patch-clamp recordings were obtained using Multiclamp 700B amplifiers (Molecular Devices) and digitized using an Instrutech ITC-18 (HEKA) and software written in Igor Pro (Wavemetrics). All signals were low-pass filtered at 10 kHz and sampled at 20–100 kHz. Neurons with an access resistance >30 MΩ or a resting membrane potential greater than −60 mV were not used for further recordings or analyses. The access resistance was not compensated in current clamp, and recordings were not corrected for the liquid junction potential.

    Analysis of intrinsic excitability, synaptic connectivity and synaptic plasticity

    We measured the resting membrane potential (RMP) shortly after establishing the whole-cell current-clamp recording configuration. A 1-s hyperpolarizing current (−100 pA) pulse was used to calculate the input resistance of recorded neurons. To assess the spiking behaviour of the cell, we injected 1-s depolarizing current steps into the recorded neurons. We measured the current–spike frequency relationship with a range of depolarizing current steps presented in pseudorandom order (1-s long, 40-pA increments, 5-s inter-stimulus intervals). Each current intensity was tested three times. For each current intensity, we counted the total number of action potentials exceeding an amplitude of 0 mV generated during each current step, then averaged the values across the three trials. We determined the rheobase by first probing the response of the neuron with 1-s-long depolarizing steps (5-s inter-stimulus intervals) to define a small range of current steps that bounded the rheobase. We then tested the neuron response within this range using 1-s-long depolarizing steps with 1-pA increments. We measured action potential properties from single spikes evoked by rheobase current injections. To compare the current–spike frequency relationship and rheobase between cells from the same baseline, we held cell membrane potentials at −70 mV when injecting depolarizing current steps. We performed all electrophysiological recordings that were assessing the intrinsic properties of PV interneurons in the presence of the following blockers of glutamate and GABA receptors (all from Tocris Bioscience): 5 µM NBQX (AMPA receptor antagonist); 5 µM (RS)-3-(2-carboxypiperazin-4-yl)-propyl-1-phosphonic acid (NMDA receptor antagonist); and 10 µM 6-imino-3-(4-methoxyphenyl)-1(6H)-pyridazinebutanoic acid hydrobromide (SR95531; GABAA receptor antagonist).

    To determine the properties of unitary synaptic connections among neurons, we generated two action potentials in the presynaptic neuron by injecting short, depolarizing current steps (3-ms pulse duration, 20 Hz, 10-s inter-trial interval). We held pyramidal neurons and PV interneurons at approximately −55 mV and −70 mV during synaptic connectivity tests to detect inhibitory postsynaptic potentials (IPSPs) and EPSPs, respectively. We assessed synaptic connectivity (EPSP or IPSP) with an average of 10–50 trials. A synaptic connection was detected if the first response amplitude of the average trace was >3 times the root mean squared of the average trace during baseline conditions and visually verified. We calculated the paired-pulse ratio by dividing the amplitude of the second postsynaptic potential by the first.

    We subjected a subset of connected pyramidal→PV pairs, all of which exhibited an average EPSP amplitude of >0.3 mV at baseline, to an anti-Hebbian protocol. After recording 50 traces (6 Hz) as a baseline, we induced synaptic plasticity by pairing 400 presynaptic action potentials delivered at 5 Hz with continuous hyperpolarization of the postsynaptic PV interneuron to –90 mV25,84. After induction, EPSPs were recorded under the same conditions as the baseline measurement (50 traces in response to presynaptic action potentials, 6 Hz).

    Analysis of AMPAR rectification

    To measure AMPAR rectification85,86,87,88, we cut coronal brain slices in ice-cold cutting solution containing (in mM) 96 NMDG, 2.5 KCl, 1.25 NaH2PO4, 25 NaHCO3, 25 d-(+)-glucose, 10 MgSO4, 0.5 CaCl2, 96 HCl, 20 HEPES, 12 N-acetylcysteine and 5 sodium l-ascorbate, and oxygenated with carbogen gas (95% O2 and 5% CO2). The 300-µm-thick slices were kept in aCSF (125 NaCl, 2.5 KCl, 2 MgCl2, 2 CaCl2, 1.0 NaH2PO4, 26.2 NaHCO3 and 11 glucose) and oxygenated with carbogen gas at 23–25 °C until they were transferred for recording to a submerged chamber superfused with aCSF (1–3 ml min–1) supplemented with about 50 µM picrotoxin and 100 μM APV (2-amino-5-phosphonovaleric acid) to isolate AMPAR-mediated excitatory synaptic transmission.

    We made targeted whole-cell recordings of eGFP/SEP-GluA2-positive L2/3 PV interneurons using pipettes of 3–5 MΩ resistance. The intracellular solution contained (in mM): 115 CsMeSO4, 0.4 EGTA, 5.0 TEA-Cl, 1 QX314, 2.8 NaCl, 20 HEPES, 3.0 ATP magnesium salt, 0.5 GTP sodium salt, 10 phosphocreatine disodium salt and 0.1 spermine and was adjusted to pH 7.2, 285–290 mOsm. When we achieved whole-cell mode, we allowed >5 min for dialysis of the intracellular solution before collecting data. We held cells at −70 mV holding potential and recorded them at room temperature. We left the junction potential (about 11 mV) uncorrected. Signals were measured with a MultiClamp 700B amplifier, digitized using a Digidata 1440A digitizer (Molecular Devices) at 20 kHz and acquired with pClamp 10 software (Molecular Devices). We recorded AMPAR currents at 11 membrane potentials to construct a current–voltage (IV) plot (Vh = −60 to +60 mV, except for a subset of pyramidal neurons recorded for comparison up to +50 mV). We calculated the rectification index as a weighted ratio of negative (−60 mV) and positive (+60 mV) currents. We compensated for the junction potential (11 mV): rectification index (RI) = (I–60 mV/–71)/(I+60 mV/49). An AMPAR rectification index of 1 represented perfect linearity, whereas values <1 indicate inward rectification. We estimated the reversal potential (Erev) by cubic polynomial regression that fitted the linear, rectifying and double-rectifying AMPAR IV curves well.

    Immunohistochemistry

    We deeply anaesthetized mice with isoflurane then transcardially perfused them with PBS and 4% PFA. We removed and post-fixed the brain in 4% PFA–PBS for >2 h. We sectioned the brain coronally into 25 μm slices using a vibratome (VT-1000, Leica). We acquired marmoset brains post-mortem from terminal experiments and sliced them into 40 µm sections. Free-floating sections underwent antigen retrieval using LAB solution (Polysciences) when necessary and were blocked and permeabilized in 3% BSA with 0.3% Triton X-100 in PBS for 1 h at room temperature. We incubated sections with primary antibodies overnight at 4 °C, washed them with PBS 3 times for 5 min, and then incubated them with secondary antibodies for 2 h at room temperature. After another round of washes, we mounted the slices on glass slides in PermaFluor mounting medium (Thermo Fisher Scientific) and imaged them using a laser scanning confocal microscope (Zeiss LSM880). Controls were carefully carried out, including antibody staining of homozygous knockout mice (Extended Data Fig. 2) to ensure antibody specificity. For GluA1 and GluA2 quantification, ROIs were made around cell somas, and the background signal was subtracted to estimate protein levels.

    The following primary antibodies were used: rabbit anti-parvalbumin (1:2,000, PV25, Swant); goat anti-parvalbumin (1:1,000, PVG-213, Swant); rat anti-somatostatin (1:200, MAB354, Chemicon); mouse anti-CaMKIIα (1:1,000, sc-32288, Santa Cruz); rabbit anti-GluA1 (1:1,000, JH4294, generated in-house); mouse anti-GluA2 (1:5,000; clone 15F1, gift from E. Gouaux); chicken anti-GFP (1:1,000, GFP-1020, Aves); and rabbit anti-dsRed2 (1:1,000, 632496, Clontech). The following secondary antibodies were used: Alexa Fluor 405 donkey anti-goat (1:1,000, ab175665, Abcam); Dylight 405 goat anti-mouse IgG2a (1:1,000, 115-477-186 Jackson ImmunoResearch); Alexa Fluor 488 goat anti-mouse IgG2a (1:1,000, A-21131, Thermo Fisher Scientific); Alexa Fluor 488 goat anti-chicken (1:1,000, A-11039, Thermo Fisher Scientific); Alexa Fluor 546 goat anti-rabbit (1:1,000, A-11035, Thermo Fisher Scientific); Alexa Fluor 568 goat anti-mouse IgG1 (1:1,000, A-21124, Thermo Fisher Scientific); Alexa Fluor 568 goat anti-rabbit (1:500, Thermo Fisher Scientific); Texas Red donkey anti-goat (1:1,000, SAB3700332, Millipore Sigma); Alexa Fluor 647 goat anti-rabbit (1:1,000, A-21245, Thermo Fisher Scientific); Alexa Fluor 647 goat anti-mouse IgG2a (1:1,000, A-21241, Thermo Fisher Scientific); Alexa Fluor 647 donkey anti-goat (1:1,000, A-21447, Thermo Fisher Scientific); and Alexa Fluor 647 goat anti-rat (1:500, A-21247, Thermo Fisher Scientific).

    Computational modelling

    The low feature selectivity of PV neurons17,18,19,20,21,89 (but see refs. 22,90,91,92) and the enhancement in PV-Cre;lsl-eGFP-GluA2 mice could result from several mechanisms. We used computational models to identify which mechanisms are consistent with the observed link between CP-AMPARs and feature selectivity. We examined the impact of three observed electrophysiological circuit changes: (1) increased intrinsic excitability (Extended Data Fig. 10o); (2) the loss of inward-rectifying AMPARs (Extended Data Fig. 7e,f); and (3) enhanced LTD (Extended Data Fig. 10l). Each mechanism was incorporated into a variation of a common base model. This model comprises a single PV neuron receiving excitatory inputs from a set of presynaptic pyramidal neurons with predefined stimulus tuning (Fig. 5a). The output of the PV neuron is a firing rate that is computed as a weighted sum of the inputs. Negative inputs are rectified to ensure a positive firing rate. To endow the PV neuron with stimulus tuning, pyramidal–PV connectivity was modelled as bell-shaped around the preferred orientation of the PV neuron (Fig. 5b), which enabled these neurons to inherit their tuning from pyramidal cells (Fig. 5c). We adjusted the parameters of pyramidal selectivity and connectivity to match the observed PV (and pyramidal) selectivity in the data.

    Modelling increased intrinsic excitability

    PV interneurons without CP-AMPARs showed increased intrinsic excitability (Extended Data Fig. 10o). PV neuron activation typically requires the coincident activation of multiple excitatory synaptic inputs93,94. However, the reduced rheobase, and increased RMP and input resistance in PV-Cre;lsl-eGFP-GluA2 mice suggested some strong synapses may reach the activation threshold unilaterally, which may increase selectivity95. To test whether this alone could account for the increased stimulus selectivity of PV interneurons, we increased the excitability of the PV model neuron by introducing a positive baseline current to the PV cell, mirroring the empirical shift of the frequency–current (FI) curve (Extended Data Fig. 16a,b). We discovered that increased excitability reduced stimulus selectivity, contradicting the experimental observation. The response of the PV neuron was increased for all stimuli, thereby reducing the relative magnitude of the preferred response when compared with non-preferred responses (Extended Data Fig. 16c). This held for any rise in intrinsic excitability, regardless of a potential reduction in unitary EPSP amplitude (Extended Data Fig. 10f) when implemented as synaptic scaling (Extended Data Fig. 16d). We also simulated a scenario whereby enhanced intrinsic excitability was adjusted such that it homeostatically maintained the mean rate of the neuron by compensating for a multiplicative decrease in EPSPs (Extended Data Fig. 16e). In this scenario, stimulus selectivity was also reduced (Extended Data Fig. 16f–h). In conclusion, nonselective mechanisms such as increased intrinsic excitability and synaptic downscaling are insufficient to increase stimulus selectivity in the model.

    Modelling removal of inward-rectifying AMPAR current

    CP-AMPARs are inward-rectifying, which means that their conductance decreases with increasing postsynaptic potential (Extended Data Fig. 7e,f). This implies that they could become less effective for coincident stimuli that induce a strong postsynaptic response. To model this effect, we introduced a dependence of synaptic weights on the postsynaptic potential of the PV interneuron. In this model, we used conductance instead of current-based synapses to allow for a better comparison with experimentally measured current–voltage relationships. We modelled each synaptic weight as the sum of two components (Fig. 5d). The first represents CP-AMPARs and weakens with increasing postsynaptic potential. The second symbolizes other calcium-impermeable AMPARs unaffected by postsynaptic potential (Fig. 5d, dashed line), except due to changes in synaptic drive. We systematically varied the amount of CP-AMPARs relative to calcium-impermeable AMPARs and the membrane potential at which they inactivate (inactivation threshold). The intuition behind CP-AMPARs influencing stimulus selectivity is that they should remain open for weak (that is, non-preferred) stimuli but deactivate for strong (that is, preferred) stimuli. PV neurons fire at high frequencies, which makes this more relevant, and compartmentalized dendritic depolarizations could further exacerbate this effect. This would selectively enhance the response to non-preferred stimuli, thus reducing stimulus selectivity. Conversely, eliminating CP-AMPARs would enhance stimulus selectivity. Indeed, we observed that removing the CP-AMPAR component reduced the response to non-preferred stimuli without affecting preferred stimuli, thereby increasing stimulus selectivity (Fig. 5e,f and compare with Extended Data Fig. 9c and Fig. 2e). This effect was robust to variations in the relative abundance of the CP-AMPARs and their inactivation threshold (Fig. 5g).

    A qualitatively similar outcome emerged from applying a previously measured empirical IV curve from Gria2–/– mice96 to estimate inward rectification (Extended Data Figs. 16 and 7e,f). Systematically varying the proportion of CP-AMPARs in the PV neuron model revealed that orientation selectivity monotonically decreases as the proportion of CP-AMPARs increases (Extended Data Fig. 16f). Two previous papers have examined the potential impact of CP-AMPARs on postsynaptic activation from slightly different perspectives of EPSC kinetics and dendritic summation sublinearity93,97, and both arrived at conclusions similar to ours. In conclusion, increased stimulus selectivity may be due to the removal of CP-AMPAR-mediated inward rectification.

    Modelling increased LTD

    Pyramidal–PV connections exhibited exaggerated LTD in PV-Cre;lsl-eGFP-GluA2 mice compared with control mice (Extended Data Fig. 10l). This could enhance selectivity by weakening synaptic inputs from pyramidal cells tuned to non-preferred stimuli. We modelled this scenario by introducing synaptic plasticity in the pyramidal–PV synapses. Synaptic weights changed according to a Bienenstock–Cooper–Munro (BCM) rule, which has been broadly studied as a model for the development of stimulus selectivity98. The BCM learning rule is an associative rule that changes synapses when the presynaptic (pyramidal) neuron and the postsynaptic (PV) neuron are simultaneously active. However, the direction of the change is determined by the postsynaptic firing rate. When PV activity is below a threshold, synaptic efficacy decreases. If PV activity surpasses the threshold, synaptic efficacy increases (Fig. 5h). Here we used a fixed instead of the typical activity-dependent threshold in the classical BCM model. This allowed us to test the effect of increased LTD by varying the threshold. Specifically, we increased the LTP–LTD threshold to model the exaggerated LTD in PV-Cre;lsl-eGFP-GluA2 mice (Fig. 5h and Extended Data Fig. 10l). This weakened synapses from pyramidal cells activated for stimuli that elicit only a weak response in the PV cell (Fig. 5i). The exaggerated LTD consequently reduced the PV response to non-preferred stimuli (Fig. 5j) while enhancing its response to preferred stimuli. The resulting boost in selectivity was observable across a wide range of LTD–LTP thresholds as long as the threshold was within the range of PV responses (Fig. 5k). We conclude that increased selectivity could arise from changes in synaptic plasticity if this plasticity, in a BCM-like manner, can generate both potentiation and depression, and if depression is exaggerated after the removal of CP-AMPARs.

    Conclusions of modelling studies

    These modelling studies demonstrate that the inward-rectifying nature of the CP-AMPAR ion channel and the exaggerated LTD observed in PV-Cre;lsl-eGFP-GluA2 mice can both effectively reduce responses to non-preferred stimuli, thereby accounting for the increases in orientation selectivity. However, neither the rise in intrinsic excitability nor a potential general reduction in excitatory input in PV interneurons due to GluA2 expression can explain the increase in orientation selectivity. These modelling findings imply that acute rectification and cumulative plasticity triggered by resident CP-AMPARs may sufficiently account for their role in maintaining low selectivity. Determining the extent of contribution of these two mechanisms to sensory selectivity in vivo poses a challenging question, which will necessitate rigorous empirical investigation in the future.

    Network modelling architecture

    The model was a feed-forward rate network of n presynaptic pyramidal neurons and a single postsynaptic PV neuron. We first describe the base model and then its elaborations. The presynaptic pyramidal neurons were tuned to stimulus direction and orientation according to a mixture of von Mises distributions. Specifically, the response of the ith pyramidal cell to a moving grating with direction θ was given by the following:

    $${r}_{i}(\theta )\propto (1-\alpha )\cdot \exp (\kappa \cdot \cos (\theta -{\theta }_{i})+\alpha \cdot \exp (\kappa \cdot \cos (\theta -{\theta }_{i}-180))$$

    The proportionality sign indicates a normalization between a minimum of 0 and a maximum of 1 across stimuli. Here θi is the preferred direction of the cell, κ determines its tuning width and α controls the strength of direction tuning (κ = 2 and α = 0.5). The preferred directions of the pyramidal cells were equally spaced in the interval [0,2π). The tuning of the PV cell was determined by the pyramidal tuning and the pyramidal-to-PV connectivity. Without loss of generality, we defined the preferred orientation of the PV cell to be 0°. The connectivity from the ith pyramidal cell onto the PV cell was given by a single von Mises distribution:

    $${w}_{i}\propto \exp (\kappa \cdot \cos (-{\theta }_{i})),\kappa =3$$

    Weights were normalized across presynaptic cells, such that the minimum and maximum weights were equal to 0 and 1, respectively. The connectivity and pyramidal response together defined the PV voltage and rate using the following equations:

    $$\tau \frac{{\rm{d}}u}{{\rm{d}}t}=-\,u\left(t\right)+\mathop{\sum }\limits_{i=1}^{n}\,{w}_{i}{r}_{i}\left(\theta \right)$$

    Here, τ = 10 ms denotes the membrane time constant. To simulate the PV activity from these equations, we used forward Euler discretization with a time step Δt = 1 ms. We simulated a time T = 100 ms unless specified otherwise and confirmed that the system had reached its steady state. This steady-state activity was used to compute tuning curves.

    Intrinsic excitability

    We fitted the change in the empirical IF curve by numerically finding the shift that minimized the squared difference between the PV-Cre;lsl-eGFP-GluA2 and the PV-Cre;lsl-eGFP mean values. This was done using the minimize_scalar method of SciPy99 with the shift as the optimization parameter. In the model, we increased the intrinsic excitability by adding an untuned positive baseline input I0:

    $$\tau \frac{{\rm{d}}u}{{\rm{d}}t}=-\,u\left(t\right)+\mathop{\sum }\limits_{i=1}^{n}\,{w}_{i}{r}_{i}\left(\theta \right)+{I}_{0}.$$

    We varied I0 between 0 and 10. Note that firing rates, membrane potential, weights and currents are unitless in our model. This does not alter the results, because orientation tuning is assessed based on relative rates. Decreases in unitary EPSPs were modelled by downscaling the synaptic weights with a factor p:

    $$\tau \frac{{\rm{du}}}{{\rm{d}}t}=-\,u\left(t\right)+p\cdot \mathop{\sum }\limits_{i=1}^{n}\,{w}_{i}{r}_{i}\left(\theta \right)+{I}_{0}.$$

    We downscaled the weights in two different ways. In Extended Data Fig. 16d, we used p = 0.62, reflecting the mean empirical reduction in EPSPs (Extended Data Fig. 10f). To investigate the effect of homeostatic increases in excitability, we used the minimize_scalar function to find the scaling that would keep the average PV rate constant given a specific increase in its excitability I0.

    Inward rectification

    We modelled the inward-rectifying calcium currents by adding a voltage-dependent weight scaling p(u) to the PV dynamics. We also introduced conductance-based synapses to allow for a better comparison with experimental data:

    $$\tau \frac{{\rm{d}}u}{{\rm{d}}t}=-\,u\left(t\right)+p\left(u\right)\cdot \mathop{\sum }\limits_{i=1}^{n}\,{w}_{i}{r}_{i}\left(\theta \right)\cdot \frac{{u}_{0}-u}{{u}_{0}}.$$

    Here, u0 = 30 is the reversal potential. In our simulations, the precise value of u0 and the choice for conductance versus current-based synapses scale the postsynaptic responses without strongly affecting relative stimulus tuning in different conditions. The scale p smoothly increases for decreasing voltages:

    $$p(u)=1+\frac{A}{2}\cdot [\tanh (\,-\,\beta (u-M))+1].$$

    This is a decreasing sigmoid function between 1 and A, with a slope β and a midpoint M. The midpoint M describes the threshold potential at which the CP-AMPARs deactivate, and β how sensitive the inactivation is to the membrane potential. A quantifies the abundance of rectifying AMPARs relative to the number of non-rectifying AMPARs. We varied A between 0 and 3 and M between 0 and 5; we fixed β to 0.5. The removal of CP-AMPARs was modelled by fixing p to 1. We increased the width of the presynaptic tuning to κ = 3.6 to achieve approximately equal selectivity in the presence of rectification.

    In addition to this idealized model of inward rectification, we also simulated a data-driven model. Our starting point were previously measured current–voltage relationships96 (Extended Data Fig. 16i). These data were collected in excitatory cells of wild-type and Gria2–/– mice, which allowed for a direct comparison of calcium permeable (CP) and calcium-impermeable (CI) receptors. Specifically, we used these published measurements96 to estimate the normalized conductance at each voltage as the ratio I/V (Extended Data Fig. 16j). We did this for both wild-type and GluA2 traces, and normalized each between 0 and 1. This resulted in scaling factors \({p}_{{\rm{CP}}}\left(u\right)\) and \({p}_{{\rm{CI}}}\left(u\right)\) that represent the strength of CP and CI receptors, respectively, in our model (Extended Data Fig. 16k). Their convex sum determined the total synaptic rectification:

    $$p\left(u\right)=\lambda {\cdot p}_{{\rm{CP}}}\left(u\right)+\left(1-\lambda \right)\cdot {p}_{{\rm{CI}}}\left(u\right).$$

    We found that orientation selectivity slowly but monotonically decreased with increasing λ (Extended data Fig. 16l–n). In the data-driven model, neurons with a larger relative abundance of CP receptors therefore have a weaker orientation selectivity, consistent with the idealized model and with our experimental findings.

    Plasticity

    We modelled synaptic plasticity using a plasticity rule inspired by BCM theory98. According to BCM, the change in synaptic efficacy is given by:

    $$\Delta w=\eta \cdot {r}_{\text{pre}}\cdot {r}_{\text{post}}\cdot ({r}_{\text{post}}-{\theta }_{{\rm{BCM}}}).$$

    Here η = 0.02 is a small learning rate that controls the speed of learning but does not affect the outcome. rpre and rpost are the presynaptic and postsynaptic rates, respectively, and θBCM is the threshold between LTD and LTP. In most applications of the BCM rule, this threshold is adaptive and depends on the recent PV activity. Here we fixed it to a single value per experiment to allow full control over the amount of LTD. Specifically, LTD was implemented by increasing the threshold from 8 to 10 Hz. We further varied the threshold between 6.5 and 11 Hz. As the empirical response distribution seems to be largely unaffected by CP-AMPAR removal, we added synaptic scaling100 to keep the mean postsynaptic rate constant:

    $$w\to w\cdot \frac{{r}^{* }}{\bar{r}}.$$

    Here r* is the target mean rate, which we fixed to the mean rate across stimuli before the onset of plasticity. The mean rate \(\bar{r}\) was computed after every weight update by averaging across all stimuli. In the plasticity experiments, we first simulated T = 100 time steps without plasticity to allow the system to reach a steady state. At subsequent time steps, we computed Δw for each individual stimulus, and used the average Δw across stimuli to update the weights. This continued until the weights and rates converged to a new steady state.

    Statistical analysis and reproducibility

    We performed statistical tests in Matlab (Mathworks), Prism (GraphPad) or R. Data distributions were tested for normality using Shapiro–Wilk test. We used parametric tests if the data were normally distributed and nonparametric otherwise, as detailed in the text describing each comparison. For parametric tests, we used unpaired or paired t-tests and one-way or two-way ANOVA tests with Tukey’s post hoc multiple comparison correction (all two-sided). For data that did not follow normal or log-normal distributions, we used the following statistical tests where appropriate: Mann–Whitney U-test (Wilcoxon rank-sum test), Kruskal–Wallis one-way ANOVA with Dunn’s post hoc multiple comparison correction (all two-sided). For categorical data, we used Fisher’s test or χ2 with or without Yates correction according to degrees of freedom and sample size. We report centre and spread values as the mean ± s.e.m. or median ± interquartile range unless otherwise stated. We did not use statistical methods to plan sample sizes, but used sample sizes similar to those frequently used in the field. The text or figure legends include the number of animals and cells. We did not use randomization, and data collection and analyses were not performed blind to the conditions of the experiments unless otherwise stated. P values < 0.05 were considered to be significant. When we used a statistical test, the P value is noted either in the manuscript text or depicted in figures and legends as follows: *P < 0.05, **P < 0.01, ***P < 0.001, ****P < 0.0001, NS, not significant, P ≥ 0.05. Representative examples such as traces and micrographs were chosen from at least three or more independent experiments.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Neural circuit mechanisms underlying context-specific halting in Drosophila

    [ad_1]

    Experimental animals

    We used Drosophila melanogaster raised on standard cornmeal-agar medium supplemented with baker’s yeast and incubated at 25 °C with 60% humidity and a 12 h light–dark cycle throughout development and adulthood unless otherwise stated. The optogenetic manipulation experimental flies were collected on retinal food and again transferred to fresh retinal food 1–2 days before testing. Retinal food contains standard fly food with freshly added 400 μM all-trans retinal (Sigma-Aldrich, catalogue no. R2500). These flies were kept in the dark for their entire life-cycle until test. Age and sex of animals tested is indicated in the sections below. All full experimental genotypes, exact sample size per genotype and source of the genetic reagents are described in Supplementary Tables 1 and 2.

    Identification and generation of halt neuron specific drivers

    The neural-activation screen was composed of an extended version of our previously published work19 with added lines from the SEZ-split-Gal4 collection20. Whereas in our previous work19 we focused on lines that increased walking on optogenetic stimulation, here we focused on lines that decreased walking. We could narrow the set of interesting lines to 11 drivers based on their locomotor phenotype and expression levels. Among the SEZ lines, we focused on three lines (SS40909, SS31326, SS31328) in which we could unambiguously identify the neurons as FG and BB both in the light microscopy24 as well as electron microscopy8,28,29,61 datasets. Additionally, we found three Gal4 drivers that drove the strongest halting phenotypes (R37F06, R36G02, VT12408). By comparing available or generated stochastic labelling images (we performed this for VT012408 as described in ref. 19, MCFO images were available for R36G02 and R37F06, ref. 24), we identified that these three lines labelled BRK neurons. To validate this further, we devised a split-Gal4 screen with R36G02-Gal4DBD and candidate BRK targeting p65-ADs identified by using the NeuronBridge toolkit24. This (Extended Data Fig. 1d) helped generate split-Gal4 drivers for labelling BRK neurons (Fig. 1).

    Identification of neurons in connectome

    We used image database search tools24,25 and co-ordinate transform tools23,26 to identify neurons across light microscopy and electron microscopy datasets. Maximum intensity colour-depth images from light microscopy and electron microscopy for each neuron used in this study are shown in Extended Data Fig. 5a. Electron microscopy identifiers of all neurons from this work are detailed in Supplementary Table 3. Further details of comprehensive DN and AN proofreading and identification in the FlyWire and FANC datasets are now reported in ref. 62.

    Optogenetic activation in untethered animals

    All optogenetic activation experiments in untethered animals were performed using 6–9-day-old female flies. The flies were loaded in behavioural arenas as described in ref. 19 (44 mm bowl-shaped arena made of 1.5% agarose gel). The videos were recorded as in ref. 19 using a FLIR BlackFly-S camera (FL3-U3-13Y3M-C) at a resolution of 1,280 × 1,024, at 30 Hz. The camera was fitted with an adjustable focus lens (LMVZ990-IR) and near infrared bandpass filter (Midopt BP850) to allow infrared imaging without artefacts from visible light. A custom designed light-emitting diode (LED) panel19 provided backlit illumination with infrared (850 nm), green (530 nm) or red (630 nm) light. Both intensity and pulsing of each wavelength could be independently controlled and synchronized to the recording camera through transistor–transistor logic pulses generated using a custom Arduino circuit. The bowl-shaped arena was backlit with infrared light (850 nm) for video recording. We also provided continuous dim green light (0.0031 mW mm−2) during all optogenetic activation experiments to avoid a jumping response in flies due to sudden bright red light exposure. The green light level was adjusted as to not drive optogenetic stimulation even in a very sensitive reagent (MDN>CsChrimson). All experiments were performed at 25 °C unless stated otherwise. Videos were tracked using FlyTracker software63 and data were analysed in MATLAB.

    Activation in free-walking flies

    Experimental flies were loaded in the setup described above, and allowed to walk freely to be assayed for optogenetics induced halting (Figs. 1a–c and 2 and Extended Data Figs. 1, 2d–g, 4b,c and 9e). The light stimulation protocol consisted of red light pulsed at 50 Hz (5 ms pulse width, average intensity at arena surface of 0.038 mW mm−2) in a sequence of 50 s OFF/10 s ON, repeated five times. A trial was defined as 10 s OFF followed by 10 s ON for analysis.

    Activation in powdered flies

    Flies were covered with powder (Reactive Yellow 86, Santa Cruz Biotechnology, catalogue no. sc-296260) to induce grooming19,48. Powdered flies were loaded in bowl-shaped arenas described above, and assayed for walking initiation with red light intensity of 0.04 mW mm−2 pulsed at 100 Hz (Fig. 3j). The light stimulation protocol consisted of 50 s OFF/10 s ON sequence, repeated five times. For analysis, 10 s OFF followed by 10 s ON was considered as one trial.

    Data analysis

    FlyTracker63 output was used to quantify translational and angular velocities as in ref. 19. Angular velocity values correspond to ‘absolute angular velocity’. Rotation is defined as integral of angular velocity as in ref. 19. Pivots were defined as time periods with high angular velocity (more than two rotations per second) and low translational velocity (less than 5 mm s−1) after smoothing with 0.5 s window. These pivot thresholds are set based on empirical observation, as well as previous literature64,65,66 indicating values for slow walking and high turning. For coactivation experiments (Fig. 2), distance and rotation were calculated for the entire stimulation duration or just first 2 s of stimulation as indicated. In all experiments in Fig. 2 in which we compared coactivation of walk + halt neuron phenotypes, we restricted statistical analysis to a period of 2 s after stimulation onset. All walk activation phenotypes start declining after this 2 s mark. Moreover, in case of MDN activation, the flies start switching between backward and forward bouts after this 2 s mark. This 2 s period was thus selected to restrict the analysis to the clean and strong part of the walk phenotype. The results were identical if the time window was changed 2 ± 1 s.

    Optogenetic silencing in untethered animals

    All optogenetic silencing experiments were performed using 6–9-day-old female flies (unless stated otherwise) in the same setup and tracking and analysis pipeline as the activation experiments. The 530 nm green LED used for silencing was adjusted to 0.0255 mW mm−2 average intensity at the arena walking surface to silence neurons expressing GtACR1.

    Silencing in free-walking flies

    Flies were loaded in bowl-shaped chambers kept at 30 °C (to elevate baseline walking) and assayed for decrease in walking velocity on silencing (Fig. 3k). The light stimulation protocol consisted of a 60 s OFF/30 s ON sequence, repeated three times, for a video duration of 5 min.

    Silencing in powdered intact flies

    Flies were powdered as described above and assayed for interruption of grooming (Fig. 6i). The green light stimulation protocol consisted of 60 s OFF followed by continuous ON for a duration of 6 min.

    Silencing in powdered decapitated flies (assay for tripping quantification)

    The flies were decapitated using forceps and the neck was sealed using ultraviolet-cured glue (Bondic). Flies that recovered well from this procedure (based on good self-righting and grooming behaviours) were chosen for experiments. The experimental flies were powdered (as mentioned above) and loaded in flat-floor arenas (50 mm diameter and 3 mm height described in ref. 19). The light stimulation protocol consisted of 30 s OFF/10 s ON sequence of green light, repeated three times, for a video duration of 3 min. The flies that lost balance and ended in an upside-down position (with all legs off the ground) in at least one out of three light ON periods were recorded as tripped (Fig. 6l and Supplementary Video 10).

    Data analysis

    Velocities, distance and rotation were quantified as stated above. Stopping events were defined as instances in which smoothed translational velocity (1.5 mm s−1) was below a threshold defined previously31. Tripping events were quantified manually.

    Feeding related neuronal silencing assays

    Here, 1–3-day-old female flies were transferred to retinal food and allowed to feed for 4 days. Flies were then wet-starved with 0.4 mM retinal in water before testing to induce starvation.

    Sugar preference assay

    This assay was performed using previously described setup and conditions42. Here, 36-hour starved female flies were loaded in flat-floor circular behavioural arenas (50 mm diameter) described above. The circular arena floor was covered with two halves of semi-circular filter paper, which had been soaked with either water or 2 M sucrose and left to dry overnight. Flies were introduced into the chamber and allowed to explore and choose a preferred side for a duration of 4 min (Fig. 5e). Green light was provided throughout assay duration for GtACR1-based neuronal silencing. By the time video recording started, most flies had encountered both sides of the chamber, implying that at t = 0 flies are considered as having been exposed to sucrose. Video recording, tracking and analysis was performed as described above.

    Sucrose-blob interaction assay

    A 5 µl drop (3 mm diameter) of 1% agarose solution containing 200 mM sucrose was placed in the centre of the flat circular arena (50 mm diameter). One fly per arena was loaded and allowed to explore and find the sucrose drop. Green light was provided throughout the assay duration for GtACR1-based neuronal silencing as described above. Flies that encountered the sucrose before the video recording started were discarded from the analysis to ensure accurate capture of the first feeding bout. Video recording and tracking was performed as described above. A fly within 3 mm from the centre of the sucrose blob was considered as interacting with it (as both the sucrose blob and the fly are similar size; that is, roughly 3 mm). The food-zone was then defined as 6-mm-diameter circle centred around the sucrose blob (Fig. 5f). The exact frame corresponding to when the fly first found the sucrose was manually annotated, and the data were aligned to this time point (Extended Data Fig. 8f–i). Quantification of food-zone stopping and velocities was performed within 5 s of finding the sucrose. Stops were defined as smoothed-velocity less than 2 mm s−1 for ten frames (when flies stayed in one spot for long as happens when they feed, the tracker often induced a jitter that led to artificial velocity values, this definition helped extract true stopping events). For depicting velocity heatmap and averaged velocity plots depicting pre- and postencounter profile, we filtered the dataset to select cases that showed at least 20 s pre-encounter period and 50 s postencounter period. Most flies were still contained in this dataset.

    PER assay

    The PER assay in Extended Data Fig. 8j was performed as described in ref. 41. Data were analysed using Fisher’s exact test between test and control genotypes.

    High-resolution 3D leg kinematics analysis

    Setup

    The setup consisted of eight cameras (FLIR BFS-U3-16S2M-CS, fitted with InfiniStix 194100 lenses and near infrared bandpass filters (Midopt BP850)) surrounding a ball holder (Extended Data Fig. 3a), such that all legs were visible from at least one pair of cameras, at all times. Individual flies were tethered to a 34-gauge needle by their thorax using ultraviolet-cured glue, and were then placed on an air-supported spherical treadmill (6 mm diameter). Tethered flies were illuminated with a custom infrared ring emitting focused light to the plane of the ball. The ball was tracked at 50 Hz through two orthogonally placed custom motion sensors. The cameras, infrared light source and the ball tracker were all triggered by an Arduino at 200 Hz, with camera exposure time set to 200 µs. Videos were recorded with a resolution of 1,440 × 1,072 pixels.

    Camera calibration, two-dimensional pose tracking and 3D pose reconstruction

    We used DeepLabCut (v.2.2.3, DLC67) to track 33 points of interest on the fly body: the notum, two wing hinges and five joints per leg (thorax-coxa, coxa-trocanter, Fe–Ti, tibia-tarsus and the tarsal tip). Separate ResNet-101 neural networks were trained for all cameras (500,000 iterations) except for the three front-facing cameras, which were all handled by the same network (five networks in total). We used roughly 830 manually annotated frames per camera for initial training of all networks (46 frames each from 18 flies) with a test–train split of 95–5%. An additional round of training was needed using roughly 600 frames each (40 frames from 16 flies) before the tracking was satisfactory (error in pixels less than 4 pixels for all networks). The cameras were calibrated using the calibration module in Anipose68 (v.1.0.1). We used a precision manufactured ChArUco board68 as a calibration target. The board was imaged from all cameras simultaneously at 15 Hz and maximum resolution (1,440 × 1,072). When the board-based calibration alone failed to give satisfactory results (as measured by the mean reprojection error in pixels of the final 3D model output of Anipose being greater than 20 pixels for any point), their animal-based calibration module was used to bring the mean reprojection errors below this threshold. Anipose was used to triangulate all points, as well as to calculate the flexion angle for all four joints from each leg.

    Ball fitting and swing-stance prediction

    Step cycles were estimated based on the proximity of the tracked tarsal tip coordinates to the ball surface. As the ball itself was not tracked, we fit a sphere to the 3D reconstructed tarsal tip coordinates. The position of the sphere in space and its radius was optimized iteratively using the squared distance of the tarsal tips to the surface of the sphere. Tarsal tip positions within 0.05% of the radius were considered as stance, others as swing. Of note, swing and stance phases shorter than 10 ms were filtered out.

    Activation of halt neurons in tethered flies walking on the ball

    To precisely quantify the difference between the halting phenotypes on activation of BRK, FG and BB (Figs. 1g and 4a–d and Extended Data Fig. 3), male flies aged between 7 and 10 days expressing CsChrimson in the respective halt neurons were subjected to optogenetic activation on the ball. The flies were starved for 6–9 h before the experiment to increase the likelihood of high-speed spontaneous walking. The compressed air supplied to the ball was passed through an in-line heating element (Southeastern Heaters and Controls, Inc., Heater FLC-2 120 V 250 W coupled with a TPC10063 controller) to bring the local temperature on the ball up to 32 °C. Each fly was left on the ball for a maximum of 20 min, during which a maximum of ten trials (7 s each) could be triggered in closed-loop with the forward velocity of the fly. Each trial consisted of 2 s of light OFF, followed by 3 s of red light stimulation (66 Hz, roughly 0.04 mW mm−2) delivered through an LED-coupled optic fibre (625 nm, Thorlabs M625F2).

    Kinematic analysis

    To quantify the differences between halting phenotypes, we considered only the trials during which flies were walking with an average velocity greater than 1 mm s−1 before optogenetic stimulation. The whole dataset was segmented into cases in which the light stimulation onset coincided with a continuing swing phase or stance phase. A stopping bout was defined as when the average ball velocity was below 0.8 mm s−1 over a minimum period of 250 ms. Swing duration before optogenetic stimulation was calculated as the median swing duration from all swing events in the prestimulation period. Swing duration after optogenetic stimulation was the duration of the continuing swing at light onset.

    Activation experiments in tethered, decapitated flies walking on the ball

    Flies were ice-anaesthetized, decapitated and their neck was sealed using ultraviolet-cured glue. Only flies that recovered well from decapitation (roughly 95% of all decapitated flies) (that is, showing proper self-righting and spontaneous grooming) were tethered to the 34-gauge needle with ultraviolet-cured glue and placed on the ball. In MDN and MDN + BRK activation experiments (Fig. 4e–j), decapitated flies were subjected to ten trials (7 s each) with 3 s red light stimulation (66 Hz, 0.04 mW mm−2). In the case of BDN2 activation in decapitated flies, we observed robust walking when we restricted to testing older flies (10–12 days old, for Fig. 4e–j) flies compared to the 7–10-day-old age range that was used for initial experiments (Extended Data Fig. 6e), probably due to lower and more variable expression levels in younger flies. Further, for BDN2 and BDN2 + BRK experiments (Fig. 4e–j), given expression levels of CsChrimson in BDN2 differed between individuals, for each fly we sampled five different intensities (0.01, 0.015, 0.025, 0.041, 0.058 mW mm−2) of stimulation and chose the particular intensity at which that individual fly showed some degree of intention for forward walking (if BDN2 expression is weak, BRK dominates the phenotype and legs do not show any movement). All videos acquired were passed through our 3D pose estimation pipeline as elaborated above. The SIZ was defined as the range below the 25th percentile (for forward walking) or above the 75th percentile (for backward walking) of the Fe–Ti flexion angle at which MDN or BDN2 activated flies initiate swings, respectively. The SIZ count is number of times the Fe–Ti joint angle enters the SIZ in a single trial. The dwell time in SIZ is the time spent by the leg in the SIZ each time it enters it. The percentage of swings in SIZ refers to the number of SIZ events in which the leg performs a swing, divided by total number of SIZ events, per trial.

    Segment-specific grooming in decapitated flies on the ball

    Tethered, decapitated flies expressing GtACR1 in different subsets of the BRK neurons were placed on the ball and acclimated to 45 s green light (530 nm, Thorlabs M530F2, continuous, roughly 0.018 mW mm−2) before recording. Subsequently, flies were again exposed to 45 s green light for silencing BRK, while front leg or hind-leg-specific grooming was induced. Hind-leg grooming was induced by gently touching the wing with a brush (Fig. 6p–r), whereas foreleg grooming (Fig. 6.m–o) was induced by touching the front leg with a brush covered with yellow dust (Reactive Yellow 86, catalogue no. sc-296260). These videos were manually scored for grooming bouts. We considered the start of a grooming bout when leg lifted off the ball surface, and the end when the leg touched down the ball surface (in case of stable grooming bouts) or when grooming movements ended (in case of destabilized grooming in which the fly tries to regain normal posture). The 3D pose (front and hind legs) of these flies were reconstructed using the pipeline mentioned above, and the Fe–Ti flexion angle standard deviation during each grooming bout was quantified. Mid-legs could not be tracked due to occlusions with the brush. Ball movement was defined as the sum of the x, y and z rotational velocities of the ball.

    Functional connectivity

    For all functional connectivity experiments, tissues were imaged under a Bergamo II two-photon (2P) microscope using a ×20 numerical aperture (NA) 1.0 objective lens (XLUMPLFLN, Olympus). For imaging, GCaMP signal was recorded with a 920 nm Ti:Sapphire laser (MaiTai DeepSee, Newport Spectra-Physics). For optogenetic activation, a fibre-coupled 655 nm LED (FC1-LED, Prizmatix) was positioned with a micromanipulator (Misumi XYZFG2) to deliver pulse trains of red light onto the tissues, with an inter-stimulation interval greater than 10 s. The LED was controlled and synchronized with the resonance imaging scanner (8.3 kHz) using ScanImage software (MBF Bioscience), such that red light stimulation was permitted only during the non-imaging fly-back time of the scanner. This ensured that no light artefact appeared in the region of interest. LED power was measured with a power meter (PM100A, Thorlabs) paired with a photodiode sensor (S121C, Thorlabs), at roughly 1 cm distance between LED and sensor. Background subtracted imaging data were analysed using ImageJ and MATLAB as in ref. 19. Change in calcium signal was computed using ∆F/F = (F − F0)/F0, where F0 is the mean fluorescence 2 s period before stimulation onset. Statistical comparisons between groups were performed by quantifying the area under the curve (0–2 s poststimulation).

    To test whether BRK is excitatory (as predicted by the connectome), we optogenetically activated BRK while recording calcium activity from its main postsynaptic partner that we called BON1 (Brake Output Neuron 1). In this experiment (Extended Data Fig. 5e,f), whole central nervous systems (brain + VNC) of female flies (6–9 days old) of the genotypes BRK-Gal4>UAS-CsChrimson; BON1-LexA>LexAop-GCaMP6s or +>CsChrimson; BON1>GCaMP6s were dissected and imaged in extracellular saline solution bubbled with carbogen19. Tissues were transferred on a poly-l-lysine-coated coverslip fixed in an imaging chamber (ALAMS-518SWPW). During the entire imaging session, bubbled extracellular saline with carbogen was delivered over the brains by means of a perfusion system (78018-40, Masterflex). For BRK activation, 2 s pulse trains of red light (50 Hz, roughly 0.08 mW mm−2) were delivered onto the tissues. Simultaneously, single-plane imaging of the BON1 soma was performed at a rate of 6 Hz.

    To test whether FG and/or BB receive information from gustatory sensory neurons, we activated Gr5a neurons while recording calcium activity from either FG or BB. In these experiments (Fig. 5b and Extended Data Fig. 8a–d), female flies (6–9 days old) of the genotypes (1) Gr5a-LexA>LexAop-ChrimsonR; FG-Gal4>UAS-GCaMP7b, (2) Gr5a-LexA>LexAop-ChrimsonR; BB-Gal4>UAS-GCaMP7b, (3) +>LexAop-ChrimsonR; FG-Gal4>UAS-GCaMP7b and (4) +>LexAop-ChrimsonR; BB-Gal4>UAS-GCaMP7b were tethered, dissected and imaged as in refs. 41,69. In brief, flies were ice-anaesthetized and vertically mounted on chamber. The cuticle was removed from the head to expose the SEZ brain region from where FG and BB neurites could be imaged (single plane, 3 Hz). The front legs were ultraviolet-glued to avoid movements during imaging, and Gr5a neurons were photostimulated by delivering pulsed red light onto the proboscis (100 Hz, roughly 0.08 mW mm−2). A side camera (FLIR, SpinView software) ensured reproducible positioning of the LED in front of the proboscis (distance of roughly 1 cm). Flies were either fed or starved 24 h before the experiment (placed in vials with tissue soaked with water and all-trans retinal). Experiments for fed versus starved state comparison of FG activity on Gr5a stimulation and corresponding controls, (Extended Data Fig. 8a), were performed on a setup described in ref. 41, which used a 0.66 Hz imaging frame rate and wide-field opto-stimulation (650 nm) through the imaging objective, instead of the fibre-coupled LED used in all other experiments.

    Muscle imaging

    To test the influence of BRK, FG or BB activation on leg muscle activity, we performed one-photon (1P) and 2P calcium imaging of front-leg femoral muscles (Fig. 4 and Extended Data Fig. 7). Female flies (5–8 days) of the genotypes (1) BRK-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f (ref. 38), (2) FG-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f, (3) BB-Gal4>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f and (4) +>UAS-CsChrimson; MHC-LexA>LexAop-GCaMP6f were cold anaesthetized and placed on a circular coverslip fixed in an imaging chamber (CSC-25L, Bioscience Tools). The wings and five legs, except the left front leg, were ablated. We applied ultraviolet-cured glue around the fly body and on the proboscis to avoid movements during imaging. The remaining front leg was glued either in its flexed (Fe–Ti angle roughly 10–27°) or extended (Fe–Ti angle roughly 123–147°) position. The fly holder was then flipped, such that the fly was underneath the coverslip on the opposite side to the objective. We could then add water on the coverslip and image with a water immersion objective (×20 NA 1.0 objective lens, Olympus XLUMPLFLN), while the fly remained dry on the other side of the coverslip. Muscle GCaMP6f signal in the front leg was recorded using 1P, wide-field fluorescence imaging (488 nm mounted LED; Thorlabs) and then the same sample was imaged under 2P imaging (920 nm Ti:Sapphire laser; MaiTai DeepSee, Newport Spectra-Physics). Under 2P conditions, because the fly was in complete darkness, control flies often showed light responses to the opto-stim LED (note that even though we use 655 nm LED, it is likely that there was a dim tail of the LED spectrum that is present in the visual spectrum of the fly). On the other hand, under the 1P condition, because of bright blue imaging light, control flies did not show any responses to the 655 nm opto-stim LED. Hence we used 1P data for analysis, but still continued performing 2P imaging given it was very useful to draw the muscle boundaries and also depict the imaging videos. For activating CsChrimson expressed in BRK, FG or BB, the 655 nm LED described above was placed with a micromanipulator and used to deliver red light towards the fly thorax (roughly 1 cm distance). A given session typically consisted of four stimulations for both 1P and 2P experiments. Change in calcium signal was computed using ∆F/F = (F − F0)/F0, where F0 is the tenth percentile fluorescence intensity level in the 2 s period before stimulation onset. For ∆F/F calculation, all four stimulation trials were considered and averaged across the different sessions.

    In 1P experiments (Fig. 4k and Extended Data Fig. 7d), red light stimulation (continuous, roughly 0.01 mW mm−2) was delivered for 1.6 s with 10 s inter-stimulation intervals; muscle GCaMP6f signal was acquired at a frame rate of 50 Hz. Red light stimulation was controlled by means of transistor–transistor logic inputs synchronized to the imaging session using ThorCam software (Thorlabs) plus an external Arduino based trigger box (Thorlabs TSI-IOBOB2). In 2P experiments (Fig. 4l), 2 s of red light stimulation (100 Hz, roughly 0.08 mW mm−2) was as described in functional connectivity experiments; muscle GCaMP6f signal was acquired at 6 Hz.

    To probe the effect of halting neurons on spontaneous muscle activity, we performed a separate set of experiments (Extended Data Fig. 7a,b,e,f) in which red light stimulation was delivered for roughly 2 s only during high muscle baseline activity.

    For tibia-movement experiments (Extended Data Fig. 7c), we used a protocol described in ref. 70. Briefly, a fly was mounted on a coverslip as described above. A magnetic pin (Entomoravia, Austerlitz Insect Pins; 1 mm length; 0.1 mm diameter) was then glued on the front left leg tibia. A magnet mounted on a programmable servo motor (Silver max Hybrid Servo Motor, Precise Motion and Control Inc.) was used to forcibly flex and extend the Fe–Ti joint (1 s per flexion or extension, repeated four times). Femoral muscle activity was imaged under epifluorescence (1P) while delivering optogenetic stimulation using the 655 nm LED described above, during the entire session (continuous, roughly 0.08 mW mm−2). Muscle GCaMP signal was acquired at a frame rate of 50 Hz. A simultaneous video of the tibia movements (720 × 540 resolution; 50 Hz) was acquired in SpinView software (FLIR) and synchronized to the imaging session using ThorCam software (Thorlabs) plus an external Arduino based trigger box (Thorlabs TSI-IOBOB2). Change in calcium signal was computed using ∆F/F = (F − F0)/F0, where F0 is the median fluorescence 300 ms period before movement initiation onset.

    In vivo imaging

    For imaging BRK activity in vivo (Fig. 6), female flies (4–7 days) of the genotypes BRK-Gal4>Act88F:Rpr; UAS-GCaMP6f; UAS-tdTomato or BDN2-Gal4>Act88F:Rpr; UAS-GCaMP6f; UAS-tdTomato were anaesthetized on ice and tethered on a custom fly holder19. Thoracic dissection for VNC imaging was then performed as described in ref. 15. Artificial Haemolymph (AHL71) solution was used during dissection and imaging of the exposed VNC. After dissection, the holder was placed under a Bergamo II 2P microscope (Thorlabs) under a water immersion objective (×40 NA 0.8 objective lens Nikon CFI APO near infrared). An air-supported ball was positioned under the fly in a similar setup as described above for leg kinematics analysis. Temperature under objective (roughly 25–30 °C) was controlled and maintained by using a heater (Southeastern Heaters & Controls, Inc., FLC-2 120 V 250 W paired with a TPC10063 controller) paired to the air–ball system. Flies with uncoordinated leg movements (roughly 25%) were discarded before the experiment. After an acclimation period to the ball (roughly 15–20 min), a volume containing axonal projections from BRK or BDN2 was imaged using at a volumetric rate of 2 Hz (BRK) or 6 Hz (BDN2), using a 920 nm Ti:Sapphire laser and a fast z-piezo device. Video of the behaving fly (720 × 540 resolution; 200 Hz) was acquired in SpinView software (FLIR) and synchronized to the imaging session using ScanImage software (MBF Bioscience). The synchronized calcium imaging and ball velocity data were analysed offline. For BRK imaging experiments, additional behaviours were manually annotated (Fig. 6e–h) using FlyTracker software63. Data analysis was performed using custom scripts in Python and MATLAB.

    Immunohistochemistry

    All central nervous system dissections and immunohistochemistry were performed as described in ref. 72 with detailed protocols available at https://www.janelia.org/project-team/flylight/protocols. Primary antibodies used were chicken anti-GFP (1:1,000, Thermo Fisher Scientific, AB_2534023), rabbit anti-dsRed (1:500, CloneTech, AB_10013483) and anti-Bruchpilot (1:500, nc82, mouse monoclonal, Developmental Studies Hybridoma Bank, AB_2314866). Alexa fluor secondary antibodies (Thermo Fisher Scientific) were used at 1:500 dilution (Goat antichicken, Alexa488, AB_2576217; Goat antirabbit, Alex568, AB_10563566; Goat antimouse, Alex568, AB_2534072 and Goat antimouse, Alex647, AB_141725).

    FISH

    This was performed as a part of a large-scale fluorescence in situ hybridization (FISH) imaging session by A. Petruncio and the FlyLight team at the Janelia Research Campus, as described in ref. 73.

    Connectome-constrained modelling

    The neuronal activity was simulated as a spiking neural network in the brian2 software v.2.5.1 (ref. 74). Model details, including the original code, are described elsewhere7. The original code was modified to allow for stimulating and silencing neurons at arbitrary time points throughout the simulation. Briefly, a leaky integrate-and-fire model was constructed based on the fully annotated connectome8. The connection strength between two neurons was set as proportional to the number of synapses linking them. Neurotransmitter predictions based on the EM dataset35,75 determine whether the interaction between two neurons is inhibitory (GABA, Glu) or excitatory (all other). Neuronal stimulation was mimicked in the model by adding a Poisson spike train of defined frequency as an input to a neuron. Neuronal silencing was mimicked by simply severing all outgoing synaptic connections of the desired neuron. It is important to realize that the intrinsic firing rate of neurons in this model is zero and that the Poisson inputs constitute the only external input. The firing rates reported here are averaged over 30 trials, for 1,000 ms each with 0.05 ms integration time steps.

    The walk neurons P9 and BPN were stimulated bilaterally at 150 and 50 Hz, respectively. The firing rates for the top 100 neurons are shown in Fig. 3a,e. Figure 3b–d,f–h shows the same neurons as Fig. 3a,e, but here the stop neurons BB, FG and BRK, respectively, are stimulated at 150 Hz between 0.25 and 0.75 s. All rates in the top Fig. 3a–h were smoothed with a Gaussian kernel (sigma 25 ms). In the wiring diagram shown in the bottom of Fig. 3a–h, only the most active DNs with firing rates greater than 10.3 and 20 Hz for P9 and BPN stimulations are shown. The node colour shows the average firing rates of the most active DNs during walk neuron stimulation (Fig. 3a,e) and during walk–halt costimulation (Fig. 3b–d,f–h) normalized to the maximum firing rate in Fig. 3a,e, respectively. As BPNs project contralaterally, the left hemisphere DNs receiving input from contralateral BPNs (right) were chosen for representation (this applies to Extended Data Fig. 10a,b, in which walk neurons BPNs and P9 were stimulated at 150 and 50 Hz, respectively, and oviDN and MAN1 were stimulated at 150 Hz).

    Extended Data Fig. 6b shows all neurons that were differentially affected in walk neuron stimulation and walk neuron–stop neuron costimulation. Walk neurons BPN and P9 were stimulated at 150 and 50 Hz, respectively. Stop neurons FG and BB were stimulated at 150 Hz.

    The left hemisphere GRNs were activated (150 Hz) in Fig. 5a and the downstream feeding pathway with increased firing rates, along with FG and BB, are shown as a wiring diagram. The node colours correspond to the firing rate, except for oDN1 and BDN1 (for simplicity, the graphs are limited to one hemisphere). The heatmaps in Fig. 5c,d show the average firing rate of oDN1 and BDN2 normalized to the maximum value in the left panel, respectively. The left shows costimulation of left hemisphere sugar GRNs and bilateral P9 or BPN walk neurons. The middle shows the same as left, but while silencing stop neuron FG bilaterally. The right shows the difference in firing rate between left and middle panels (this applies to Extended Data Fig. 8e in which only the difference in firing rate for oDN1 and BDN1 in case of BB is shown). The heatmap in Extended Data Fig. 9c demonstrates activation of sugar GRNs (left hemisphere) and eye bristles at 150 Hz and the resultant change in firing of FG, BB and DNg12 neurons (grooming command neurons). Colours and values on the heatmap indicate their firing rates.

    Cytoscape75 (v.3.10.0) was used to create all the wiring diagrams shown in this study. The edges in Figs. 3a–h and 5a and Extended Data Figs. 2b, 9b,f and 10a–c illustrate the connectivity in the model (red denotes excitatory, blue denotes inhibitory). The arrow size represents the connection strength (connections below five synapses are excluded). For simplicity, only one hemisphere is shown, except in Extended Data Figs. 2b and 9b. The node colours represent firing rates wherever mentioned.

    Experimental procedures and statistics

    We used standard sample sizes, from the field and similar to previous work. All behavioural experiments were reproduced independently at least twice. Control and experimental flies were scored in random order during behavioural experiments. Behavioural experiments were performed with the experimenter blinded to genotype. All statistical tests were performed in MATLAB or Graphpad Prism. All two-group comparisons (unless indicated otherwise) were performed using a non-parametric Mann–Whitney test. All multiple-group comparisons (unless indicated otherwise), were performed using a non-parametric Kruskal–Wallis test followed by Dunn’s multiple comparisons with appropriate controls. Exact sample size values for each plot are reported in Supplementary Table 1.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Whole-brain annotation and multi-connectome cell typing of Drosophila

    [ad_1]

    Annotations

    Base annotations

    At the time of writing, the general FlyWire annotation system operates in a read-only mode in which users can add additional annotations for a neuron but cannot edit or delete existing annotations. Furthermore, the annotations consist of a single free-form text field bound to a spatial location. This enabled many FlyWire users (including our own group) to contribute a wide range of community annotations, which are reported in our companion paper1 but are not considered in this study. As it became apparent that a complete connectome could be obtained, we found that this approach was not a good fit for our goal of obtaining a structured, systematic and canonical set of annotations for each neuron with extensive manual curation. We therefore set up a web database (seatable; https://seatable.io/) that allowed records for each neuron to be edited and corrected over time; columns with specific acceptable values were added as necessary.

    Each neuron was defined by a single point location (also known as a root point) and its associated PyChunkedGraph supervoxel. Root IDs were updated every 30 min by a Python script based on the fafbseg package (Table 1) to account for any edits. The canonical point for the neuron was either a location on a large-calibre neurite within the main arbour of the neuron, a location on the cell body fibre close to where it entered the neuropil or a position within the nucleus as defined by the nucleus segmentation table80. The former was preferred as segmentation errors in the cell body fibre tracts regularly resulted in the wrong soma being attached to a given neuronal arbour. These soma swap errors persisted late into proofreading and, when fixed, resulted in annotation information being attached to the wrong neuron until this in turn was fixed.

    We also note that our annotations include a number of non-neuronal cells/objects such as glia cells, trachea and extracellular matrix that others might find useful (superclass not_a_neuron; listed in Supplementary Data 2).

    Soma position and side

    Besides the canonical root point, the soma position was recorded for all neurons with a cell body. This was either based on curating entries in the nucleus segmentation table (removing duplicates or positions outside the nucleus) or on selecting a location, especially when the cell body fibre was truncated and no soma could be identified in the dataset. These soma locations were critical for a number of analyses and also allowed a consistent side to be defined for each neuron. This was initialized by mapping all soma positions to the symmetric JRC2018F template and then using a cutting plane at the midline perpendicular to the mediolateral (x) axis to define left and right. However, all soma positions within 20 µm of the midline plane were then manually reviewed. The goal was to define a consistent logical soma side based on examination of the cell body fibre tracts entering the brain; this ultimately ensured that cell types present, for example, in one copy per brain hemisphere, were always annotated so that one neuron was identified as the left and the other the right. In a small number of cases, for example, for the bilaterally symmetric octopaminergic ventral unpaired medial neurons, we assigned side as ‘central’.

    For sensory neurons, side refers to whether they enter the brain through the left or the right nerve. In a small number of cases we could not unambiguously identify the nerve entry side and assigned side as ‘na’.

    Biological outliers and sample artefacts

    Throughout our proofreading, matching and cell typing efforts, we recorded cases of neurons that we considered to be biological outliers or showed signs of sample preparation and/or imaging artefacts.

    Biological outliers range from small additional/missing branches to entire misguided neurite tracks, and were typically assessed within the context of a given cell type and best possible contralateral matches within FlyWire and/or the hemibrain. When biological outliers were suspected, careful proofreading was undertaken to avoid erroneous merges or splits of neuron segmentation.

    Sample artefacts come in two flavours:

    (1) A small number of neurons exhibit a dark, almost black cytosol, which caused issues in the segmentation as well as synapse detection. This effect is often restricted to the neurons’ axons. We consider these sample artefacts because it is not always consistent within cell types. For example, the cytosol in the axons of DM3 adPN is dark on the left and normal light on the right. Because the dark cytosol leads to worse synapse detection, probably due to lower contrast between the cytosol and synaptic densities, we typically excluded neurons (or neuron types) with sample artefacts from connectivity analyses. Anecdotally, this appears to happen at a much higher frequency in sensory neurons compared with in brain-intrinsic neurons.

    (2) Some neurons are missing large arbours (for example, a whole axon or dendrite) because a main neurite suddenly ends and cannot be traced any further. This typically happens in commissures where many neurites co-fasculate to cross the brain’s midline. In some but not all cases, we were able to bridge those gaps and find the missing branch through left–right matching. Where neurons remained incomplete, we marked them as outliers.

    Whether a neuron represents a biological outlier or exhibits sample preparation/segmentation artefacts is recorded in the status column of our annotations as ‘outlier_bio’ and ‘outlier_seg’, respectively. Note that these annotations are probably less comprehensive for the optic lobes than for the central brain. Examples plus quantification are presented in Extended Data Fig. 5.

    Hierarchical annotations

    Hierarchical annotations include flow, superclass, class (plus a subclass field in certain cases) and cell type. The flow and superclass were generally assigned based on an initial semi-automated approach followed by extensive and iterative manual curation. See Supplementary Table 3 for definitions and the sections below for details on certain superclasses.

    Based on the superclasses we define two useful groupings which are used throughout the main text:

    Central brain neurons consist of all neurons with their somata in the central brain defined by the five superclasses: central, descending, visual centrifugal, motor and endocrine.

    Central brain associated neurons further include superclasses: visual projection neurons (VPNs), ascending neurons and sensory neurons (but omit sensory neurons with cell class: visual).

    Cell classes in the central brain represent salient groupings/terms that have been previously used in the literature (examples are provided in Supplementary Table 3). For sensory neurons, the class indicates their modality (where known). For optic-lobe-intrinsic neurons cell class indicates their neuropil innervation: for example, cell class ‘ME’ are medulla local neurons, ‘LA>ME’ are neurons projecting from the lamina to the medulla and ‘ME>LO.LOP’ are neurons projecting from the medulla to both lobula and lobula plate.

    Hemilineage annotations

    Central nervous system lineages were initially mapped for the third instar larval brain, where, for each lineage, the neuroblast of origin and its progeny are directly visible81,82,83,84. Genetic tools that allow stochastic clonal analysis85 have enabled researchers to visualize individual lineages as GFP-marked ‘clones’. Clones reveal the stereotyped morphological footprint of a lineage, its overall ‘projection envelope’32, as well as the cohesive fibre bundles—hemilineage-associated tracts (HATs)—formed by neurons belonging to it. Using these characteristics, lineages could be also identified in the embryo and early larva86,87, as well as in pupae and adults31,32,33,34,37,88. HATs can be readily identified in the EM image data, and we used them, in conjunction with clonal projection envelopes, to identify hemilineages in the EM dataset through a combination of the following methods:

    (1) Visual comparison of HATs formed by reconstructed neurons in the EM, and the light microscopy map reconstructed from anti-Neuroglian-labelled brains31,33,34. In cross-section, tracts typically appear as clusters of 50−100 tightly packed, rounded contours of uniform diameter (~200 nm), surrounded by neuronal cell bodies (when sectioned in the cortex) or irregularly shaped terminal neurite branches and synapses (when sectioned in the neuropil area; Fig. 2c). The point of entry and trajectory of a HAT in the neuropil is characteristic for a hemilineage.

    (2) Matching branching pattern of reconstructed neurons with the projection envelope of clones: as expected from the light microscopy map based on anti-Neuroglian-labelled brains31, the majority of hemilineage tracts visible in the EM dataset occur in pairs or small groups (3–5). Within these groups, individual tracts are often lined by fibres of larger (and more variable) diameter, as shown in Fig. 2c. However, the boundary between closely adjacent hemilineage tracts is often difficult to draw based on the EM image alone. In these cases, visual inspection and quantitative comparison of the reconstructed neurons belonging to a hemilineage tract with the projection envelope of the corresponding clone, which can be projected into the EM dataset through Pyroglancer (Table 1), assists in properly assigning neurons to their hemilineages.

    (3) Identifying homologous HATs across three different hemispheres (left and right of FlyWire, hemibrain): by comparison of morphology (NBLAST38), as well as connectivity (assuming that homologous neurons share synaptic partners), we were able to assign the large majority of neurons to specific HATs that matched in all three hemispheres.

    In the existing literature, two systems for hemilineage nomenclature are used: Ito/Lee33,34 and Hartenstein31,32. Although these systems overlap in large parts, some lineages have been described in only one but not the other nomenclature. In the main text, we provide (hemi)lineages according to the ItoLee nomenclature for simplicity. Below and in the Supplementary Information, we also provide both names as ItoLee/Hartenstein, and the mapping between the two nomenclatures is provided in Supplementary Data 3. From previous literature, we expected a total of around 119 lineages in the central brain, including the gnathal ganglia (GNG)31,32,33,34,84. Indeed, we were able to identify all 119 lineages based on light-level clones and tracts, as well as the HATs in FlyWire. Moreover, we found one lineage, LHp3/CP5, which could not be matched to any clone. Thus, together, we have identified 120 lineages.

    By comprehensively inspecting the hemilineage tracts originally in CATMAID and then in FlyWire, we can now reconcile previous reports. Specifically, new to refs. 33,34 (ItoLee nomenclature) are: CREl1/DALv3, LHp3/CP5, DILP/DILP, LALa1/BAlp2, SMPpm1/DPMm2 and VLPl5/BLVa3_or_4—we gave these neurons lineage names according to the naming scheme in refs. 33,34. New to ref. 31 (Hartenstein nomenclature) are: SLPal5/BLAd5, SLPav3/BLVa2a, LHl3/BLVa2b, SLPpl3/BLVa2c, PBp1/CM6, SLPpl2/CP6, SMPpd2/DPLc6, PSp1/DPMl2 and LHp3/CP5—we named these units according to the Hartenstein nomenclature naming scheme. We did not take the following clones from ref. 33 into account for the total count of lineages/hemilineages, because they originate in the optic lobe and their neuroblast of origin has not been clearly demonstrated in the larva: VPNd2, VPNd3, VPNd4, VPNp2, VPNp3, VPNp4, VPNv1, VPNv2 and VPNv3.

    Notably, although light-level clones from refs. 33,34 match very well the great majority of the time, sometimes clones with the same name only match partially. For example, the AOTUv1_ventral/DALcm2_ventral hemilineage seems to be missing in the AOTUv1/DALcm2 clone in the Ito collection33. There appears to be a similar situation for the DM4/CM4, EBa1/DALv2 and LHl3/BLVa2b lineages. When there is a conflict, we have preferred clones as described in ref. 34.

    For calculating the total number of hemilineages, to keep the inclusion criteria consistent with the lineages, we included the type II lineages (DL1-2/CP2-3, DM1-6/DPMm1, DPMpm1, DPMpm2, CM4, CM1, CM3) by counting the number of cell body fibre tracts, acknowledging that they may or may not be hemilineages. Neuroblasts of type II lineages, instead of generating ganglion mother cells that each divide once, amplify their number, generating multiple intermediate progenitors that in turn continue dividing like neuroblasts28,89,90. It has not been established how the tracts visible in type II clones (and included in Extended Data Fig. 3 and Supplementary Data 3 and 4) relate to the (large number of) type II hemilineages.

    There are also 3 type I lineages (VPNl&d1/BLAl2, VLPl2/BLAv2 and VLPp&l1/DPLpv) with more than two tracts in the clone; we included these additional tracts in the hemilineages provided in the text. Without taking these type I and type II tracts into account, we identified 141 hemilineages.

    A minority of neurons in the central brain could not reliably be assigned to a lineage. These mainly include the (putative) primary neurons (3,780). Primary neurons, born in the embryo and already differentiated in the larva, form small tracts with which the secondary neurons become closely associated91. In the adult brain, morphological criteria that unambiguously differentiate between primary and secondary neurons have not yet been established. In cases in which experimental evidence exists27, primary neurons have significantly larger cell bodies and cell body fibres. Loosely taking these criteria into account we surmise that a fraction of primary neurons forms part of the HATs defined as described above. However, aside from the HATs, we see multiple small bundles, typically close to but not contiguous with the HATs, which we assume to consist of primary neurons. Overall, these small bundles contained 3,780 neurons, designated as primary or putative primary neurons.

    Hemilineage annotations in hemibrain

    Hemilineage annotations in hemibrain were generated using the hemilineage annotations in FlyWire as the ground truth. For each hemilineage, we first obtained potential hemibrain matches to FlyWire neurons using a combination of NBLAST38 scores and cell body fibre/cell type annotations. We then clustered neurons in all three hemispheres (FlyWire left, FlyWire right, hemibrain potential candidates) by morphology, and went through the clusters, to make sure that the hemilineage annotations correspond across brains at the finest level possible. To ensure that no neurons within a hemilineage were missed, we examined the cell body fibre bundles of each hemilineage in the hemibrain at the EM level. To further guarantee the completeness of hemilineage annotations, we inventoried all right hemisphere neurons in hemibrain with a cell type annotation, to ensure all neurons with a type annotation were assigned a hemilineage annotation where possible.

    Morphological groups

    Within a hemilineage, subgroups of neurons often share distinctive morphological characteristics. These morphological groups were identified for all hemilineages as follows. Neurons from FlyWire and hemibrain were transformed into the same hemisphere and pairwise NBLAST scores were generated for all neurons within a hemilineage. Intrahemilineage NBLAST scores were then clustered using HDBSCAN92, an adaptive algorithm that does not require a uniform threshold across all clusters, and that does not assume spherical distribution of data points in a cluster, compared to other clustering algorithms such as k-means clustering.

    To test the robustness of the morphological groups, we reran the above analysis across one, two or three hemispheres. This treatment sometimes gave slightly different results. However, some groups of neurons consistently co-clustered across the different hemispheres; we termed these ‘persistent clusters’. Early-born neurons, which are often morphologically unique, frequently failed to participate in persistent clusters, and were omitted from further analysis. We linked these persistent clusters across hemispheres using two- and three-hemisphere clustering: for example, when clustering FlyWire left and FlyWire right together for hemilineage AOTUv3_dorsal, the TuBu neurons from both the left and right hemispheres would fall into one cluster, which we termed a morphological group. Morphological groups are therefore defined by consistent across-hemisphere clustering. When neurons of a given hemilineage were sufficiently contained by the hemibrain volume, all three hemispheres (two from FlyWire and one from hemibrain) were used; otherwise, the two hemispheres from FlyWire were used. As we prioritized consistency across 1, 2 and 3 hemisphere clustering, a minority of neurons with a hemilineage annotation do not have a morphological group. For example, if neuron type A clusters with type B in one-hemisphere clustering, but clusters with type C (and not B) in two-hemisphere clustering, then type A will not have a morphological group annotation.

    After generating the morphological groups, we cross-checked these annotations against existing cross-identified hemibrain types and (FlyWire only) cell types. In a minority of cases, neurons of one hemibrain/cell type were annotated with multiple morphological groups. This occasionally reflected errors in assigning types, which were corrected; and others where individual neurons from a type were singled out due to additional branches/reconstruction issues. We therefore manually corrected some morphological group annotations to make them correspond maximally with the hemibrain/cell type annotations.

    Overall, we divide hemilineages in each hemisphere into 528 morphological groups, with hemilineages typically having 1–6 morphological groups (10/90 quantile) and with each morphological group containing 2–52 neurons in each hemisphere (10/90 quantile).

    Cell typing

    Using methods described in detail in the sections below, we defined cell types for 96.4% of all neurons in the brain—98% and 92% for the central brain and optic lobes, respectively. The remaining 3.6% of neurons were largely (1) optic lobe local neurons for which we could not find a prior in existing literature or (2) neurons without clear contralateral pairings, including a number of neurons on the midline.

    About 21% of our cell type annotations are principally derived from the hemibrain cell type matching effort (see the section below). The remainder was generated either by comparing to existing literature (for example, in case of optic lobe cell types or sensory neurons) and/or by finding left/right balanced clusters through a combination of NBLAST and connectivity clustering (Fig. 6 and Extended Data Figs. 8 and 9). New types were given a simple numerical cross-brain identifier (for example, CB0001) or, in the case of ascending neurons (ANs)/descending neurons(DNs), a more descriptive identifier (see the section below) as a provisional cell type label. A flow chart summary is provided in Extended Data Fig. 12.

    For provenance, we provide two columns of cell types in our Supplementary Data:

    hemibrain_type always refers to one or more hemibrain cell types; in rare occasions where a matched hemibrain neuron did not have a type, we recorded body IDs instead.

    cell_type contains types that are either not derived from the hemibrain or that represent refinements (for example, a split or retyping) of hemibrain types.

    Neurons can have both a cell_type and a hemibrain_type entry, in which case, the cell_type represents a refinement or correction and should take precedence. This generates the reported total count of 8,453 terminal cell types and includes 3,643 hemibrain-derived cell types (Fig. 3h (right side of the flow chart)) and 4,581 proposals for new types. New types consist of 3,504 CBXXXX types, 65 new visual centrifugal neuron types (‘c’ prefix, for example, cL08), 173 new VPN types (‘e’ suffix, for example, LTe07), 602 new AN types (‘AN_’ or ‘SA_’ prefix, for example, AN_SMP_1) and 237 new DN types (‘e’ suffix, for example, DNge094). The remaining 229 types are cell types known from other literature, for example, columnar cell types of the optic lobes.

    Hemibrain cell type matching

    We first used NBLAST38 to match FlyWire neurons to hemibrain cell types (see ‘Morphological comparisons’ section). From the NBLAST scores, we extracted, for each FlyWire neuron, a list of potential cell type hits using all hits in the 90th percentile. Individual FlyWire neurons were co-visualized with their potential hits in neuroglancer (see the ‘Data availability’ and ‘Code availability’ sections) and the correct hit (if found) was recorded. In difficult cases, we would also inspect the subtree of the NBLAST dendrograms containing the neurons in questions to include local cluster structure in the decision making (Extended Data Fig. 4e). In cases in which two or more hemibrain cell types could not be cleanly delineated in FlyWire (that is, there were no corresponding separable clusters) we recorded composite (many:1) type matches (Fig. 3i and Extended Data Figs. 4g and 12).

    When a matched type was either missing large parts of its arbours due to truncation in the hemibrain or the comparison with the FlyWire matches suggested closer inspection was required, we used cross-brain connectivity comparisons (see the section below) to decide whether to adjust (split or merge) the type. A merge of two or more hemibrain types was recorded as, for example, SIP078,SIP080, while a split would be recorded as PS090a and PS090b (that is, with a lower-case letter as a suffix). In rare cases in which we were able to find a match for an untyped hemibrain neuron, we would record the hemibrain body ID as hemibrain type and assign a CBXXXX identifier as cell type.

    Finally, the hemibrain introduced the concept of morphology types and ‘connectivity types’2. The latter represent refinements of the former and differ only in their connectivity. For example, morphology type SAD051 splits into two connectivity types: SAD051_a and SAD051_b, for which the _{letter} indicates that these are connectivity types. Throughout our FlyWire↔hemibrain matching efforts we found connectivity types hard to reproduce and our default approach was to match only up to the morphology type. In some cases, for example, antennal lobe local neuron types like lLN2P_a and lLN2P_b, we were able to find the corresponding neurons in FlyWire.

    Note that, in numerous cases that we reviewed but remain unmatched, we encountered what we call ambiguous ‘daisy-chains’: imagine four fairly similar cell types, A, B, C and D. Often these adjacent cell types represent a spectrum of morphologies where A is similar to B, B is similar to C and C is similar to D. The problem now is in unambiguously telling A from B, B from C and C from D. But, at the same time, A and D (on the opposite ends of the spectrum) are so dissimilar that we would not expect to assign them the same cell type (Fig. 3k and Extended Data Fig. 4h). These kinds of graded or continuous variation have been observed in a number of locations in the mammalian nervous system and represent one of the classic complications of cell typing18. Absent other compelling information that can clearly separate these groups, the only reasonable option would seem to be to lump them together. As this would erase numerous proposed hemibrain cell types, the de facto standard for the fly brain, we have been conservative about making these changes pending analysis of additional connectome data2.

    Hemibrain cell type matching with connectivity

    In our hemibrain type matching efforts, about 12% of cell types could not be matched 1:1. In these cases, we used across-dataset connectivity clustering (for example, to confirm the split of a hemibrain type or a merger of multiple cell types). To generate distances, we first produced separate adjacency matrices for each of the three hemispheres (FlyWire left, right and hemibrain). In these matrices, each row is a query neuron and each column is an up- or downstream cell type; the values are the connection weights (that is, number of synapses). We then combine the three matrices along the first axis (rows) and retain only the cell types (columns) that have been cross-identified in all hemispheres. From the resulting observation vector, we calculate a pairwise cosine distance. It is important to note that this connectivity clustering depends absolutely on the existence of a corpus of shared labels between the two datasets—without such shared labels, which were initially defined by morphological matching as described above, connectivity matching cannot function.

    This pipeline is implemented in the coconatfly package (Table 1), which provides a streamlined interface to carry out such clustering. For example the following command can be used to see if the types given to a selection of neurons in the Lateral Accessory Lobe (LAL) are robust:

    cf_cosine_plot(cf_ids(‘/type:LAL0(08|09|10|42)’, datasets=c(“flywire”, “hemibrain”)))

    .

    An optional interactive mode allows for efficient exploration within a web browser. For further details and examples, see https://natverse.org/coconatfly/.

    Defining robust cross-brain cell types

    In Fig. 6, we used two kinds of distance metrics—one calculated from connectivity alone (used for FC1–3; Fig. 6e–g) and a second combining morphology + connectivity (used for FB1–9; Fig. 6h and Extended Data Fig. 8b–f) to help define robust cross-brain cell types. The connectivity distance is as described in the ‘Hemibrain cell type matching with connectivity’ section above). We note that the central complex retyping used FlyWire connectivity from the 630 release. The combined morphology + connectivity distances were generated by taking the sum of the connectivity and NBLAST distances. Connectivity-only works well in the case of cell types that do not overlap in space but instead tile a neuropil. For cell types that are expected to overlap in space, we find that adding NBLAST distances is a useful constraint to avoid mixing of otherwise clearly different types. From the distances, we generated a dendrogram representation using the Ward algorithm and then extracted the smallest possible clusters that satisfy two criteria: (1) each cluster must contain neurons from all three hemispheres (hemibrain, FlyWire right and FlyWire left); (2) within each cluster, the number of neurons from each hemisphere must be approximately equal.

    We call such clusters ‘balanced’. The resulting groups were then manually reviewed.

    Defining new provisional cell types

    After the hemibrain type matching effort, around 40% of central brain neurons remained untyped. This included both neurons mostly or entirely outside the hemibrain volume (for example, from the GNG) but also neurons for which the potential hemibrain type matches were too ambiguous. To provide provisional cell types for these neurons, we ran the same cell typing pipeline described in the ‘Defining robust cross-brain cell types’ section above on the two hemispheres of FlyWire alone. In brief, we produced a morphology + connectivity co-clustering for each individual hemilineage (neurons without a hemilineage such as putative primary neurons were clustered separately) and extracted ‘balanced’ clusters, which were manually reviewed (Fig. 6i,j and Extended Data Fig. 9). Reviewed clusters were then used to add new or refine existing cell and hemibrain types:

    • Clusters consisting entirely of previously untyped neurons were given a provisional CBXXXX cell type.

    • Clusters containing a mix of hemibrain-typed and untyped neurons typically meant that, after further investigation, the untyped neurons were given the same hemibrain type.

    • Hemibrain types split across multiple clusters were double checked (for example, by running a triple-hemisphere connectivity clustering), which often led to a split of the hemibrain type; for example, SMP408 was split into SMP408a–d.

    • In rare cases, clusters contained a mix of two or more hemibrain types; these were double checked and the hemibrain types corrected (for example, by merging two or more hemibrain types, or by removing hemibrain type labels).

    To validate a subset of the new, provisional cell types, we re-ran the clustering using three hemispheres (FlyWire + hemibrain) on 25 cross-identified hemilineages that are not truncated in the hemibrain (Extended Data Fig. 9). The procedure was otherwise the same as for the double-clustering.

    Optic lobe cell typing

    We provide cell type annotations for >92% of neurons in both optic lobes. The vast majority of these types are based on previous literature42,93,94,95,96,97,98,99. We started the typing effort by annotating well-known large tangential cells (for example, Am1 or LPi12), VPNs (for example, LT1s) as well as photoreceptor neurons. From there, we followed two general strategies, sometimes in combination: (1) for neurons with known connectivity fingerprints, we specifically hunted upstream or downstream of neurons of interest (for example, looking for T4a neurons upstream of LPi12). (2) We ran connectivity clustering as described above on both optic lobes combined. Clusters were manually reviewed and matched against literature. This was done iteratively; with each round adding new or refining existing cell types to inform the next round of clustering. Clusters that we could not confidently match against a previously described cell type were assigned a provisional (CBXXXX) type.

    This effort was carried out independently of other FlyWire optic lobe intrinsic neuron typing, including ref. 23; the sole exception was the Mi1 cell type, which was initially based on annotations reported previously100 and then reviewed. For this reason ref. 100 should be cited for the Mi1 annotations. Note that our typing focuses on previously reported cell types rather than defining new ones, but covers both optic lobes to enable accurate typing of visual project neurons (by defining their key inputs). For the 38,461 neurons of the right optic lobe (for which a comparison is possible), we report 156 cell types for 35,567 neurons compared with 229 cell types for 37,345 neurons in ref. 23.

    VPNs and VCNs

    Similar to cell typing in the central brain, a significant proportion of VPN (61%) and visual centrifugal neuron (VCN) (60%) types are derived from the hemibrain (see the ‘Hemibrain cell type matching’ section). These annotations are listed in the hemibrain_type column in the Supplementary Data.

    To assign cell types to the remaining neurons and in some cases also to refine existing hemibrain types, we ran a double-hemisphere (FlyWire left–right) co-clustering. For VCNs, this was done as part of the per-hemilineage morphology-connectivity clustering described in the ‘Defining new provisional cell types’ section above. For VPNs of which the dendrites typically tile the optic neuropils, we generated and reviewed a separate connectivity-only clustering on all VPNs together. Groups extracted from this clustering were also cross-referenced with new literature from parallel typing efforts100,101 and those new cell type names were preferred for the convenience of the research community. In cases in which literature references could not be found, systematic names were generated de novo using the schemata below.

    For VPNs the nomenclature follows the format [neuropil][C/T][e][XX], where neuropil refers to regions innervated by VPN dendrites; C/T denotes columnar versus tangential organization; e indicates identification through EM; and XX represents a zero padded two digit number.

    For example: ‘MTe47’ for ‘medulla-tangential 47’.

    For VCNs, the nomenclature follows the format [c][neuropil][XX], where c denotes centrifugal; neuropil refers to regions innervated by VCN axons; and XX represents a zero padded two digit number.

    For example, ‘cM12’ for ‘centrifugal medulla-targeting 12’.

    Note that new names were also given to non-canonical, generic hemibrain types, such as IB006. All new names are recorded in the cell_type column in the Supplementary Data.

    The majority of VPNs (99.6%) and VCNs (98.3%) were assigned to specific types. Only 29 VPNs and 9 VCNs could not be confidently assigned a cell type and were therefore left untyped.

    Sensory and motor neurons

    We identified all non-visual sensory and motor neurons entering/exiting the brain through the antennal, eye, occipital and labial nerves by screening all axon profiles in a given nerve.

    Sensory neurons were further cross-referenced to existing literature to assign modalities (through the class field) and, where applicable, a cell type. Previous studies have identified almost all head mechanosensory bristle and taste peg mechanosensory neurons102 in the left hemisphere (at the time of publication: right hemisphere). Gustatory sensory neurons were previously identified in ref. 103 and Johnston’s organ neurons in refs. 104,105 in a version of the FAFB that used manual reconstruction (https://fafb.catmaid.virtualflybrain.org). Those neurons were identified in the FlyWire instance by transformation and overlay onto FlyWire space as described previously102.

    Johnston’s organ neurons in the right hemisphere were characterized based on innervation of the major AMMC zones (A, B, C, D, E and F), but not further classified into subzone innervation as shown previously104. Other sensory neurons (mechanosensory bristle neurons, taste peg mechanosensory neurons and gustatory sensory neurons) in the right hemisphere were identified through NBLAST-based matching of their mirrored morphology to the left hemisphere and expert review. Olfactory, thermosensory and hygrosensory neurons of the antennal lobes were identified through their connectivity to cognate uniglomerular projection neurons and NBLAST-based matching to previously identified hemibrain neurons40,106.

    Visual sensory neurons (R1–6, R7–8 and ocellar photoreceptor neurons) were identified by manually screening neurons with pre-synapse in either the lamina, the medulla and/or the ocellar ganglia93.

    ANs and DNs

    We seeded all profiles in a cross-section in the ventral posterior GNG through the cervical connective to identify all neurons entering and exiting the brain at the neck. We identified all DNs based on the following criteria: (1) soma located within the brain dataset; and (2) main axon branch leaving the brain through the cervical connective.

    We next classified the DNs based on their soma location according to a previous report107. In brief, the soma of DNa, DNb, DNc and DNd is located in the anterior half (a, anterior dorsal; b, anterior ventral; c, in the pars intercerebralis; d, outside cell cluster on the surface) and DNp in the posterior half of the central brain. DNg somas are located in the GNG.

    To identify DNs described in ref. 107 in the EM dataset, we transformed the volume renderings of DN GAL4 lines into FlyWire space. Displaying EM and LM neurons in the same space enabled accurate matching of closely morphologically related neurons. For DNs without available volume renderings, we identified candidate EM matches by eye, transformed them into JRC2018U space and overlaid them onto the GAL4 or Split GAL4 line stacks (named in ref. 107 for that type) in FIJI for verification. Using these methods, we identified all but two (DNd01 and DNg25) in FAFB/FlyWire and annotated their cell type with the published nomenclature. All other unmatched DNs received a systematic cell type consisting of their soma location, an ‘e’ for EM type and a three digit number (for example, DNae001). A detailed account and analysis of DNs has been published108 separately.

    ANs were identified based on the following criteria: (1) no soma in the brain; and (2) main branch entering through the neck connective (note that some ANs make a dendrite after entry through the neck connective and then an axon).

    To distinguish sensory ascending (SA) neurons from ANs, we analysed SA neuron morphology in the male VNC dataset MANC109,110. First, we identified which longitudinal tract they travel to ascend to the brain111 and then found GAL4 lines matching their VNC morphology. We next identified putative matching axons in the brain dataset by morphology and tract membership. A detailed description of this process and the lines used has been published separately108.

    FAFB laterality

    In the fly brain, the asymmetric body is reproducibly around 4 times larger on the right hemisphere than on the left112,113,114, except in rare cases of situs inversus114,115. However, completion of the FlyWire whole-brain connectome and associated cell typing showed the asymmetric body to be larger on the apparent left side of the brain rather than the right, suggesting an inversion of the left–right axis during initial acquisition of EM images comprising the FAFB dataset17. This hypothesis was confirmed by comparing of FAFB sample grids imaged using differential interference contrast microscopy to low-magnification views of corresponding EM image mosaics using CATMAID or neuroglancer. Grids were chosen with particularly obvious staining and sample preparation artefacts visible both in the differential interference contrast and low-magnification EM images (Extended Data Fig. 1), confirming that a left–right axis inversion had taken place during image acquisition.

    Owing to the extensive post-processing of the FAFB dataset and derived datasets (for example, transformation fields, image mosaicing and stack registrations to produce aligned volumes, segmentation supervoxels, proofread neuron segmentations, skeletons, meshes and myriad 3D visualizations), which had been undertaken at the time at which this error was discovered, we deemed it impractical to correct this error at the raw data level. Instead, we break a convention of presentation: usually, frontal views of the fly brain place the fly’s right on the viewer’s left. Instead, in this paper, frontal views of the fly brain place the fly’s right on the viewer’s right—similar to the view one has of oneself while looking in a mirror. This maintains consistency with past publications. However, note that all labels of left and right in the figures in this paper, our companion papers, the supplemental annotations and associated digital repositories (for example, https://codex.flywire.ai, FAFB/FlyWire CATMAID) have been corrected to reflect the error during data acquisition. In these resources, a neuron labelled as being on the left is indeed on the left of the fly’s brain.

    For consistency with visualizations and datasets obeying the standard convention (fly’s right on viewer’s left), FlyWire data can be mirrored. To facilitate this, we provide tools to digitally mirror FAFB-FlyWire data using the Python flybrains (https://github.com/navis-org/navis-flybrains) or natverse nat.jrcbrains (https://github.com/natverse/nat.jrcbrains) packages (Extended Data Fig. 1c), through the

    navis.mirror_brain()

    and

    nat.jrcbrains::mirror_fafb()

    function calls, respectively. See the fafbseg-py documentation for a tutorial on mirroring.

    We also provide a neuroglancer scene in which both FlyWire and hemibrain data are displayed in the correct orientation: https://tinyurl.com/flywirehbflip783. In this scene, a frontal view has both FAFB and hemibrain RHS to the left of the screen, obeying the standard convention. The scene displays the SA1 and SA2 neurons, which target the right asymmetric body for both FlyWire and the hemibrain, confirming that the RHS for both datasets has been superimposed (compare with Extended Data Fig. 1a).

    Morphological comparisons

    Throughout our analyses, NBLAST38 was used to generate morphological similarity scores between neurons—for example, for matching neurons between the FlyWire and the hemibrain datasets, or for the morphological clustering of the hemilineages. In brief, NBLAST treats neurons as point clouds with associated tangent vectors describing directionality, so called dotprops. For a given query→target neuron pair, we perform a k-nearest neighbours search between the two point clouds and score each nearest-neighbour pair by their distance and the dot product of their vector. These are then summed up to compute the final query→target NBLAST score. It is important to note that direction of the NBLAST matters, that is, NBLASTing neurons A→B≠B→A. Unless otherwise noted, we use the minimum between the forward and reverse NBLAST scores.

    The NBLAST algorithm is implemented in both navis and the natverse (Table 1). However, we modified the navis implementation for more efficient parallel computation in order to scale to pools of more than 100,000 neurons. For example, the all-by-all NBLAST matrix for the full 139,000 FlyWire neurons alone occupies over 500 GB of memory (32 bit floats). Most of the large NBLASTs were run on a single cluster node with 112 CPUs and 1 TB RAM provided by the MRC LMB Scientific Computing group, and took between 1 and 2 days (wall time) to complete.

    Below, we provide recipes for the different NBLAST analyses used in this paper:

    FlyWire all-by-all NBLAST

    For this NBLAST, we first generated skeletons using the L2 cache. In brief, underlying the FlyWire segmentation is an octree data structure where level 0 represents supervoxels, which are then agglomerated over higher levels116. The second layer (L2) in this octree represents neurons as chunks of roughly 4 × 4 × 10 μm in size, which is sufficiently detailed for NBLAST. The L2 cache holds precomputed information for each L2 chunk, including a representative x/y/z coordinate in space. We used the x/y/z coordinates and connectivity between chunks to generate skeletons for all FlyWire neurons (implemented in fafbseg; Table 1). Skeletons were then pruned to remove side branches smaller than 5 μm. From those skeletons, we generated the dotprops for NBLAST using navis.

    Before the NBLAST, we additionally transformed dotprops to the same side by mirroring those from neurons with side right onto the left. The NBLAST was then run only in forward direction (query→target) but, because the resulting matrix was symmetrical, we could generate minimum NBLAST scores using the transposed matrix: min(A + AT).

    This NBLAST was used to find left–right neuron pairs, define (hemi)lineages and run the morphology group clustering.

    FlyWire—hemibrain NBLAST

    For FlyWire, we re-used the dotprops generated for the all-by-all NBLAST (see the previous section). To account for the truncation of neurons in the hemibrain volume, we removed points that fell outside the hemibrain bounding box.

    For the hemibrain, we downloaded skeletons for all neurons from neuPrint (https://neuprint.janelia.org) using neuprint-python and navis (Table 1). In addition to the approximately 23,000 typed neurons, we also included all untyped neurons (often just fragments) for a total of 98,000 skeletons. These skeletons were pruned to remove twigs smaller than 5 μm and then transformed from hemibrain into FlyWire (FAFB14.1) space using a combination of non-rigid transforms116,117 (implemented through navis, navis-flybrain and fafbseg; Table 1). Once in FlyWire space, they were resampled to 0.5 nodes per μm of cable to approximately match the resolution of the FlyWire L2 skeletons, and then turned into dotprops. The NBLAST was then run both in forward (FlyWire to hemibrain) and reverse (hemibrain to FlyWire) direction and the minimum between both were used.

    This NBLAST allowed us to match FlyWire left against the hemibrain neurons. To also allow matching FlyWire right against the hemibrain, we performed a second run after mirroring the FlyWire dotprops to the opposite side.

    In Fig. 3c,d, we manually reviewed NBLAST matches. For this, we sorted hemibrain neurons based on their highest NBLAST score to a FlyWire neuron into bins with a width of 0.1. From each bin, we picked 30 random hemibrain neurons (except for bin 0–0.1 which contained only 27 neurons in total) and scored their top five FlyWire matches as to whether a plausible match was among them. In total, this sample contained 237 neurons.

    Cross-brain co-clustering

    The pipeline for the morphology-based across brain co-clustering used in Fig. 6 and Extended Data Fig. 9 was essentially the same as for the FlyWire–hemibrain NBLAST with two exceptions: (1) we used high-resolution FlyWire skeletons instead of the coarser L2 skeletons (see below); and (2) both FlyWire and hemibrain skeletons were resampled to 1 node per μm before generating dotprops.

    High-resolution skeletonization

    In addition to the coarse L2 skeletons, we also generated high-resolution skeletons that were, for example, used to calculate the total length of neuronal cable reported in our companion paper1 (149.2 m). In brief, we downloaded neuron meshes (LOD 1) from the flat 783 segmentation (available at gs://flywire_v141_m783) and skeletonized them using the wavefront method implemented in skeletor (https://github.com/navis-org/skeletor). Skeletons were then rerooted to their soma (if applicable), smoothed (by removing small artifactual bristles on the backbone), healed (segmentation issues can cause breaks in the meshes) and slightly downsampled. A modified version of this pipeline is implemented in fafbseg. Skeletons are available for download (see the ‘Data availability’ and ‘Code availability’ sections).

    Connectivity normalization

    Throughout this paper, the basic measure of connection strength is the number of unitary synapses between two or more neurons79; connections between adult fly neurons can reach thousands of such unitary synapses2. Previous work in larval Drosophila has indicated that synaptic counts approximate contact area118, which is most commonly used in mammalian species when a high-resolution measure of anatomical connection strength is required. Connectomics studies also routinely use connection strength normalized to the target cell’s total inputs71,79. For example, if neurons i and j are connected by 10 synapses and neuron j receives 200 inputs in total, the normalized connection weight i to j would be 5%. A previous study119 showed that while absolute number of synapses for a given connection changes drastically over the course of larval stages, the proportional (that is, normalized) input to the downstream neuron remains relatively constant119. Importantly, we have some evidence (Fig. 4g) that normalized connection weights are robust against technical noise (differences in reconstruction status, synapse detection). Note that, for analyses of mushroom body circuits, we use an approach based on the fraction of the input or output synaptic budget associated with different KC cell types; this differs slightly from the above definition and will be detailed in a separate section below.

    Connectivity stereotypy analyses

    For analyses on connectivity stereotypy (Fig. 4 and Extended Data Fig. 6) we excluded a number of cell types:

    • KCs, due to the high variability in numbers and synapse densities in the mushroom body lobes between FlyWire and the hemibrain (Fig. 5 and Extended Data Fig. 7).

    • Cell types that exist only on the left but not the right hemisphere of the hemibrain because our comparison was principally against the right hemisphere.

    • Antennal lobe receptor neurons, because truncation/fragmentation in the hemibrain causes some ambiguity with respect to their side annotation.

    • Cell types with members that have been marked as being affected by sample or imaging artefacts (that is, status ‘outlier_seg’).

    • VPNs, as they are heavily truncated in the hemibrain.

    Among the remaining types, we used only the 1:1 and 1:many but not the many:1 matches. Taken together, we used 2,954 (hemibrain) types for the connectivity stereotypy analyses.

    Availability through CATMAID Spaces

    To increase the accessibility and reach of the annotated FlyWire connectome, meshes of proofread FlyWire neurons and synapses were skeletonized and imported into CATMAID, a widely used web-based tool for collaborative tracing, annotation and analysis of large-scale neuronal anatomy datasets79,120 (https://catmaid.org; Extended Data Fig. 10). Spatial annotations like skeletons are modelled using PostGIS data types, a PostgreSQL extension that is popular in the geographic information system community. This enables us to reuse many existing tools to work with large spatial datasets, for example, indexes, spatial queries and mesh representation.

    A publicly available version of the FlyWire CATMAID project is available online (https://fafb-flywire.catmaid.org). This project uses a new extension, called CATMAID Spaces (https://catmaid.org/en/latest/spaces.html), which allows users to create and administer their own tracing and annotation environments on top of publicly available neuronal image volumes and connectomic datasets. Moreover, users can now login through the public authentication service ORCiD (https://www.orcid.org), so that everyone can log-in on public CATMAID projects. Users can also now create personal copies (Spaces) of public projects. The user then becomes an administrator, and can invite other users, along with the management of their permissions in this new project. Invitations are managed through project tokens, which the administrator can generate and send to invitees for access to the project. Both CATMAID platforms can talk to each other and it is possible to load data from the dedicated FAFB-FlyWire server in the more general Spaces environment.

    Metadata annotations for each neuron (root id, cell type, hemilineage, neurotransmitter) were imported for FlyWire project release 783. Skeletons for all 139,255 proofread neurons were generated from the volumetric meshes (see the ‘High-resolution skeletonization’ section) and imported into CATMAID, resulting in 726,831,877 treenodes. To reduce the import time, skeletons were imported into CATMAID directly as database inserts through SQL, rather than through public RESTful APIs. FlyWire root IDs are available as metadata for each neuron, facilitating interchange with related resources such as FlyWire Codex1. Synapses attached to reconstructed neurons were imported as CATMAID connector objects and attached to neuron skeletons by doing a PostgreSQL query to find the nearest node on each of the partner skeletons. Connector objects were linked to postsynaptic partners only if the downstream neuron was in the proofread data release (180,016,288 connections from the 130,054,535 synapses with at least one partner in the proofread set).

    Synapse counts

    Insect synapses are polyadic, that is, each presynaptic site can be associated with multiple postsynaptic sites. In contrast to the Janelia hemibrain dataset, the synapse predictions used in FlyWire do not have a concept of a unitary presynaptic site associated with a T-bar46. Thus, pre-synapse counts used in this paper do not represent the number of presynaptic sites but rather the number of outgoing connections.

    In Drosophila connectomes, reported counts of the inputs (post-synapses) onto a given neuron are typically lower than the true number. This is because fine-calibre dendritic fragments frequently cannot be joined onto the rest of the neuron, instead remaining as free-floating fragments in the dataset.

    Technical noise model

    To model the impact of technical noise such as proofreading status and synapse detection on connectivity, we first generated a fictive ‘100%’ ground-truth connectivity. We took the connectivity between cell-typed left FlyWire neurons and scaled each edge weight (the number of synapses) by the postsynaptic completion rates in the respective neuropil. For example, all edge weights in the left mushroom body calyx (CA), which has a postsynaptic completion rate of 52.5%, were scaled by a factor of 100/52.5 = 1.9.

    In the second step, we simulated the proofreading process by randomly drawing (without replacement) individual synaptic connections from the fictive ground-truth until reaching a target completion rate. We further simulate the impact of false positives and false negatives by randomly adding and removing synapses to/from the draw according to the precision (0.72) and recall (0.77) rates reported previously46. In each round, we made two draws: (1) A draw using the original per-neuropil postsynaptic completion rates; and (2) a draw where we flip the completion rates for left and right neuropils, that is, use the left CA completion rate for the right CA and vice versa.

    In each of the 500 rounds that we ran, we drew two weights for each edge. Both stem from the same fictive 100% ground-truth connectivity but have been drawn according to the differences in left versus right hemisphere completion rates. Combining these values, we calculated the mean difference and quantiles as function of the weight for the FlyWire left (that is, the draw that was not flipped) (Fig. 4i). We focussed this analysis on edge weights between 1 and 30 synapses because the frequency of edges stronger than that is comparatively low, leaving gaps in the data.

    KC analyses

    Connection weight normalization and synaptic budget analysis

    When normalizing connection weights, we typically convert them to the percentage of total input onto a given target cell (or cell type). However, in the case of the mushroom body, the situation is complicated by what we think is a technical bias in the synapse detection methods used for the two connectomes that causes certain kinds of unusual connections to be very different in frequency between the two datasets. We find that the total number of post-synapses as well as the post-synapse density in the mushroom body lobes are more than doubled in the hemibrain compared with in FlyWire (Extended Data Fig. 7b,c). This appears to be explained by certain connections (especially KC to KC connections, which are predominantly arranged with an unusual rosette configuration along axons and of which the functional significance is poorly understood121) being much more prevalent in the hemibrain than in FlyWire (Extended Data Fig. 7d). Some other neurons, including the APL giant interneuron, also make about twice as many synapses onto KCs in the hemibrain compared with in FlyWire (Extended Data Fig. 7a). As a consequence of this large number of inputs onto KC axons in the hemibrain, input percentages from all other cells are reduced in comparison with FlyWire.

    To avoid this bias, and because our main goal in the KC analysis was to compare different populations of KCs, we instead expressed connectivity as a fraction of the total synaptic budget for upstream or downstream cell types. For example, we examined the fraction of the APL output that is spent on each of the different KC types. Similarly, we quantified connectivity for individual KCs as a fraction of the budget for the whole KC population.

    Calculating K from observed connectivity

    Calculation of K, that is, the number of unique odour channels that each KC receives input from, was principally based on their synaptic connectivity. For this, we looked at their inputs from uniglomerular ALPNs and examined from how many of the 58 antennal lobe glomeruli does a KC receive input from. K as reported in Fig. 6 is based on non-thresholded connectivity. Filtering out weak connections does lower K but, importantly, our observations (for example, that KCg-m cells have a lower K in FlyWire than in the hemibrain) are stable across thresholds (Extended Data Fig. 7g).

    KC model

    A simple rate model of neural networks122 was used to generate the theoretical predictions of K, the number of ALPN inputs that each KC receives (Fig. 5k). KC activity is modelled by

    $${\bf{h}}={\bf{W}}\cdot {{\bf{r}}}_{{\rm{P}}{\rm{N}}},$$

    where h is a vector of length M representing KC activity, \({\bf{W}}\) is an M × N matrix representing the synaptic weights between the KCs and PNs, rPN is a vector of length N representing PN activity. The number of KCs and ALPNs is denoted by M and N, respectively. In this model, the PN activity is assumed to have zero mean, \({\bar{{\bf{r}}}}_{{\rm{P}}{\rm{N}}}=0\), and be uncorrelated, \(\bar{{{\bf{r}}}_{{\rm{P}}{\rm{N}}}\cdot {{\bf{r}}}_{{\rm{P}}{\rm{N}}}}={{\bf{I}}}_{N}\). Here, \({{\bf{I}}}_{N}\) is an N × N identity matrix and \({\bar{{\bf{r}}}}_{{\rm{P}}{\rm{N}}}\) denotes the average taken over independent realizations of \({{\bf{r}}}_{{\rm{P}}{\rm{N}}}\). Then, the ijth element of the covariance matrix of h is

    $$[{\bf{C}}{]}_{ij}=\bar{{[{\bf{h}}]}_{i}{[{\bf{h}}]}_{j}}=\mathop{\sum }\limits_{k=0}^{N}[{\bf{W}}{]}_{ik}{[{\bf{W}}]}_{jk}.$$

    More detailed calculations can be found in a previous report122. Randomized and homogeneous weights were used to populate \({\bf{W}}\), such that each row in \({\bf{W}}\) has K elements that are 1 − α and N − K elements that are −α. The parameter α represents a homogeneous inhibition corresponding to the biological, global inhibition by APL. The value inhibition was set to be α = A/M, where A = 100 is an arbitrary constant and M is the number of KCs in each of the three datasets. The primary quantity of interest is the dimension of the KC activities defined by122:

    $$\dim ({\bf{h}})=\frac{{(\text{Tr}[{\bf{C}}])}^{2}}{\text{Tr}[{{\bf{C}}}^{2}]}$$

    and how it changes with respect to K, the number of input connections. In other words, what are the numbers of input connections K onto individual KCs that maximize the dimensionality of their responses, h, given M KCs, N ALPNs and a global inhibition α?

    From Fig. 5k, the theoretical values of K that maximize dim(h) in this simple model demonstrate the consistent shift towards lower values of K found in the FlyWire left and FlyWire right datasets when compared with the hemibrain.

    The limitations of the model are as follows:

    1. (1)

      The values in the connectivity matrix \({\bf{W}}\) take only two discrete values, either 0 and 1 or 1 − α and α. In a way, this helps when calculating analytical results for the dimensionality of the KC activities. However, it is unrealistic as the connectomics data give the number of synaptic connections between the ALPNs and the KCs.

    2. (2)

      The global inhibition provided by APL to all of the mixing layer neurons is assumed to take a single value for all neurons. In reality, the level of inhibition would be different depending on the number of synapses between APL and the mixing layer neurons.

    3. (3)

      It is unclear whether the simple linear rate model presented in the original paper represents the behaviour of the biological neural circuit well. Furthermore, it remains unproven that the ALPN-KC neural circuit is attempting to maximize the dimensionality of the KC activities, albeit the theory is biologically well motivated (but see refs. 49,50).

    4. (4)

      The number of input connections to each mixing layer neuron is kept at a constant K for all neurons. It is definitely a simplification that can be corrected by introducing a distribution P(K) but this requires further detailed modelling.

    Statistical analyses

    Unless otherwise stated, statistical analyses (such as Pearson R or cosine distance) were performed using the implementations in the scipy123 Python package. To determine statistical significance, we used either t-tests for normally distributed samples, or Kolmogorov–Smirnov tests otherwise.

    Cohen’s d124 was calculated as follows:

    $$d=\frac{{\bar{x}}_{1}-{\bar{x}}_{2}}{s}$$

    where pooled s.d. s is defined as:

    $$s=\sqrt{\frac{({n}_{1}\,-\,1){s}_{1}^{2}\,+\,({n}_{2}\,-\,1){s}_{2}^{2}}{{n}_{1}\,+\,{n}_{2}\,-\,2}}$$

    where the variance for one of the groups is defined as:

    $${s}_{1}^{2}=\frac{1}{{n}_{1}-1}{\sum }_{i=1}^{{n}_{1}}{({x}_{1,i}-{\bar{x}}_{1})}^{2}$$

    and similar for the other group.

    Enhanced box plots—also called letter-value plots125—in Fig. 5h and Extended Data Fig. 7f are a variation of box plots better suited to represent large samples. They replace the whiskers with a variable number of letter values where the number of letters is based on the uncertainty associated with each estimate, and therefore on the number of observations. The ‘fattest’ letters are the (approximate) 25th and 75th quantiles, respectively, the second fattest letters the (approximate) 12.5th and 87.5th quantiles and so on. Note that the width of the letters is not related to the underlying data.

    Mapping to the VirtualFlyBrain database

    The VirtualFlyBrain (VFB) database22 curates and extracts information from all publications relating to Drosophila neurobiology, especially neuroanatomy. The majority of published neuron reconstructions, including those from the hemibrain, can be examined in the VFB. Each individual neuron (that is, one neuron from one brain) has a persistent ID (of the form VFB_xxxxxxxx). Where cell types have been defined, they have an ontology ID (for example, FBbt_00047573, the ID for the DNa02 DN cell type). Importantly, VFB cross-references neuronal cell types across publications even if different terms were used. It also identifies driver lines to label many neurons. In this paper, we generate an initial mapping providing FBbt IDs for the closest and fine-grained ontology term that already exists in their database. For example, a FlyWire neuron with a confirmed hemibrain cell type will receive a FBbt ID that maps to that exact cell type, while a DN that has been given a new cell type might only map to the coarser term ‘adult descending neuron’. Work is already underway with the VFB to assign both ontology IDs (FBbt) to all FlyWire cell types as well as persistent VFB_ids to all individual FlyWire neurons.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Connectome-constrained networks predict neural activity across the fly visual system

    [ad_1]

    Construction of spatially invariant connectome from local reconstructions

    We built a computational model of the fly visual system that is consistent with available connectome data1,2,3,4,5, has biophysically plausible neural dynamics, and can be computationally trained to solve an ethologically relevant behavioural task, namely the estimation of optic flow. To achieve this, we developed algorithms to blend annotations from two separate datasets by transforming, sanitizing, combining and pruning the raw datasets into a coherent connectome spanning all neuropils of the optic lobe (Supplementary Note 1 and Supplementary Data files 1–3).

    The original data stem from focused ion beam scanning electron microscopy datasets from the FlyEM project at Janelia Research Campus. The FIB-25 dataset volume comprises seven medulla columns and the FIB-19 dataset volume comprises the entire optic lobe and, in particular, detailed connectivity information for inputs to both the T4 and T5 pathways2,3,4. The data available to us consisted of 1,801 neurons, 702 neurons from FIB-25 and 1,099 neurons from FIB-19. For about 830 neurons, the visual column was known from hand annotation. These served as reference positions. Of the 830 reference positions, 722 belong to neuron types selected for simulation. None of the T5 cells, whose directional selectivity we aimed to elucidate, was annotated. We therefore built an automated, probabilistic expectation maximization algorithm that takes synaptic connection statistics, projected synapse centre-of-mass clusters and existing column annotations into account. We verified the quality of our reconstruction as described in Supplementary Note 1. Only the neurons consistently annotated with both 100% and 90% of reference positions used were counted to estimate the number of synapses between cell types and columns, to prune neuron offsets with low confidences.

    Synaptic signs for most cell types were predicted on the basis of known expression of neurotransmitter markers (primarily the cell-type-specific transcriptomics data from ref. 30). For a minority of cell types included in the model, no experimental data on transmitter phenotypes were available. For these neurons, we used guesses of plausible transmitter phenotypes. To derive predicted synaptic signs from transmitter phenotypes, we assigned the output of histaminergic, GABAergic and glutamatergic neurons as hyperpolarizing and the output of cholinergic neurons as depolarizing. In a few cases, we further modified these predictions on the basis of distinct known patterns of neurotransmitter receptor expression (see ref. 30 for details). For example, output from R8 photoreceptor neurons, predicted to release both acetylcholine and histamine, was treated as hyperpolarizing or depolarizing, respectively, depending on whether a target cell type is known to express the histamine receptor gene ort (which encodes a histamine-gated chloride channel).

    Representing the model as a hexagonal convolutional neural network

    Our end-to-end differentiable61 DMN model of the fly visual system can be interpreted as a continuous-time neural ordinary differential equation62 with a deep convolutional recurrent neural network63 architecture that is trained to perform a computer vision task using backpropagation through time64,65. Our goal was to optimize a simulation of the fly visual system to perform a complex visual information processing task using optimization methods from deep learning. One hallmark of visual systems that has been widely exploited in such tasks is their convolutional nature66,67,68,69 (that is, the fact that the same computations are applied to each pixel of the visual input). To model the hexagonal arrangement of photoreceptors in the fly retina, we developed a hexagonal convolutional neural network (CNN) in the widely used deep learning framework PyTorch21 (ignoring neuronal superposition70), which we used for simulation and optimization of the model. We model columnar cell types, including retinal cells, lamina monopolar and wide-field cells, medulla intrinsic cells, transmedullary cells and T-shaped cells, as well as amacrine cells. The model comprises synapses from all neuropils and downstream- and upstream-projecting connections from the retina, lamina and medulla.

    Neuronal dynamics

    In detail, we simulated point neurons with voltages Vi of a postsynaptic neuron i, belonging to cell type ti using threshold-linear dynamics, mathematically equivalent to commonly used formulations of firing-rate models71

    $${\tau }_{{t}_{i}}{\dot{V}}_{i}=-\,{V}_{i}+\sum _{j}{s}_{ij}+{V}_{{t}_{i}}^{\text{rest}}+{e}_{i}.$$

    (1)

    Neurons of the same cell type share time constants, \({\tau }_{{t}_{i}}\), and resting potentials, \({V}_{{t}_{i}}^{\text{rest}}\). Dynamic visual stimuli were delivered as external input currents ei to the photoreceptor (R1–R8), for all other cell types, ei = 0. In our model, instantaneous graded synaptic release from presynaptic neuron j to postsynaptic neuron i is described by

    $${s}_{{ij}}={w}_{{ij}}\,f({V}_{j})={\alpha }_{{t}_{i}{t}_{j}}{\sigma }_{{t}_{i}{t}_{j}}{N}_{{t}_{i}{t}_{j}\varDelta u\varDelta v}\,f({V}_{j}),$$

    (2)

    comprising the anatomical filters in terms of the synapse count from electron microscopy reconstruction, \({N}_{{t}_{i}{t}_{j}\varDelta u\varDelta v}\), at the offset location \(\varDelta u={u}_{i}-{u}_{j}\) and \(\varDelta v={v}_{i}-{v}_{j}\) in the hexagonal lattice between two types of cells, \({t}_{i}\) and \({t}_{j}\), and further characterized by a sign, \({\sigma }_{{t}_{i}{t}_{j}}\in \{\,-\,1,+1\}\), and a non-negative scaling factor, \({\alpha }_{{t}_{i}{t}_{j}}\).

    The synapse model entails a trainable non-negative scaling factor per filter that is initialized as

    $${\alpha }_{{t}_{i},{t}_{j}}=\frac{0.01}{{\rm{\langle }}{N}_{{t}_{i},{t}_{j}}{{\rm{\rangle }}}_{\varDelta u,\varDelta v}},$$

    with the denominator describing the average synapse count of the filter. Synapse counts, \({N}_{{t}_{i}{t}_{j}\varDelta u\varDelta v}\) from the connectome, and signs, \({\sigma }_{{t}_{i}{t}_{j}}\) from the neurotransmitter and receptor profiling, were kept fixed. The scaling factor was clamped during training to remain non-negative.

    Moreover, at initialization, the resting potentials were sampled from a Gaussian distribution

    $$\begin{array}{c}{V}_{{t}_{i}}^{\text{rest}} \sim {\mathcal{N}}\left({\mu }_{{V}^{\text{rest}}},{\sigma }_{{V}^{\text{rest}}}^{2}\right)\end{array}$$

    with mean \({\mu }_{{V}^{\text{rest}}}=0.5\) (a.u.) and variance \({\sigma }_{{V}^{\text{rest}}}^{2}=0.05\) (a.u.). The time constants were initialized at \({\tau }_{{t}_{i}}=50\,{\rm{ms}}\). The 50 task-optimized DMNs were initialized with the same parameter values. During training, in Euler integration of the dynamics, we clamped the time constants as \({\tau }_{i}=\max \left({\tau }_{i},\varDelta t\right)\), so that they remain above the integration time step Δt at all times.

    In total, the model comprises 45,669 neurons and 1,513,231 synapses, across two-dimensional (2D) hexagonal arrays 31 columns across. The number of free parameters is independent of the number of columns: 65 resting potentials, 65 membrane time constants, 604 scaling factors; and connectome-determined parameters: 604 signs and 2,355 synapse counts. Thus, the number of free parameters in the visual system model is 734.

    In the absence of connectome measurements, the number of parameters to be estimated is much larger. With T = 65 cell types (counting CT1 twice for the compartments in the medulla and lobula) and C = 721 cells per type for simplicity, the number of cells in our model would be TC = 46,865. Assuming a recurrent neural network with completely unconstrained connectivity and simple dynamics \({\tau }_{i}{V}_{i}=-{V}_{i}+{\sum }_{j}{w}_{{ij}}\,f({V}_{j})+{V}_{i}^{{\rm{rest}}}\), we would have to find \({({TC})}^{2}+2({TC})\,=\,\)\(2,196,421,955\) free parameters. Assuming a convolutional recurrent neural network with shared filters between cells of the same postsynaptic type, shared time constants and shared resting potentials, the amount of parameters reduces markedly to \({T}^{2}C+2T=3,046,355\). Further assuming the same convolutional recurrent neural network but additionally that convolutional filters are constrained to F = 5 visual columns (that is, the number of presynaptic input columns in the hexagonal lattice is \(P=3F\left(F+1\right)+1\)), the amount of parameters reduces to \({T}^{2}P+2T=384,605\). Assuming as in our connectome that only Q = 604 connections between cell types exist, this reduces the number of parameters further to \({QP}+2T=55,185\). Instead of parametrizing each individual synapse strength, we assume that synapse strength is proportional to synapse count from the connectome times a scalar for each filter, reducing the number of parameters to \(Q+2T=734\) while providing enough capacity for the DMNs to yield realistic tuning to solve the task.

    Convolutions using scatter and gather operations

    For training the network, we compiled the convolutional architecture specified by the connectome and the sign constraints to a graph representation containing: a collection of parameter buffers shared across neurons and/or connections; a collection of corresponding index buffers indicating where the parameters relevant to a given neuron or connection can be found in the parameter buffers; and a list of pairs (presynaptic neuron index, postsynaptic neuron index) denoting connectivity. This allowed us to efficiently simulate the network dynamics through Euler integration using a small number of element-wise, scatter and gather operations at each time step. We found that this is more efficient than using a single convolution operation or performing a separate convolution for each cell type as each cell type has its own receptive field—some much larger than others—and the number of cells per type is relatively small.

    Optic flow task

    Model training

    An optic flow field for a video sequence consists of a 2D vector field for each frame. The 2D vector at each pixel represents the magnitude and direction of the apparent local movement of the brightness pattern in an image.

    We frame the training objective as a regression task

    $$\hat{{\bf{Y}}}\left[n\right]={\rm{Decoder}}\left({\rm{DMN}}\left({\bf{X}}\left[0\right],…,{\bf{X}}\left[n\right]\right)\right),$$

    with \(\hat{{\bf{Y}}}\) being the optic flow prediction, and X being the visual stimulus sequence from the Sintel dataset, both sampled to a regular hexagonal lattice of 721 columns. With the objective to minimize the square error loss between predicted optic flow and target optic flow fields, we jointly optimized the parameters of both the decoder and the visual system network model described above.

    In detail, for training the network, we added randomly augmented, greyscaled video sequences from the Sintel dataset sampled to a regular hexagonal lattice of 721 columns to the voltage of the 8 photoreceptor cell types (Fig. 1f and equation (1)). We denote a sample from a minibatch of video sequences as \({\bf{X}}\in {{\mathbb{R}}}^{N,C}\), with N being the number of time steps, and C being the number of photoreceptor columns. The dynamic range of the input lies between 0 and 1. Input sequences during training entailed 19 consecutive frames drawn randomly from the dataset and resampled to match the integration rate. At the original frame rate of 24 Hz, this corresponds to a simulation of 792 ms. We did not find that an integration time step smaller than 20 ms (that is, a frame rate of 50 Hz after resampling) yielded qualitatively superior task performance or more realistic tuning predictions. We interpolated the target optic flow in time to 50 Hz temporal resolution. To increase the amount of training data for better generalization, we augmented input and target sequences as described further below. At the start of each epoch, we computed an initial state of the network’s voltages after 500 ms of grey stimulus presentation to initialize the network at a steady state for each minibatch during that epoch. The network integration for a given input X results in simulated sequences of voltages \({\bf{V}}\in {{\mathbb{R}}}^{N,{T}_{C}}\), with TC being the total number of cells. The subset of voltages, \({{\bf{V}}}_{\text{out}}\in {{\mathbb{R}}}^{N,D,C}\), of the D cell types in the black rectangle in Fig. 1g was passed to a decoding network. For decoding, the voltage was rectified to avoid the network finding biologically implausible solutions by encoding in negative dynamic ranges. Furthermore, it was mapped to Cartesian coordinates to apply PyTorch’s standard spatial convolution layers for decoding and on each time step independently. In the decoding network, one layer implementing spatial convolution, batch normalization, softplus activation and dropout, followed by one layer of spatial convolution, transforms the D feature maps into the 2D representation of the estimated optic flow, \(\hat{{\bf{Y}}}\in {{\mathbb{R}}}^{N,2,C}\).

    Using stochastic gradient descent with adaptive moment estimation (β1 = 0.9, β2 = 0.999, learning rate decreased from 5 × 10−5 to 5 × 10−6 in ten steps over iterations, batch size of four) and the automatic gradient calculation of the fully differentiable pipeline, we optimized the biophysical parameters through backpropagation through time such that they minimize the L2-norm between the predicted optic flow, \(\hat{{\bf{Y}}}\), and the ground-truth optic flow, Y:

    $$L({\bf{Y}},\widehat{{\bf{Y}}})=\parallel {\bf{Y}}-\widehat{{\bf{Y}}}\parallel .$$

    We additionally optimized the shared resting potentials for 150,000 iterations, using stochastic gradient descent without momentum, with respect to a regularization function of the time-averaged responses to naturalistic stimuli of the central column cell of each cell type, tcentral, to encourage configurations of resting potentials that lead to non-zero and non-exploding activity in all neurons in the network. We weighted these terms independently with γ= 1, encouraging activity greater than a, and δ= 0.01, encouraging activity less than a. We chose \({\lambda }_{V}=0.1\) and a= 5 in arbitrary units. With B being the batch size and T being the number of all cell types, the regularizer is

    $$R(V)=\frac{{\lambda }_{V}}{BT}\sum _{b}\sum _{{t}_{{\rm{central}}}}\{\begin{array}{cc}\gamma {(\bar{V}-a)}^{2}, & {\rm{if}}\,\bar{V}=\frac{1}{N}\sum _{n}{V}_{b{t}_{{\rm{central}}}}[n]\le a\\ \delta {(\bar{V}-a)}^{2}, & {\rm{if}}\,\bar{V} > a.\end{array}$$

    We regularly checkpointed the error measure \(L\left({\bf{Y}},\hat{{\bf{Y}}}\right)\) averaged across a held-out validation set of Sintel video clips. Models generalized on optic flow computation after about 250,000 iterations, yielding functional candidates for our fruit fly visual system models that we analysed with respect to their tuning properties.

    Task-optimization dataset

    We optimized the network on 23 sequences from the publicly available computer-animated film Sintel12. The sequences have 20–50 frames, at a frame rate of 24 frames per second and a pixel resolution of 1,024 × 436. The dataset provides optical flow in pixel space for each frame after the first of each sequence. As the integration time steps we use are faster than the actual sampling rate of the sequences, we resample input frames accordingly over time and interpolate the optic flow.

    Fly-eye rendering

    We first transformed the RGB pixel values of the visual stimulus to normalized greyscale between 0 and 1. We translated Cartesian frames into receptor activations by placing simulated photoreceptors in a 2D hexagonal array in pixel space, 31 columns across resulting in 721 columns in total, spaced 13 pixels apart. The transduced luminance at each photoreceptor is the greyscale mean value in the 13 × 13-pixel region surrounding it.

    Augmentation

    We used: random flips of input and target across one of the three principal axes of the hexagonal lattice; random rotation of input and target around its six-fold rotation axis; adding element-wise Gaussian noise with mean zero and variance \({\sigma }_{n}=0.08\) to the input X (then clamped at 0); random adjustments of contrasts, \(\log c\sim {\mathcal{N}}(0,{\sigma }_{c}^{2}=0.04)\), and brightness, \(b\sim {\mathcal{N}}\left(0,{\sigma }_{b}^{2}=0.01\right)\), of the input with \({X}^{{\prime} }=c\left(X-0.5\right)+0.5+{cb}\).

    In addition, we ‘strided’ the fly-eye rendering across the rectangular raw frames in width, subsampling multiple scenes from each. We ensured that such subsamples from the same scene were not distributed across training and validation sets. Input sequences in chunks of 19 consecutive frames were drawn randomly in time from the full sequences.

    Black-box decoding network

    The decoding network is feedforward, convolutional and has no temporal structure. Aspects of the architecture are explained in the section entitled Model training. The spatial convolutions have a filter size of 5 × 5. The first layer transforms the D = 34 feature maps to an eight-channel intermediate representation, which is further translated by an additional convolutional layer to a three-channel intermediate representation of optic flow. The third channel is used as shared normalization of each coordinate of the remaining 2D flow prediction. The decoder uses PyTorch-native implementations for 2D convolutions, batch normalization, softplus activation and dropout. We initialized its filter weights homogeneously at 0.001.

    Model characterization

    Task error

    To rank models on the basis of their task performance, we computed the standard optic flow metric of average end-to-end point error (EPE)72, which calculates the average over all time steps and pixels (that is, here columns) of the error

    $${\rm{EPE}}({\bf{Y}},\hat{{\bf{Y}}})=\frac{1}{{NC}}\sum _{n}\sum _{c}\sqrt{{({y}_{1c}[n]-{\hat{y}}_{1c}[n])}^{2}+{({y}_{2c}[n]-{\hat{y}}_{2c}[n])}^{2}}$$

    between predicted optic flow and ground-truth optic flow and averaged across the held-out validation set of Sintel sequences.

    Importance of task optimization and connectome constraints

    We generated DMNs with different constraints to assess their relative importance for predicting tuning properties. First, we studied the importance of task optimization of DMN parameters. We created 50 DMNs with random Gaussian-distributed parameters, and task-optimized only their decoding network, to obtain baseline values for both the task error and the accuracy of predicting tuning curves without task optimization of the DMN.

    In the full DMN, we constrained single synapses by connectome cell-type connectivity, cell connectivity, synapse counts and synapse signs (equation (2)) and task-optimized the non-negative type-to-type unitary synapse scaling factor \({{\boldsymbol{\alpha }}}_{{t}_{i},{t}_{j}}\). Next, we trained five additional task-optimized DMNs with different connectome constraints (Fig. 2d and Extended Data Fig. 2a–d).

    In these five additional types of DMN, we additionally task-optimized the terms in bold, rather than using connectome measurements, related to synaptic currents from a presynaptic cell j to a postsynaptic cell i: known single-cell connectivity, unknown synapse count: \({w}_{{ij}}={\sigma }_{{t}_{i},{t}_{j}}{{\bf{m}}}_{{t}_{i},{t}_{j},\varDelta u,\varDelta v}\), in which \({{\bf{m}}}_{{t}_{i},{t}_{j},\varDelta u,\varDelta v}\) is non-negative; known cell-type connectivity, unknown single-cell connectivity and synapse counts: \({w}_{i,j}={\sigma }_{{t}_{i},{t}_{j}}{{\bf{m}}}_{{t}_{i},{t}_{j},-3 < \varDelta u,\varDelta v,\varDelta u+\varDelta v < 3}\) (that is, for all connected cell types, a connection weight was learned for all cells up to a distance of three columns in hexagonal coordinates, with known signs); known single-cell connectivity and synapse counts, but unknown synapse signs: \({w}_{i,j}={{\boldsymbol{\alpha }}}_{{t}_{i},{t}_{j}}{{\boldsymbol{\sigma }}}_{{t}_{j}}{N}_{{t}_{i},{t}_{j},\varDelta u,\varDelta v}\) (that is, connection weights were fixed by measurements, but signs optimized); known single-cell connectivity, but unknown synapse signs and synapse counts: \({w}_{i,j}={{\bf{w}}}_{{t}_{i},{t}_{j},\varDelta u,\varDelta v}\), (that is, all non-zero connection weights were optimized, including their signs); or known cell-type connectivity, unknown single-cell connectivity, synapse counts and synapse signs: \({w}_{i,j}={{\bf{w}}}_{{t}_{i},{t}_{j},-3 < \varDelta u,\varDelta v,\varDelta u+\varDelta v < 3}\) (that is, for all connected cell types, a connection weight and sign was learned for all cells up to distance of three columns). We trained 50 models per DMN type. The task-optimized parameters in each case are highlighted using bold symbols. We randomly initialized the models with \({{\bf{m}}}_{{t}_{i},{t}_{j}},{{\bf{w}}}_{{t}_{i},{t}_{j}}\sim {\mathcal{N}}\left(0,\frac{2}{{n}_{{\rm{in}}}}\right)\), in which \({n}_{{\rm{in}}}\) is the number of cell connections and m is non-negative, and \({{\boldsymbol{\sigma }}}_{{t}_{j}}\in \{\,-\,1,1\}\) with equal probability.

    Unconstrained CNN

    We trained unconstrained, fully convolutional neural networks on the same dataset and task to provide an estimate of a lower bound for the task error of the DMN. Optic flow was predicted by the CNN from two consecutive frames

    $$\begin{array}{c}\hat{Y}\left[n\right]={\rm{CNN}}\left(X\left[n\right],X\left[n-1\right]\right).\end{array}$$

    with the original frame rate of the Sintel film. We chose 5 layers for the CNN with 32, 92, 136, 8 and 2 channels, respectively, and kernel size 5 for all but the first layer, for which the kernel size is 1. Each layer performs a convolution, batch normalization and exponential linear unit activation, except the last layer, which performs only a convolution. We optimized an ensemble of 5 unconstrained CNNs with 414,666 free parameters each using the same loss function, \(L\left(Y,\hat{Y}\right)\), as for the DMN. We used the same dataset (that is, hexagonal sequences and augmentations from Sintel) for training and validating the CNN as that used for training and validating the DMN, enabled by two custom modules mapping from the hexagonal lattice to a Cartesian map and back.

    Circular flash stimuli

    To evaluate the contrast selectivity of cell types in task-optimized models, we simulated responses of each DMN to circular flashes. The networks were initialized at an approximate steady state after 1 s of grey-screen stimulation. Afterwards the flashes were presented for 1 s. The flashes with a radius of 6 columns were ON (intensity I = 1) or OFF (I = 0) on a grey (I = 0.5) background. We integrated the network dynamics with an integration time step of 5 ms. We recorded the responses of the modelled cells in the central columns to compute the FRI.

    FRI

    To derive the contrast selectivity of a cell type, \({t}_{i}\), we computed the FRI as

    $${{\rm{FRI}}}_{{{\rm{t}}}_{{\rm{i}}}}\begin{array}{c}=\frac{{r}_{{{\rm{t}}}_{\text{central}}}^{{\rm{peak}}}\left(I=1\right)-{r}_{{{\rm{t}}}_{\text{central}}}^{{\rm{peak}}}\left(I=0\right)}{{r}_{{{\rm{t}}}_{\text{central}}}^{{\rm{peak}}}\left(I=1\right)+{r}_{{{\rm{t}}}_{\text{central}}}^{{\rm{peak}}}\left(I=0\right)}\end{array}$$

    from the non-negative activity

    $$\begin{array}{c}{r}_{{{\rm{t}}}_{\text{central}}}^{{\rm{peak}}}\left(I\right)=\mathop{\max }\limits_{n}{V}_{{t}_{\text{central}}}\left[n\right]\left(I\right)+\left|\mathop{\min }\limits_{n,I}{V}_{{t}_{\text{central}}}\left[n\right]\left(I\right)\right|,\end{array}$$

    from voltage responses \({V}_{{t}_{\text{central}}}\left[n\right]\left(I\right)\) to circular flash stimuli of intensities \(I\in \{0,1\}\) lasting for 1 s after 1 s of grey stimulus. We note that our index quantifies whether the cell depolarizes to ON- or to OFF-stimuli. However, cells such as R1–R8, L1 and L2 can be unrectified (that is, sensitive to both light increments and light decrements), which is not captured by our index.

    For the P values reported in the results, we carried out a binomial test with probability of correct prediction 0.5 (H0) or greater (H1) to test whether both the median FRI from the DMN ensemble and the task-optimal model can predict the contrast preferences. Additionally, we found for each individual cell type across 50 DMNs that predictions for 29 out of 31 cell types are significant (P < 0.05, binomial).

    Moving-edge stimuli

    To predict the motion sensitivity of each cell type in task-constrained DMNs, we simulated the response of each network, initialized at an approximate steady state after 1 s of grey-screen stimulation, to custom generated edges moving to 12 different directions, \(\theta \in [{0}^{^\circ },{30}^{^\circ },{60}^{^\circ },{90}^{^\circ },{120}^{^\circ },{150}^{^\circ },{180}^{^\circ },{210}^{^\circ },{240}^{^\circ },{270}^{^\circ },\)\({300}^{^\circ },{330}^{^\circ }]\). We integrated the network dynamics with an integration time step of 5 ms. ON-edges (I = 1) or OFF-edges (I = 0) moved on a grey (I = 0.5) background. Their movement ranged from −13.5° to 13.5° visual angle and we moved them at six different speeds, ranging from 13.92° s−1 to 145° s−1 (\(S\in [{13.92}^{^\circ }\,{{\rm{s}}}^{-1},{27.84}^{^\circ }\,{{\rm{s}}}^{-1},{56.26}^{^\circ }\,{{\rm{s}}}^{-1},{75.4}^{^\circ }\,{{\rm{s}}}^{-1},\)\({110.2}^{^\circ }\,{{\rm{s}}}^{-1},{145.0}^{^\circ }\,{{\rm{s}}}^{-1}]\)). In Fig. 2d, we report the correlation between predicted motion-tuning curves to the single experimentally measured tuning curve. We take the maximum correlation across six investigated speeds to make the correlation measure robust to potential variations in preferred speeds.

    DSI

    We computed a DSI73 of a particular type \({t}_{i}\) as

    $$\begin{array}{r}{{\rm{DSI}}}_{{{\rm{t}}}_{{\rm{i}}}}(I)=\frac{1}{|{\mathbb{S}}|}\sum _{S\in {\mathbb{S}}}\frac{|{\sum }_{\theta \in \varTheta }{r}_{{{\rm{t}}}_{{\rm{central}}}}^{{\rm{peak}}}({\rm{I}},{\rm{S}},\theta )\exp (i\theta )|}{\mathop{\text{max}}\limits_{I\in {\mathbb{I}}}|{\sum }_{\theta }{r}_{{{\rm{t}}}_{{\rm{central}}}}^{{\rm{peak}}}({\rm{I}},{\rm{S}},\theta )|}\end{array}$$

    from rectified peak voltages

    $$\begin{array}{r}{r}_{{{\rm{t}}}_{{\rm{central}}}}^{{\rm{peak}}}({\rm{I}},{\rm{S}},\theta )=\mathop{\text{max}}\limits_{n}{V}_{{t}_{{\rm{central}}}}^{+}[n]({\rm{I}},{\rm{S}},\theta ),\end{array}$$

    elicited from moving-edge stimuli. We rectify the voltage to quantify the tuning of the effective output of the cell, and to avoid the denominator becoming zero. We parameterized movement angle \(\theta \in \varTheta \), intensities \(I\in {\mathbb{I}}\), and speeds \(S\in {\mathbb{S}}\) of the moving edges. To take the response magnitudes into account for comparing the DSI for ON- and for OFF-edges, we normalized by the maximum over both intensities in the denominator. To take different speeds into account, we averaged over \({\mathbb{S}}\).

    Normalization of model neural activity for averaging across models in a cluster

    Threshold-linear networks have arbitrary units for the voltages and currents. Therefore, we normalized the neural activity before averaging the neural activity predictions from different models. For a single cell or cell type t, we first divided responses (voltages or rectified voltages) by the root mean square across the cell’s responses to the naturalistic stimuli:

    $$\begin{array}{c}{r}_{t}^{{\rm{| }}{\rm{| }}\cdot {\rm{| }}{\rm{| }}\sim 1}[n]=\frac{{r}_{t}[n]}{| | \frac{1}{{SN}}{{\bf{R}}}_{t}^{{\rm{nat}}.}{{\rm{| }}{\rm{| }}}_{2}},\end{array}$$

    in which \({{\bf{R}}}_{t}^{{\rm{nat}}.}\in {{\mathbb{R}}}^{S,N}\) is the cell’s response vector to S sequences from the Sintel dataset with N time steps and \({r}_{t}\left[n\right]\) is the cell’s response to any stimuli. This normalization makes averages (Fig. 4a,b,d–e and Extended Data Figs. 4, 7, 8, and 9a,b) independent to variation in the scale of neural activity from model to model. We normalized input currents equivalently (Fig. 4b and Extended Data Figs. 4, 7, and 8) by the same normalization factor. We exclude solutions for which the denominator becomes zero.

    Determining whether a cell type with asymmetric inputs counts as direction selective

    We counted a cell type as direction selective if the DSIs from its synthetic measurements were larger than 99% of DSIs from non-motion selective cell types (that is, those with symmetric filters). We note, however, that estimates of the spatial asymmetry of connectivity from existing connectome reconstructions can be noisy.

    For deriving the 99% threshold, we first defined a distribution \(p\left({d}^{* }|{{\rm{t}}}_{{\rm{sym}}}\right)\) over the DSI for non-direction-selective cells, from peak responses to moving edges of cell types with symmetric inputs, tsym. We computed that distribution numerically by sampling

    $$\begin{array}{r}{d}^{* }=\frac{|{\sum }_{{\theta }^{* }}{r}_{{{\rm{t}}}_{{\rm{central}}}}^{{\rm{peak}}}({\rm{I}},{\rm{S}},{\theta }^{* })\exp i\theta |}{|{\sum }_{\theta }{r}_{{{\rm{t}}}_{{\rm{central}}}}^{{\rm{peak}}}({\rm{I}},{\rm{S}},\theta )|}\end{array}$$

    for 100 independent permutations of the angle \({\theta }^{* }\). We independently computed \({d}^{* }\) for all stimulus conditions, models and cell types with symmetric inputs. From \(p\left({d}^{* }|{{\rm{t}}}_{{\rm{sym}}}\right)\), we derived the threshold \({d}_{{\rm{thresh}}}=0.357\) as the 99% quantile of the random variable \({d}^{* }\), meaning that the probability that a realization of \({d}^{* } > {d}_{{\rm{thresh}}}\) is less than 1% for cell types with symmetric inputs. To determine whether an asymmetric cell type counts as direction selective, we tested whether synthetically measuring direction selectivity larger than dthresh in that cell type is binomial with probability 0.1 (H0) or greater (H1). We identified 12 cell types with asymmetric inputs (T4a, T4b, T4c, T4d, T5a, T5b, T5c, T5d, TmY3, TmY4, TmY5a and TmY18) as direction selective (P < 0.05) from our models, and 7 cell types with asymmetric inputs to not count as direction selective (T2, T2a, T3, Tm3, Tm4, TmY14 and TmY15; see Extended Data Fig. 5 as reference for cell types with symmetric and asymmetric inputs).

    Uniform manifold approximation and projection and clustering

    We first simulated central column responses to naturalistic scenes (24 Hz Sintel video clips from the full augmented dataset) with an integration time step of 10 ms. We clustered models in feature space of concatenated central column responses and sample dimension. Next, we computed a nonlinear dimensionality reduction to two dimensions using the UMAP (uniform manifold approximation and projection) algorithm, and fitted Gaussian mixtures of 2 to 5 components, with the number of components that minimize the Bayesian information criterion, using the Python libraries umap-learn and scikit-learn38,74.

    Single-ommatidium flashes

    To derive spatio-temporal receptive fields of cells, we simulated the response of each network to single-ommatidium flashes. Flashes were ON (I = 1) or OFF (I = 0) on a grey (I = 0.5) background and presented for [5, 20, 50, 100, 200, 300] ms after 2 s of grey-screen stimulation and followed by 5 s of grey-screen stimulation.

    Spatio-temporal, spatial and temporal receptive fields

    We derived the spatio-temporal receptive field (STRF) of a cell type \({t}_{i}\) as the baseline-subtracted responses of the central column cell to single-ommatidium flashes \(J\left(u,v\right)\) at ommatidium locations \(\left(u,v\right)\):

    $${{\rm{STRF}}}_{{t}_{{\rm{central}}}}[n](u,v)={V}_{{t}_{{\rm{central}}}}[n](\,J(u,v))-{V}_{{t}_{{\rm{central}}}}[n=0](\,J(u,v)).$$

    We derived spatial receptive fields (SRFs) from the responses to flashes (20 ms in Fig. 4d) \(J\left(u,v\right)\) at the point in time at which the response to the central ommatidium impulse is at its extremum:

    $${\rm{SRF}}\left(u,v\right)={\rm{STRF}}\left(n={{\rm{argmax}}}_{n}\left|{\rm{STRF}}\left[n\right]\left(0,0\right)\right|,u,v\right).$$

    We derive temporal receptive fields (TRFs) from the response to a flash \(J\left(0,0\right)\) at the central ommatidium: \({\rm{TRF}}\left[n\right]={\rm{STRF}}\left[n\right]\left(0,0\right)\). For averaging receptive fields across multiple models, we first normalize the voltages as described above.

    Maximally excitatory naturalistic and artificial stimuli

    First, we found the naturalistic maximally excitatory stimulus, \({\text{X}}^{* }\), by identifying the Sintel video clip, X, from the full dataset with geometric augmentations that elicited the highest possible response in the central column cell of a particular cell type in our models.

    $${{\rm{X}}}^{* }=\mathop{{\rm{argmax}}}\limits_{{\rm{X}}\in {\rm{Sintel}}}{V}_{{t}_{{\rm{central}}}}\left({\rm{X}}\right).$$

    Next, we regularized the naturalistic maximally excitatory stimulus, to yield \({\text{X}}^{{\prime} }\), capturing only the stimulus information within the receptive field of the cell, with the objective to minimize

    $$L({\rm{X}}{\prime} )=\sum _{n}\parallel {V}_{{t}_{{\rm{central}}}}({{\rm{X}}}^{* })[n]-{V}_{{t}_{{\rm{central}}}}({\rm{X}}{\prime} )[n]{\parallel }^{2}+\frac{1}{C}\sum _{c}\parallel {\rm{X}}{\prime} [n,c]-0.5{\parallel }^{2}.$$

    The first summand preserves the central response to \({\text{X}}^{* }\), and the second regularizes the irrelevant portions of the stimulus outside the receptive field to grey (I= 0.5).

    In addition, we computed artificial maximally excitatory stimuli75.

    Model selection

    To describe the most data-consistent motion tuning mechanisms predicted by the ensemble at the level of single-cell currents, for Extended Data Figs. 4, 7 and 8, we automatically selected those models from the ensemble with tuning matching to empirical data. Specifically, we selected models with correct contrast tuning in the respective target cells and their inputs (Fig. 4c and Extended Data Fig. 3d), with the DSI larger than the threshold \({d}^{* }\) derived above, and with a correctly predicted preferred direction (45° acceptance angle, assuming 225° for TmY3).

    Training synthetic connectomes

    Training feedforward synthetic ground-truth connectome networks

    Sparsified feedforward neural networks with six hidden layers (linear transformations sandwiched between rectifications) with equal number of neurons in each hidden layer functioned as ground-truth connectome networks. The main results describe networks with 128 neurons per hidden layer. We interpret the individual units as neurons with voltage

    $${V}_{i}=\sum _{j}{s}_{ij}+{V}_{i}^{{\rm{rest}}}=\sum _{j}{\sigma }_{j}{c}_{ij}{m}_{ij}\,f({V}_{j})+{V}_{i}^{{\rm{rest}}},$$

    with presynaptic inputs \({s}_{{ij}}\) and resting potentials \({V}_{i}^{\text{rest}}\). The connectome-constrained synapse strength, \({w}_{{ij}}\), is characterized by the adjacency matrix \({c}_{{ij}}\), the signs \({\sigma }_{j}\), and the non-negative weight magnitudes \({m}_{{ij}}\). \({c}_{{ij}}=1\) if the connection exists, else \({c}_{{ij}}=0\). To respect Dale’s law, the signs were tied to the presynaptic identity, j.

    We identified the parameters \({\sigma }_{j}\), \({m}_{{ij}}\) and \({V}_{i}^{\text{rest}}\) by task optimization on handwritten digit classification (Modified National Institute of Standards and Technology (MNIST) database)76. We determined adjacency matrices, \({c}_{{ij}}\), for a given connectivity percentage using an iterative local pruning technique, the lottery ticket hypothesis algorithm77. The algorithm decreases the connectivity percentage of the ground-truth connectome networks while maintaining high task accuracy.

    We optimized the ground-truth connectome networks and all simulated networks described below in PyTorch with stochastic gradient descent with adaptive moment estimation (ADAM with AMSGrad), learning rate 0.001, batch size 500, and an exponentially decaying learning rate decay factor of 0.5 per epoch. To constrain the weight magnitudes to stay non-negative, we clamped the values at zero after each optimization step (projected gradient descent). The parameters after convergence minimize the cross-entropy loss between the predicted and the ground-truth classes of the handwritten digits. More implementation detail is available in Supplementary Note 5.

    Simulated networks with known connectivity and unknown strength

    Simulated networks inherited connectivity, \({c}_{{ij}}\), and synapse signs, \({\sigma }_{j}\), from their respective ground-truth connectome networks. In simulated networks, signs and connectivity were held fixed. Weight magnitudes, \({m}_{{ij}}\), and resting potentials, \({V}_{i}^{\text{rest}}\), were initialized randomly and task-optimized. Just like ground-truth connectome networks, simulated networks were trained on the MNIST handwritten digit classification task until convergence.

    Simulated networks with known connectivity and known strength

    Alternatively, we imitate measurements of synaptic counts from the ground-truth weight magnitudes:

    $${\widetilde{m}}_{{ij}}={m}_{{ij}}{{\epsilon }}_{{ij}}\,{\rm{with}}\,{{\epsilon }}_{{ij}}\sim {\mathcal{U}}(1-\sigma ,1+\sigma ),$$

    with multiplicative noise to imitate spurious measurements. We used \(\sigma =0.5\) for the main results. Weight magnitudes were initialized at the measurement, \({\widetilde{m}}_{{ij}}\), and task-optimized on MNIST with the additional objective to minimize the squared distance between optimized and measured weight magnitudes, \({\widetilde{m}}_{{ij}}\) (L2 constraint, Gaussian weight magnitude prior centred around the simulated network’s initialization). We weighted the L2 constraint ten times higher than the cross-entropy objective to keep weight magnitudes of the simulated networks close to the noisy connectome measurements. Resting potentials, \({V}_{i}^{\text{rest}}\), were again initialized randomly and task-optimized.

    Measuring ground-truth-simulated network similarity

    Ground-truth-simulated network similarity was measured by calculating the median Pearson’s correlation of tuning responses (rectified voltages) of corresponding neurons in the ground-truth-simulated network pair. In each of the 6 hidden layers, N = 100 randomly sampled neurons were used for comparison. Response tuning was measured over input stimuli from the MNIST test set (N = 10,000 images). Results are medians over all hidden layers and over 25 ground-truth-simulation network pairs.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Mating proximity blinds threat perception

    [ad_1]

    Resource availability

    Requests for additional information and reagents should be addressed to the lead author (C.R.). All data generated in this paper can be shared on request.

    Fly husbandry and strains

    Flies were reared at 25 °C or 30 °C for RNAi experiments, with 40–50% humidity on a standard cornmeal-agar food in a 12-h light–dark cycle. Canton-S (CS) strain flies were used as wild type. Flies were sorted under CO2 anaesthesia within 6 h of emergence and housed in same-sex groups of 20, except for the males that were to be tested in the behavioural experiments, which were kept in groups of 4 per vial. Virgin females for the behavioural experiments were collected using the hs-hid conditional virginator transgenic line. L3 larvae were heat shocked at 37 °C for 1.5 h. Additional strains used and their sources61,62,63,64,65,66,67,68,69 are outlined in Supplementary Table 3.

    Trans-retinal food

    Trans-retinal (R2500-100MG, CAS number: 116-31-4, Sigma-Aldrich) was stored at –20 °C as a 50 mM stock solution diluted in ethanol and wrapped in foil. To blend retinal homogeneously into the food, 60 μl of stock solution was directly pipetted into 6-ml vials of liquid cornmeal-yeast food except for the experiment in Fig. 3e in which OvAbg flies were not exposed to food supplemented with trans-retinal factor.

    Behaviour

    Threat setup

    Experiments were recorded at 27 frames per second using a Mako U-130B camera mounted with an infrared filter (BP735-40.5, Midopt). The visual threat was generated by repeatedly passing a 13 cm × 6 cm × 2 cm 3D-printed opaque oblong paddle through a blue-light beam (455 nm). This created an overhead shadow at periodic intervals of 0.3 Hz for 30 s. The paddle was set 5 cm above the courtship chambers (20 mm, 5 mm) at a 90o angle on a servo motor controlled by a custom-built Arduino code, which controlled the movement parameters of the paddle (frequency set to 0.3 Hz and number of cycles set to 9). The mechanical threat was generated using a Sony XP500-X speaker playing a loud 3-Hz binaural beat (https://www.youtube.com/watch?v=Y-urmCRs61I&t=713s) causing surface vibrations. Courtship chambers were illuminated from the bottom using an infrared backlight.

    Behavioural assays

    Behavioural assays were conducted at 25 °C under continuous blue light between 09:00 and 13:00. Tested males were 5–7 days of age and transferred to fresh food vials 1 day before experiments. For males used in optogenetic assays, flies were transferred to food enriched with trans-retinal 3 days before the experiment. Vials containing retinal were wrapped in foil. Virgin females were decapitated and used within a maximum of 3 h to preserve chemical signature and motor reflexes during the experiment.

    Action selection assay

    The action selection assay presented a naive male coupled with a decapitated hs-hid virgin female with a choice between continuing to court the female or interrupting the ritual in response to the threat. The threat was delivered after consistent courtship of at least 7 s (early), 2 min (middle) or 4 min (late). Only males that started to court during the first 5 min of the trial and until threat delivery were considered in the analysis. All assays were manually analysed using the behavioural analysis software BORIS70, and the following parameters were quantified to measure the effect of the threat on male courtship behaviour.

    The courtship index is defined by the percentage of time (in seconds) the male spends courting the female over the total time of the threat delivery (30 s). We considered that males initiated courtship by demonstrating full wing extension and a persistent courtship behaviour of at least 7 s towards the female. We considered courtship as the display of stereotyped courtship events that include tapping of the female with the forelegs of the male, singing (wing extension and vibration), licking (male proboscis extension) and attempts at copulation in which the male bends the abdomen towards the female and attempts to mount her. See Fig. 1a for a schematical representation of these behaviours.

    The defensive index is defined by the percentage of time (in seconds) the male spends displaying defensive behaviours (that is, escaping and freezing) over the total time of the threat delivery (30 s).

    As a control, the behaviour was assessed in the absence of the visual threat during the same time window according to the same criteria.

    Optogenetic assay

    Flies were tested in a transparent circular chamber ( 20 mm, H = 5 mm for courtship; and 24 mm, H = 3 mm for the locomotion assay) and illuminated from underneath with either 660-nm (red) or 515-nm (green) light in the absence or presence of the threat. Refer to Supplementary Table 4 for the optogenetic experimental conditions corresponding to each figure. The light was turned ON 1 s before the first threat passed.

    Locomotion assay

    Individual flies were introduced into a circular chamber (24 mm, H = 3 mm) and left to acclimatize for 3 min. After the acclimatation period, flies were subjected to the threat (9 cycles and frequency of 0.3 Hz). The walking speed of the flies (thresholded at values larger than 4 mm s−1 to be considered as ‘walking’) was assessed using the Ethovision XT17 software. The change in walking speed was calculated by subtracting the average walking speed of the 30 s after threat from the 30-s average before threat delivery.

    Two-photon functional imaging

    Tethered male flies (3–6 days of age) had their head capsules dissected in a sugar-free HL3-like saline-filled imaging chamber with a central hole (for details on fly dissection, see ref. 71). Flies were then placed under a multiphoton microscope (Femto2D-Resonant by Femtonics), and expressed either the calcium indicator GCaMP or GRABDA in different sets of neurons (see Supplementary Table 3 for details on genotypes). Fluorescence was generated by a Ti-Sapphire laser centred on 920 nm (Chameleon Ultra II, Coherent). Images with a pixel size of 0.3 × 0.3 μm were acquired with a ×20, 1.0 NA water-immersion objective, controlled by the MESc v3.5 software (Femtonics). Fast recordings were taken at a speed of 30 Hz with a resonant scan head using MESc software (Femtonics). Analysis was performed using NOSA software v1.1.16 (neuro-optical signal analysis)72 and a customized R script or Graphpad Prism, Regions of interest (ROIs) were manually drawn for analysis. Data were converted into tiff files and processed using a Savitzky–Golay filter or moving average of 2 s when brain movement was strong (Figs. 4c and 5b). No baseline/photobleaching correction was applied to any of the imaging data. The final time resolution was 6 fps (Femtonics microscope data) or 2 fps (Optogenetic data from Nikon microscope). Mean intensity values were calculated as ΔF/F0 (in %), whereas F0 was defined as the mean F from baseline activity (first 30 s in Figs. 1h,i, 2i,j,m,n, 4e and 5c,d,h,k,l and Extended Data Figs. 3j, 4h, 7b,e; the first 20 s in Figs. 4c,f, and 5b and Extended Data Figs. 6f–i,k,l and 7a; the first 15 s in Fig. 5e,f and Extended Data Fig. 7e,g; and the first 2 s in Fig. 2e and Extended Data Fig. 3b).

    Threat delivery under the two-photon microscope

    The threat was delivered as previously described (see the ‘Threat setup’ section). The paddle and light source were placed below the microscope and inclined towards the chamber in a way that the passing shadow reached the tethered fly’s eye. Calcium signals in LC16 axons and PMPD neurons were recorded for 30 s before and 60 s immediately after the threat exposure (calculation windows in Figs. 1h,i and 5c,d,h,k,l: last 10 s before and first 10 s after; Fig. 4f and Extended Data Fig. 7e,g: last 15 s before and 30 s after). As LC16 neurons respond to laser onset, the first 2 s of each recording were excluded from the analysis. Conditions under the microscope were set to more than 20 °C and 40% humidity.

    Application of serotonin or dopamine

    100 µl of serotonin (H9523, Sigma-Aldrich) or dopamine (H8502, Sigma-Aldrich) diluted in sugar-free HL3 solution was applied directly onto the Drosophila brain through the open head capsule. The final concentration was 100 µM for serotonin and 500 µM for dopamine. Calcium signals were recorded 50 s before and 100 s immediately after application (first 30 s of pre-application and last 30 s of post-application were taken for quantification).

    Courtship progression under the microscope

    For examining courtship progression, 5–8-day-old virgin male flies were used. Flies were tethered and dissected as previously described, leaving legs and proboscis freely moveable (or fixed depending on the experiment indicated for each figure). Note that the fixation position of the male onto the imaging chamber does not allow for wing extension. Agitated males that did not stop moving for 10 s during the first 5 min under the microscope were discarded. Immediately upon recording initiation, a decapitated 3–5-day-old virgin female tethered onto a moveable arm controlled by a micromanipulator was presented to the male with her abdomen oriented towards the head of the male fly. Following male contact with the female, calcium or GRABDA signals were recorded for a total duration of 4 min, while the fly behaviour was simultaneously observed using a video camera (Thorlabs C1285R12M and SM1D12D iris diaphragm) recording at 7 fps. The first 20 s and last 20 s were taken for quantification (except Extended Data Fig. 6g: 1–20 s, 240–260 s and 400–420 s). Abdomen bending was manually analysed frame by frame. As tethered flies show typical behaviour that includes moving the abdomen back and forth, only full-bending events (the tip of the abdomen bending underneath the thorax) that lasted longer than 1 s or 6 frames were considered as part of courtship behaviour.

    Optogenetic experiments during in vivo calcium imaging

    Experiments were conducted using a Nikon A1R+ multiphoton microscope with a galvo scanner at a speed of 2 Hz. We used the two-photon 1,040-nm red laser of the microscope to activate CsChrimson while simultaneously recording the calcium activity within the ROI (see the details for the conditions in the main text figure legends and Supplementary Table 4). To activate OvAbg neurons, experiments were carried out using a Femtonics microscope with the same imaging parameters mentioned previously. A 590-nm LED positioned below and towards the tethered fly was used for optogenetic activation of CsChrimson (15 or 7 repetitions of 1-s LED-on and 1-s LED-off intervals) while recording simultaneously. To activate PPM1/2 neurons during threat delivery, 15 repetitions of red light were used overlapping the 30 s of threat exposure under the microscope. LED stimulation artefacts were removed for clarity. As the acquisition was carried out continuously, the post-sequence shown in the graph displays the fluorescence intensity immediately after the LED stopped (Fig. 4d).

    Focal dopamine injection

    Fly preparation and imaging were conducted as described previously40 using a Nikon A1R+ multiphoton microscope. The sugar-free HL3-like saline was added with 30 units of Papain (Roche) and applied to the head capsule for 10 min to digest the glial sheath of the brain and facilitate removal. Flies were subjected to local dopamine (10 mM diluted in saline) or saline injection via a micropipette (saline used for injection contained no CaCl2 or MgCl2). The injection solution was labelled with Texas Red (Invitrogen by Thermo Fisher Scientific, dextran, 10,000 MW) to visualize the pipette and the localization of the injections. Multiple (2–5) injections were given per experiment and averaged, resulting in a single average trace per experiment. Fluorescence traces were extracted using FIJI (ImageJ). F0 for the ΔF/F calculations was the average baseline fluorescence of the 10 frames immediately preceding the injection. Calculation windows for mean ΔF/F0 % was 10 s pre and last 10 s post. ROIs were selected manually.

    Immunohistochemistry

    Three-to-five-day-old male fly brains were dissected in ice-cold PBS and fixed in 4% paraformaldehyde solution at room temperature for 20 min. Fixed brains were then washed four times in PBST (0.5%) for 30 min and blocked with normal goat serum (5%) for 30–60 min. The brains were then incubated with primary antibodies (anti-GFP chicken, 1:1,000 or 1:2,000, 13970, Abcam; anti-dsRed rabbit, 1:250, 632496, Takara; and nC82 anti-Brp, 1:50, DSHB) for 2–3 days at 4 °C. After four 20-min washes in PBST, the brains were incubated overnight with secondary antibodies (Alexa Fluor 488 goat anti-chicken IgG, 1:1,000 (A28175) or 1:2,000 (A32931), Thermo Fisher Scientific); Alexa Fluor 546 goat anti-mouse, 1:2000, A11018, Thermo Fisher; and Alexa Fluor 546 goat anti-rabbit, 1:2,000, A11071, Thermo Fisher). After four 20-min washes in PBST, brains were mounted in Vectashield on a glass slide before scanning with a Leica SP8 confocal microscope, a Nikon A1 confocal microscope or a Zeiss LSM900 with AiryScan2 module.

    Split-GFP immunohistochemistry

    Three-to-seven-day-old male fly brains were dissected in room temperature PBS and fixed in 4% paraformaldehyde solution at room temperature for 20 min. Fixed brains were then washed in PBST (0.3%) three times for 20 min each and blocked with normal goat serum (5%) for 30 min. The brains were then incubated with anti-Brp (nC82, 1:50, DSHB) with 5% goat serum for 2 days at 4 °C. No anti-GFP antibody was used. After three 20-min washes in PBST, the brains were incubated with Alexa Fluor 546 goat anti-mouse (1:2,000, A11018, Thermo Fisher) for 2 days at 4 °C. After four 20-min washes in PBST, brains were mounted in Vectashield on a glass slide before scanning with a Nikon A1 confocal microscope.

    Reconstituted split-GFP signal was quantified using ImageJ. The GFP signal was taken as the average pixel intensity within manually drawn volumes (freehand ROIs in multiple z-slices) around the LC16 axon terminals and cell bodies. The background fluorescence (from an ROI in a proximal brain region outside the LC16 neuron) was subtracted from the GFP signal. Statistical significance was evaluated by t-tests and two-way ANOVA in GraphPad Prism 9.

    Connectomics search

    We used the neuprint (hemibrain v1.2.1 dataset)39 platform to search for candidate neurons and subsequent connectivity (https://neuprint.janelia.org/).

    • Predicted link between LC16 and pC1a: Query Selection > General > Shortest paths > neuron A = LC16 # 1256830582 > Neuron B = pC1a # 359744514, Minimum weight = 3.

    • 3D visualization of 5-HTPMPD01 and pC1 neurons: ‘dataset’:‘hemibrain:v1.2.1’,‘bodies’[‘297230760’,‘\n297908801’,‘\n359744514’,‘\n5813046951’,‘\n267214250’,‘\n267214250’,‘\n392821837’,‘\n359744514’,‘\n5813046951’,‘\n514850616’].

    • 3D visualization of LC16 neurons and PPM1/2 neurons: ‘dataset’:‘hemibrain:v1.2.1’,‘bodies’[‘1350945956’,‘1288897930’,‘1319927345’,‘1319587380’,‘1319579391’,‘1254037524’,‘1288893503’,‘1289238972’,‘1319586861’,‘1319919918’,‘1412989088’,‘950229431’,‘792040520’,‘5813054384’].

    Statistics and reproducibility

    See Supplementary Tables 1 and 2 for details on statistics. All statistical tests were performed using R v2023.03.1 + 446 or GraphPad Prism 9. Each behavioural experiment was repeated at least three times over a minimum of 3 days. Individuals were tested only once. The sample size for the behavioural experiments always represents biologically independent animals. Behavioural indexes and calcium imaging quantification are displayed as boxplots. Boxes represent the lower (25th) and upper (75th) interquartile, respectively, and the horizontal line represents the median. Each dot on the plot represents a single fly. Courtship progression behavioural data and locomotion data do not follow a normal distribution, thus non-parametric Mann–Whitney or Kruskal–Wallis tests, followed by a Conover–Iman multiple pairwise comparisons post-hoc test, have been applied on raw data (P = 0.05, with a Bonferroni correction) for one factor experiments. To test the interaction between the genetic manipulations and the treatments, we applied two-way ANOVA. Significant differences are indicated by different letters at the level of P < 0.05. We used a one-sample Wilcoxon signed-rank test (μ = 0) to assess whether the speed change (∆) in Extended Data Fig. 5e significantly deviated from 0. We indicated significance using an asterisk at the level of P < 0.05.

    Calcium imaging traces over time are represented as the mean ∆F/F0 (%; solid lines) with s.e.m. (shaded area). Quantification plots are shown as minimum/maximum plots and the median as the horizontal line. After verification of normality, a paired t-test or paired Wilcoxon signed-rank test was applied on mean ∆F/F0 (%) data from individual flies on specific time windows indicated in the figures and/or in the Methods. Significant differences are indicated by different letters (P < 0.05). For inter-group comparisons, mean pre values were subsracted from mean post values and differences between genotypes and treatments were tested using one-way ANOVA, Kruskal-Wallis, t-test or Mann-Withney test as approriate. Experimenters were not blinded to the conditions of the experiments during data collection. Genotypes used for one experiment were tested simultaneously and in random order as well as random times during the day to avoid any influence of circadian timepoints and order of the experimental trials. We repeated all statistical tests excluding data points that were identified as outliers using the ROUT method in Prism with Q = 0.5%, and always obtained the same results, so we did not exclude outlier data points. Expression pattern of TH-C1-GAL4 and split-GAL4 lines, including LC16, P1, TRHR23E12 and plP10, were all imaged in n = 4 flies and were reliable across samples.

    Randomization and blinding

    Animals were never pre-assigned to a treatment or control group before the experiments. Behavioural and imaging experiments were performed in conjunction with their respective control cohorts. Randomization of animals was not implemented in this design.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • A population code for spatial representation in the zebrafish telencephalon

    [ad_1]

    Experimental set-up

    Simultaneous behavioural and neural imaging by tracking microscopy

    Tracking microscopy was performed as described in our previous study7. Motion cancellation was performed by a custom three-axis motorized system, to be described elsewhere (Mohan et al., manuscript in preparation). To enable animal tracking, the behavioural chamber is illuminated by four custom light strips consisting of narrow-angle, 850 nm infrared light-emitting diodes (LEDs; no. SFH4655-Z, Osram) that deliver infrared light to the chamber by total internal reflection. Ambient white-light illumination in the behavioural chamber is provided by an array of wide-angle white LEDs (no. GW PSLM31.FM).

    For recording of neural activity, we used DIFF microscopy to image a brain area of 1,013 × 764 × 150 µm3 at cellular resolution, a volume rate of 2 Hz and frame rate of 200 Hz, as described in our previous study7. The performance and characteristics of the imaging system have been characterized in depth in our previous study7.

    Chamber construction and experiment design

    Several constructions for the chamber wall were used depending on the complexity of the experiment. The top and bottom of all behavioural chambers are made of glass to allow optical access from above and below7. Between the glass plates, 1-mm-thick, gas-permeable PDMS walls (Sylgard 184, Dow Corning) were used to create a watertight rigid body as described previously7. PDMS chambers were cut using a computer-controlled blade and finished by manual cutting. The chamber was filled with E3 water before fish loading (‘Fish loading, removal and reloading’). Following fish loading we gently closed the chamber by sliding on a top coverslip. Excess fluid was removed to create a watertight seal between the PDMS and the two glass surfaces. Each imaging session lasted 45–100 min to ensure sufficient spatial coverage of the arena (each experiment is described in more detail below). We did not include any fish in our analysis that was quiescent for more than 20 min during the experiment. If not specified explicitly, all chambers were initially new to the fish.

    For whole-chamber-rotation experiments (Fig. 4m) and rectangle-to-circle experiments (Fig. 6a), the outer wall (1 mm thick) is made of translucent white PDMS cut into the desired chamber shape. Landmarks are constructed from black PDMS pieces embedded into the outer wall. A clear PDMS inner wall (0.5 mm thick, 1.5 mm wide) placed alongside the outer wall prevents the fish from direct interaction with the outer wall or landmarks. For chamber-rotation experiments, animals were first imaged for 90 min in the rectangular chamber (S1) and then the entire chamber was slowly rotated over 10–20 s as a rigid body without removing the animal (that is, the chamber walls, ceiling, floor and fish all rotated together). Animals were then imaged for a further 60 min (S2).

    For experiments that required rotation of the chamber wall without removal of the animal or disassembly of the chamber (Fig. 5m), an outer PDMS wall with a central square cut-out of 60 × 60 mm2 was used only for water-sealing the chamber. An inner chamber wall (of distinct size and shape from the outer PDMS wall) was constructed from laser-etched plastic with embedded stainless steel pieces (grade 430), which enabled remote repositioning of the plastic chamber wall using small magnets (3–5 mm in diameter) below the bottom glass of the chamber. Landmarks (when used) were painted onto the wall of the plastic chamber. The plastic chamber wall was placed inside the square cut-out of the outer PDMS wall. Animal movement was restricted to within the plastic chamber walls. Given the flexibility of this chamber design, we also used it for the experiments shown in Fig. 5a,e,i and Extended Data Fig. 9a.

    In the wall-rotation experiments we first recorded the animal for 45–90 min (S1) and then the entire chamber assembly was removed from the microscope. Using small magnets underneath the bottom glass of the chamber, we then carefully rotated the chamber walls by 180° before replacing the chamber assembly on the microscope. During this manipulation only the walls rotate but not the fish. Following wall rotation the animal was recorded for a further 45–75 min (S2).

    For wall-morphing experiments (Fig. 4i) we constructed a morph chamber consisting of eight pieces of stainless steel (12 × 2 × 1 mm3) linked by a flexible ring of silicone (1 mm wide and 0.5 mm tall). The stainless steel pieces can be remotely repositioned using small magnets below the bottom glass of the chamber (as described above), allowing flexible and gradual morphing of the chamber wall. As described above, an outer PDMS wall with a central square cut-out of 60 × 60 mm2 was used only for water-sealing the chamber, and the morph chamber was placed inside the square cut-out. Animal movement was restricted to within the morph chamber. We first arranged the morph chamber into a radially near-symmetric octagon and recorded the animal for 45–65 min (S1). Using small magnets underneath the bottom glass of the chamber, we then morphed the chamber wall into an ellipse. During this manipulation we ensured that the walls did not make strong physical contact with the fish. Following morphing, the animal was recorded for a further 45–70 min (S2).

    For border-insertion and -removal experiments (Extended Data Fig. 3b) we used a PDMS chamber with an 84 × 15 mm2 central cut-out in which the animal was free to move. At the midpoint of the long axis of the chamber we created a hidden rectangular pocket (21.5 × 2 mm2) containing a stainless steel rectangular bar (20 × 1.5 × 0.5 mm3). Using a small magnet, the stainless steel bar can either be inserted into the chamber (creating an extra border wall) or hidden from the chamber. In S1 (45–95 min) the movable wall was hidden from the animal. Following S1, the movable wall was inserted into the interior of the chamber and the animal recorded for 45–95 min (S2). Following S2, the movable wall was again retracted and hidden from the animal, and the animal recorded again for 45–90 min (S3).

    For the landmark-removal experiment (Fig. 4e) we used a PDMS chamber with a 25 × 25 mm2 central cut-out. On one edge of the chamber we created two additional PDMS pockets (100 × 2.5 mm2) that each contained a 70 × 2 × 0.5 mm3 white (acrylic painted), stainless steel, rectangular bar. Landmarks (vertical black stripes) were painted on a portion of one of the stainless steel bars (Fig. 4e) whereas the opposing stainless bar was completely white. In S1 (75–90 min), landmarks were positioned so as to be visible to the fish. Following S1, by applying small magnets to the bottom glass of the chamber, the stainless steel piece with landmarks was remotely moved into the PDMS pocket, effectively hiding the landmarks from the animal within the chamber; the opposing stainless steel bar was not moved. The animal was then recorded again for 60–100 min (S2).

    Fish loading, removal and reloading

    For all experiments, fish were loaded into the chamber using a glass or plastic pipette. For experiments with fish removal between S1 and S2 (Figs. 5a,e,i and 6a) we used the following procedure. Following the first 60–90 min recording (S1) the chamber was removed from the microscope. The top coverslip of the chamber was loosened and then either partially or completely removed. The fish was then removed from the chamber with a glass or plastic pipette. In between sessions, the chamber was thoroughly cleaned with soap and isopropanol and then pressure-rinsed for 2–5 min. For two fish (Extended Data Fig. 8g) we rotated the bottom glass relative to the chamber walls without cleaning, to scramble any potential olfactory cues. We reloaded the fish into the chamber at a different heading and position from those at which the animal was removed. Following fish loading, the chamber was again sealed with its top glass coverslip and transferred to the microscope for a second imaging session (45–100 min). For the ABA experiment (Extended Data Fig. 9a) the same procedure was carried out to load the fish into the B chamber for S2, and to subsequently load the fish into the A chamber for S3.

    Lights-on/off experiment

    To study how PFs are influenced by the luminance of the environment we designed a light/dark protocol. Following 60 min of recording fish exploring the circular PDMS chamber we turned off the white LEDs, providing visible illumination to the chamber. Turning off the white LEDs resulted in a luminance change from 7.05 to under 0.01 µW mm−2, measured at the centre of the chamber. To ensure that the transition to lights off did not generate an aversive response, luminance was changed gradually over 1 min. Recording was then resumed for an additional 60 min.

    We note that a small blue spotlight with a radius of 0.5 mm is always centred on the brain of the fish under all conditions, due to its requirement for neural imaging. We measured the light scattering from this spotlight to be 0.14 µW mm2 within 5 mm of the source.

    Light intensity measurements were performed using a photodiode-based optical power sensor with a known detector area (no. S130C, Thorlabs).

    Image registration

    High-resolution offline registration of fluorescent brain volumes for each animal

    Each fluorescent image from the tracking microscope was registered to a high-resolution reference brain volume collected from the same animal. An in-depth description and characterization of the registration pipeline was published in our previous study7. Briefly, an initial coarse registration is obtained by optimization of a three-dimensional rigid transformation that maps the moving image to a (possibly tilted) plane within the reference brain volume. This planar surface is then finely subdivided into a deformable surface that is locally adjusted within the reference volume using a regularized piecewise affine transform.

    Registration to a common reference brain across animals

    We use the Computational Morphometry Toolkit (CMTK)51 to register each animal to a common reference fish. An atlas fish52 was selected to serve as the common reference brain. Each brain was registered onto the reference brain in a series of steps: initialization, rigid, full affine, warp. The coordinate transformation for each individual cell was then saved. The command line commands are listed below:

    cmtk make_initial_affine –centers-of-mass moving_image fixed_image initial.list

    cmtk registration –initial initial.list –nmi –dofs 6 –dofs 12 –nmi –exploration 8 –accuracy 0.8 -o affine.list moving_image fixed_image

    cmtk warp –nmi –threads 160 –jacobian-weight 0 –fast -e 18 –grid-spacing 100 –energy-weight 1e-1 –refine 4 –coarsest 10 –ic-weight 0 –output-intermediate –accuracy 0.5 -o warp.list affine.list

    cmtk reformatx –pad-out 0 -o out_image –floating fixed_image moving_image warp.list

    cmtk streamxform warp.list <cell_coordinates.txt > cell_coordinates_registered.txt

    Image analysis

    Extraction of neural activity by NMF

    Non-negative matrix factorization (NMF) separates each cell into two components—a spatial footprint and a time-varying activity component—as described in our previous study27. Briefly, following registration, we applied constrained NMF32 to our whole-brain datasets with nuclear localized fluorescence. NMF was performed for each axial section of a given brain volume. Our axial sections of the reference volume are separated by 2 µm and the average diameter of a zebrafish cell is approximately 5 µm; thus there can be double counting of centroids if a cell spans more than one axial plane. Cell centroids were detected throughout the entire reference brain volume but were included in downstream analysis only if they were sampled in at least 30% of time points throughout the imaging session. We merged these cell centroids belonging to the same cell based on close spatial proximity (horizontal distance 1.4 µm or less, vertical distance 2 µm or less) and highly correlated activity (over 0.7). Following merging, the number of cells was 73,621 ± 10,558 (mean ± s.d.), decreasing by 28.4 ± 2.6% (mean ± s.d.) across animals (n = 6 fish).

    The fluorescence baseline for each merged cell was estimated using the tenth percentile within a 30 min sliding window. Baseline-corrected fluorescent traces ΔF(t) were then obtained by subtraction of the estimated baseline from raw fluorescent traces.

    Identification of PCs

    For identification of PCs we first generate a spatial activity map for each neuron (see below), use this map to compute spatial information and specificity8 (see below), generate shuffled data by circular permutation to obtain a null distribution for spatial specificity (see below) and, finally, compare the spatial specificity of each cell to the null distribution from shuffled activity and to the distribution of spatial specificity across the brain (see below). The spatial information/specificity criteria for PC identification were originally defined by Skaggs et al.8. The criteria we use are similar to those in the existing literature in both mammals and birds, for both electrophysiological and calcium imaging data16,53.

    A spatial activity map was generated for each neuron, representing the mean neural activity at each spatial location. To calculate the spatial activity map the chamber was divided into square bins (side length 1.2 mm) and then the summed neural activity and occupancy time were calculated for each bin. This resulted in two matrices: a summed neural activity matrix and an occupancy matrix (matrix entries correspond to spatial bins). We then applied a boundary-constrained Gaussian filter (standard deviation one bin, with the boundary defined by the chamber boundary) to these two matrices. The spatial activity map was calculated by dividing the filtered summed neural activity matrix by the filtered occupancy matrix to obtain the filtered average activity in each spatial bin. When the fish was stationary (speed below 0.1 mm s−1), the corresponding frames were not included in the calculation of the spatial activity map. For all experimental spatial activity maps (for example, for comparison of spatial maps across sessions) we exclude the first 15 min following initial exposure to the environment in S1. For within-session control (comparison between the first and second halves of S1) we separately generated spatial activity maps for the first and second halves of S1. The first 15 min were not excluded in the within-session control, to ensure sufficient coverage of the environment by the fish trajectory.

    From the spatial activity map of each cell, spatial information can be used to quantify how much information is contained by that cell about the location of the animal, in units of bits per second8. For each cell, spatial information I was calculated as

    $$I=\sum _{x}\lambda \left(x\right){{\rm{lo}}g}_{2}\frac{\lambda \left(x\right)}{\lambda }P(x),$$

    where x is a spatial bin, P(x) is the probability that the fish is in spatial bin x, λ(x) is the mean activity of the cell when the fish is in spatial bin x and λ is average neural activity, computed as \(\lambda ={\sum }_{x}\lambda (x)P(x)\).

    Based on the equation above, cells with high average neural activity tend to have higher spatial information. To normalize for this we calculate specificity s as

    $$s=\frac{I}{\lambda }.$$

    In other words, specificity is spatial information divided by average neural activity, resulting in units of bits per activity unit.

    Due to our baseline correction, bins occasionally have negative average activities. Such bins, as well as those with less than 1 s total occupancy time following Gaussian filtering, were not included in the calculation of spatial information and specificity.

    To test the significance of the specificity of each cell we use circular permutation to construct a null distribution. For each cell we define the set of valid timepoints as the frames in which neural activity was recorded and fish movement speed was above 0.1 mm s−1. A null distribution for specificity is then estimated by measurement of specificity after circularly permuting the neural activity vector within the valid time points by 1,000 offsets (each offset is 0.5 s, so it covers from −250 to +250 s). The specificity of a given cell is converted to a specificity z-score by subtracting the mean specificity of the null distribution and dividing by the standard deviation of the null distribution. To test the significance of the specificity of a cell at the population level, a population specificity z-score is also calculated by subtracting the mean specificity of all recorded cells and dividing by the standard deviation of the specificity of all recorded cells.

    To be classified as a place-encoding cell, a cell is required to have a specificity z-score larger than or equal to 5, a population specificity z-score larger than or equal to 3 and a specificity value of over 0.01 bits per activity unit.

    Defining place fields

    The place field (PF, or firing field) of each neuron is defined as the set of spatial bins with activity above 80% of peak activity (with peak defined as the 95th percentile) of the spatial activity map. A more in-depth and systematic analysis of unimodal and multimodal PFs is described in Extended Data Fig. 1i–k, in which the activity threshold was swept from 50 to 80%. The location of the PF is represented by its COM for cells with a single PF. For cells with multiple PFs (as distinct components in the map) we use the COM of the component (over 20 bins, to avoid spurious PFs due to noise), with the highest peak activity (defined as the 95th percentile of the component) as the location of its primary PF. Only PCs with a PF size of less than 30% of chamber size are included in maps of the distribution of PFs and in the analysis of PF shift. PFs are used only for analysis of PF shift and visualization of PF location across an environment. All other analyses of PC activity, such as PF correlation, PV correlation, change in specificity and positional decoding, use the spatial activity map directly.

    Rigid and non-rigid registration of spatial activity maps across sessions

    Experiments were conducted with various chambers, sometimes in varying orientations, sometimes before and after morphing the chamber into different shapes. For comparison of spatial activity maps across these chambers we developed methods to register maps across sessions. When there was no change in chamber wall geometry (for example, whole-chamber rotation), registration was performed by rotation and translation of the S2 activity map (that is, a rigid transformation) so that activity in both sessions was represented in terms of the spatial bins of S1, thus facilitating comparisons (‘PV correlation, PF correlation and PF shift’).

    Otherwise we performed non-rigid transformation to register spatial activity maps across sessions. Our strategy was first to establish a correspondence between the chamber walls of both sessions, then to map each spatial bin of S2 to a set of spatial bins in S1 according to their distance to the wall anchor points, and finally to represent the activity of S2 in terms of the spatial bins of S1. Each of these steps is described in greater detail below.

    First we detected the walls of the chambers in both sessions and defined a set of anchor points on the chamber walls. Because the precise number of detected wall points could differ between sessions, we used linear interpolation to upsample the wall points of the session with fewer points, such that the number of anchor points was the same across sessions. The correspondence between anchor points across sessions was established based on either landmarks (for example, the wall-morphing experiment with fish removal; Fig. 5i) or the polar angle of the wall within the microscope reference frame in experiments with no clear match between geometry or landmarks (for example, rectangle-to-circle remapping (Fig. 6a) and ABA remapping (Extended Data Fig. 9a)), or by systematic consideration of every rotation of the anchor points in S2 relative to S1 (Extended Data Figs. 8c,d and 10; ‘Non-rigid transformation with the best rotation angle’).

    Next, for each spatial bin centre (x,y) in S2 we compute a corresponding location \(({x}^{{\prime} }\,,{y}^{{\prime} })\) in S1 using a COM procedure. Specifically, for each anchor point \(({x}_{a},{y}_{a})\) in S2 we associate a weight \(1/{d}^{2}\), where d is the distance between the anchor point \(({x}_{a},{y}_{a})\) and the spatial bin centre (x,y) in S2. We then use the previously established wall correspondence between both sessions to transfer these weights to the anchor points in S1. The corresponding location \(({x}^{{\prime} }\,,{y}^{{\prime} })\) in S1 is then defined as the COM of the S1 anchor points (that is, the weighted sum of the S1 anchor points divided by the sum of the weights).

    Finally we represent the activity of S2 in terms of the spatial bins of S1. The computed location \(({x}^{{\prime} }\,,{y}^{{\prime} })\) in S1 is generally between the spatial bin centres of the S1 activity map, so we identify the 4 × 4 spatial bins with bin centres (x,y) with \({\rm{floor}}({x}^{{\prime} })-1\le x\le {\rm{ceil}}\,({x}^{{\prime} })+1\) and \({\rm{floor}}(\,y)-1\le y\le {\rm{ceil}}\,(\,y{\prime} )+1\). In this way we associate each S2 spatial bin with 4 × 4 spatial bins in S1. This procedure ensures that each S1 spatial bin is associated with at least one S2 bin. We then average the activity of all S2 bins that are associated with a given spatial bin in S1, yielding a representation of the activity of S2 in terms of the spatial bins of S1.

    Non-rigid transformation with the best rotation angle

    Non-rigid transformation of the S2 maps described above is generally applied assuming a rotation angle of 0° between sessions (for example, Figs. 4i, 5i and 6a). For systematic investigation of whether a coherent map rotation had occurred between sessions (Extended Data Fig. 8d), 72 incremental rotations (covering 360°) were applied to the S2 anchor points followed by non-rigid registration as described above. The best rotation angle is identified by the maximum PF correlation (‘PV correlation, PF correlation and PF shift’) across sessions. We refer to this procedure as ‘non-rigid transformation with the best rotation angle’. Note that this is also done for the early–late control in Extended Data Fig. 8c,e.

    To test whether the improvement in PF correlation, from ‘non-rigid registration assuming an angle of 0°’ to ‘non-rigid transformation with the best rotation angle’, is significant, we shuffle the cell identity in S2. Post shuffle, we then compare the improvement in PF correlation from non-rigid registration assuming an angle of 0° with non-rigid transformation with the best rotation angle. This was repeated 1,000 times to generate a null distribution. The P value in Extended Data Fig. 10 is calculated by counting the percentage of shuffles in which the real data improve by less than the shuffle control.

    PV correlation, PF correlation and PF shift

    For comparison of population-level activity across sessions, a population vector correlation (that is, PV correlation) was computed for each spatial bin that is shared across sessions. For each neuron we first compute a ΔF/F spatial activity map for each session. To do this we estimate a baseline fluorescent signal for each map by taking the mean of spatial bins with fluorescent signal below the 20th percentile. The ΔF/F of each spatial bin is then computed as follows:

    $$\frac{A-{\rm{baseline}}}{{\rm{baseline}}+c}$$

    where A is the mean fluorescent signal for a spatial bin. A pseudocount c is added when the baseline is below 10. For each spatial bin we obtained two vectors of population activity (one for each session). The length of the vector is equal to the total number of telencephalic PCs identified from either session. Correlation between the two activity vectors yields the PV correlation for a given spatial bin.

    To determine the similarity of spatial activity maps we computed the correlation between spatial activity maps (that is, PF correlation or spatial correlation). Correlation was performed on spatial bins that are shared across both maps and normalized by the mean and variance of each map. All telencephalic cells identified as PCs in either session were used.

    To measure the extent of PF shift across sessions, for each neuron we identified the COM of its PF in each session. We define PF shift as the distance between the COM of the cell’s PF in S1 and S2. Only cells with confined PFs (firing field size less than 30% of chamber size; section ‘Defining place fields’) in both sessions are included for this analysis.

    For the within-session control we generate two separate spatial activity maps corresponding to the early and late halves of S1. PV correlation, PF correlation and PF shift are computed from the within-session control spatial activity maps using the procedure described above. For comparison with control we ensure that the same set of neurons (for PV correlation, PF correlation and PF shift) and spatial bins (for PV correlation and PF correlation) are used. One-sided Wilcoxon signed-rank tests are used to measure whether PF correlation and PV correlation are significantly lower than control, and whether PF shift is significantly higher than control.

    Blurring of the spatial activity map

    Blurring is the broadening of a PF at a given point on its boundary in the radially outward direction. For estimation of this blurring effect of PFs due to the speed of the fish, combined with calcium indicator dynamics, we compute an upper and a lower bound. The lower bound is computed by assuming a 10 Hz firing rate and a speed of the mean minus standard deviation; the upper bound assumes a firing rate of 100 Hz with a speed of the mean plus standard deviation. Speed distribution consists of pooled speed data from seven fish (Extended Data Fig. 1f). The data for the half-decay times for different firing rates are taken from ref. 54. The half-time of temporal fluorescence decay is multiplied by the speed value to obtain the half-distance for spatial fluorescence decay (Extended Data Fig. 1g). Of this exponential spatial decay, the distance needed for a decay down to 80% of starting value is computed (Extended Data Fig. 1h); this matches our definition of PF and is used as a blurring estimate. Based on the behavioural data (Extended Data Fig. 1f) and calcium indicator kinetics, which both depend on firing rate54, we estimate the radius of the PFs to be spatially blurred by 0.17–1.31 mm.

    Isomap and quantification

    Isomap37 embedding was performed using Scikit-learn55 with ‘n_neighbors = 100’. A rectangular matrix representing the population activity of all telencephalic PCs in a span of 30 min was constructed, an Isomap manifold was fit to the data (with each point in the manifold representing the population activity at one time point) and finally a two-dimensional embedding was extracted for visualization in Fig. 3a and computation in Fig. 3b. Because the implementation does not handle missing data, we filled in missing values in the activity trace for individual cells with the nearest preceding available value. In the case of missing values at the beginning of the experiment, a backwards filling is applied. For Fig. 3a,b the early (0–30 min) and late (60–90 min) windows of population activity data were fit separately and therefore have different two-dimensional embeddings. For Supplementary Video 2 we fit an Isomap manifold to the final 30 min of imaging S1 (before chamber rotation; Fig. 4m) to establish stable axes for two-dimensional embedding, and then repeatedly transformed each window of 30 min of population activity data into this embedding. Standard exclusion criteria based on movement were applied (spatial activity map in ‘Identification of PCs’).

    To quantify the relationship between the two-dimensional manifold and the physical position of the fish we use neighbour distance, which quantifies the degree to which local neighbours in the manifold space are also local neighbours in the physical space of the chamber. In a given 30 min time window we analyse each time point in the two-dimensional manifold space (the ‘seed point’) by selecting its 30 nearest neighbours in the manifold space, then measuring the physical distance in the chamber between those 30 points and the seed point and averaging to obtain the mean physical neighbour distance of the seed point. We then compute the overall average physical neighbour distance by averaging this across all time points in the manifold. As a baseline, for each seed point, 30 random neighbours in the manifold are chosen and then physical neighbour distance is computed as before.

    For analyses comparing between two sessions, or between the early and late intervals of a session (Fig. 3), the occupancy of each spatial bin was equalized by subsampling. That is, for each spatial bin, we identified the session or time interval having a lesser number of time points and randomly subsampled from the session or time window with more time points, so that both time windows had the same number of time points in each spatial bin.

    Direct basis decoder

    The direct basis decoder36 is a linear decoder with no free parameters that predicts the animal’s position at each individual time point by a linear combination of the spatial activity maps, weighted with the activity of the corresponding place-encoding cell. All decoding and map construction was performed only at those time points at which the fish was moving (fish speed greater than 0.1 mm s−1). Even though no parameters had to be learned, it is still necessary to compute the spatial activity map of each cell. To avoid circularity between computing the spatial activity map and testing the decoder we used a cross-validation scheme in which the neural data were divided into non-overlapping 1 min chunks. To test the decoder on each 1 min chunk we first computed the spatial activity map without including the test chunk or its two neighbouring chunks. The predictions of all 1 min chunks were concatenated as the prediction of the whole dataset. Decoder error was then computed as the mean distance between the predicted and actual position of the fish across the dataset.

    Spatial activity maps were constructed as described above using spatial bins (side length 1.2 mm) and boundary-constrained Gaussian smoothing. Apart from the analysis shown in Extended Data Fig. 5c, the activity used in this map construction is time shifted by 2 s relative to the location of the fish, to counteract potential calcium lag dynamics. All maps were standardized by mean and standard deviation. To prepare the decoder, a 7.5 s boxcar average filter was applied to the activity and then maps of the most active 30% of cells were weighted by their respective activity and summed to form the decoder map. This nonlinear thresholding step was designed to omit low-intensity signals that would contribute noise to the decoding. The decoder map was then normalized for density differences in representation. To this end we calculated a representation histogram across all spatial bins, defined for each spatial bin as the number of PCs containing that bin in their primary PF (Defining place fields). Because we found that the effect of representation density on decoding error was sublinear, we normalized the decoder map by the third root of the representation histogram. The position estimate for each time point was then calculated by the COM of the 99th percentile of the decoder map. If not specified differently, 1,000 telencephalic cells of the highest spatial tuning per animal were used for all decoding analyses. For selection of the top spatially tuned cells we ranked each telencephalic place-encoding cell according to its specificity z-score and also according to its population specificity z-score, and then assigned its final rank according to the worse of the two ranks (Fig. 2f). This allows for a fair comparison between fish that may have varying numbers of PCs (Fig. 1g). For selection of the minimum number of cells needed for good decoding, an iterative, greedy algorithm was used (Fig. 2g). Starting with zero neurons, we find the single best neuron to add to the decoding set to minimize the resulting decoder error and then iteratively repeat this same greedy selection procedure to grow the decoding set, one neuron at a time.

    For the analysis of decoder error by brain region (Fig. 2e), the 1,000 top spatially tuned cells were chosen for each defined region (whole brain, telencephalon, mes- and rhombencephalon). The random cell population was randomly selected from cells with a population z-score less than 1, to explicitly contain no PCs. We defined two baselines for evaluation of the decoder performance. For the uniform random baseline we measured the average decoder error of a decoder that outputs random positions sampled uniformly from the chamber. This procedure was repeated 1,000 times, with the mean decoder error taken as the uniform random baseline. For the behaviour-informed baseline we measured the average decoder error of a decoder that outputs the COM of fish positions in the chamber.

    For all analyses, if not specified differently, only the final 75 min of each experiment were used for decoding. In the analysis of the decoder error as a function of number of cells included (Fig. 2f), the threshold for spatial tuning was gradually lowered until 10,000 cells were obtained (n = 7 fish). The two fish with fewer than 10,000 recorded cells in the telencephalon were hence excluded from this analysis. To avoid circularity, for Fig. 3d the shuffled specificity z-score and population z-score were calculated separately for the first and last 30 min of the experiments. Decoding for these two time windows was therefore based on the respective top-ranked PCs within each window.

    We find that the non-redundant decoder starts to outperform the decoder using all cells from 17 cells onwards. The worse performance of the decoder using all cells is a consequence of the simple linear decoder design, which values the information of all cells equally; hence, less specific neurons can influence the decoder and slightly worsen the results. The advantages of this decoder, however, are the limited assumptions of the model, easy interpretability and impossibility of overfitting.

    Regression and prediction of neural activity

    We used ordinary least-squares regression to measure how much of the variance in place-encoding cell activity can be explained by different behavioural variables, including physical location, heading and speed. This is a much simpler model compared with previous work using a generalized linear model56. The behaviour variables were discretized into bins, and an indicator function for each bin was added as a regressor in the model. The regression model can be summarized by the following formula:

    $${\lambda }_{n}\left(t\right)={\mu }_{n}+\mathop{\sum }\limits_{i=1}^{L}{w}_{i,n}^{\left(x\right)}{x}_{i,t}+\mathop{\sum }\limits_{j=1}^{H}{w}_{j,n}^{\left(h\right)}{h}_{j,t}+\mathop{\sum }\limits_{k=1}^{S}{w}_{k,n}^{\left(s\right)}{s}_{k,t}$$

    where \({\lambda }_{n}\left(t\right)\) is the baseline-corrected neural activity for cell n at time t, \({\mu }_{n}\) represents baseline activity, \({w}_{i,n}^{(x)}{x}_{i,t}\) represents the contribution from the physical location of the fish, \({x}_{i,t}\) is the activity for spatial bin i at time t, L is the number of spatial bins (15 × 8 = 120), \({w}_{j,n}^{\left(h\right)}{h}_{j,t}\) represents the contribution from the heading of the fish, \({h}_{j,t}\) is the activity for heading bin j at time t, H is the number of heading bins (24), \({w}_{k,n}^{(s)}{s}_{k,t}\) represents the contribution from the speed of the fish, \({s}_{k,t}\) is the activity for speed bin k at time t and S = 24 is the number of speed bins. For comparison of contributions from spatial location, heading and speed, both individually and together, we tested ordinary least-squares regression in four cases: \({\lambda }_{n}(t)={\mu }_{n}+{\sum }_{i=1}^{L}{w}_{i,n}^{(x)}{x}_{i,t}\) (that is, with only spatial indicator functions), \({\lambda }_{n}(t)={\mu }_{n}+{\sum }_{j=1}^{H}{w}_{j,n}^{(h)}{h}_{j,t}\) (that is, with only heading indicator functions), \({\lambda }_{n}(t)={\mu }_{n}+{\sum }_{k=1}^{S}{w}_{k,n}^{(s)}{s}_{k,t}\) (that is, with only speed indicator functions) and, finally, the complete equation shown above. All models included a weak L2 regularization on the parameters with a penalty coefficient of 1−10. For each regression model we report the resulting distribution of R2 values across the telencephalic PCs shown in Extended Data Fig. 1b. Similarly, the distribution of R2 values across other telencephalic cells is shown in Extended Data Fig. 1c. Standard exclusion criteria based on movement speed were applied (see spatial activity map in ‘Identification of PCs’).

    Whole-brain PC maps

    Following projection of the location of PCs from all fish to the same reference fish52, we accumulated all PCs into a three-dimensional histogram representing how many PCs were detected in each three-dimensional bin within the reference volume. We then convolved the three-dimensional histogram with a spherical convolution mask of radius 5 µm, such that each place-encoding cell contributes an increment of one count to all bins within a 5 µm radius. Maximum-intensity projections were then computed to visualize the anatomical distribution from multiple views (Fig. 1f).

    BVC model

    To search for cells whose firing properties follow the BVC model34 we fitted a BVC model (see below) to candidate neurons in the telencephalon. The model predicts that the activity of these cells, f, integrates each boundary point (represented in polar coordinates r and θ relative to the animal) according to

    $${\rm{\delta }}f=g(r,\theta ){\rm{\delta }}\theta ,$$

    where \(g(r,\theta )\) represents the firing rate relative to a preferred firing orientation ϕ and distance d from the boundary:

    $$g(r,\theta )=A\frac{\exp \left[\frac{{-(r-d)}^{2}}{2{\sigma }_{{\rm{rad}}}^{2}}\right]}{\sqrt{2\pi {\sigma }_{{\rm{rad}}}^{2}}}\frac{\exp \left[\frac{{-(\theta -\phi )}^{2}}{2{\sigma }_{{\rm{ang}}}^{2}}\right]}{\sqrt{2\pi {\sigma }_{{\rm{ang}}}^{2}}}+c.$$

    Here, \({\sigma }_{{\rm{rad}}}\) and \({\sigma }_{{\rm{ang}}}\) are the width of radial and angular tuning, respectively. Compared with the original model34, which treats \({\sigma }_{{\rm{rad}}}\) as a variable that linearly depends on d, we treat \({\sigma }_{{\rm{rad}}}\) as a constant to be fit. A is a scaling factor and c is the baseline. Note that the bin size for spatial activity maps for this experiment is slightly smaller (side length 1.1 mm), to ensure sufficient resolution for accurate detection and representation of the inserted wall. When fitting the model to spatial activity maps, we first normalize the map by its standard deviation. During the fitting we constrain d to be between 0 and 10 bins (assuming BVCs fire close to the boundary), ϕ between −π and π, both \({\sigma }_{{\rm{rad}}}\) and \({\sigma }_{{\rm{ang}}}\) between 0 and 10, A between 0 and 100 and c between −10 and +10 activity units.

    To test whether the activity of a given neuron is predicted by the BVC model we performed a three-session experiment—after a baseline session (45–95 min), an interior wall was introduced for S2 (45–95 min) and removed for S3 (45–95 min) (Extended Data Fig. 3b). We first identified all cells passing a minimum specificity criterion (over 0.01 bits per activity unit for all three sessions). Given the orientation of the inserted wall, only cells with PFs parallel to the inserted wall (from −45 to 45° or 135 to 225° in both S1 and S3) are suitable candidates for BVC analyses. We then fit the BVC model to the spatial activity maps of these candidate cells in S1 and then used the fitted model to generate predicted activity maps across sessions (with or without wall insertion).

    We computed the Pearson correlation coefficient between the observed spatial activity map of each session with the predicted activity map generated by the fitted model. To test the significance of the Pearson correlation coefficient we circularly permuted the observed spatial activity maps approximately 1,100 times (same as the number of bins in the map) and recalculated the Pearson correlation coefficient for each permutation to construct the null distribution for a one-sided shuffle test.

    Crucially, the BVC model predicts a duplication of PFs in S2. This duplicated firing field is expected to be absent in S1 and S3, which are predicted to have the same spatial activity map. Thus, to be classified as a BVC, a cell has to be consistent with the BVC model in all three sessions:

    1. 1.

      For S1, Pearson correlation between the observed spatial activity map and model-predicted activity should be significantly higher relative to shuffle (P < 0.05, one-sided shuffle test as described above).

    2. 2.

      For S2, Pearson correlation between the observed spatial activity map and model-predicted activity should be significantly higher relative to shuffle (P < 0.05, one-sided shuffle test) and the observed spatial activity map should have higher Pearson correlation with model-predicted activity with wall insertion than model-predicted activity without wall insertion.

    3. 3.

      For S3, the spatial activity map should return to the map observed in S1 (PF correlation between S1 and S3 should be significantly higher relative to shuffle; P < 0.05, one-sided shuffle test).

    Neighbourhood analysis

    To quantify the degree to which potential clustering of PFs is maintained across sessions, we performed a neighbourhood analysis for each neuron (Fig. 6e). First, for each neuron we ranked all other neurons by their PF correlation to the neuron of interest in S1. We define neurons with the highest PF correlation as neighbours, with a systematically varied inclusion threshold from top 2% to top 100%. We define neighbour retention % as the number of neurons that remain neighbours in S2 divided by the number of original neighbours in S1. The mean neighbour retention % across all telencephalic PCs from either session is then plotted. This analysis is also carried out separately for cells whose PF is close to the edge (nearest distance of COM to edge 3 mm or less) and for cells whose firing field is away from the edge (nearest distance to edge greater than 3 mm). To avoid any potential contribution from imperfect cell merging we restricted this analysis to pairs of cells with a minimum anatomical distance of over 20 µm. A one-sided Wilcoxon signed-rank test was used to quantify whether neighbour retention % in the experiment was significantly worse than a within-session positive control (comparison between the early and late periods of S1). As a negative control we shuffled the cell indices in the second session 1,000 times to randomize relationships between neurons. Post shuffle, we calculated mean neighbour retention % across all telencephalic PCs from either session to generate a null distribution (that is, a shuffle control). A P value is calculated by counting the percentage of shuffles in which the mean neighbour retention % is higher than the shuffle control. For these significance tests we fixed the number of top correlated neighbours to 10%.

    Significance tests for sample comparison

    Wilcoxon signed-rank tests were used for paired location comparisons with equal sample size. Mann–Whitney U-tests were used for unpaired location comparison.

    Animal care and transgenic lines

    Experiments were carried out in accordance with the Animal Welfare Office at the University of Tübingen and the Regierungspräsidium. All experiments in rectangular chambers, and ABA experiments, used Tg(elavl3:H2B-GCaMP6s+/+) with nacre (mitfa−/−) at 6–9 days postfertilization. The remainder of the experiments used Tg(elavl3:H2B-GCaMP8s+/+ or GCaMP8s+/−) with nacre (mitfa−/−) at 6–13 days postfertilization. In three of the rectangle-to-circle experiments the fish expressed an additional allele of Tg(elavl3:GCaMP6s). Fish were reared on a 14/10 h light/dark cycle at 25 °C. They were maintained in sets of 30 in E3 water and fed dry food daily.

    Computer hardware for data acquisition and analysis

    The tracking microscope was controlled by a rack-mounted, 12-core workstation with a Geforce RTX 3080 Ti graphics processing unit. Offline data analysis was performed using eight rack-mounted, 8- to 16-core Linux servers with four graphics processing units each (Geforce RTX 3080 Ti, RTX 2080 Ti or GTX 1080 Ti), or at the Max Planck Computing and Data Facility (Raven, A100-SXM4).

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Descending networks transform command signals into population motor control

    [ad_1]

    Fly stocks and husbandry

    All experiments were performed on female adult D. melanogaster raised at 25 °C and 50% humidity on a 12-h light–dark cycle. The day before optogenetic experiments (22–26 h prior), we transferred experimental and control61 flies to a vial containing food covered with 20 μl all trans-retinal (ATR) solution (100 mM ATR in 100% ethanol; Sigma Aldrich R2500, Merck) and wrapped in aluminium foil.

    Functional imaging and behaviour experiments

    We generated transgenic flies expressing LexAop-opGCaMP6s (a gift from O. Akin62) under the control of a Dfd-LexA driver (a gift from J. Simpson63) and having a copy of UAS-CsChrimson (Bloomington ID 55135) (Supplementary Table 1, ID 1). We also generated flies that additionally had the LexAop-tdTomato transgene (Bloomington ID 77139) (Supplementary Table 1, ID 2). For most experiments, we used flies without tdTomato expression.

    MDN-spGAL4 flies (also known as MDN3 from ref. 2) were used to drive backwards walking. aDN2-spGAL4 flies (also known as aDN2-spGAL4-2 from ref. 4) were used to drive antennal grooming. DNp09-spGAL4 flies (from ref. 3) were used to drive forwards walking. Their genotypes2,3,4,14,15,22,64 are listed at the top of Supplementary Table 2.

    For all experiments in Figs. 2 and 4, we crossed spGAL4 flies or wild-type flies (Phinney Ridge flies, Dickinson laboratory) with one of our stable transgenic driver lines for imaging (Supplementary Table 1, ID 1 or ID 2). For Fig. 2, flies were 2–9 days post-eclosion and experiments were performed at Zeitgeber time 7–13 (ZT7–13). For Fig. 4, flies were 2–9 days post-eclosion and experiments were performed at ZT4–7. For Fig. 5, Extended Data Figs. 5, 6 and 10, we crossed spGAL4 lines with 20XUAS-CsChrimson.mVenus (attP40) flies (Bloomington ID 55135). Control experiments were performed by crossing wild-type flies (Phinney Ridge flies, or Canton S) to 20XUAS-CsChrimson.mVenus (attP40). The exact genotypes of the split lines and the source stocks are listed in Supplementary Table 2. All experiments were performed on flies 4–8 days post-eclosion at ZT4–7.

    Confocal imaging experiments

    We generated flies with stable Dfd-driven expression of membrane-targeted tdTomato or nuclear-targeted mCherry based on flies generated by the McCabe laboratory (EPFL) (Supplementary Table 1, IDs 3 and 4). For the three spGAL4 driver lines targeting comDNs (MDN, DNp09 and aDN2), we generated stable lines expressing CsChrimson (Supplementary Table 1, IDs 5, 6 and 7). We crossed flies expressing a red fluorescent protein variant with flies expressing CsChrimson in a spGAL4 driver line to visualize the expression patterns using confocal microscopy (Extended Data Fig. 1).

    Recording from DNs using a Dfd driver line

    We leveraged a genetic-optical intersectional approach to selectively record from GNG DNs. We chose to record from GNG DNs because we found that 73% of all DN–DN synapses in the brain connectome are in the GNG. In addition, the GNG houses 60% of all DNs and 85% of all DNs have axonal output in the GNG14. However, the Hox gene Dfd does not include the entirety of all GNG DNs: it excludes those driven by the Hox gene Sex combs reduced (Scr)65. Sterne et al.15 have estimated that 550 cells in the GNG are Dfd positive and 1,100 are Scr positive, with only a small fraction expressing both. We show, for example, that aDN2, although localized to the GNG, is Dfd negative and thus most likely Scr positive (Extended Data Fig. 1c). In our study, functional imaging of DNs using an Scr driver line proved difficult because Scr expression extends into the neck and anterior VNC63. Specifically, we observed strong expression of GCaMP in the tissues surrounding the thoracic cervical connective (potentially ensheathing glia66), making it very hard to record the activity of DN axons. We expect that some Scr-positive DNs will also be recruited by comDNs. Thus, we probably under-report the number of recruited GNG DNs.

    Limitations of selected spGAL4 driver lines

    In addition to descending neurons, our aDN2-spGAL4 driver line (aDN2-GAL4.2 (ref. 4)) contains two more groups of neurons. One pair is on the anterior surface of the brain and, based on our control experiments, is probably not or only weakly activated by targeted optical stimulation of the neck (and not at all activated by thoracic stimulation). Another is a set of neurons in the anterior VNC. Because other driver lines targeting aDN2 neurons with more, different off-target neurons have the same behavioural phenotype as our aDN2 driver4, we are confident that the effects that we observed are due to stimulating aDN2 neurons.

    Different studies have reported variable behavioural phenotypes for stimulating the DNp09-spGAL4 driver line: some saw forwards walking3, whereas others observed stopping or freezing18,67. We observed both: at our standard 21-μW optogenetic stimulation power, heterozygous animals mostly walked forwards. Occasionally, flies would only transiently walk forwards and then stop, or alternate rhythmically between walking and stopping. With higher expression levels of CsChrimson (that is, DNp09-spGAL4 > UAS-CsChrimson homozygous animals), we observed mostly freezing. We used heterozygous animals for our study.

    Immunofluorescence tissue staining and confocal imaging

    We dissected brains and VNCs from 3 to 6 days post-eclosion female flies as described in ref. 68.

    For samples in Extended Data Fig. 1a,c, we fixed flies in 4% paraformaldehyde (PFA; 441244-1KG, Sigma Aldrich, Merck) in 0.1 M PBS (Gibco PBS, pH 7.4, 10010-015, Thermo Fisher Scientific). We then washed them six times for 10 min with 1% Triton (Triton X-100, X100-100ML, Sigma Aldrich, Merck) in PBS (hereafter named 1% PBST) at room temperature. We then transferred them to a solution of 1% PBST, 5% natural goat serum (goat serum from controlled donor herd, G6767-100ML, Sigma Aldrich, Merck) and primary antibodies (see Supplementary Table 3) and left them overnight at 4 °C. We then washed the samples six times for 10 min with 1% PBST at room temperature. We transferred them to a solution of 1% PBST, 5% natural goat serum and secondary antibodies (see Supplementary Table 3) and left them for 2 h at room temperature. We then washed the samples six times for 10 min with 1% PBST at room temperature. We mounted the samples on glass slides using SlowFade (SlowFade Gold Antifade Mountant, S36936, Thermo Fisher Scientific) and applied a coverslip. To space the slide and the coverslip, we placed a small square of two layers of double-sided tape at each edge. We sealed the edges of the coverslip with nail polish.

    For samples in Extended Data Fig. 1b, we fixed flies in 4% PFA in PBS and transferred them to 1% PBST and left them overnight at 4 °C. We then washed the samples three times for 15 min with 1% PBST at room temperature. We transferred them to a solution of 1% PBST, 5% natural goat serum and primary antibodies (see Supplementary Table 3) and left them overnight at 4 °C. We then washed the samples three times for 15 min with 1% PBST at room temperature. We transferred them to a solution of 1% PBST, 5% natural goat serum and secondary antibodies (see Supplementary Table 3) and left them overnight at 4 °C. We then washed the samples three times for 15 min with 1% PBST at room temperature. We mounted the samples on glass slides using SlowFade and applied a coverslip. To space the slide and the coverslip, we applied a small square of two layers of double-sided tape at each edge. We sealed the edges of the coverslip with nail polish.

    We imaged samples using a Leica SP8 Point Scanning Confocal Microscope with the following settings: ×20, 0.75 NA HC PL APO dry objective, 2× image averaging, 1,024 × 1,024 pixels, 0.52 × 0.52-μm pixel size, 0.5-μm z-step interval; green channel 488-nm excitation, 50–540-nm emission bandpass; red channel (imaged separately to avoid cross-contamination) 552-nm excitation, 570–610-nm emission bandpass; and infrared channel (nc82, imaged in parallel with the green channel) 638-nm excitation, 650–700-nm emission bandpass. We summed confocal image stacks along the z-axis and rotated and translated the images to centre the brain/VNC using Fiji69.

    Optogenetic stimulation system and approach

    We used a 640-nm laser (Coherent OBIS 1185055 640 nm LX 100 mW, Edmund Optics) as an optogenetic excitation light source. We reduced the light intensity using neutral density filters (Thorlabs) and controlled the light intensity with mixed analogue and digital control signals coming from an Arduino with custom software. A digital signal was used to turn the laser on and off. An analogue signal (PWM output from Arduino and RC low-pass filtered) was used to modulate the power. Both of those signals were sent in parallel to the laser and acquisition board and were recorded alongside the two-photon microscope signals using ThorSync 3.2 software (Thorlabs). The light was directed towards the fly with multiple mirrors. Fine control of the target location was achieved using a kinematic mount (KM100, Thorlabs) and a galvanometric mirror (GVS011/M, Thorlabs). We manually optimized targeting of the laser onto the neck/thorax before each experiment. The light was focused onto the fly using a plano-convex lens with f = 75.0 mm (LA1608, Thorlabs) placed at the focal distance from the fly. For stimulation of the inhibitory opsin GtACR1, we used the same system, but with a 561-nm laser (Coherent OBIS 1280720 561 nm LS 150 mW, Edmund Optics) instead of a 640-nm laser to better match the optical excitation spectrum of GtACR1.

    We note that, although comDNs have axon collaterals in the GNG, none of the comDNs in this study were among the DN populations that we imaged: DNp09-spGAL4 and MDN-spGAL4 lines drive expression in neurons with cell bodies in the cerebral ganglia and not in the GNG (Extended Data Fig. 1a). The DN cell bodies of the aDN2-spGAL4 line are within the GNG but do not overlap with Dfd driver line expression (Extended Data Fig. 1c). Thus, we could be certain that any active DNs would be recruited through synaptic connections and not optogenetically. We identified laser light intensities that could elicit robust forwards walking, anterior grooming and backwards walking (Fig. 2a and Extended Data Fig. 1d).

    We used different laser intensities to stimulate MDN (21 μW), DNp09 (21 μW) and aDN2 (41.6 μW) animals because 21-μW stimulation power mostly causes aDN2 animals to stop (Extended Data Fig. 1d). Activation of MDN in the head, neck and thorax was sufficient to trigger backwards walking (Extended Data Fig. 1e). Although some tissue scattering of laser light can be expected, in control experiments, we found that activation of the head capsule, but not the thorax, could strongly elicit forwards walking in the ‘bolt protocerebral neurons’ of the brain—these neurons are known to drive robust and fast forwards walking3 (Extended Data Fig. 1f). Stimulation (21 μW) was more specific than 41.6 μW, which is why we selected 21-μW stimulation for MDN and DNp09 as well as the spGAL4 lines tested (Fig. 5f,g and Extended Data Figs. 5 and 6). We regularly calibrated the laser intensity by measuring it with a power metre (PM100D, Thorlabs) and adjusting the analogue gain of the laser.

    In vivo two-photon calcium imaging experiments

    We performed two-photon microscopy with a ThorLabs Bergamo II two-photon microscope augmented with a behavioural tracking system as described in ref. 29. In brief, we recorded a coronal section of the thoracic cervical connective using galvo-resonance scanning at around 16-Hz frame rate. In addition, optogentic stimulation was performed as described above. We only recorded the green PMT channel (525 ± 25 nm) because the red PMT channel would be saturated by red laser illumination of the fly. In parallel, we recorded animal behaviour at 100 frames per second (fps) using two infrared cameras placed in front and to the right of the fly.

    Flies were dissected to obtain optical access to the VNC and thoracic cervical connective as described in ref. 70. In brief, we mounted the fly to a custom stage by gluing its thorax and anterior head to the holder and removed its wings. Then, we opened the dorsal thorax using a syringe needle and waited for indirect flight muscles to degrade for approximately 1.5 h. We pushed aside the trachea and resected the gut and salivary glands. For some flies, where the trachea was obstructing the view, we placed a V-shaped implant71 into the thoracic cavity to push the trachea aside. We then placed the fly over an air-suspended spherical treadmill marked with a pattern visible on infrared cameras for ball tracking (air flow at 0.6 l min−1). While the fly was adapting to this new environment (approximately 15 min), the imaging region was identified and the optogenetic stimulation laser was centred onto the neck.

    We used ThorImage 3.2 to record and ThorSync 3.2 software to synchronize imaging data. We recorded 10,000 microscopy frames (around 10 min) while also recording behavioural data using cameras placed around the fly and presenting optogenetic stimuli. During a typical 10-min recording session, we presented 40 stimuli (5-s stimulation and 10-s inter-stimulus intervals). Whenever the recording quality was still good enough (that is, many neurons were visible and the fly still behaved healthily), we recorded multiple sessions to increase the number of stimulation trials. Many GNG DNs were active during spontaneous behaviour in the absence of optogenetic stimulation. Thus, to distinguish between GNG DN activity due to comDN stimulation versus the spontaneous initiation of behaviours, we only analysed trials for which flies were walking immediately before optogenetic stimulation. Because flies were quite spontaneously active, analysing trials for which flies were previously walking instead of resting increased the data available for trial averaging. It also allowed us to avoid laser light causing quiescent control animals to behave, obscuring our analyses.

    Investigating natural behaviours

    In Extended Data Fig. 2, we compared optogenetically elicited neural activity to activity observed during natural behaviours: forwards walking, anterior grooming and backwards walking. Natural forwards walking is frequently spontaneously generated by the flies. By contrast, we needed to stimulate the antennae with 5-s puffs of humidified air to increase the probability of natural grooming (Extended Data Fig. 2b). We provided humidified air puffs with an olfactometer (220A, Aurora Scientific) using the following parameters: 80 ml min−1 air flow, 100% humidity, 5-s duration and 20-s inter-stimulus interval. To have humid air puffs (that is, an abrupt change in flow rate) instead of a switch from dry air to humidified air—the default olfactometer configuration—we only connected the ‘odour’ tube to the final valve and not the ‘air’ tube. Furthermore, to increase the likelihood of spontaneous backwards walking (Extended Data Fig. 2c), we replaced the spherical treadmill with a custom cylindrical treadmill that we found increases the motivation to backwards walk. Specifically, we designed a 10-mm diameter, 80-mg 3D-printed wheel (RCP-30 resin) and printed it using stereolithography through digital light processing (Envisiontec Perfactory P4 Mini XL). This wheel was mounted on a low-friction jewel-bearing holder (ST-3D sapphire shafts, VS-40 sapphire bearings, Freudiger SA). We marked the sides of the wheel with infrared-visible dots to facilitate infrared camera tracking of rotations and calculations of velocity to classify bouts of backwards walking. When using the wheel, we added an additional third infrared camera to the left of the wheel, where dot markers were visible.

    Recording neuronal activity of DNs after resecting the VNC

    To record neuronal activity in Dfd DNs after cutting the VNC, we first mounted and dissected flies as described above for intact animals. We verified that the animal was responding to optogenetic stimulation where appropriate and that the animal was still healthy. Then, we used a pair of microscissors (FST, Clipper Neuro Scissors, no. 15300-00, Fine Science Tools GmbH) to cut the entire VNC in the T1 neuromere. We cut just posterior to the fat bodies surrounding the cervical connective. We verified that the VNC was cut by pulling on its posterior region with forceps. We then performed two-photon imaging and optogenetic stimulation as in experiments with intact flies (that is, laser stimulation of the neck while recording a cross-section of the cervical connective). We recorded 5,000 microscopy frames (around 5 min) with 20 stimulation repetitions. Flies were hanging freely from the stage and not placed on the spherical treadmill because the VNC was injured resulting in no notable leg movements. Post-hoc, we recorded a volume stack of the cervical connective and T1 neuromeres to verify the location of the cut.

    Behavioural experiments in leg-amputated animals

    To investigate the number of actively controlled appendages involved in forwards and backwards walking, we mounted flies to the same stages used for imaging and behaviour experiments. We recorded ten trials of responses to optogenetic stimulation on the spherical treadmill, leaving 25 s between each stimulation. We then used cold anaesthesia to amputate the legs of the flies, before letting the flies recover for at least 10 min. The amputation was performed bilaterally for either the front legs, mid-legs or hindlegs, using clipper scissors (FST, Clipper Neuro Scissors, no. 15300-00, Fine Science Tools GmbH). We amputated the legs at the level of the tibia–tarsus joint to minimize the lesion while removing tarsal adhesion. Once they recovered, we recorded flies again on the spherical treadmill for ten trials. The control flies used to investigate walking phenotypes were Canton S, in accordance with previous work on locomotion—in particular DNp09 (ref. 3).

    Behavioural experiments in headless animals

    For behavioural experiments, we mounted flies to the same stages used for two-photon imaging, but without gluing the anterior part of the head to the holder. Then, without further dissection, we placed animals onto the spherical treadmill. After recording ten trials of responses to optogenetic stimulation in intact animals, we decapitated the fly by inverting the holder and pushing a razor blade onto the neck. To achieve this, we mounted a splinter of the razor blade onto the tip of a pair of dissection forceps for finer control. We took care not to injure the legs of the fly and to make a clean cut without pulling out thoracic organs passing through the neck connective. To limit desiccation, we then sealed the stump of the neck with a drop of UV-curable glue. We only continued experiments on flies if their limbs were moving following decapitation. We then placed the headless flies onto the spherical treadmill and let them recover for at least 10 min. Then, we recorded ten trials of responses to optogenetic stimulation on the spherical treadmill and ten trials in which the fly was hanging from the holder without contacting the spherical treadmill. In experiments for testing connectome-based predictions, we slightly modified this experimental procedure. Because intact control animals become aroused by optogenetic stimulation, to avoid false positives and to discover behavioural phenotypes for less well-studied DNs, we attempted to reduce the spontaneous movements of flies. First, instead of 10 s between optogenetic stimulation trials, we used 25 s. Second, we filled the fly holder with room temperature saline solution to buffer heating from infrared illumination. For Extended Data Figs. 5 and 6, control flies (no DN > CsChrimson) were of the Phinney Ridge genetic background except for the later-studied DNp42, oviDN and DNg11, which were compared with control flies of the Canton S genetic background.

    Data exclusion

    We manually scored the quality of neural recordings (signal-to-noise ratio, occlusions, and so on) and the behaviour of the fly (rigidity, leg injury, among others) on a scale from 1 to 6 (where 1 is very good, 3 is satisfying and 6 is insufficient) for each 10-min recording session. We only retained sessions in which both criteria were at least at a ‘satisfying’ quality level. Unless indicated otherwise, we analysed trials in which the fly was walking before stimulus onset. Thus, we did not retain data from flies with less than ten trials of walking before stimulation. We chose to do this for several reasons: (1) GCaMP6s decays very slowly. Even if the fly was moving approximately 2 s before stimulation, we still observed residual fluorescence signals, increasing the variability of changes upon stimulation. There were only very few instances in which the animal was robustly resting for more than 2 s, making the inverse analysis impossible. (2) We observed that control flies became aroused upon laser light stimulation. Thus, they may begin moving if they were resting before stimulation, indirectly driving DN activity and making it harder to discriminate between optogenetically induced versus arousal-induced activity. Data from flies that were resting before stimulation exhibit recruitment patterns that are similar, although not identical (see data at https://doi.org/10.7910/DVN/HNGVGA). DNp09 shows strong activation in the medial cervical connective (as for when the fly was walking before stimulation) and additional activation in lateral regions. The central neurons characteristic of aDN2 activation in animals that were previously walking are also active in animals that were previously resting. In addition, we observed more widespread, weaker activation. DN signals upon MDN activation were slightly more spread out when the fly was resting before stimulation.

    For experiments with headless animals, we excluded data from flies in which one of the legs was visibly immobile after decapitation, when at least one leg was not displaying spontaneous coordinated movements, or when the abdomen was stuck to the spherical treadmill such that other movements became impossible.

    Behavioural data analysis

    For analysis, we used a custom Python code unless otherwise indicated. Code for behavioural data preprocessing can be found in the ‘twoppp’ Python package on GitHub (https://github.com/NeLy-EPFL/twoppp) previously used in ref. 71. Code for more detailed analysis can be found in the GitHub repository (https://github.com/NeLy-EPFL/dn_networks) for this paper.

    Velocity computation

    As a proxy for walking velocities, we tracked rotations of the spherical treadmill using Fictrac72. Data from an infrared camera placed in front of the fly were used for these measurements as described in ref. 29. Raw velocity traces acquired at 100 Hz were noisy and thus low-pass filtered with a median filter (width = 5 = 0.05 s) and a Gaussian filter (σ = 10 = 0.1 s).

    The velocity of the cylindrical treadmill was computed as follows. First, the wheel was detected in a camera on the left side of the fly using Hough circle detection. For each frame, we extracted a line profile along the surface of the wheel showing the dot pattern painted on its side. We then compared this line profile to the line profile of the previous frame to determine the most likely rotational shift. We converted this shift to a difference in wheel angle and then transformed this into a linear velocity in millimetres per second to make it comparable to quantification of spherical treadmill rotations. This image processing was prone to high-frequency noise. Therefore, we filtered raw velocities with a Gaussian filter (σ = 20 = 0.2 s).

    2D pose estimation

    We tracked nine keypoints from a camera on the right side of the fly: anal plate, ovipositor, most posterior stripe, neck, front leg coxa, front leg femur tibia joint, front leg tibia–tarsus joint, mid-leg tibia–tarsus joint and hindleg tibia–tarsus joint (see Fig. 1d) using SLEAP (v1.3.0)73.

    Behaviour classification

    We classified behaviours using an interpretable classifier based on heuristic thresholds on the walking velocity, limb motion energy and front leg height. For example, we classified forwards and backwards walking as having a forwards velocity of more than 1 mm s−1 and − 1 mm s−1 or less, respectively. All parameters are shown in Supplementary Table 4. If none of the conditions was fulfilled, we classified the behaviour as undefined.

    Anterior grooming was composed of a logical ‘OR’ of two conditions: (1) the front leg was lifted up high, or (2) the front leg was moving with high motion energy. Front leg height was computed as the vertical distance between the front leg tibia–tarsus joint and the median position of the coxa. Pixel coordinates start from the top of the image. Thus, it is positive when the front leg is low (for example, during resting) and negative when the front leg is high (for example, during head grooming). Motion energy (ME) of the front legs, mid-legs and hindlegs was computed based on the movements of the respective tibia–tarsus joint as follows: \({\rm{ME}}=\sqrt{{(\Delta {x}_{t})}^{2}+{(\Delta {y}_{t})}^{2}}\), where Δxt and Δyt are the difference in x and y between two consecutive frames. We then computed the moving average of the motion energy within a 0.5-s (that is, 50 samples) window to focus on longer timescale changes in motion energy.

    Two-photon microscopy image analysis

    We used a custom Python code unless otherwise indicated. For all image analysis, the y axis is dorsal–ventral along the body of the fly, and the x axis is medial–lateral. Image and filter kernel sizes are specified as (y, x) in units of pixels. Code for two-photon data preprocessing can be found in the ‘twoppp’ Python package on GitHub (https://github.com/NeLy-EPFL/twoppp) previously used in ref. 71. Code for more detailed analysis can be found in the GitHub repository (https://github.com/NeLy-EPFL/dn_networks) for this paper.

    Motion correction

    Recordings from the thoracic cervical connective suffer from large inter-frame motion including large translations, as well as smaller, non-affine deformations. Contrary to motion-correction procedures used before for similar data71, here we made use of the high baseline fluorescence seen in Dfd > LexAop-GCaMP6s animals instead of relying on an additional, red colour channel for motion correction. Thus, we performed motion correction directly on the green GCaMP channel. We compared the performance for data where a red channel was available and could only find negligible differences in ROI signals. Whether a neuron was encoding walking or resting was unchanged irrespective of whether we used the GCaMP channel or recordings from an additional red fluorescent protein.

    We performed centre-of-mass registration on every microscopy frame to compensate for large cervical connective translations. We cropped the microscopy images (from 480 × 736 to 320 × 736 pixels). Then, we computed the motion field for each frame relative to one selected frame per fly using optic flow. We corrected the frames for this motion using bi-linear interpolation. The algorithm for optic flow motion correction was previously described in ref. 70. We only used the optic flow component to compute the motion fields and omitted the feature matching constraint. We regularized the gradient of the motion field to promote smoothness (λ = 800).

    ROI detection

    For each pixel, we computed the standard deviation image across time for the entire recording. This gives a good proxy of whether a pixel belongs to a neuron: it has high standard deviation because the neuron was sometimes active. We used this image as a spatial map of the recording to inform ROI detection. Example standard deviation images are also used as the background image for Fig. 2c.

    We applied principal component analysis (PCA) on a subset of all pixels in the two-photon recording. We then projected the loadings of the first five principal components back into the image space. This gave us additional spatial maps integrating functional information to identify neurons. We then used a semi-automated procedure to detect ROIs; we performed peak detection in the standard deviation map. We visually inspected these peaks for correctness by looking at both the standard deviation map and the PCA maps. We manually added ROIs that the peak detection algorithm had missed, for example, because the neuron was only weakly active. The functional PCA maps allowed us to discriminate between nearby neurons with dissimilar functions. They might show up as one big peak in the standard deviation map, but would clearly be assigned to different principal components. We were able to annotate between 50 and 80 ROIs for each fly. The number of visible neurons varies due to GCaMP6s expression levels, dissection quality, recording quality and the behavioural activity level of the fly.

    Neural signal processing

    We extracted fluorescence values for each annotated ROI by averaging all pixels within a rhomboid shape placed symmetrically over the ROI centre (11 pixels high and 7 pixels wide). This gave us raw fluorescence traces across time for each neuron/ROI. We then low-pass filtered those raw fluorescence traces using a median filter (width = 3 = ~0.185 s) and a Gaussian filter (σ = 3 = ~0.185 s).

    ΔF/F computation

    Because of variable expression levels among cells, GCaMP fluorescence is usually reported as a change in fluorescence relative to a baseline fluorescence. Here we were mostly interested whether neurons were activated. To have a quantification that was comparable across neurons, we also normalized fluorescence of each neuron to its maximum level. Thus, we computed \(\Delta F/F=\frac{F-{F}_{0}}{{F}_{{{\max}}}-{F}_{0}}\), where F is the time-varying fluorescence of a neuron, F0 is its fluorescence baseline and Fmax is its maximum fluorescence. We computed Fmax as the 95% quantile value of F across the entirety of the recording. In rare instances, neurons would get occluded, or slight glitches of the motion-correction algorithm would result in some residual movement. Both of these make it challenging to estimate the minimum fluorescence. When the fly is resting, nearly all neurons are at their lowest levels (aside from several29) and there is usually less movement of the nervous system. Thus, we computed F0 as a ‘resting baseline’ as follows. First, using our behavioural classifier, we identified the onset of prolonged resting (at least 75% of 1 s after onset classified as resting and at least 1 s after the previous onset of resting) outside of optogenetic stimulation periods. For each neuron, we then computed the median fluorescence across repetitions aligned to resting onset. We then searched for the minimum value in time over the 2 s following rest onset. Taking the median across multiple instances of resting provided a more stable way to compute the baseline than by simply taking the minimum fluorescence. For flies that were not behaving (that is, those with resected VNCs shown in Extended Data Fig. 3), we could not compute a resting baseline and instead used the 5% quantile value as F0. The normalization using F0 and Fmax provided a way to compare fluorescence across multiple neurons with similar units. Thus, whenever we report absolute ΔF/F, a value of 0 refers to neural activity during resting and 1 refers to the 95% quantile of neural activity. When we report ΔF/F relative to pre-stimulus values (Fig. 2b–f,i and Extended Data Fig. 2), the unit of ΔF/F persists and a value of 0.5 means that the neuron has changed its activity level half as much as when it would go from a resting state to its 95% quantile state.

    Video data processing

    To process the raw fluorescence videos shown in Supplementary Videos 1 and 2 and in Fig. 2b, we first low-pass filtered the data with the same temporal filters as for ROI signals (median filter width = 3 = ~0.185 s, Gaussian filter σ = 3 = ~0.185 s). In addition, we applied spatial filters (median filter width = [3,3] pixels, Gaussian filter σ = [2,2] pixels). We then applied the same ΔF/F computation method described above, but for each individual pixel instead of for individual ROIs. Thus, the units used in the videos are identical to the units used for ROI signals in Fig. 2 and Extended Data Fig. 1.

    Synchronization of two-photon imaging and camera data

    We recorded two different data modalities at two different sampling frequencies: two-photon imaging data were recorded at approximately 16.23 Hz and behavioural images from cameras were acquired at 100 Hz. We synchronized these recordings using a trigger signal acquired at 30 kHz. When it was necessary to analyse neural and behavioural data at the same sampling rate (for example, Supplementary Videos 1 and 2), we downsampled all measurements to the two-photon imaging frame rate by averaging all behavioural samples acquired during one two-photon frame. In the figures, we report data at its original sampling rate.

    Stimulus-triggered analysis of neural and behavioural data

    We proceeded in the same way irrespective of whether the trigger was the onset of optogenetic stimulation (Figs. 2, 4 and 5 and Extended Data Figs. 1, 3, 5, 6 and 10) or the onset of a natural (spontaneous or puff elicited) behaviour (Extended Data Fig. 2). To compute stimulus-triggered averages, we aligned all trials to the onset of stimulation and considered the times between 5 s before the stimulus onset and 5 s after stimulus offset. In Fig. 2, we only considered trials in which the fly was walking in the 1 s before stimulation (behaviour classification applied to the mean of the 1-s pre-stimulus interval). We only considered flies with at least ten trials of walking before stimulation. Behavioural responses in Figs. 2a, 4b–g and 5f,g and Extended Data Fig. 1d–f, 2a–c, 5, 6 and 10 show the average across all trials (including multiple animals) and the shaded area indicates the 95% confidence interval of the mean across trials. When behavioural probabilities are shown, the fraction of trials that a certain behaviour occurs at a specific time after stimulus onset is shown. Neural responses over time in Fig. 2d and Extended Data Figs. 2a–c and 3c,h show average responses across all trials for one animal. To visualize the change in neural activity upon stimulation, the mean of neural activity in the 1 s before stimulation is subtracted for each neuron. If the absolute value of the mean across trials for a given neuron at a given time point was less than the 95% confidence interval of the mean, the data were masked with 0 (that is, it is white in the plot). This procedure allowed us to reject noisy neurons with no consistent response across trials. Because we subtracted the baseline activity before stimulus onset, we also observed DNs that became less active upon optogenetic stimulation (neurons appearing blue). However, GCaMP6s fluorescence does not reliably reflect neural inhibition. Thus, we cannot claim that this reduced activation in some neurons is due to inhibition. Instead, because the flies were walking before stimulation onset, those neurons most likely encode walking and became less active when the fly stopped walking forwards.

    Individual neuron responses in Fig. 2c and Extended Data Fig. 2a–c,f and 3b,g show the maximum response of a single neuron/ROI. We detected the maximum response during the first half of the stimulus (2.5 s). We then computed the mean response of this neuron during 1 s centred around the time of its maximum response. If during at least half of that 1 s the mean was confidently different from 0 (that is, mean > CI), we considered the neuron to be responsive, otherwise we masked the response to zero to reject noisy neurons with no consistent response across trials. Figure 2b shows the same as Fig. 2c, but with this processing applied to pixels rather than individual neurons/ROIs. Contrary to previous ROI processing, pixels are not masked to 0 in case they are not responsive. Figure 2e shows an overlay of Fig. 2c for multiple flies. Data from each of these flies were registered to one another by aligning the y coordinates of the most dorsal and ventral neurons, as well as the x coordinate of the most lateral neurons. Figure 2f is a density visualization of Fig. 2e. To compute the density, we set the individual pixel values where a neuron was located to its response value and summed this across flies. We then applied a Gaussian filter (σ = 25 pixels, kernel normalized such that it has a value of 1 in the centre to keep the units interpretable) and divided by the number of flies to create an ‘average fly’. Extended Data Fig. 2d was generated in the same manner.

    Statistical tests

    Figure 2g–i includes a statistical analysis of neural responses. We quantified the number of activated neurons for each fly (Fig. 2g) as the neurons whose response value was positive (as in Fig. 2c). We quantified the fraction of activated neurons for each fly (Fig. 2h) by dividing the number of activated neurons by the number of neurons detected in the recording. In Fig. 2i, we quantified the summed ΔF/F as the sum of the response values of neurons that were positively activated (see the red line in Fig. 2d). Here we ignored neurons with negative response values because reductions in GCaMP fluorescence should not be interpreted as reflecting inhibition (see above). We used two-sided Mann–Whitney U-tests (scipy.stats.mannwhitneyu74) to statistically analyse these comparisons. Sample sizes and P values are described in the figure legends. The Mann–Whitney U-test is a ranked test. Thus, comparing three samples against three samples (for example, aDN2 versus control), where all samples are at identical relative positions (that is, ranks), will yield the same P value, even if the absolute values are slightly different. This leads the P values to be identical across Fig. 2g–i, reflecting the conservative choice of a rank test that does not assume an underlying distribution.

    Figures 4b–e and 5f,g and Extended Data Figs. 5 and 6 show statistical tests comparing the behavioural responses of intact and headless flies. Figures 4f,g and 5f,g and Extended Data Figs. 5 and 6 show statistical tests comparing the behavioural responses of headless experimental flies with headless control flies. In each case, we used two-sided Mann–Whitney U-tests (scipy.stats.mannwhitneyu74) to compare the average value within the first 2.5 s after stimulus onset. We averaged across technical replicates (trials) and only compared biological replicates (individual flies) using statistical tests. Exact P values rounded to three digits are indicated in Supplementary Table 5.

    Statistical tests in Extended Data Fig. 10 show comparison of the behavioural responses of leg-amputated experimental flies with intact experimental flies, and leg-amputated experimental flies with leg-amputated control flies. In each case, we used two-sided Mann–Whitney U-tests (scipy.stats.mannwhitneyu74) to compare the total displacement after 5 s of stimulation. We averaged across technical replicates (trials) and only compared biological replicates (individual flies) using statistical tests. Exact P values rounded to three digits are in Supplementary Table 6.

    Extended Data Fig. 2a–c (right) and 2e show the Pearson correlation between neural responses to optogenetic stimulation and neural activity during natural (spontaneous or puff-elicited) behaviours. The two-sided significance of the correlation is measured as the probability that a random sample has a correlation coefficient as high as the one reported (scipy.stats.pearsonr v1.4.1 (ref. 74)).

    In all figures showing statistical tests, significance levels are indicated as follows: ***P < 0.001, **P < 0.01, *P < 0.05 and not significant (NS) P ≥ 0.05.

    Brain connectome analysis

    Loading connectome data

    We used the female adult fly brain (FAFB) connectomics dataset7 from Codex75 (version hosted on Codex as of 3 August 2023, FlyWire materialization snapshot 630; https://codex.flywire.ai/api/download) to generate all figures. We merged the ‘neurons’, ‘morphology clusters’, ‘connectivity clusters’, ‘classification’, ‘cell stats’, ‘labels’, ‘connections’ and ‘connectivity tags’ tables. We then found DNs by filtering for the attribute super_class=descending. We identified DNs with known, named (for example, DNp09) genetic driver lines from Namiki et al.14 by checking the ‘cell type’, ‘hemibrain type’ and ‘community labels’ attributes (in this priority) and using the following rules. Otherwise, we used the consensus cell type38 (for example, DNpe078). We semi-automatically assigned names using the following rules:

    1. 1.

      For special neurons, we manually labelled root IDs 720575940610236514, 720575940640331472, 720575940631082808 and 720575940616026939 as MDNs based on community labels from S. Bidaye (consensus cell type DNpe078); root IDs 720575940616185531 and 720575940624319124 as aDN1 based on community labels from K. Eichler and S. Hampel (consensus cell type DNge197); and root IDs 720575940624220925 and 720575940629806974 as aDN2 based on community labels from K. Eichler and S. Hampel (consensus cell type DNge078). We verified visually that the shape of the neurons corresponded to published light-level microscopy images2,4.

    2. 2.

      Otherwise, if both the hemibrain_type attribute and the cell_type attribute followed the Namiki format (‘DN{1 lowercase letter} {2 digits}’, for example, ‘DNp16’) and they are identical, we used this as the cell name. If they are both in this format but are not identical, we marked this neuron for manual intervention.

    3. 3.

      Otherwise, if the hemibrain_type attribute follows the Namiki format, we used this as the cell name. In addition, if the hemibrain_type attribute follows the Namiki format, but the cell_type attribute has a different value following the consensus cell-type format (‘DN{at least 1 lowercase letter} {at least 1 digit}’, such as ‘DNge198’), we marked the cell as requiring manual attention.

    4. 4.

      Otherwise, if the cell_type attribute follows the Namiki format, we used this as the cell name.

    5. 5.

      Otherwise, if the cell_type attribute follows the consensus cell-type format, we used this as the cell name.

    6. 6.

      Otherwise, we marked the cell as requiring manual intervention.

    7. 7.

      Wherever manual intervention was required (mostly in which the hemibrain_type is the Namiki format, but the cell_type is in the consensus cell-type format), we manually assigned the consensus cell type. However, we assigned the Namiki type if there was no other DN in this Namiki cell type or if the cell type was still missing a pair of DNs14.

    Next, we stored the connectome as a graph using SciPy sparse matrix74 and NetworkX DirectedGraph76 representations. We identified DNs with somas in the GNG by checking the third letter of the consensus cell type to be ‘g’ (that is, DNgeXXX)38.

    Analysing connectivity

    We only considered neurons with at least five synapses to be connected and computed the number of connected DNs based on this criterion (Figs. 3, 5b,c,e and 6a–c and Extended Data Figs. 4–9). This is the same value as the default in Codex, the connectome data explorer provided by the FlyWire community37,75. Analysis of connectivity across three brain hemispheres (two brain halves from the FAFB dataset7 and one from the hemibrain dataset77) revealed that connections “stronger than ten synapses or 1.1% of the target’s inputs have a greater than 90% change to be preserved”38. We visualized all DNs connected to a given DN (Figs. 3a,b and 5d and Extended Data Figs. 5 and 6) using the neuromancer interface, and manually coloured neurons depending on whether they are in the GNG.

    Neurotransmitter identification was available from the connectome dataset based on classification of individual synapses with an average accuracy of 87%39. Here we report neurotransmitter identity for a given presynaptic–postsynaptic connection. To define neurotransmitter identity for a given presynaptic–postsynaptic pair, we asserted that the neurotransmitter type would be unique using a majority vote rule. This was chosen as a tradeoff between harmonizing neurotransmitters for a neuron (especially GABA, acetylcholine and glutamate78) and avoiding the propagation of classification errors.

    DN network visualizations and DN hierarchy

    We used the networkx library76 to plot networks of DNs in Figs. 3c,d and 5e and Extended Data Fig. 5–9. Again, we considered neurons to be connected if they had at least five synapses. In the circular plots, we show summed connectivity of multiple DNs. For example, the network for DNp09 in Fig. 3c shows only one green circle in the centre representing two DNp09 neurons. All connections shown as arrows are the sum of those two neurons. DNs are considered excitatory if they have the neurotransmitter acetylcholine and inhibitory if they have the neurotransmitter GABA. Whether glutamate is excitatory or inhibitory is unclear; this depends on the receptor subtype60, which is unknown in most cases. To emphasize this, we highlight glutamatergic network edges in a different colour (pink).

    In Fig. 3e, we show the cumulative distribution of the number of DNs reachable within up to n synapses. Statistics on DN connectivity across multiple synapses were computed using matrix multiplication with the numpy library on the adjacency matrix of the network. Lines in colour represent a DN network traversal starting at specific comDNs. The black trace represents the median of all neurons. Only a maximum of approximately 800 DNs can be reached because the others have maximally one DN input. In Fig. 5b,c, we sorted DNs by the number of monosynaptic connections that they make to other DNs. In Fig. 5b, the same sorting is applied to show the number of connected GNG DNs (orange).

    In Extended Data Fig. 4, we show the effect of the choice of different constraints of the underlying connectome network on DN–DN connectivity degree. Statistics on DN connectivity across multiple synapses were computed using matrix multiplication with the numpy library on the adjacency matrices of the network. The segregation of excitatory and inhibitory connections was obtained by applying a mask on the direct connection signs. This implies that an inhibitory neuron acting on another inhibitory neuron would not be counted as excitatory but simply ignored in Extended Data Fig. 4d–f.

    Fitting network models to connectivity degree distribution

    In Fig. 6a, we generated a shuffled network of the same size by keeping the number of neurons constant and keeping the number of connections constant. Then, we randomly shuffled (that is, reassigned) those connections. Here we only considered the binary measure of whether a neuron was connected (number of synapses > 5) and not its synaptic weight. We then fit a power law or an exponential to the connectivity degree distribution using the scipy.optimize74 library. Histograms of the degree distributions for all four distributions are shown in Fig. 6a using constant bin widths of five neurons. The quality of the fits are quantified using linear regression (R2).

    Detection of DN clusters

    We applied the Louvain method48 with resolution parameter γ = 1 to detect clusters in the undirected network of DNs (that is, connections between two neurons are scaled by their synaptic strength and neurotransmitter identity, but the directionality of the connection is not taken into account). Here all connections—feedforward, lateral and feedback—are taken into account. In brief, the Louvain method is a greedy algorithm that maximizes modularity (that is, the relative density of connections within clusters compared with between clusters). To simplify analysing the network during the optimization, we did not consider the directionality of connections between neurons. If there is reciprocal connectivity between neurons, we add up the number of synapses (positive if excitatory, negative if inhibitory; here glutamate is considered inhibitory and neuromodulators are disregarded for the sake of simplicity). The Louvain method finds different local optima of cluster assignments due to its stochastic initialization and greedy nature. Therefore, we ran the algorithm 100 times. On the basis of the outcomes of these 100 runs, we defined a co-clustering matrix: the matrix has the same size as the connectivity matrix (number of DNs × number of DNs). Each entry represents how often two DNs end up in the same cluster. This matrix assigns each pair of DNs a probability to be in the same cluster. Using this meta-clustering, we could be sure that the sorting of DNs that we found through clustering is not a local optimum and that it is reproducible. We then applied hierarchical clustering to this matrix (using the ‘ward’ optimization method from the scipy.cluster.hierarchy library74) to get the final sorting of DNs shown in Fig. 6b. We used this final sorting to detect the clusters shown in grey in Fig. 6b as follows: we started from one side of the sorted DNs and sequentially grew the cluster. If the next DN was in the same Louvain clusters at least 25% of the time, we assigned it to the same cluster as the previous DN. If not, we started a new cluster with this DN and kept testing subsequent DNs to determine whether they fulfil the criteria for this new cluster. Finally, we only kept clusters that had at least ten neurons. This yielded 12 clusters (grey squares). We applied this same meta-clustering and sorting approach to analyse the shuffled network (same number of DNs, same number of connections and same number of synapses, but shuffled connections). On this shuffled network, we found 34 clusters of much smaller size (Fig. 6c), hinting at a better clustering in our network than in a shuffled control (modularity = 0.27 for the original network and modularity = 0.12 for the shuffled network). The number of synapses is shown as positive (red) if it is excitatory and as negative (blue) if it is inhibitory.

    We then analysed the connectivity within and between clusters. To do this, we accumulated the number of synapses between two clusters (positive for excitatory and negative for inhibitory). To be able to compare this quantity between clusters of different sizes, we divided this number of synapses by the number of DNs in the cluster that receives the synaptic connections. This quantity is visualized in Fig. 6d for the original DN–DN network clusters and Fig. 6e for the shuffled network as the ‘normalized number of synapses’. If positive (red), then connections from one cluster to another are predominantly excitatory. If negative (blue), then connections are predominantly inhibitory. We did not mirror connectome data before clustering because it requires resolving discrepancies between left and right neuron pairs, which, in many cases, are also not identifiable as corresponding cell classes across the brain.

    Statistical comparison of original versus shuffled DN–DN clusters

    As detailed above, we applied the Louvain algorithm 100 times to increase the robustness of clustering. We computed statistics on the clustering of this dataset (mean and standard deviation) specifically on metrics including the size and number of clusters. We then compared these distributions with those for the shuffled graph using one-sided Welch’s t-tests (scipy.stats.ttest_ind74 with equal_var = False). The resulting statistics are a conservative quantification of the difference between the original network and the shuffled control, as each data point is taken independently. When performing the hierarchical clustering across 100 iterations, the large clusters from the biological network are preserved, whereas the random associations of the shuffled network become incoherent. In practice, the difference in cluster sizes reported statistically underestimates the difference between the resulting matrices shown in Fig. 6b,c. The 100 iterations result from random seed initialization, on the condition that the algorithm converges. We restarted it whenever the convergence criteria were not reached within 3 s. Indeed, we observed empirically that when the algorithm would not converge in 3 s, it would not do so for at least 30 min and was, therefore, terminated.

    Identifying DNs to test predictions

    On the basis of the cell-type data associated with each neuron in FAFB (see above), we were able to find many DNs from refs. 4,14,15,22,64 in the connectome database. We then checked which of them have either a very high number of synaptic connections to other DNs or a very low number. We then filtered for lines where a clean spGAL4 line was available. In addition, we focused on lines whose major projections in the VNC were outside of the wing neuropil, because we removed the wings in our experimental paradigm and thus might not be able to see optogenetically induced behaviours. This left us with 15 additional DNs to test our predictions. DNp01 (giant fibre) activation was reported to trigger take-off in intact and headless flies44,45, so we did not repeat those experiments. This left us with 14 lines to test. The source and exact genotypes of those fly lines are reported in Supplementary Table 2. We then performed experiments with those 14 lines. Because intact control flies become aroused by laser illumination, but not headless control animals, to avoid false positives, we only analysed DN lines that either had a known optogenetic behaviour in intact flies (that is, DNp42, aDN1, DNa01, DNa02, oviDN and DNg11) or that had a clear phenotype in headless flies (that is, DNb02, DNg14 and Mute). Thus, we excluded Web, DNp24, DNg30, DNb01 (involved in flight saccades in ref. 79, but with no obvious phenotype on the spherical treadmill) and DNg16 as they did not fulfil either of these criteria and only analysed the remaining nine driver lines in Fig. 5 and Extended Data Figs. 5 and 6.

    Analysing DN–DN connectivity in the VNC

    We used the neuprint website to interact with the male adult nerve cord (MANC) connectome dataset13,80. There, we searched for neurons based on their names (MDN, DNp09, and so on) and checked whether there were any DNs among their postsynaptic neurons. We found all neurons that we used from ref. 14 (that is, DNp09, DNa01, and so on), MDN and oviDN. We were not able to find aDN2, aDN1, Mute, Web and DNp42.

    Analysing VNC targets of DN clusters

    We used data shown in Cheong et al.13 (figure 3, supplement 2) to define whether a DN known from Namiki et al.14 was projecting to a particular VNC neuropil. In brief, a DN is considered as projecting to a given neuropil if at least 5% of its presynaptic sites are in that region. We manually found the MDNs in the MANC dataset and determined the regions that they connect to using the same criterion. To generate Fig. 6f, for each cluster, we accumulated the number of known DNs that project to a given VNC region. We then divided this by the number of known DNs to obtain the fraction of known DNs within a cluster that project to a given region. The number of unknown DNs per cluster is also shown next to the plot. The raw data of associations between DNs and VNC neuropils are shown in Supplementary Table 8.

    Analysing behaviours associated with DN clusters

    We examined the literature2,3,4,13,16,18,19,21,30,64,70,81,82,83,84 to identify behaviours associated with DNs and grouped them into broad categories (anterior grooming, take-off, landing, walking and flight). This literature summary is available in Supplementary Table 8. Of the 35 DN types annotated, we found conflicting evidence for only two: DNg11 is reported to elicit foreleg rubbing21 while targeting mostly flight-related neuropils13; DNa08 targets flight power control circuits13 but has been reported to be involved in courtship under the name aSP22 (ref. 23). In Fig. 6g, we assigned DNg11 to ‘anterior’ and DNa08 to ‘flight’. We accumulated the number of known DNs that are associated with a given behaviour for each cluster. We then divided by the number of known DNs in the respective cluster to get a fraction of DNs within a cluster that have a known behaviour. The number of unknown DNs per cluster is also shown next to the plot. The raw data of associations between DNs and behaviours are shown in Supplementary Table 8.

    Analysing brain input neuropils for each DN cluster

    We used data from FAFB to identify the brain input neuropils for each DN cluster based on the neuropil annotation for each DN–DN synapse. Thus, localization information is given by the position of each synaptic connection and not the cell body of the presynaptic partner. This allows us to account for local processing and modularity of neurons. The acronyms of brain regions are detailed in Supplementary Table 7, with ‘L’ and ‘R’ standing for the left and right brain hemispheres, respectively. Results are reported as the fraction of synapses made in a neuropil out of all the postsynaptic connections made by DNs of a given cluster.

    Ethical compliance

    All experiments were performed in compliance with relevant national (Switzerland) and institutional (EPFL) ethical regulations. Characteristics of animals such as sex, age and husbandry are detailed in the Methods.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Volatile working memory representations crystallize with practice

    [ad_1]

    Mice

    All of the experiments were conducted according to the National Institute of Health (NIH) guidelines and with the approval of the Chancellor’s Animal Research Committee of the University of California, Los Angeles. Experiments were performed with 8–15-week-old adult male and female C57BL/6J (Jackson Laboratory, 000664), C57BL/6J-Tg (Thy1-GCaMP6s), GP4.12Dkim/J (Jackson Laboratory, 025776) and B6;DBA-Tg(tetO-GCaMP6s)2Niell/J (Jackson Laboratory, 024742) mice crossed with B6.Cg-Tg(Camk2a-tTA)1Mmay/DboJ (Jackson Laboratory, 007004) mice. Mice were kept in the vivarium under a 12 h–12 h light–dark cycle.

    Viruses

    For optogenetic experiments, CaMKIIa-driven soma-targeted anion-conducting channelrhodopsin fused to FusionRed (pAAV-CKIIa-stGtACR2-FusionRed, Addgene, 105669; titre, 1 × 1013 viral genomes per ml) was used to express GtACR2 in the soma of excitatory neurons. For control experiments, we used pAAV-CaMKIIa-mCherry (Addgene, 114469; titre, 7 × 1012 viral genomes per ml) or pAAV-CaMKIIa-EGFP (Addgene 50469; titre, 7 × 1012 viral genomes per ml).

    Head-bar and cranial window implantation

    Adult 8-to-12-week-old male and female C57BL/6J-Tg (Thy1-GCaMP6s) GP4.12Dkim/J mice were anaesthetized with isoflurane (5% for induction, 1–2% (v/v) for maintenance). The depth of anaesthesia was monitored continuously and adjusted when necessary. After induction of anaesthesia, the mice were fitted into a stereotaxic frame (Kopf), with their heads secured by blunt ear bars and their noses placed into an anaesthesia and ventilation system (David Kopf Instruments). Body temperature was kept at 37 °C with a feedback-controlled heating pad (Harvard Apparatus). Mice were administered 0.05 ml lidocaine (2%; Akorn) subcutaneously as a local anaesthetic before surgery. The surgical incision site was cleaned three times with 10% povidone-iodine and 70% ethanol. After removing the scalp and clearing the skull of connective tissues, a custom-made lightweight metal head-bar was fixed onto the skull with cyanoacrylate adhesive and covered with black dental cement (Ortho-Jet). A circular craniotomy (diameter, 5 mm) was performed above the secondary motor cortex (centred at 1.94 mm anterior from bregma or centred at bregma for M2/RSA imaging). A cranial glass window consisting of a 5 mm diameter round #1 coverslip (Warner Instruments) was implanted in the craniotomy, flush with the skull surface and sealed in place using tissue adhesive (Vetbond). The exposed skull surrounding the cranial window was then completely covered with black dental cement to build a small chamber for imaging with a water-immersion objective. After surgery, the mice were injected with carprofen (5 mg per kg of body weight) and allowed to recover overnight in cages placed on a low-voltage heating pad. Carprofen was administered once per day for up to 2 days after surgery. Amoxicillin antibiotic (0.25 mg ml−1) was dispensed in the drinking water for 7 days. Animals were returned to the vivarium for 1–2 weeks for recovery before undergoing imaging experiments.

    AAV injection and fibre optic cannula implantation

    Adult 8-to-12-week-old male and female C57BL/6J mice were anaesthetized with isoflurane (5% for induction, 1–2% (v/v) for maintenance). Skin incisions were made, followed by craniotomies 1 mm in diameter above the secondary motor cortex (centred at 1.94 mm anterior to bregma and 0.5 mm lateral to the midline) using a small steel burr (Fine Science Tools) powered by a high-speed drill. Saline (0.9%) was applied to the skull to reduce heating caused by drilling. Bilateral viral injections were performed by using stereotaxic apparatus (David Kopf Instruments) to guide the placement of bevelled glass pipettes with a tip diameter of about 50 μm (World Precision Instruments) into the secondary motor cortex (1.94 mm anterior to bregma, 0.5 mm lateral to the midline and 0.3 mm from the pial surface). Using the Nanoject II micro-injector (Drummond Scientific), 300 nl of 1:100 PBS-diluted AAV was bilaterally injected using a syringe pump. Glass pipettes were left in place for at least 10 min after virus injection.

    A ferrule-terminated optical fibre (Thorlabs) was placed above the injected site. The fibre tip was aimed to terminate at the pial surface. The optical fibre was secured to the skull using cyanoacrylate adhesive and black dental cement (Ortho-Jet). After surgery, the mice were left overnight in cages placed on a low-voltage heating pad. Mice were allowed to recover for 2–3 weeks before the experiments. The locations of injections and implanted optical fibres were validated histologically for all experimental mice.

    Behavioural training

    After recovery from surgery, mice were handled and water-restricted to 85–90% of their original weight. The mice were subsequently habituated to head fixation, airflow and water port for two sessions (one session per day). During the two shaping days, the mice were presented only with the combination of the odours (A, 1-pentanol; B, butyl formate; C, 3-methyl-2-buten-1-ol; and D, ethyl acetate; Sigma Aldrich, 138975, 261521, 162353 and 270989) that led to reward (AC and BD trials) and water was automatically delivered. After 2 days of shaping, the mice were trained to perform the complete delayed-association WM task. The lick port was connected to a touch sensor, and mouse tongues had to touch the lick port at least once to receive a water reward. Each training session consisted of 150 to 250 trials. Odour combinations were presented in a random order. Responses were assessed based on mouse licking during the choice window. If any licks occurred during the choice window, the trial was considered to be a hit for AC and BD trials or false alarm for AD and BC trials. If no licking occurred during the choice window, the trial was considered to be a miss for AC and BD trials or correct rejection for AD and BC trials. Mice were not punished for miss or false alarm trials. A training session was aborted early if a mouse had more than three misses within the most recent ten trials, indicating the animal’s lack of motivation to obtain the water reward. Performance was quantified as the number of hits and correct rejections over the total number of completed trials. The airflow and odour delivery were frequently monitored using an Aurora Scientific photo-ionization detector at the beginning of each training session.

    In vivo calcium imaging

    Two-photon laser-scanning microscopy was conducted using the Thorlabs multiphoton mesoscope using a 12 kHz resonant scanner with a water-immersion objective with 0.6 excitation NA, 1.0 collection NA and 2.7 mm working distance. The excitation laser was a 920 nm Tiberius Ti:Sapphire Femtosecond Laser, and the laser intensity was 30–80 mW at the sample. Images were acquired using the ScanImage software (Vidrio Technologies). Fully awake mice were mounted in a 2-inch-diameter transparent tube by securing its head bar onto a custom-made head-bar holder under the microscope. 600 px × 1,200 px to 600 px × 2,500 px images were acquired at 8–17 Hz at 150–250 μm depth. To track the mouse movement, a camera mounted underneath the animal acquired the paw location of the animals at 30 Hz. The locomotion data were acquired simultaneously with the calcium imaging data and synchronized with the scanning mirror signals. The microscope and behavioural set-up were encased in a light-tight box, and the mice were kept in darkness during the imaging sessions. We performed online image processing at the beginning of every session to align cells across days. We tried to maximize the correlation between the moving average of frames of the current field of view and the average of frames of the previous sessions.

    Two-photon LBM was conducted using a custom-built microscope equipped with a 960 nm, 4.89  MHz repetition rate optical parametric chirped-pulse amplification (OPCPA) pumped by an ytterbium laser at 1,030 nm with 80 W power, delivering a 2 μJ pulse energy and a 90 fs pulse width. The LBM featured a rapid 12 kHz resonant scanner and was paired with a 0.6 excitation NA, 1.0 emission water-immersion objective lens with a 2.7 mm working distance. The LBM technique divided a single pulse into 30 distinct subpulses of varying intensities, targeting 30 separate depths of the specimen separated by 15 μm, yet eliciting a consistent level of fluorescence across these layers22. In our initial LBM experiments, we successfully recorded a region measuring 1,450 × 1,825 × 450 μm3 at a frequency of 7.95 Hz in two mice. Subsequent experiments extended the recorded area to 2,000 × 2,000 × 450 μm3, recorded at 6.45 Hz, in another two animals.

    Optogenetics

    Optical stimulation was applied through a ferrule-terminated 200 μm core and 0.39 NA optical fibre (Thorlabs) attached to the 200 μm core and 0.39 NA patch cable using a 1.25 mm ceramic mating sleeve (Thorlabs). We used a blue-fibre-coupled light emission diode (λ = 470 nm, Thorlabs, M470F3). The light was delivered at 20 Hz with a 0.4 duty cycle at an irradiance of 10 mW mm−2 at the output tip of the fibre.

    Optogenetic experiments commenced only when the animals achieved a behavioural performance threshold exceeding 90% accuracy for at least three consecutive sessions. This criterion ensured that the animals were well-trained and proficient in reliably executing the behavioural tasks before the introduction of optogenetic manipulations.

    Electrophysiology

    For in-vivo electrophysiology recordings, expert mice were anaesthetized with isoflurane (5% for induction, 1–2% (v/v) for maintenance). They underwent a 2 mm craniotomy (centred at 1.94 mm anterior to bregma and 0.5 mm lateral to the midline) and silver wire ground (Warner Instruments) implantation surgery over the cerebellum 1 day before recording. The ground wire was fixed in place with dental cement. The exposed skull was covered with Kwik-Sil, and the mouse was allowed to recover overnight. On the day of the recording, the mice were head-fixed into a tube, the Kwik-Sil covering the craniotomy was removed and replaced with buffered artificial cerebrospinal fluid, and the mouse was aligned to the micromanipulator. A 128-channel silicon microprobe37 was slowly lowered using a micromanipulator into M2, and the surface of the exposed brain was covered with mineral oil. The process was monitored using a surgical microscope (Zeiss, STEMI 2000). The microprobe contained 128 channels that were densely distributed (honeycomb layout with 20 μm spacing between nearest-neighbour channels) on two shanks (placed 0.4 mm apart). After insertion, the microprobe was allowed to settle for at least 30 min before the recording began and continued for the entire duration of the session. The electrophysiological and behavioural data acquisitions were synchronously performed using custom MATLAB software while the mouse performed the task. The probe readout was achieved using a detachable head stage module (Intan Technologies RHD 128). Head stages contained commercial integrated electronic circuits (Intan Technologies RHD 2000 USB interface board) providing a multiplexed signal recorded with open source software (Intan Technologies) at 25 kHz per channel.

    Histology

    At the end of experiments, the mice were deeply anaesthetized under isoflurane and transcardially perfused with 40 ml 1× PBS followed by 40 ml 4% paraformaldehyde in 1× PBS at a rate of approximately 4 ml min−1. After perfusion, the brains were rapidly extracted and post-fixed in 4% paraformaldehyde. Coronal sections (thickness, 100 μm) were collected using a vibratome. The sections were mounted onto glass slides. The slides were then cover-slipped with mounting medium DAPI. Images were acquired using the Leica DM6 B microscope.

    Quantification and statistical analysis

    Calcium imaging data processing, including motion correction, segmentation, fluorescence signal extraction and deconvolution, was performed using the Python implementation of Suite2P38. Before segmentation, we performed several steps to enhance image quality, including noise reduction, background subtraction and image registration to correct for tissue movement. We validated our segmentation results by comparing the automated segmentation to manually annotated ground truth data. Adjustments to parameters and algorithms were done to achieve optimal results. We used the deconvolved signal for all our analyses. Silicon probe data processing and spike sorting were performed using custom code, KiloSort39 and Phy40.

    To visualize the calcium activity of individual neurons, we computed a peristimulus time histogram averaged across all trials for all four combinations of odours, smoothed using a moving average over a 400 ms window. To generate response maps for each neuron, we subtracted its mean spontaneous baseline calcium activity across all trials on a given day during the baseline epoch (5 s before the first-odour onset). We divided it by the s.d. of calcium activity during the baseline epoch. Thus, the response maps show changes in calcium activity in units of the s.d. of spontaneous activity. This method was used for visualization purposes only. Unless stated otherwise, all statistical analyses were performed on unsmoothed, deconvolved calcium activity without baseline calcium activity subtracted.

    A neuron was considered to have a significant activity field during a specific time epoch if its activity within that epoch significantly differed from the distribution of its 1,000 times circularly shuffled mean activity.

    The first-odour selectivity of a neuron was assessed by comparing the distribution of its mean deconvolved calcium activity over a time epoch for A and B odour trials using the Wilcoxon rank-sum test with a confidence interval of 99%. A neuron was considered to be purely selective if it exhibited selectivity for a specific odour or choice during a specific epoch and did not show selectivity for any other parameter at any other time. Conversely, a neuron was considered to be mixed selective if it showed selectivity for more than one odour or choice at different epochs.

    We considered an animal naive, training or expert if its behavioural performance (p) was, respectively, p < 65%, 65% ≤ p < 80% or p ≥ 80%. An animal was considered a novice during the first training day.

    To determine whether a neuron’s response was related to the animals’ motor activity, we used DeepLabCut41 to find the position of the animals’ paws from which we extracted the animals’ movements. We calculated the correlation coefficient between the activity of each neuron and the unshuffled and 1,000 times circularly shuffled locomotion activity. A neuron was considered to be significantly correlated if its correlation coefficient was at least 2 s.d. away from the mean value of the correlation coefficients of shuffled distribution.

    We assessed the WM information content in a population activity of neurons by measuring the classification performance using a SVM with a linear kernel. We implemented the SVM binary classification in MATLAB and performed the computations on high-performance computing clusters using thousands of computing nodes. We used the activity of neurons in 500 ms time bins to train a decoder on 90% of randomly chosen trials and tested its accuracy on the 10% of the trials that were withheld. To ensure our model was not biased or overfit to specific data patterns, we repeated the classification measurements at least 32 times with different sets of randomly chosen trials. We then calculated the average of all measurements. This approach introduces randomness and helps to ensure that the decoding results are not a product of a model memorizing specific instances. Decoding accuracy and its standard error were then found by averaging the prediction accuracy of the decoder across all mice.

    For across-day classification, we used the activity of the overlapping neurons for our analyses. We trained a model on all trials on one day and tested that model’s predictions on all trials on another day. To assess statistical significance and determine whether decoding performance surpasses chance, we randomized trial types by assigning random labels to each trial.

    For the LSTM decoding analyses, we configured the recurrent neural network architecture so that the dimensions of the input layer were aligned with the number of neurons recorded in the pertinent dataset. The network comprised 128 hidden units followed by a linear layer to compute logits for a softmax classifier using cross-entropy loss. The weights and biases within the LSTM layers during the training phase were optimized using the adaptive moment estimation (Adam) optimizer. LSTMs were trained for 100 epochs (passes through the training set). For the decoding process, temporal data granularity was 500 ms. Training involved 90% of randomly selected trials, with the remaining 10% reserved for testing. Analogous to the SVM decoding procedure, the LSTM classification was iterated at least 32 times using distinct randomly chosen trial subsets. The resultant metrics were then averaged over the 32 samples. Furthermore, we performed trial shuffling to mitigate potential biases and ensure the robustness of the LSTM model’s performance assessment.

    To find overlapping neurons across sessions, we used co-registration of spatial cell footprints using CellReg42. Neurons were modelled with a maximal centroid distance of 10 μm. Final registration used the probabilistic model with a threshold of more than 95% probability of cells being the same for all mice. We used these parameters to ensure the accuracy of matching cells.

    We used t-SNE43 to embed the high-dimensional neuronal activity into two dimensions. We calculated the time-averaged calcium activity of neurons during a specific epoch and found the pairwise distances between the high-dimensional points for each trial. For each point, we calculated a s.d. so that the perplexity of each data point matched a predefined value. Starting from an initial set of low-dimensional points, we iteratively updated the points to minimize the Kullback–Leibler divergence between a Gaussian distribution in the high-dimensional space and a t-distribution in the low-dimensional space.

    Statistics and reproducibility

    All statistical analyses were conducted using Prism (GraphPad), MATLAB (MathWorks) or Python. Statistical tests used in this study include Wilcoxon rank-sum tests and paired t-tests. The significance threshold was held at α = 0.05; NS, not significant (P > 0.05); *P ≤ 0.05, **P ≤ 0.01, ***P ≤ 0.001, ****P ≤ 0.0001. All behavioural, imaging and optogenetics experiments were replicated in multiple animals. Sample sizes were not predetermined using statistical methods.

    Reporting summary

    Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

    [ad_2]

    Source link

  • Motor neurons generate pose-targeted movements via proprioceptive sculpting

    [ad_1]

  • Sherrington, C. The Integrative Action of the Nervous System (Cambridge Univ. Press Archive, 1952).

  • Dionne, H., Hibbard, K. L., Cavallaro, A., Kao, J.-C. & Rubin, G. M. Genetic reagents for making Split-GAL4 lines in Drosophila. Genetics 209, 31–35 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Milde, J. J., Seyan, H. S. & Strausfeld, N. J. The neck motor system of the fly Calliphora erythrocephala. II Sensory organization. J. Comp. Physiol. A 160, 225–238 (1987).

    Article 

    Google Scholar
     

  • Merel, J., Botvinick, M. & Wayne, G. Hierarchical motor control in mammals and machines. Nat. Commun. 10, 5489 (2019).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Scott, S. H. A functional taxonomy of bottom-up sensory feedback processing for motor actions. Trends Neurosci. 39, 512–526 (2016).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • McKellar, C. E., Siwanowicz, I., Dickson, B. J. & Simpson, J. H. Controlling motor neurons of every muscle for fly proboscis reaching. eLife 9, e54978 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Baek, M. & Mann, R. S. Lineage and birth date specify motor neuron targeting and dendritic architecture in adult Drosophila. J. Neurosci. 29, 6904–6916 (2009).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Azevedo, A. W. et al. A size principle for recruitment of Drosophila leg motor neurons. eLife 9, e56754 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Strausfeld, N. J., Seyan, H. S. & Milde, J. J. The neck motor system of the fly Calliphora erythrocephala. I Muscles and motor neurons. J. Comp. Physiol. A 160, 205–224 (1987).

    Article 

    Google Scholar
     

  • Phelps, J. S. et al. Reconstruction of motor control circuits in adult Drosophila using automated transmission electron microscopy. Cell 184, 759–774 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Hengstenberg, R. Gaze control in the blowfly Calliphora: a multisensory, two-stage integration process. Semin. Neurosci. 3, 19–29 (1991).

    Article 

    Google Scholar
     

  • Kim, A. J., Fenk, L. M., Lyu, C. & Maimon, G. Quantitative predictions orchestrate visual signaling in Drosophila. Cell 168, 280–294 (2017).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Borst, A., Haag, J. & Reiff, D. F. Fly motion vision. Annu. Rev. Neurosci. 33, 49–70 (2010).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Zhao, A. et al. A comprehensive neuroanatomical survey of the Drosophila lobula plate tangential neurons with predictions for their optic flow sensitivity. eLife 13, RP93659 (2024).

  • Krapp, H. G. & Hengstenberg, R. Estimation of self-motion by optic flow processing in single visual interneurons. Nature 384, 463–466 (1996).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Zheng, Z. et al. A complete electron microscopy volume of the brain of adult Drosophila melanogaster. Cell 174, 730–743 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Wertz, A., Haag, J. & Borst, A. Integration of binocular optic flow in cervical neck motor neurons of the fly. J. Comp. Physiol. A 198, 655–668 (2012).

    Article 

    Google Scholar
     

  • Huston, S. J. & Krapp, H. G. Visuomotor transformation in the fly gaze stabilization system. PLoS Biol. 6, e173 (2008).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Fisher, N. I. Statistical Analysis of Circular Data (Cambridge Univ. Press, 1993).

  • Graziano, M. S. A., Taylor, C. S. R. & Moore, T. Complex movements evoked by microstimulation of precentral cortex. Neuron 34, 841–851 (2002).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Griffin, D. M., Hudson, H. M., Belhaj-Saïf, A. & Cheney, P. D. EMG activation patterns associated with high frequency, long-duration intracortical microstimulation of primary motor cortex. J. Neurosci. 34, 1647–1656 (2014).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Klier, E. M., Wang, H. & Crawford, J. D. The superior colliculus encodes gaze commands in retinal coordinates. Nat. Neurosci. 4, 627–632 (2001).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Field, L. H. & Matheson, T. Chordotonal organs of insects. Adv. Insect Physiol. 27, 1–228 (1998).

  • Tuthill, J. C. & Azim, E. Proprioception. Curr. Biol. 28, R194–R203 (2018).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Preuss, T. & Hengstenberg, R. Structure and kinematics of the prosternal organs and their influence on head position in the blowfly Calliphora erythrocephala. J. Comp. Physiol. A 171, 483–493 (1992).

    Article 

    Google Scholar
     

  • Feldman, A. G. Functional tuning of the nervous system with control of movement or maintenance of a steady posture. II. Controllable parameters of the muscle. Biofizika 11, 565–578 (1966).


    Google Scholar
     

  • Bizzi, E., Mussa-Ivaldi, F. A. & Giszter, S. Computations underlying the execution of movement: a biological perspective. Science 253, 287–291 (1991).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Sainburg, R. L. Should the equilibrium point hypothesis (EPH) be considered a scientific theory? Motor Control 19, 142–148 (2015).

    Article 
    PubMed 

    Google Scholar
     

  • Huston, S. J. & Krapp, H. G. Nonlinear integration of visual and haltere inputs in fly neck motor neurons. J. Neurosci. 29, 13097–13105 (2009).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Todorov, E. & Jordan, M. I. Optimal feedback control as a theory of motor coordination. Nat. Neurosci. 5, 1226–1235 (2002).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Shadmehr, R. From equilibrium point to optimal control. Motor Control 14, e25–e30 (2010).

    Article 

    Google Scholar
     

  • Gorb, S. N. The jumping mechanism of cicada Cercopis vulnerata (Auchenorrhyncha, Cercopidae): skeleton–muscle organisation, frictional surfaces and inverse-kinematic model of leg movements. Arthropod Struct. Dev. 33, 201–220 (2004).

    Article 
    PubMed 

    Google Scholar
     

  • Siwanowicz, I. & Burrows, M. Three dimensional reconstruction of energy stores for jumping in planthoppers and froghoppers from confocal laser scanning microscopy. eLife 6, e23824 (2017).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Sober, S. J., Sponberg, S., Nemenman, I. & Ting, L. H. Millisecond spike timing codes for motor control. Trends Neurosci. 41, 644–648 (2018).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Loeb, E. P., Giszter, S. F., Borghesani, P. & Bizzi, E. Effects of dorsal root cut on the forces evoked by spinal microstimulation in the spinalized frog. Somatosens. Mot. Res. 10, 81–95 (1993).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Caggiano, V., Cheung, V. C. K. & Bizzi, E. An optogenetic demonstration of motor modularity in the mammalian spinal cord. Sci. Rep. 6, 35185 (2016).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Gilbert, C. & Bauer, E. Resistance reflex that maintains upright head posture in the flesh fly Neobellieria bullata (Sarcophagidae). J. Exp. Biol. 201, 2735–2744 (1998).

    Article 
    PubMed 

    Google Scholar
     

  • Cellini, B., Salem, W. & Mongeau, J.-M. Mechanisms of punctuated vision in fly flight. Curr. Biol. 31, 4009–4024 (2021).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Ijspeert, A., Nakanishi, J. & Schaal, S. Learning attractor landscapes for learning motor primitives. Adv. Neural Inf. Process. Syst. 15, 1547–1554 (2002).

  • Durr, V. & Matheson, T. Graded limb targeting in an insect is caused by the shift of a single movement pattern. J. Neurophysiol. 90, 1754–1765 (2003).

    Article 
    PubMed 

    Google Scholar
     

  • Card, G. & Dickinson, M. H. Visually mediated motor planning in the escape response of Drosophila. Curr. Biol. 18, 1300–1307 (2008).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Masullo, L. et al. Genetically defined functional modules for spatial orienting in the mouse superior colliculus. Curr. Biol. 29, 2892–2904 (2019).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Wolpert, D. M. & Ghahramani, Z. Computational principles of movement neuroscience. Nat. Neurosci. 3, 1212–1217 (2000).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Fujiwara, T., Brotas, M. & Chiappe, M. E. Walking strides direct rapid and flexible recruitment of visual circuits for course control in Drosophila. Neuron 110, 2124–2138 (2022).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Cruz, T. L., Pérez, S. M. & Chiappe, M. E. Fast tuning of posture control by visual feedback underlies gaze stabilization in walking Drosophila. Curr. Biol. 31, 4596–4607 (2021).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Tweed, D., Cadera, W. & Vilis, T. Computing three-dimensional eye position quaternions and eye velocity from search coil signals. Vision Res. 30, 97–110 (1990).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Bogovic, J. A. et al. An unbiased template of the Drosophila brain and ventral nerve cord. PLoS ONE 15, e0236495 (2020).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Rokicki, K. et al. Janelia workstation codebase. GitHub https://github.com/JaneliaSciComp/workstation (2019).

  • Luan, H., Peabody, N. C., Vinson, C. R. & White, B. H. Refined spatial manipulation of neuronal function by combinatorial restriction of transgene expression. Neuron 52, 425–436 (2006).

    Article 

    Google Scholar
     

  • Pfeiffer, B. D. et al. Refinement of tools for targeted gene expression in Drosophila. Genetics 186, 735–755 (2010).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Tirian, L. & Dickson, B. J. The VT GAL4, LexA and split-GAL4 driver line collections for targeted expression in the Drosophila nervous system. Preprint at bioRxiv https://doi.org/10.1101/198648 (2017).

  • Klapoetke, N. C. et al. Independent optical excitation of distinct neural populations. Nat. Methods 11, 338–346 (2014).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Bloomquist, B. T. et al. Isolation of a putative phospholipase C gene of Drosophila, norpA and its role in phototransduction. Cell 54, 723–733 (1988).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Lee, A., Kabra, M., Branson, K., Robie, A. A. & Roian, E. APT: animal part tracker. GitHub https://github.com/kristinbranson/APT (2018).

  • Horn, B. K. P. Closed-form solution of absolute orientation using unit quaternions. J. Opt. Soc. Am. A 4, 629 (1987).

    Article 

    Google Scholar
     

  • Yershova, A., Jain, S., Lavalle, S. M. & Mitchell, J. C. Generating uniform incremental grids on SO(3) using the Hopf fibration. Int. J. Rob. Res. 29, 801–812 (2010).

    Article 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • Markley, F. L., Cheng, Y., Crassidis, J. L. & Oshman, Y. Averaging quaternions. J. Guid. Control Dynam. 30, 1193–1197 (2007).

    Article 

    Google Scholar
     

  • Maimon, G., Straw, A. D. & Dickinson, M. H. Active flight increases the gain of visual motion processing in Drosophila. Nat. Neurosci. 13, 393–399 (2010).

    Article 
    CAS 
    PubMed 

    Google Scholar
     

  • Nordström, K., Barnett, P. D., de Miguel, I. M. M., Brinkworth, R. S. A. & O’Carroll, D. C. Sexual dimorphism in the hoverfly motion vision pathway. Curr. Biol. 18, 661–667 (2008).

    Article 
    PubMed 

    Google Scholar
     

  • Nern, A., Pfeiffer, B. D. & Rubin, G. M. Optimized tools for multicolor stochastic labeling reveal diverse stereotyped cell arrangements in the fly visual system. Proc. Natl Acad. Sci. USA 112, E2967–E2976 (2015).

    Article 
    CAS 
    PubMed 
    PubMed Central 

    Google Scholar
     

  • [ad_2]

    Source link