Many behavioural tasks require the manipulation of mathematical vectors, but, outside of computational models1,2,3,4,5,6,7, it is not known how brains perform vector operations. Here we show how the Drosophila central complex, a region implicated in goal-directed navigation7,8,9,10, performs vector arithmetic. First, we describe a neural signal in the fan-shaped body that explicitly tracks the allocentric travelling angle of a fly, that is, the travelling angle in reference to external cues. Past work has identified neurons in Drosophila8,11,12,13 and mammals14 that track the heading angle of an animal referenced to external cues (for example, head direction cells), but this new signal illuminates how the sense of space is properly updated when travelling and heading angles differ (for example, when walking sideways). We then characterize a neuronal circuit that performs an egocentric-to-allocentric (that is, body-centred to world-centred) coordinate transformation and vector addition to compute the allocentric travelling direction. This circuit operates by mapping two-dimensional vectors onto sinusoidal patterns of activity across distinct neuronal populations, with the amplitude of the sinusoid representing the length of the vector and its phase representing the angle of the vector. The principles of this circuit may generalize to other brains and to domains beyond navigation where vector operations or reference-frame transformations are required.
This is a preview of subscription content
Subscribe to Nature+
Get immediate online access to the entire Nature family of 50+ journals
Subscribe to Journal
Get full journal access for 1 year
only $3.90 per issue
All prices are NET prices.
VAT will be added later in the checkout.
Tax calculation will be finalised during checkout.
Get time limited or full article access on ReadCube.
All prices are NET prices.
Data for all of the main figures are available on Dropbox (https://www.dropbox.com/sh/p8bqwavlsyl9ppv/AABz2-vda4Q3gukXqp8Ba2Gwa?dl=0). Other data are available on request from the corresponding author.
The analysis code has been deposited on GitHub (https://github.com/Cheng-Lyu/TravelingDirectionPaper_code).
Zipser, D. & Andersen, R. A. A back-propagation programmed network that simulates response properties of a subset of posterior parietal neurons. Nature 331, 679–684 (1988).
O’Keefe, J. An allocentric spatial model for the hippocampal cognitive map. Hippocampus 1, 230–235 (1991).
Touretzky, D. S., Redish, A. D. & Wan, H. S. Neural representation of space using sinusoidal arrays. Neural Comput. 5, 869–884 (1993).
Pouget, A. & Sejnowski, T. J. A neural model of the cortical representation of egocentric distance. Cereb. Cortex 4, 314–329 (1994).
Salinas, E. & Abbott, L. F. Transfer of coded information from sensory to motor networks. J. Neurosci. 15, 6461–6474 (1995).
Wittmann, T. & Schwegler, H. Path integration—a network model. Biol. Cybern. 73, 569–575 (1995).
Stone, T. et al. An anatomically constrained model for path integration in the bee brain. Curr. Biol. 27, 3069-3085.e11 (2017).
Seelig, J. D. & Jayaraman, V. Neural dynamics for landmark orientation and angular path integration. Nature 521, 186–191 (2015).
Green, J., Vijayan, V., Mussells Pires, P., Adachi, A. & Maimon, G. A neural heading estimate is compared with an internal goal to guide oriented navigation. Nat. Neurosci. 22, 1460–1468 (2019).
Giraldo, Y. M. et al. Sun navigation requires compass neurons in Drosophila. Curr. Biol. 28, 2845-2852.e4 (2018).
Green, J. et al. A neural circuit architecture for angular integration in Drosophila. Nature 546, 101–106 (2017).
Turner-Evans, D. et al. Angular velocity integration in a fly heading circuit. eLife 6, e23496 (2017).
Shiozaki, H. M., Ohta, K. & Kazama, H. A multi-regional network encoding heading and steering maneuvers in Drosophila. Neuron 106, 126–141 (2020).
Taube, J. S., Muller, R. U. & Ranck, J. B. Head-direction cells recorded from the postsubiculum in freely moving rats. I. Description and quantitative analysis. J. Neurosci. 10, 420–435 (1990).
Seeley, T. D. Honeybee Democracy (Princeton Univ. Press, 2010).
Wehner, R. Desert Navigator (Harvard Univ. Press, 2020).
Ardin, P. B., Mangan, M. & Webb, B. Ant homing ability is not diminished when traveling backwards. Front. Behav. Neurosci. 10, 69 (2016).
Pfeffer, S. E. & Wittlinger, M. How to find home backwards? Navigation during rearward homing of Cataglyphis fortis desert ants. J. Exp. Biol. 219, 2119–2126 (2016).
Riley, J. R. et al. Compensation for wind drift by bumble-bees. Nature 400, 126–126 (1999).
Scheffer, L. K. et al. A connectome and analysis of the adult Drosophila central brain. eLife 9, e57443 (2020).
Wolff, T., Iyer, N. A. & Rubin, G. M. Neuroarchitecture and neuroanatomy of the Drosophila central complex: a GAL4-based dissection of protocerebral bridge neurons and circuits. J. Comp. Neurol. 523, 997–1037 (2015).
Kim, S. S., Rouault, H., Druckmann, S. & Jayaraman, V. Ring attractor dynamics in the Drosophila central brain. Science 356, 849–853 (2017).
Cohn, R., Morantte, I. & Ruta, V. Coordinated and compartmentalized neuromodulation shapes sensory processing in Drosophila. Cell 163, 1742–1755 (2015).
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).
Srinivasan, M. V., Zhang, S. W., Lehrer, M. & Collett, T. S. Honeybee navigation en route to the goal: visual flight control and odometry. J. Exp. Biol. 199, 237–244 (1996).
Weir, P. T. & Dickinson, M. H. Functional divisions for visual processing in the central brain of flying Drosophila. Proc. Natl Acad. Sci. USA 112, E5523–E5532 (2015).
Kim, A. J., Fenk, L. M., Lyu, C. & Maimon, G. Quantitative predictions orchestrate visual signaling in Drosophila. Cell 168, 280-294.e12 (2017).
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).
Poodry, C. & Edgar, L. Reversible alteration in the neuromuscular junctions of Drosophila melanogaster bearing a temperature-sensitive mutation, shibire. J. Cell Biol. 81, 520–527 (1979).
Baines, R. A., Uhler, J. P., Thompson, A., Sweeney, S. T. & Bate, M. Altered electrical properties in Drosophila neurons developing without synaptic transmission. J. Neurosci. 21, 1523–1531 (2001).
Govorunova, E. G., Sineshchekov, O. A., Janz, R., Liu, X. & Spudich, J. L. Natural light-gated anion channels: a family of microbial rhodopsins for advanced optogenetics. Science 349, 647–650 (2015).
Mohammad, F. et al. Optogenetic inhibition of behavior with anion channelrhodopsins. Nat. Methods 14, 271–274 (2017).
Wolff, T. & Rubin, G. M. Neuroarchitecture of the Drosophila central complex: a catalog of nodulus and asymmetrical body neurons and a revision of the protocerebral bridge catalog. J. Comp. Neurol. 526, 2585–2611 (2018).
Klapoetke, N. C. et al. Independent optical excitation of distinct neural populations. Nat. Methods 11, 338–346 (2014).
Cei, A., et al Reversed theta sequences of hippocampal cell assemblies during backward travel. Nat. Neurosci. 17, 719–724 (2014).
Maurer, A. P., Lester, A. W., Burke, S. N., Ferng, J. J. & Barnes, C. A. Back to the future: preserved hippocampal network activity during reverse ambulation. J. Neurosci. 34, 15022–15031 (2014).
Bicanski, A. & Burgess, N. Neuronal vector coding in spatial cognition. Nat. Rev. Neurosci. 21, 453–470 (2020).
Wang, C., Chen, X. & Knierim, J. J. Egocentric and allocentric representations of space in the rodent brain. Curr. Opin. Neurobiol. 60, 12–20 (2020).
Vaswani, A. et al. Attention is all you need. Preprint at https://arxiv.org/abs/1706.03762 (2017).
Lu, J. et al. Transforming representations of movement from body- to world-centric space. Nature https://doi.org/10.1038/s41586-021-04191-x (2021).
Dana, H. et al. Sensitive red protein calcium indicators for imaging neural activity. eLife 5, e12727 (2016).
Lin, C. Y. et al. A comprehensive wiring diagram of the protocerebral bridge for visual information processing in the Drosophila brain. Cell Rep. 3, 1739–1753 (2013).
Turner-Evans, D. et al. The neuroanatomical ultrastructure and function of a biological ring attractor. Neuron 108, 145–163 (2020).
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).
Reiser, M. B. & Dickinson, M. H. A modular display system for insect behavioral neuroscience. J. Neurosci. Methods 167, 127–139 (2008).
Maimon, G., Straw, A. D. & Dickinson, M. H. A simple vision-based algorithm for decision making in flying Drosophila. Curr. Biol. 18, 464–470 (2008).
Fry, S. N., Rohrseitz, N., Straw, A. D. & Dickinson, M. H. Visual control of flight speed in Drosophila melanogaster. J. Exp. Biol. 212, 1120–1130 (2009).
Leitch, K. J., Ponce, F. V., Dickson, W. B., van Breugel, F. & Dickinson, M. H. The long-distance flight behavior of Drosophila supports an agent-based model for wind-assisted dispersal in insects. Proc. Natl Acad. Sci. 118, e2013342118 (2021).
Moore, R. J. D. et al. FicTrac: a visual method for tracking spherical motion and generating fictive animal paths. J. Neurosci. Methods 225, 106–119 (2014).
Wu, M. et al. Visual projection neurons in the Drosophila lobula link feature detection to distinct behavioral programs. eLife 5, e21022 (2016).
We thank the laboratories of V. Ruta, B. Dickson and L. Vosshall for fly stocks and members of the Maimon laboratory, especially P. Mussells-Pires, for helpful discussions; R. Wilson and J. Lu for sharing the hypothesis that the h∆B cells may be the locus for the four-vector integration process rather than PFR cells, given anatomical considerations; A. Rizvi and S. Lewallen for helpful comments on the manuscript; J. Green and A. Adachi for recombinant stocks, and A. Adachi for initial anatomical characterization of some of the cell types and driver lines, which made this study progress faster than otherwise possible; V. Vijayan and J. Weisman for helping to optimize the csChrimson optogenetics approach during two-photon imaging; A. Kim for sharing the code for making optic-flow stimuli, developed off of the code initially given to us by P. Weir in the laboratory of M. Dickinson; and I. Morantte from the laboratory of V. Ruta and P. Mussells-Pires for developing the genetic strategy and organizing the plasmids needed to generate the UAS-sytGCaMP7f fly line. Stocks obtained from the Bloomington Drosophila Stock Center (NIH P40OD018537) and the Vienna Drosophila Resource Center were used in this study. Research reported in this publication was supported by a Brain Initiative grant from the National Institute of Neurological Disorders and Stroke (R01NS104934) to G.M. and a Kavli Foundation seed grant to C.L. L.F.A. was supported by NSF NeuroNex Award DBI-1707398 and the Simons Collaboration for the Global Brain. G.M. is a Howard Hughes Medical Institute Investigator.
The authors declare no competing interests.
Peer review information Nature thanks the anonymous reviewers for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data figures and tables
Extended Data Fig. 1 Characterizing the anatomy and physiology of h∆B cells, showing that sytGCaMP and RGECO1a yield similar EPG phase estimates in the ellipsoid body, quantifying the EPG phase tracking of the closed loop dot, and evidence that the h∆B phase tracks the fly’s traveling direction in walking flies.
a, At least sixteen somas are labeled by the h∆B split-Gal4 line used in this paper. By comparison, the hemibrain connectome (v1.1) reports nineteen h∆B cells20. b, GFP expression of the h∆B split Gal4 in the fan-shaped body. c, Same as panel b, but not showing the anti-nc82 neuropil stain. d, h∆B cells from hemibrain connectome v1.120. e, Top, h∆B GCaMP7f signal in a tethered, flying fly experiencing optic-flow (in the time window bracketed by the vertical dashed lines) with foci of expansion that simulate the following directions of travel: 180° (backward), −120°, −60°, 0° (forward), 60°, 120°. Bottom, Phase-nulled and averaged h∆B activity patterns in the fan-shaped body, calculated from the above [Ca2+] signals in the last 2.5 s of optic flow presentation. Population means with s.e.m. are shown. f, Same as panel e, but with h∆B sytGCaMP7f signal. Note that the single-bump structure in the sytGCaMP7f signal is clearer than the structure in the cytoplasmic GCaMP7f signal, which is consistent with sytGCaMP7f biasing GCaMP to axonal compartments of h∆Bs. g, Probability distributions of the difference between the EPG phase and the bright dot’s angular position, without and with optic flow. h, Circular standard deviation of the EPG phase – dot position distributions, without and with optic flow. Two-tailed unpaired t-test was performed. i, Correlations between the angular velocities of the EPG phase and the visual landmark position under different conditions. The first two columns use the same data as in panels g and h. The third and fourth columns use data from simultaneous GCaMP7f imaging of EPG cells and PFR cells in tethered-flying flies with a closed-loop dot. The fifth column use data from GCaMP6m imaging of EPG cells in tethered-walking flies with a closed-loop bar. Two-tailed one sample t-tests were performed against zero. P values are 1.7e-3, 1.3e-4, 5.3e-4, 1.2e-5 and 3.6e-4 comparing each column (from left to right) to zero, respectively. The relatively low, but significantly different from zero, r values show that the EPG phase tracks, even if poorly, the rotation of the landmark. The EPG phase measured in walking experiments tracks the closed-loop stimulus better than in tethered flight. See Main Text for possible technical reasons for why one would observe this difference. The fact that EPG-phase tracking of the closed loop dot is better when we co-imaged EPG cells and PFR cells compared to when we imaged EPG cells and h∆Bs argues that the flies’ genetic background (and thus how reliably flies perform tethered flight) can also quantitatively impact these measures. j, Angular-velocity correlations of the EPG phase and the visual landmark position under different conditions as a function of the time-lag between the two velocity signals. Same data as in panel i, but data with and without optic flow are lumped together. Correlation is highest at 290 ms, 260 ms and 375 ms for the three panels from left to right, respectively. Thus, we used time lags of 275 ms (mean of 290 and 260) and 375 ms for calculating the correlations in flight and walking experiments in panel i, respectively. k, Probability distribution of the angular position of the dot on the arena. Same data as in panels g and h, but data with and without optic flow are lumped together. We tested the uniformity of the distribution across angles using reduced χ2 test. P value is > 0.995, meaning that we cannot reject the hypothesis that the dot position is not evenly distributed on the arena. l, Circular standard deviation of the EPG phase minus the h∆B phase distributions, without and with optic flow. Same data as in panels g, h. Two-tailed unpaired t-test was performed. P value equals 1.3e-6. m, Correlations between the EPG phase and the h∆B phase. Same data as in panels g, h and l. Two-tailed unpaired t-test was performed. P value equals 3.9e-4. n, Data collected from tethered flies walking on a floating ball in complete darkness are shown in this panel and all subsequent panels in this figure. Sample time series of simultaneously imaged EPG and h∆B Gal4 lines. Top two traces show [Ca2+] signals. Third trace shows the phase estimates of the two bumps. Bottom two traces show the forward velocity and sideslip velocity of the fly. Quasi-unidirectional walking bouts are labeled with walking directions indicated. o, Probability distribution of the difference between EPG phase and h∆B phase from time segments where flies were walking in three different general directions (Methods). p, EPG – h∆B phase as a function of the egocentric traveling direction. Gray: individual fly circular means. Black: population circular mean and s.e.m. The sign of EPG – h∆B phase deviations seen here, in walking, are consistent with the signs observed in flight, for the same directions of backward-left and backward-right travel. Watson-Williams multi-sample tests were performed. P values are 1.6e-3 and 2.6e-6 comparing the 1st and 3rd columns (from left to right) to the 2nd column, respectively.
Extended Data Fig. 2 PFNd and PFNv activity bumps in the bridge are phase aligned with the EPG heading signal.
a, Sample trace, in tethered flight without optic flow, of simultaneously imaged GCaMP6m in EPG cells and jRGECO1a in PFNd cells reveals that the activity bumps of these two cell classes are phase aligned in the bridge. b, Probability distribution of the EPG - PFNd phase in tethered flight without optic flow. In this panel and throughout, the single fly data are in light gray and the population mean is in black. c, d, Same as panels a, b, but for GCaMP6m in EPG cells and jRGECO1a in PFNvcells. e, Top three rows, sample trace of simultaneously imaged GCaMP6m in EPG cells and jRGECO1a in PFNv cells in a tethered, flying fly experiencing optic flow (in the time window bracketed by the vertical dashed lines) with foci of expansion that simulate the following directions of travel: −120°, 0° (forward), 120°. Bottom, circular-mean phase difference between EPG cells and PFNv cells. f, Probability distribution of the EPG - PFNv phase under three optic flow conditions. g, Circular mean of the EPG – PFN phase and s.e.m. under different visual stimulus conditions. Watson-Williams multi-sample tests, P>0.66 when comparing any experimental group with 0°. Note that we only collected a full EPG-PFN, dual-imaging data set with optic flow (moving dots) with PFNv cells because, for reasons that are not fully clear, the jRGECO1a signal was too weak in PFNd cells to properly estimate the PFNd phase outside of the context of stationary dots (i.e., during optic flow). When imaging PFNd cells with a split-Gal4 driver and with GCaMP rather than with jRGECO1a (e.g., Fig. 3j–l), the signal is much brighter.
Extended Data Fig. 3 ∆7 cells are poised to help create sinusoidally shaped activity bumps in PFNd, PFNv, and PFR cells in the protocerebral bridge.
Connectivity data are based on those in neuPrint20, hemibrain:v1.1. a, Two ∆7 cells from neuPrint reveal a graded increase and decrease in dendritic density across the bridge. b, Synapse-number matrix for detected synapses from EPG cells to ∆7 cells in the protocerebral bridge. Each row represents one ∆7 cell. c, Same data as in panel b, but plotting each ∆7 cell separately. d, Phase-nulled EPG-to-∆7 synapse # across the glomeruli of the bridge, averaged across all 42 ∆7 cells, based on the data in panel c. The anatomical input strength from EPG cells to ∆7 cells is sinusoidally modulated across the bridge. e, Transforming the EPG activity pattern across the bridge (blue) into a predicted ∆7 activity pattern (green, bottom row) based on the synaptic density profile in panel c (schematized in the middle). We first calculated the dot product between the EPG activity vector and each ∆7 cell’s EPG-to-∆7 synapse-number vector (panel c). Then, for each glomerulus, we averaged the dot-product-output for all of the ∆7 cells that have axonal terminals in that glomerulus, thus creating the predicted activity value for that glomerulus. (The size of each green square here schematizes the # of synapses from EPG cells to the ∆7 cell of that type in that column; the intensity of each ∆7 row indicates the expected output strength of each ∆7 cell type, after being driven by the EPG signal above.) We plot the inverted, predicted activity output from ∆7 cells in the bottom row (green) because ∆7 cells are glutamatergic43 and glutamatergic neurons in the Drosophila central nervous system typically inhibit their postsynaptic targets (via Glu-Cl channels). After inverting the ∆7 activity one can then imagine simply averaging the ∆7 predicted-activity row with the EPG activity–with some relative weighting for the ∆7 and EPG curves–to generate the net drive to the many downstream neurons that receive both EPG and ∆7 input20, like PFN cells. Note that the EPG activity bumps are slightly narrower than the sinusoidal fits whereas the ∆7 activity bumps are slightly wider than the sinusoidal fits. f, Same as panel e, but using the phase-nulled, averaged EPG GCaMP activity pattern from a previous study11. Note although the EPG bump is narrower in these data from walking flies than in panel e from flying flies, the shape of the predicted ∆7 output remains similar. g, Same as panel e, but starting with (imagined) EPG activity where there is only one active glomerulus on each side of the bridge. Note that the shape of the predicted ∆7 output remains similar to that in panels e, f. h, Measured, phase-nulled activity profiles from PFNd, PFNv and PFR cells. Thin lines: individual flies. Thick lines: population average. All three activity patterns conform well to their sinusoidal fits (gray dashed lines) (see Methods for goodness of fit). We hypothesize that the sinusoidal activity patterns in bridge columnar cells like PFNd, PFNv, PFR cells arises from the combined impact of EPG and ∆7 input. In other words, we posit that ∆7 cells ‘sinusoidalize’ the EPG bumps in the bridge – that is, they function to broaden and smoothen the EPG input to the bridge, to create two sinusoidally shaped bumps in their recipient cells, with these bumps often functioning as explicit, 2D vector signals in the fan-shaped body.
Extended Data Fig. 4 LNO1 and SpsP cells have [Ca2+] responses that are strongly tuned to the fly’s egocentric translation direction–in both walking and flying flies–with responses suggesting that these cells provide sign-inverting input to PFNv and PFNd cells, respectively.
Connectivity data and cell-type names are based on those in neuPrint20, hemibrain:v1.1. a, LNO1 neurons are a class of cells (two total neurons per side, four per brain) that receive extensive synaptic input outside the central complex and provide extensive synaptic input to PFNv cells in the noduli, with each PFNv cell on average receive 131 synapses from LNO1s20. b, Mean GCaMP signals in PFNv and LNO1 cells in the nodulus as a function of the simulated traveling direction of the fly (via open-loop optic flow). Dotted rectangle indicates a repeated-data column, in this panel and throughout. c, Single-fly (colored circles) and population means ± s.e.m. (black bars) of the average signal in the final 2.5 s of the optic flow epoch. Sinusoidal fits shown in this panel (Methods), and throughout. d, Each SpsP cell (two total neurons per side, four per brain) receives extensive synaptic input outside the central complex and provides extensive synaptic input to PFNd cells on one side of the protocerebral bridge, with each PFNd cell on average receive 56 synapses from SpsP cells20. e, Same as panel b, but mean GCaMP signals in PFNd and SpsP cells in the bridge as a function of the simulated traveling direction of the fly (via open-loop optic flow). A closed-loop bright dot was not present on the LED display when collecting the PFNd data. f, Same as panel c, but averaging the bridge signal in panel e. g, Same as panel b, but analyzing the PFNd signal in the noduli. A closed-loop bright dot was not present on the LED display. h, Same as panel c, but averaging the nodulus signal in panel g. i, The optic-flow-simulated egocentric traveling angle at which the activity of each cell type is strongest is depicted with a line at the associated angle. Note that the left-vs-right angular differences measured in the noduli are smaller, and closer to 90°, than the left-vs-right angular differences measured in the bridge. This difference might be a purposeful shift in optic-flow tuning related to the use of orthogonal and non-orthogonal PFN axes under different behavioral contexts (see Supplementary Text) and/or originate from differences in how SpsP cells in the bridge and LNO1 cells in the noduli balance optic-flow with proprioceptive/efference-copy inputs to generate their signals. j, Data collected from tethered flies walking on a floating ball in complete darkness are shown in this panel and all subsequent panels in this figure. Mean PFNv GCaMP signals in the bridge as a function of the fly’s forward speed. k, Right-minus-left PFNv GCaMP signals in the bridge as a function of the fly’s sideslip speed. l–m, Same as panel j and k, but analyzing LNO1 signals in the nodulus. n, o, Same as panel j and k, but analyzing PFNd signals in the bridge. p–q, Same as panel j, k, but analyzing SpsP signals in the bridge. In panel b, e, g, j–q, thin lines represent single-fly means and thick lines represent population means. Note that PFNv and LNO1 cells have sign-inverted responses, and that PFNd and SpsP cells have sign-inverted responses. The response signs to optic-flow simulating the fly’s body translating forward and leftward (rightward) in flight are the same as the signs of responses to the fly walking forward and side-slipping leftward (rightward) when walking. Thus, these data are consistent with all these neurons being sensitive to the fly’s egocentric translation direction, as assessed via optic flow (dominantly) in flight, and via proprioception or efference-copy (dominantly) in walking.
Extended Data Fig. 5 Multiple, functionally relevant ways of indexing angles across the protocerebral bridge.
Connectivity data and cell-type names are based on those in neuPrint20, hemibrain:v1.1. a, The previously described mapping between EPG dendritic locations in the ellipsoid body and axonal-terminal locations in the bridge21. Numbers ordered based on the location of each EPG cell in the ellipsoid body. b, EPG cells divide the ellipsoid body into 16 wedges, each 22.5° wide. Each glomerulus in the bridge inherits its angle, in our analysis here, based on the EPG projection pattern shown in panel a. The angles of the outer two bridge glomeruli–which do not receive standard EPG input, but only EPGt input20–were inferred to have angles equal to the middle two glomeruli (0° and 22.5°, respectively) based on how other cell types (e.g., PEN cells) innervate the bridge, as discussed in past work11. This angular assignment maintains a 45° step size between adjacent glomeruli on each side of the bridge, which seems natural due to symmetry considerations. (Note that EPGt cells map from the ellipsoid body to the outer two glomeruli of the bridge with a small angular offset compared to the pattern set up by the EPG cells that target the central 16 glomeruli–as reported by other studies28–a caveat that slightly complicates our angular assignments; however, EPGt cells receive extensive axonal input in the bridge that has the potential to align their output signals with the rest of the bridge system.) Glomeruli are numbered 1 to 18 from left to right, to aid the comparisons made below. c, Two ∆7 cells from neuPrint (and past work21) reveal that the axonal terminals of each ∆7 cell are 8-glomeruli apart (#5→#13 for cell A and #2→#10→#18 for cell B). This anatomy argues that any two glomeruli 8 apart, such as #5 and #13, will experience ∆7 output of equal strength. Compelling physiological evidence for this statement is available in the [Ca2+] signals of the PEN2 (equivalently, PEN_b) columnar cell class in the bridge, which is a strong anatomical recipient of ∆7 synapses20 and shows [Ca2+] activity across the bridge–clearly dissociable from the activity in EPG cells–with consistently equal signal strength at glomeruli spaced 8 apart, perfectly following the ∆7 anatomical prediction (orange trace in Fig. 3d and data points in Extended Data Fig. 2i from ref. 15). Note that in the EPG indexing, shown in panel b, glomeruli #5 and #13, as examples, have angular indices that are not identical, but differ by 22.5°. d, Angles assigned to each bridge glomerulus based on the ∆7 axonal anatomy. Because the ∆7 output anatomy requires that any two glomeruli 8 apart, across the whole bridge, have the same angular index assignment, this results in a situation where all neighboring glomeruli have angular assignments that are separated by 45°. Note that almost all neighboring glomeruli are separated by 45° in the EPG mapping as well, except that, critically, in the EPG mapping the middle two glomeruli are separated by only 22.5°. This discontinuity is not evident in the ∆7 output. To create an angular indexing of the bridge for ∆7s that accommodates the anatomical constraints just described–i.e., one that incorporates an additional 22.5° in the bridge representation of angular space and thus ‘erases’ the EPG discontinuity–we shifted the angular index for each glomerulus on the left bridge leftward by 11.25° relative to the EPG indexing and we shifted the angular index for each glomerulus on the right bridge rightward by 11.25° relative to the EPG indexing. e, The EPG indexing in panels a, b predicts that EPG activity in the left bridge (#2→#9) will be left-shifted by 22.5° compared to EPG activity in the right bridge (#10→#17). Indeed, when we overlapped the left- and right-bridge EPG signals we found the two curves are detectably offset from each other. f, To quantify the data from panel e, for each imaging frame in which the fly was flying, we calculated the phase of the EPG bump in the left and right bridge separately (via a population-vector average) and took the difference of these two angles (black bars: population mean and s.e.m.). We then averaged this angular difference across all analyzed frames for the same fly. For EPG cells, this angular difference should be –22.5° if it follows the EPG indexing in panel b and it should be 0° if the activity follows the ∆7 indexing in panel d. Across a population of 9 flies, we found the angular difference is close to –22.5°, but shifted toward 0° by 4.6°, consistent with the fact that the EPG signal itself receives strong anatomical input from the ∆7s and thus could be modulated in its shape to follow the ∆7 indexing, in principle20. It seems that the ∆7 feedback to EPG cells reshapes its signal, but incompletely. g, h, Same as panel e, but analyzing the PFNd and PFNv activity in the bridge. Because PFN cells only innervate the outer 8 glomeruli in each side of the bridge (unlike EPG cells, which innervate the inner 8), we compared glomeruli #1→#8 in the left bridge overlapped with glomeruli #11→#18 in the right bridge here (the middle two glomeruli contain no signal for PFN cells). i, Same as panel f, but analyzing the PFNd and PFNv activity in the bridge. Black bars: population mean and s.e.m. Note that because PFNd and PFNv cells innervate (and thus we can only analyze) the outer 8 glomeruli of the bridge, the angular difference in phase estimates between the left- and right-bridge activity should be +67.5° if it follows the EPG indexing (panel b) and +90° if it follows the ∆7 indexing (panel d). We found that the average angular difference in both PFNd and PFNv cells is intermediate between +67.5° and +90°, consistent with PFNs receiving functional inputs from both EPG cells and ∆7 cells. We use the angular offsets measured in this panel as the basis for slightly adjusting the PFNd and PFNv angular indices in the bridge to an intermediate value between the EPG and ∆7 indexing options, described above. We believe that this approach represents the most careful way to combine the known anatomy and physiology to determine the azimuthal angle that each PFN cell signals with its activity in driving the h∆B neurites in the fan-shaped body, which we analyze in the next figure. j, Angles assigned to each bridge glomerulus for PFNd cells, based on the EPG indices from panel b and the physiologically determined adjustment required, based on the measurements in panel i. k, Same as panel j, but for PFNv cells.
Connectivity data and cell-type names are based on those in neuPrint20, hemibrain:v1.1. a, The anatomical angle of each PFNv cell is indicated based on which glomerulus it inervates in the protocerebral bridge, using the indexing described in Extended Data Fig. 5k. b, Same as panel a, but for PFNd cells, using the indexing described in Extended Data Fig. 5j. c, Synapse-number matrix for detected synapses from PFNv cells to h∆B cells in the fan-shaped body. Note that the two stripes in the heatmap represent PFNv cells synapsing onto the dendritic regions of h∆B cells. d, Same as panel c, but for synapses from PFNd cells to h∆B cells. Note that two of the five stripes in the heatmap represent PFNd cells synapsing onto the dendritic regions of h∆B cells, whereas the other, brighter, three stripes represent PFNd cell synapsing onto the axons of h∆B cells. The average # of synapses that each h∆B compartment (axon vs. dendrite) receives from PFN cells is indicated on the bottom. e, Because h∆B cells are postsynaptic to both PFNv and PFNd cells that project to the fan-shaped body from both sides of the bridge (panels c, d), each h∆B cell can be assigned an anatomical angle in four potential ways. To calculate the angle for an h∆B cell through its connection with the left-bridge PFNv cells, for example, we averaged the anatomical angles of all the left-bridge PFNv cells that connect to the h∆B cell in question, weighted by the number of synapses from that PFNv cell to the h∆B cell. f, The anatomical angle of each h∆B cell calculated based on its monosynaptic inputs from left-bridge PFNvs using the method described in panel e and data in panel c. g, Same as panel f, but calculations were made with right-bridge PFNv inputs to h∆B cells. h, Same as panel f, but calculations were made with left-bridge PFNd inputs to h∆B cells, using only the synapses formed on the axonal terminals of h∆B cells. (We test the impact of this assumption–of complete functional dominance of PFNd axonal synapses to h∆B cells–below.) i, Same as panel f, but calculations were made with right-bridge PFNd inputs to h∆B cells, using only axonal synapses. j, For each h∆B cell, we calculated the angular difference between the mean left-bridge PFNd input and the mean right-bridge PFNd inputs (i.e., the difference between data points in panels h and i) and we plot a histogram of those values. k–m, Same as j for the cell types indicated. n, The anatomically predicted angles for the coordinate axes of the four PFN vectors, as projected to the fan-shaped body and interpreted by h∆B axons and dendrites, calculated by averaging the histogram values in panels j–m, respectively. o, Same as panel n, but including all synapses from PFNd to h∆B cells, not just the axonal ones as in panel n. We weigh dendritic and axonal synapses by PFNd to h∆B cells equally in the panel e calculation. Note that the angles between four coordinate-frame axes do not change very much when also including the dendritic synapses from PFNd to h∆B cells, likely because they are less numerous than the axonal ones and the impact of the dendritic angles also seem to cancel out in their net effect (compare panels o and n). p, Same as panel n, but using the EPG indexing from Extended Data Fig. 5 instead of the adjusted PFNv and PFNd indexing. Note that the EPG indexing makes the front angle between the left- and right-bridge PFNd axes smaller. The same is true for the back angle between the left- and right-bridge PFNv axes. q, Same as panel n, but using the ∆7 indexing from Extended Data Fig. 5 instead of the PFNv and PFNd indexing. Note that the ∆7 indexing makes the front and back angles broader than 90°, when used in isolation. This analysis suggests that EPG and ∆7 inputs to PFNs are perfectly weighted to create axes that are orthogonal in our experiments in flying flies and also raise the possibility that orthogonality of this 4-vector system can be dynamically modulated via changing the weights of EPG and ∆7 inputs to PFNs (see Supplementary Text).
Extended Data Fig. 7 PFR neurons track a variable similar to allocentric traveling direction in walking and flying flies.
a, Schematics of two example EPG cells, two example PFR cells and two example h∆B cells, which are the anatomically dominant input to PFRs. b, Sample GCaMP7f frames of the EPG bump in the ellipsoid body and the PFR bump in the fan-shaped body. c, Top, EPG (blue) and PFR (purple) GCaMP7f signal in a tethered, flying fly experiencing optic-flow (in the time window bracketed by the vertical dashed lines) with foci of expansion that simulate the following directions of travel: 180° (backward), −120°, −60°, 0° (forward), 60°, 120°, 180° (backward; repeated data). Third row, EPG and PFR phases extracted from the above [Ca2+] signals. Fourth row, circular-mean phase difference between EPG cells and PFR cells. Bottom two rows, average of left-minus-right and left-plus-right wingbeat amplitude. Single fly means: light gray. Population means: black. Dotted rectangle indicates a repeated-data column. d, EPG – PFR phase as a function of the egocentric traveling direction simulated by the optic flow, at three different speeds. Circular means were calculated in the last 2.5 s of optic flow presentation. Gray: individual fly circular means. Black: population circular mean and s.e.m. Dotted rectangle indicates a repeated-data column. (See Methods for how we calculate the optic flow speed.) Note that the data points deviate slightly from the unity line in a manner that means that the PFR phase is slightly shifted away from the traveling direction indicated by the optic flow and toward a frontal heading direction. The h∆B data in Fig. 1h does not show this deviation from unity. We performed two-tailed one-sample t-tests against the diagonal line for data points in the ±60° and ±120° columns for the 35 cm/s data from PFR cells here and the 35 cm/s data from h∆B cells in Fig. 1h. For the PFR results on the left of panel d, P values are 4.7e-5, 4.7e-5, 5.4e-4 and 9.1e-3 for the −120°, −60°, +60° and +120° columns, respectively. For the h∆B results in Fig. 1h, P values are 0.39, 0.88, 0.058 and 0.44 for the −120°, −60°, +60° and +120° columns, respectively. e, PFR phase as a function of the inferred allocentric traveling direction, calculated by assuming that the EPG phase indicates allocentric heading direction and adding to this angle, at every sample point, the optic-flow angle. Gray: individual fly means. Black: population mean. In panels d and e, data from the middle column (35cm/s) were the same as in panel c. f, Tethered, walking, [Ca2+]-imaging setup with a bright blue bar that rotates in closed loop with the fly’s turns. g, Sample time series of simultaneously imaged EPG and PFR bumps in a tethered, walking fly. Top two traces show [Ca2+] signals. Third trace shows the phase estimates of the two bumps. Bottom trace shows the forward speed of the fly. h, Probability distributions of the EPG – PFR phase in walking and standing flies. Thin lines: single flies. Thick line: population mean. i, Circular mean of the EPG – PFR phase in walking and standing flies. Watson-Williams multi-sample tests, P>0.63 when comparing any experimental group with 0°. Gray dots: single fly values. Black bars: population means ± s.e.m. j, Same as panel i, but plotting circular standard deviation. Two-tailed unpaired t-tests were performed. P value equals 0.042. k, Tethered-walking setup where we used a 617 nm LED focused on the center of the fly’s head to optogenetically trigger backward walking via activation of LC16 visual neurons expressing CsChrimson50 (Methods). l, An example 2D trajectory of optogenetically triggered backward walking. An arrow is shown every ~0.1 seconds. Red arrows indicate backward walking during the red-light pulse; blue arrows indicate the 1.2 s before the red light turned on. m, Left, time series of EPG (blue) and PFR (purple) bumps and phase-estimates from the trajectory in panel l. Right, time series of forward velocity, sideslip velocity and the difference between the PFR and EPG phase in the trajectory shown in panel l. The ∆F/F heatmap range is more compressed here than in other plots because the PFR signal strength typically dips when the fly initiates backward walking (a phenomenon whose mechanism we have not yet explored). Nevertheless, clear moments where the PFR phase separates from the EPG phase are evident, even after the PFR signal strength has recovered, in this sample trace (and in others). n, Time series of the mean forward velocity, mean sideslip velocity and the circular mean of the difference between the PFR and EPG phase during backward walking, grouped by optogenetic trials in which the fly walked to the back left (left panel) or to the back right (right panel). The sign of PFR-EPG phase deviations seen here, in walking, are consistent with the signs observed in flight, for the same directions of backward-left and backward-right travel. Thin lines and gray dots: individual trials. Thick line and black dot: population mean (circular mean for bottom row). o, Circular mean and s.e.m. of the peak EPG – PFR phase during triggered left-backward and right-backward walking bouts (0.6 s to 1.4 s after the dashed lines in panel n). Watson-Williams multi-sample tests were performed and P value equals 1.6e-6.
Extended Data Fig. 8 Response-tuning in PFN, PFR and h∆B neurons to the translation speed indicated by our optic-flow stimuli.
a, Top row: same optic-flow tuning curves as in panel b, plotted twice (left and right). Bottom row: phase-nulled PFNd GCaMP activity across the bridge, averaged in the final 2.5 s of the optic flow epoch. We show responses to optic flow simulating traveling backward at four different speeds (left) and responses to optic flow simulating forward travel at four different speeds (right). The mapping between bridge [Ca2+] signals and data points in the plots in subsequent panels is indicated (arrows) for a few example points, using measurements from left-bridge PFNd cells, as an example. How we calculate the mean and amplitude of each bump is schematized. b, The population-averaged amplitude of the phase-nulled left-bridge PFNd [Ca2+] activity in the final 2.5 s of the optic flow epoch, plotted as a function of the egocentric traveling direction simulated by the optic flow. The translational speed of optic flow increases across the four columns, from left to right. Gray lines: sinusoidal fits. S.e.m. are shown in this panel and throughout. c, Same as panel b, but analyzing the right-bridge PFNd activity. d, Same as panel b, but analyzing the left-bridge PFNv activity. e, Same as panel b, but analyzing the right-bridge PFNv activity. f, Same as panel b, but analyzing the h∆B activity in the fan-shaped body. g, Same as panel b, but analyzing the PFR activity in the fan-shaped body. h, Same as panel b, but analyzing the h∆B activity in the fan-shaped body in non-flying flies. i, Same as panel f, but with a more zoomed-in y-axis. j, Amplitude of the four sinusoids in panel b to indicate how PFNd responses, overall, scale with optic-flow translation speed. k–m, Same as panel j, but for the plots and cell type shown to the left. Note that the amplitudes of the PFN sinusoidal activity patterns are not only scaled by the traveling direction angle (panels b–e), but also by traveling speed (panels j–m). These plots make sense as a way to quantify the amplitude of sinusoidally modulated responses, like those of PFNs, but we also show, for completeness, the results of the same analysis for h∆B and PFR cells, where this way of quantifying forward-speed tuning makes less sense. n, Mean of the four sinusoids in panel f to indicate how h∆B responses, overall, scale with optic-flow translation speed. o, Same as panel n, but for the PFR plots shown to the left. p, Same as panel n, but for the h∆B plots shown to the left. Note that response-scaling with speed in h∆B and PFR cells was not consistent across all traveling directions (panels f–h). The fact that the speed tuning of h∆B cells remains nonuniform across traveling directions in non-flying flies (panel h) suggests that this nonuniform tuning is not entirely due to an efference copy/proprioceptive signal being mismatched with backward optic-flow directions in tethered flight, though the interpretation of this nonuniform tuning will need to be resolved in future work. q, Same as panel n, but for the h∆B plots shown to the left. r, Same as panel b, but analyzing the mean (rather than the amplitude) of the left-bridge PFNd [Ca2+] activity patterns. Gray lines: same sinusoidal fits from panel b with a vertical offset and a scale factor that is constant across all four speeds. The fact that our amplitude fits from panel b also fit the mean responses shown here well supports the hypothesis that the heading input and the optic-flow input to PFN cells are integrated multiplicatively (see Methods). s–x, Same as panel r, but analyzing the cell type indicated on the left side of the figure, for each row. See Methods for how the optic-flow speed was calculated.
Extended Data Fig. 9 The neural circuit described in this paper implements an egocentric-to-allocentric coordinate transformation.
a, Schematic of the computation implemented in the Drosophila central complex. Traveling-direction signals referenced to the body axis (i.e., optic flow signals in SpsP and LNO1 cells, which indicate the egocentric traveling angle, green) are converted into traveling-angle signals referenced to cues in the world (i.e., the h∆B bump position, which indicates allocentric traveling angle, red). b, Schematic of a very similar computation hypothesized to take place in monkey parietal cortex.
Extended Data Fig. 10 A traveling-direction signal computed via optic flow is robust to changes in the yaw angle of the fly’s head.
a, A fly flying straight with the head aligned to the body axis. EPG and h∆B signals are aligned in the ellipsoid body and fan-shaped body, respectively. b, A fly flying straight forward with the head rotated 20° to the right. The EPG bump–assuming the EPG bump position tracks the fly’s head (rather than body) direction–will rotate 20° counterclockwise. The h∆B bump, however, will remain pointing in the same allocentric traveling direction because the net effect of the EPG bump rotating 20° in one direction and the ego-motion signal from optic flow (not represented in the diagram) rotating 20° in the opposite direction is that the PFR/h∆B bump stably indicates the same traveling direction throughout.
This file contains Supplementary Text and additional references.
A dynamic representation of the analytical model. (Top left) A fly walks in a circle while facing north/up the whole time. The instantaneous direction of travel (red vector) is decomposed into components (black vectors). (Top middle) The same trajectory decomposed into components rotated by 45˚. The two dotted lines represent four axes pointing at ±45˚ and ±135˚. Only the two projections with positive components are shown on any given frame (black vectors). (Top right) Four sets of central complex neurons are drawn: left- and right-bridge SpsPs and left- and right-nodulus LNO1s. The green saturation level represents the activity of each cell class, which is negatively and linearly correlated with the projection length of the fly’s traveling vector onto the ±45˚ and ±135˚ axes. (Bottom right) The two sinusoidally shaped bumps of PFNd cells (brown, top) and the two sinusoidally shaped bumps of PFNv cells (orange, bottom) in the bridge are shown. PFNs receive sign-inverting drive from SpsPs in the bridge and/or LNO1s in the noduli. These inputs induce modulations of the PFN bump amplitudes, with each PFN class’ activity showing a positive, linear correlation to the projection length of the fly’s traveling vector onto one of the ±45˚ and ±135˚ axes. (Bottom middle) PFN sinusoids shown overlaid in the fan-shaped body, phase shifted based on how PFNs anatomically project from the bridge to the fan-shaped body. h∆B neurons sum the PFN sinusoids to generate a new sinusoid whose peak represents the fly’s traveling direction (red curve). (Bottom left) The red dot position represents the peak position of the h∆B sinusoid. EPG neurons in the donut-shaped ellipsoid body express a bump of activity whose position tracks the fly’s heading (blue dot). Because the fly is always oriented in the same direction, the blue bump is stationary
Video of simultaneously imaged EPG and PFR signals in a flying fly before, during and after presentation of an optic flow stimulus that simulates forward travel
About this article
Cite this article
Lyu, C., Abbott, L.F. & Maimon, G. Building an allocentric travelling direction signal via vector computation. Nature 601, 92–97 (2022). https://doi.org/10.1038/s41586-021-04067-0