A neural heading estimate is compared with an internal goal to guide oriented navigation

Article metrics

Abstract

Goal-directed navigation is thought to rely on the activity of head-direction cells, but how this activity guides moment-to-moment actions remains poorly understood. Here we characterize how heading neurons in the Drosophila central complex guide moment-to-moment navigational behavior. We establish an innate, heading-neuron-dependent, tethered navigational behavior where walking flies maintain a straight trajectory along a specific angular bearing for hundreds of body lengths. While flies perform this task, we use chemogenetics to transiently rotate their neural heading estimate and observe that the flies slow down and turn in a direction that aims to return the heading estimate to the angle it occupied before stimulation. These results support a working model in which the fly brain quantitatively compares an internal estimate of current heading with an internal goal heading and uses the sign and magnitude of the difference to determine which way to turn, how hard to turn and how fast to walk forward.

Access optionsAccess options

Rent or Buy article

Get time limited or full article access on ReadCube.

from$8.99

All prices are NET prices.

Fig. 1: Tethered flies walk forward while maintaining a stable heading at an arbitrary angle relative to a visual landmark for minutes.
Fig. 2: Flies actively maintain a stable heading relative to an angular goal.
Fig. 3: Flies quantitatively adjust their turning and forward velocity with respect to the angular distance of the bar from its initial position before a bar jump.
Fig. 4: E-PG activity tracks the flies’ heading and not their goal heading.
Fig. 5: E-PG-impaired flies do not maintain a stable heading at an arbitrary angle.
Fig. 6: Flies slow down and turn to bring their E-PG activity back to its previous position in the protocerebral bridge after it is rotated via neural stimulation.
Fig. 7: Flies walking in complete darkness quantitatively adjust their turning and forward velocities with respect to the angular distance between current E-PG phase and the E-PG phase before chemogenetic stimulation.
Fig. 8: Working models for how flies perform goal-directed navigation.

Data availability

The data that support the findings of this study are available from the corresponding author upon request.

Code availability

Code is available from the corresponding author upon request.

References

  1. 1.

    Tsoar, A. et al. Large-scale navigational map in a mammal. Proc. Natl Acad. Sci. USA 108, E718–E724 (2011).

  2. 2.

    Müller, M. & Wehner, R. Path integration in desert ants, Cataglyphis fortis. Proc. Natl Acad. Sci. USA 85, 5287–5290 (1988).

  3. 3.

    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).

  4. 4.

    Heinze, S. & Homberg, U. Maplike representation of celestial E-vector orientations in the brain of an insect. Science 315, 995–997 (2007).

  5. 5.

    Varga, A. G. & Ritzmann, R. E. Cellular basis of head direction and contextual cues in the insect brain. Curr. Biol. 26, 1816–1828 (2016).

  6. 6.

    Seelig, J. D. & Jayaraman, V. Neural dynamics for landmark orientation and angular path integration. Nature 521, 186–191 (2015).

  7. 7.

    Sarel, A., Finkelstein, A., Las, L. & Ulanovsky, N. Vectorial representation of spatial goals in the hippocampus of bats. Science 355, 176–180 (2017).

  8. 8.

    Butler, W. N., Smith, K. S., van der Meer, M. A. A. & Taube, J. S. The head-direction signal plays a functional role as a neural compass during navigation. Curr. Biol. 27, 1259–1267 (2017).

  9. 9.

    Giraldo, Y. M. et al. Sun navigation requires compass neurons in Drosophila. Curr. Biol. 28, 2845–2852 (2018).

  10. 10.

    Heisenberg, M. & Wolf, R. in Vision in Drosophila Ch. 8 (Springer, Berlin, Heidelberg, 1984).

  11. 11.

    Byrne, M., Dacke, M., Nordstrom, P., Scholtz, C. & Warrant, E. Visual cues used by ball-rolling dung beetles for orientation. J. Comp. Physiol. A 189, 411–418 (2003).

  12. 12.

    Seelig, J. D. et al. Two-photon calcium imaging from head-fixed Drosophila during optomotor walking behavior. Nat. Methods 7, 535–540 (2010).

  13. 13.

    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).

  14. 14.

    Green, J. et al. A neural circuit architecture for angular integration in Drosophila. Nature 546, 101–106 (2017).

  15. 15.

    Reiser, M. B. & Dickinson, M. H. A modular display system for insect behavioral neuroscience. J. Neurosci. Methods 167, 127–139 (2008).

  16. 16.

    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).

  17. 17.

    Bahl, A., Ammer, G., Schilling, T. & Borst, A. Object tracking in motion-blind flies. Nat. Neurosci. 16, 730–738 (2013).

  18. 18.

    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).

  19. 19.

    Reichardt, W. & Poggio, T. Visual control of orientation behaviour in the fly. Part I. A quantitative analysis. Q. Rev. Biophys. 9, 311–375 (1976).

  20. 20.

    Strauss, R. & Pichler, J. Persistence of orientation toward a temporarily invisible landmark in Drosophila melanogaster. J. Comp. Physiol. A 182, 411–423 (1998).

  21. 21.

    Bülthoff, H., Götz, K. G. & Herre, M. Recurrent inversion of visual orientation in the walking fly, Drosophila melanogaster. J. Comp. Physiol. 148, 471–481 (1982).

  22. 22.

    Horn, E. & Wehner, R. The mechanism of visual pattern fixation in the walking fly, Drosophila melanogaster. J. Comp. Physiol. 101, 39–56 (1975).

  23. 23.

    Weir, P. T. & Dickinson, M. H. Flying Drosophila orient to sky polarization. Curr. Biol. 22, 21–27 (2012).

  24. 24.

    Warren, T. L., Weir, P. T. & Dickinson, M. H. Flying Drosophila maintain arbitrary but stable headings relative to the angle of polarized light. J. Exp. Biol. 221, jeb177550 (2018).

  25. 25.

    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).

  26. 26.

    Turner-Evans, D. et al. Angular velocity integration in a fly heading circuit. eLife 6, e23496 (2017).

  27. 27.

    Kim, S. S., Rouault, H., Druckmann, S. & Jayaraman, V. Ring attractor dynamics in the Drosophila central brain. Science 356, 849–853 (2017).

  28. 28.

    Chen, T.-W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).

  29. 29.

    Poodry, C. A. & Edgar, L. Reversible alteration in the neuromuscular junctions of Drosophila melanogaster bearing a temperature-sensitive mutation, shibire. J. Cell Biol. 81, 520–527 (1979).

  30. 30.

    Fenk, L. M., Poehlmann, A. & Straw, A. D. Asymmetric processing of visual motion for simultaneous object and background responses. Curr. Biol. 24, 2913–2919 (2014).

  31. 31.

    Kim, A. J., Fitzgerald, J. K. & Maimon, G. Cellular evidence for efference copy in Drosophila visuomotor processing. Nat. Neurosci. 18, 1247–1255 (2015).

  32. 32.

    Keleş, M. F. & Frye, M. A. Object-detecting neurons in Drosophila. Curr. Biol. 27, 680–687 (2017).

  33. 33.

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

  34. 34.

    Seelig, J. D. & Jayaraman, V. Feature detection and orientation tuning in the Drosophila central complex. Nature 503, 262–266 (2013).

  35. 35.

    Franconville, R., Beron, C. & Jayaraman, V. Building a functional connectome of the Drosophila central complex. eLife 7, e37017 (2018).

  36. 36.

    Sun, Y. et al. Neural signatures of dynamic stimulus selection in Drosophila. Nat. Neurosci. 20, 1104–1113 (2017).

  37. 37.

    Green, J. & Maimon, G. Building a heading signal from anatomically defined neuron types in the Drosophila central complex. Curr. Opin. Neurobiol. 52, 156–164 (2018).

  38. 38.

    Turner-Evans, D. B. & Jayaraman, V. The insect central complex. Curr. Biol. 26, R453–R457 (2016).

  39. 39.

    Martin, J. P., Guo, P., Mu, L., Harley, C. M. & Ritzmann, R. E. Central-complex control of movement in the freely walking cockroach. Curr. Biol. 25, 2795–2803 (2015).

  40. 40.

    Neuser, K., Triphan, T., Mronz, M., Poeck, B. & Strauss, R. Analysis of a spatial orientation memory in Drosophila. Nature 453, 1244–1247 (2008).

  41. 41.

    Triphan, T., Poeck, B., Neuser, K. & Strauss, R. Visual targeting of motor actions in climbing Drosophila. Curr. Biol. 20, 663–668 (2010).

  42. 42.

    Ofstad, T. A., Zuker, C. S. & Reiser, M. B. Visual place learning in Drosophila melanogaster. Nature 474, 204–207 (2011).

  43. 43.

    Wehner, R., Michel, B. & Antonsen, P. Visual navigation in insects: coupling of egocentric and geocentric information. J. Exp. Biol. 199, 129–140 (1996).

  44. 44.

    Manton, J. D. et al. Combining genome-scale Drosophila 3D neuroanatomical data by bridging template brains. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/006353v1 (2018).

  45. 45.

    Jenett, A. et al. A GAL4-driver line resource for Drosophila neurobiology. Cell Rep. 2, 991–1001 (2012).

  46. 46.

    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).

  47. 47.

    Schindelin, J. et al. Fiji: an open-source platform for biological-image analysis. Nat. Methods 9, 676–682 (2012).

Download references

Acknowledgements

We thank the laboratories of V. Ruta (The Rockefeller University) and G. Rubin (Janelia Research Campus) for fly stocks; L. Fenk, S. Jereb and D. Wilson for comments on the manuscript; and members of the Maimon laboratory for helpful discussions. Stocks obtained from the Bloomington Drosophila Stock Center (NIH P40OD018537) were used in this study. This work was supported by the McKnight Foundation (G.M.), the National Institutes of Health (grants DP2DA035148 and R01NS104934 to G.M.) and the Leon Levy Foundation (V.V.). G.M. is a Howard Hughes Medical Institute Investigator.

Author information

J.G., V.V. and G.M. conceived the project. J.G. performed two-photon imaging and stimulation experiments. P.M.P. performed purely behavioral experiments in plate-tethered wild-type and shibire-impaired flies. G.M. and J.G. performed behavioral experiments in pin-tethered flies. J.G., V.V., P.M.P. and G.M. analyzed and interpreted experiments. V.V. developed the bar jump perturbation approach for studying goal-directed walking. A.A. performed and analyzed multicolor flip-out anatomical experiments. J.G. and G.M. wrote the paper.

Correspondence to Gaby Maimon.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information: Nature Neuroscience thanks Roy Ritzmann and other, anonymous, reviewer(s) 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.

Integrated supplementary information

Supplementary Figure 1 How we compute mean heading vectors to determine if flies are maintaining a stable heading at an arbitrary angle relative to a visual landmark.

a, Entire one-hour recording of an example fly walking in closed-loop with a bar. The fly tends to maintain its heading at a stable angle over 60 s, but changes angles over longer timescales. b, How we analyzed whether flies maintained a stable heading at an arbitrary angle relative to a visual landmark over time. We first converted heading values at individual time points into unit vectors. We then computed the vector mean of these unit vectors over 60 s time windows. If the fly maintains its heading at a stable angle, as when it is walking in closed loop with a landmark (top), its individual unit vectors will have a mean whose magnitude will be close to 1 (towards the outside of the unit circle). If the fly does not maintain its heading at a stable angle, like when it is walking in the dark (bottom), its individual unit vectors will have a mean whose magnitude will be closer to zero (towards the inside of the unit circle). c, To assess how well flies fixated different angles, we plotted a polar heatmap of the distribution of mean heading vectors, here for flies walking in the dark, where they do not fixate any angle well. These same flies are shown in Figure 1 to fixate a blue bar very well. d, To assess how well flies maintain stable fixation over different timescales, we plotted the distribution of mean heading vector magnitudes (i.e. the length of the mean heading vectors in b) computed over different analysis window lengths (i.e. not just the 60 s time window used in b-c). Dashed line indicates the 60 s window used in panels b-c and Figure 1c-d. Like in Figure 1, time points in which flies were standing still (forward velocity < 0.5 mm/s) were ignored because heading values during such time points are stable for the trivial reason that the fly is not moving. e, Distribution of turning and forward walking velocities in closed-loop bar and dark conditions. The mean and s.e.m. across flies are shown. Dens., sample density.

Supplementary Figure 2 Drosophila typically orient directly towards or away from a tall dark bar (i.e., perform fixation or anti-fixation), but perform arbitrary-angle fixation with a tall bright bar.

a, We presented pin-tethered wild-type flies, walking on an air-cushioned ball, with visual stimuli on a green LED display (330˚ azimuth; 105˚ high) in rotational closed loop (Methods). A sample fly (left) alternated from orienting directly toward (front-fixation) to directly away from (anti-fixation) a tall (105˚ high) dark stripe. We used a high air flow rate on the ball below the fly in this experiment because we found that high ventral air flow promoted front fixation of a tall dark bar (consistent with a past report in which flies with significant ventral air flow fixated a tall dark bar17) (Methods). We raised the air flow rate until we could see the wings begin to flutter. We analyzed the flies’ orienting behavior with polar plots, like with the plate-tethered experiments. We used 15 s (rather than 60 s) analysis windows for the polar plots generated from pin-tethered data because the flies kept less stable orientations while walking forward compared to the plate tethered flies, perhaps due to the high air flow. b, Population-averaged polar plots show that flies fixate or anti-fixate tall dark bars and do not orient in a consistent manner in reference to an invisible bar (blank screen). c, Population-averaged polar plots of orientation to a tall dark bar with the minimal air flow needed to keep the ball floating (like in all other experiments in this paper). With low air flow and a tall dark bar, we observed very little front fixation, a significant amount of anti-fixation, and possibly a small amount of arbitrary-angle fixation (data points near the periphery of the polar plot, but not directly at the top or bottom). d, With low air flow and a tall bright bar, we observed data points at the periphery of polar plots, not necessarily at the top or bottom, indicating that flies kept the bright bar stable over the 15-s analysis windows at a variety of angles along the azimuth. Polar plots from individuals clearly showed single flies stabilizing the bright stripe at unique azimuthal angles (data not shown). The same flies did not orient in a consistent manner in reference to an invisible bar (blank screen). Individual flies contributed 8 min. of closed-loop data to all panels in this figure (one fly had only ~6 min. and another only ~2 min. of data for panel d, left). Dens., sample density.

Supplementary Figure 3 Flies correct for landmark rotations from arbitrary initial positions after the landmark has been rotated 180°, and after it disappears for 30 s.

a, Entire one-hour recording of an example fly walking in closed-loop with a bar, with ±90° and 180° bar jumps every 180 s. b, Population analysis of 180° bar jumps (90° bar jumps are shown in Figure 2). Top: Distance from initial heading over time. Bottom: Distance from initial heading distributions 0-1 s (red) and 20-30 s (black) after bar jumps. The initial heading is defined as the mean heading in the 10 s window before bar jumps. Red arrow indicates when the 180˚ bar jump occurred. Mean and s.e.m. across flies are shown. c, Angular distance from initial heading during discontinuous 90° and 180° bar rotations. (Top) Trials in which the flies returned to within 30° of their initial heading within the 10-30 s following the bar rotation. (Bottom) Trials in which the flies did not return to their initial heading. d, Initial headings averaged over 10 s before bar rotations. e, Circular standard deviations of the flies’ heading during the 10 s period before bar rotations (p=0.96, two-sided Wilcoxon rank-sum test). f, Distribution of the fly’s mean forward velocity during the 10 s period before bar rotations (p=1e-3, two-sided Wilcoxon rank-sum test). In d-f, each dot represents a single trial, mean and 95% bootstrap confidence intervals are shown in black. g, After walking in closed-loop with a landmark, we presented the flies with a dark screen for 30 s, after which the bar reappeared at a random offset with respect to the ball. Top: Distance to initial heading over time. 167 traces from 12 flies are shown with 3% opacity. Bottom: Mean and s.e.m. of probability distributions of distance to initial heading over 0-1 s (red) and 20-30 s (black) after the bar reappeared.

Supplementary Figure 4 Slowing down forward walking speed is a separable behavioral response from turning.

a, Turning and forward walking behavior of flies during 180° bar rotations. Absolute distance to initial heading is shown on the bottom. Mean and s.e.m. across flies are shown. These data show that flies turn and slow down after 180˚ bar jumps. b, Same as a, but selected for trials in which the flies’ turning speed changed very little in either direction (< 20°/s change in either direction) comparing a 5 s window before and after the bar rotation. Flies still slowed down on these low-turn-velocity trials (middle). Since the flies turned very weakly, they returned the bar over a longer timescale, as evidenced by the slower decay of their absolute distance to goal over time (bottom), which also matched the longer timescale of their slowing-down response. Note that the distance to initial heading after the jump does not return to its baseline level before the jump (bottom plots) for several potential reasons: (1) the bar sometimes ends up invisible when jumped to the rear of the arena, where there are no LEDs (and the fly may take a very long time to correct this specific perturbation), (2) flies might be in a different behavioral state (grooming, sleeping) when the bar is jumped and thus may take longer than 80 s to correct the perturbation, (3) flies may sometimes change their goal heading after a bar jump (perhaps as a result of the bar jump), and (4) it is possible that prior to some bar jumps, the bar was located off the actual, internal, goal angle, leading flies to not return the bar to the initial bar angle before the bar jump.

Supplementary Figure 5 The position of the E-PG peaks in the protocerebral bridge (E-PG phase) does not track heading-relative-to-goal during arbitrary-angle fixation.

a, If E-PG activity follows the fly’s heading, its position should follow the bar position independent of the fly’s goal; in other words, the offset (or mean angular distance) between E-PG activity and the bar’s position should not change when the fly changes its stable, or goal, walking direction. If, on the other hand, E-PG activity follows the fly’s heading relative to its angular goal, the offset (as defined above) should change after a change in the stable, or goal, walking direction. b, E-PG activity before and after a single fly changes the angle at which it stably maintains its heading. The same plotting offset was applied to the blue traces on the left and the right for these example traces (which represent data acquired from the same fly 12 min apart). c, Change in offset (as defined above) between E-PG phase and bar position, as well as between E-PG phase and angular distance to goal, after flies changed goal headings. That the offset between the E-PG phase and bar position does not change either in this condition or after bar jumps in Figure 4 indicates that the E-PG phase tracks the fly’s heading in reference to the bar, rather than other angular variables related to the goal. See Main Text for details.

Supplementary Figure 6 Blocking E-PG synaptic output impairs the ability of the E-PG phase both to track the flies’ heading in closed-loop with a bar and the ability of the E-PG phase velocity to track the flies’ turning velocity in the dark.

a, We imaged E-PG activity as the fly walked in closed-loop with a bar and in the dark (not depicted) while impairing E-PG synaptic output by expressing shibirets in E-PGs. b, E-PG activity in the protocerebral bridge with E-PGs expressing shibirets at 26 °C and at 34 °C. The 90° gap in the back of the arena where the bar is not visible is highlighted in grey. c, Circular correlation (Fisher, N. I. & Lee, A. J. A correlation coefficient for circular data. Biometrika 70, 327–332 (1983)) between E-PG phase and bar position. Comparing UAS-shits to X>shits: p=5e-4 (60D05), 5e-4 (77E05), 5e-4 (27F02); comparing X-Gal4 to X>shits: p=5e-4 (60D05), 1e-3 (77E05), 9e-4 (27F02), two-sided Wilcoxon rank-sum test. d, Pearson correlation coefficients between E-PG phase velocity and bar velocity. These correlation coefficients are not greatly reduced by expressing shibirets in E-PGs, suggesting that visual-motion inputs can still induce properly signed rotations of the E-PG heading signal in E-PG>shibirets flies; however, the fidelity of such velocity updating is not sufficient to prevent large drifts over time in the angular position of the E-PG phase relative to the angular position of the bar (panel c). Comparing UAS-shits to X>shits: p=0.39 (60D05), 0.25 (77E05), 1 (27F02); comparing X-Gal4 to X>shits: p=1e-2 (60D05), 0.2 (77E05), 0.7 (27F02), two-sided Wilcoxon rank-sum test. e, Same as d, but in the dark. Comparing UAS-shits to X>shits: p=2e-4 (60D05), 2e-4 (77E05), 2e-4 (27F02); comparing X-Gal4 to X>shits: p=2e-4 (60D05), 4e-4 (77E05), 2e-4 (27F02), two-sided Wilcoxon rank-sum test. In c-e, mean and s.e.m. across flies are shown. P values are not corrected for multiple comparisons. X>shits indicates a genotype in which X-Gal4 and UAS-shibirets transgenes are both present. ‘X’ represents the Gal4 line indicated in parentheses for each p-value.

Supplementary Figure 7 Blocking E-PG synaptic output impairs the fly’s ability to maintain a stable heading at many timescales.

a, Can E-PG-impaired flies maintain a stable heading? b, 30 min trajectories of control flies (black + or – sign) and E-PG-impaired flies (red + sign) walking in closed-loop with a bar. Trajectories headed toward the top of the page represent the flies walking directly toward the bar. c, Distributions of mean heading vector magnitude for different window lengths, across control and E-PG>shibirets genotypes (genotypes follow the legend in panel b). The dashed line indicates the 60 s window length used in generating the polar plots in Figure 5d. Like in Figure 5d, time points in which flies were standing still (i.e. forward velocity < 0.5 mm/s) were ignored because heading values during such time points are stable for the trivial reason that the fly is not moving. See Supplementary Fig. 1 for Methods. Dens., sample density.

Supplementary Figure 8 E-PG-impaired flies can correct for bar jumps in front, but less so in other visible parts of the arena.

a, Do E-PG-impaired flies return a landmark to its initial position after it has been rotated? Is this impairment specific to the initial position of the landmark? b, Mean absolute distance to goal before and after 90° bar jumps, when the bar’s initial position was in front (left), or in the remaining visible parts of the arena (right), across genotypes. The fact that the gray curves come down after the 90° jump indicates that control flies perform an active correction toward the initial position of the bar on many trials. The fact that the red curves come down when the bar is in front (left), but not as much when it is on the sides (right), indicates that E-PG>shibirets flies can turn in the proper direction to correct for a bar jump when the blue bar is directly in front, but their behavior is less effective or ineffective when the bar is on the sides. See Supplementary Fig. 4 legend for a detailed explanation on why none of the curves, even the control ones, return to baseline after the bar jump. c, Mean absolute distance to initial heading 30–40 s after 90° bar jumps, across different initial headings. Control flies correct for bar jumps, irrespective of their initial heading, provided the bar is visible (as evidenced by a low flat line across headings where the bar is visible). E-PG>shibirets flies, however, are more impaired in their ability to correct for bar jumps the further their initial heading is from the front. Grey areas highlight initial headings where the bar is not visible.

Supplementary Figure 9 E-PG>shibirets flies do not slow down their forward speed after bar jumps even though control flies matched for their overall forward walking speed do slow down.

a, Do E-PG-impaired flies turn and slow down in response to bar jumps as much as wild-type flies? b, Mean turning velocity over time during 90° bar jumps, across control and E-PG>shibirets genotypes. c, Same as b, for forward velocity during 90° and 180° bar jumps. Mean and s.e.m. across flies are shown in all panels. d, Data plotted as in panel b, with control (green/purple) and E-PG-impaired (gray/black) flies pooled across genotypes and shown together, after selecting for trials in control flies where the flies walked––on average over the 10 s window before the bar jump––as slow as E-PG>shibirets flies. Approximately 78% and 18% of trials were excluded for control and E-PG>shibirets flies, respectively. (A large number of trials were excluded in control flies because we were focusing, in these control analyses, on slow walking trials, which were rarer in controls.) e, Mean turning velocity for each fly, after controlling for baseline walking speed, computed 0 to 2 s after bar jumps. Mean and 95% confidence intervals across flies are shown (-90°: p=0.87, +90°: p=0.34, two-sided Wilcoxon rank-sum test, 33 control and 30 E-PG>shits flies). f-g, Same as d-e, but for forward velocity during 90° and 180° bar jumps. In g, we plot the change in the mean forward velocity in the 10 s window immediately before the bar jump compared to the 10 s window immediately after the bar jump, for each fly (90°: p=0.065, 33 control and 30 E-PG≥shits flies; 180°: p=0.01, 31 control and 30 E-PG≥shits flies; two-sided Wilcoxon rank-sum test). h, Turning velocity as a function of angular distance to initial heading using data from -20 s to 40 s around bar jumps. i, Same as h, but for forward velocity. In h-i, the initial heading is the mean heading over the 10 s immediately prior to the bar jump. Each column of the heat map is normalized independently because there are many more data points near x=0. Mean and s.e.m. across flies are shown (black curve). For all panels, we included all trials where the flies maintained a relatively stable heading (circular s.d. < 45°) over the 10 s window before the bar jump, as an indication that flies were performing arbitrary-angle fixation. Dens., sample density.

Supplementary Figure 10 Three Gal4 lines label E-PG neurons, specifically, in the protocerebral bridge and ellipsoid body.

Three example brains, one per Gal4 line, in which neurons were stochastically labeled in different colors by the multicolor flip-out (MCFO) method46. The E-PG cell class, which innervates the ellipsoid body, protocerebral bridge and gall, was the only cell class we observed in the central complex. 46 of 48 MCFO-visualized neurons that innervated the central complex in these three Gal4 lines were unambiguously E-PGs (and all 48 might have been E-PGs) (see Supplemental Table 1 for the entire dataset).

Supplementary Figure 11 Even though the flies’ behavioral headings drift over time in the dark, the E-PG heading signal is maintained at a relatively stable position in the brain, suggesting that flies are still attempting to use their E-PG signal to walk straight in the dark.

a, We imaged E-PG activity over 10 min of closed-loop bar, and 10 min of constant darkness (the order was reversed in half the flies). Sample traces of E-PG activity in relation to the fly’s heading during walking in closed-loop with a bar and in the dark. Grey areas on the left highlight the 90° gap in the back of the arena where the bar is not visible. All angles have a grey background on the right because the fly is walking in the dark. b, Mean vector magnitude distributions computed over different window lengths for the fly’s heading on the ball and E-PG phase in the brain during closed-loop bar and dark conditions. Both the fly’s heading and the E-PG phase (also an angle that can be processed in the same way) were processed as in Supplementary Fig. 1. Dashed line indicates the 60-s window length used to generate the polar plots in c. c, Polar distributions of mean vectors taken over sliding 60 s windows of walking, for the fly’s heading and E-PG phase in closed-loop bar and dark conditions. The fact that the E-PG phase plots look similar with the bar and in the dark argues that flies maintain their E-PG phase at a relatively stable location in the protocerebral bridge-ellipsoid body circuit while walking in complete darkness. Their behavioral heading, however, drifts in darkness because the flies have no visual feedback to inform them that their walking movements are causing them to go off course. Dens., sample density.

Supplementary Figure 12 On average, flies do not turn in response to chemogenetically stimulating P-ENs in the left or right bridge, or if P2X2 expression is not driven by Gal4, and stimulating P-ENs causes an overall increase in E-PG activity.

a, Mean turning velocity in each fly before (-2 to 0 s) and after (0 to 2 s) stimulating the left and right bridge, in flies expressing P2X2 in P-ENs (left bridge: p=0.39, right bridge: p=0.74, two-sided Wilcoxon signed-rank test). Flies were only stimulated on one side, thus left and right bridge stimulation data are from different flies. These data show that the side of the bridge in which we stimulate P-ENs does not predict which way the flies turn. Rather, the rotational direction of the E-PG phase caused by stimulation of P-ENs (which varies from trial to trial and is independent of which side of the bridge we stimulate) is the predictive variable (Figure 6). b, Turning velocity in flies lacking a Gal4 driver before (-2 to 0 s) and after (0 to 2 s) events when the ATP pipette was positioned 45° to 135° away from the initial E-PG phase, as in Figure 6g (CCW: p=0.13, CW: p=0.78, two-sided Wilcoxon signed-rank test). The same flies were analyzed for CCW and CW trials, only some flies by chance did not receive either CCW or CW trials. Like in Figure 6, the initial E-PG phase was defined as the mean E-PG phase in the 10 s window immediately before ATP release. There is no measureable effect on turning velocity when puffing ATP onto the protocerebral bridge in a fly that does not express P2X2 in P-ENs. c, Mean fluorescent intensity across the entire protocerebral bridge over time during ATP stimulations. Blue trace represents the E-PG>GCaMP signal. Red trace represents the Alexa594 signal. Alexa594 was co-loaded with ATP in the pipette to visualize the release of ATP. Mean and s.e.m. across trials are shown. We observed an increase in E-PG GCaMP in experimental (P-EN>P2X2) (left) but not control (UAS-P2X2;no Gal4) (right) flies. For unclear reasons, the Alexa-594 signal was weaker during stimulation of control flies than during stimulation of experimental flies, suggesting less ATP may have been applied to the bridge. We therefore selected for trials in control experiments in which the mean increase in the Alexa594 signal was similar to the mean increase measured in non-controls and we still observed that the mean E-PG GCaMP signal did not measurably increase during ATP puffs. d, Mean E-PG>GCaMP intensity for each fly before (-2 to 0 s) and after (0 to 2 s) stimulation (P-EN>P2X2: p=2e-4, UAS-P2X2: p=0.11, two-sided Wilcoxon signed-rank test). In all panels, we only included trials where the E-PG phase was maintained at a relatively stable location (circular s.d. < 45°) in the 10 s window immediately before stimulation, to match the data used in this analysis with that used in Figure 6. CW: clockwise. CCW: counterclockwise.

Supplementary information

Supplementary Figs. 1–12 and Supplementary Tables 1–3

Reporting Summary

Supplementary Video 1

Example fly turning to bring the landmark back to its initial position on the LED arena following a rotation of the visual environment. Video of a fly walking in closed loop with a bright blue bar. The fly is seen maintaining the bar directly in front. The bar is discontinuously rotated three times, twice by −90° and once by +90°, and the fly can be seen turning to return the bar to its initial position before the bar rotation. A red dot comes on 1 s before the bar jump. When the red dot comes off, the bar jumps.

Supplementary Video 2

Same as Supplementary Video 1, but with the fly fixating with the landmark at approximately 70° to its left. This video shows the same fly as in Supplementary Video 1, but 24 min later, when its fixation angle has changed to an angle ~70° to the left of the fly rather than directly in front. The bar is discontinuously rotated, once by −90° and once by +90°.

Supplementary Video 3

Example fly turning to bring its E-PG heading signal back to its position in the protocerebral bridge before neural stimulation. Video of a fly walking in constant darkness (bottom). Two-photon imaging in the protocerebral bridge of E-PG neurons expressing GCaMP6f (top). The left bridge is shown on the right and the right bridge on the left, because the fly is viewed from the front. We stimulated E-PGs via P-ENs (see Methods) by expressing in P-ENs the ATP-gated cation channel P2X2 and releasing ATP locally via a pipette (shown in red) on one to two glomeruli in the protocerebral bridge. Stimulating P-ENs reliably relocates the E-PG activity peaks approximately one glomerulus medial to the stimulated position14, consistent with P-ENs functionally exciting E-PGs and their known projection anatomy25. We added a red dot to the movie to appear at approximately the time when a pressure pulse releases ATP from the pipette. The red dot lasts 2 seconds in the video, to ensure it is salient and visible to the viewer; the actual pressure pulse lasted only 20–50 ms. All other movie components aside from the red dot (e.g., brain activity and fly behavior) were aligned using time stamps from the behavioral camera and the two-photon frame triggers in Python 2.7.

Supplementary Video 4

Same as Supplementary Video 3 but at 2× speed.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark