Abstract
Neuronal signals that are relevant for spatial navigation have been described in many species1–10. However, a circuit-level understanding of how such signals interact to guide navigational behaviour is lacking. Here we characterize a neuronal circuit in the Drosophila central complex that compares internally generated estimates of the heading and goal angles of the fly—both of which are encoded in world-centred (allocentric) coordinates—to generate a body-centred (egocentric) steering signal. Past work has suggested that the activity of EPG neurons represents the fly’s moment-to-moment angular orientation, or heading angle, during navigation2,11. An animal’s moment-to-moment heading angle, however, is not always aligned with its goal angle—that is, the allocentric direction in which it wishes to progress forward. We describe FC2 cells12, a second set of neurons in the Drosophila brain with activity that correlates with the fly’s goal angle. Focal optogenetic activation of FC2 neurons induces flies to orient along experimenter-defined directions as they walk forward. EPG and FC2 neurons connect monosynaptically to a third neuronal class, PFL3 cells12,13. We found that individual PFL3 cells show conjunctive, spike-rate tuning to both the heading angle and the goal angle during goal-directed navigation. Informed by the anatomy and physiology of these three cell classes, we develop a model that explains how this circuit compares allocentric heading and goal angles to build an egocentric steering signal in the PFL3 output terminals. Quantitative analyses and optogenetic manipulations of PFL3 activity support the model. Finally, using a new navigational memory task, we show that flies expressing disruptors of synaptic transmission in subsets of PFL3 cells have a reduced ability to orient along arbitrary goal directions, with an effect size in quantitative accordance with the prediction of our model. The biological circuit described here reveals how two population-level allocentric signals are compared in the brain to produce an egocentric output signal that is appropriate for motor control.
Subject terms: Neural circuits, Network models, Navigation
In Drosophila, FC2 neurons signal a navigational goal, which is compared with the fly’s heading by PFL3 neurons to guide moment-to-moment steering.
Main
Dung beetles pick an arbitrary direction in which to roll their precious ball of dung14. Fruit bats fly kilometres to re-visit the same tree night after night15. Whether their goal is to reach a specific location in space, like bats, or to maintain a consistent angular bearing, like dung beetles, animals must regularly update their locomotor behaviour (for example, turn left or right) on the basis of whether they are heading in the correct direction.
To determine which way to turn during navigation, the brain could compare an explicit internal estimate of the animal’s heading angle (that is, its moment-to-moment orientation, or compass direction) with a goal angle11,16 (that is, the compass direction along which an animal wishes to progress forward). The difference between these two angles could then direct turns toward the goal (Fig. 1a). Heading and goal angles are closely related because animals typically orient in the direction in which they wish to progress forward; however, the two angles are distinct because the goal angle remains constant in the face of occasional turns or detours that briefly change the animal’s heading angle. Of note, when heading and goal angles are both encoded in a common, allocentric (world-referenced; for example, north, east, south and west) coordinate frame, a neural circuit that compares them appropriately would yield a signal in egocentric (body-referenced; for example, left or right) coordinates appropriate for determining the direction and vigour of steering.
Neural signals relevant for such a computation have been described in many species. For example, neural correlates of moment-to-moment heading (that is, head-direction cells) exist in vertebrates1,17,18 and invertebrates2,19,20 as do neurons with activity related to navigational goals7,8,10,21 and locomotor turns22–24. Yet despite the correlates and elegant computational models for goal-directed navigation16,24–28, an experimentally validated circuit that converts allocentric, navigation-related signals into an output appropriate for the motor system has yet to be described. Here, we functionally characterize such a neural circuit in the Drosophila brain.
Central complex and menotaxis
The insect central complex is a set of midline-straddling brain structures that include the ellipsoid body, protocerebral bridge and fan-shaped body29 (Fig. 1b). Columnar neurons of the central complex innervate subsections or columns of these larger structures, with each columnar cell class tiling the structure or structures that they innervate12,30,31. EPG cells are a class of columnar neurons that tile the ellipsoid body with their dendrites and the protocerebral bridge with their axons31 (Fig. 1c). EPG cells have been referred to as compass neurons because they express a bump of calcium activity in the ellipsoid body, and two copies of that bump in the protocerebral bridge, that track the fly’s allocentric heading angle through the positions of these bumps in the brain2,11 (that is, their phase). We considered whether an allocentric goal signal might exist in the central complex, which could be compared with the EPG heading signal to guide navigation. Inspired by past theoretical work16,24,26, we hypothesized that columnar neurons of the fan-shaped body might signal the fly’s goal angle. Specifically, we found that FC2 cells—a class of columnar neurons that receive inputs and send outputs within the fan-shaped body12,13 (Fig. 1d)—could serve such a role.
We performed two-photon calcium imaging in tethered flies while they walked on an air-cushioned ball in a simple virtual environment32–34 (Fig. 1e). Flies viewed a vertical blue bar displayed on a panoramic LED display35. The bar rotated in angular closed loop with the fly’s yaw rotations (that is, left and right turns), thus simulating a fixed, distant cue, like the sun, whose position on the arena could be used by the fly to infer its heading in the virtual world. In this setup, flies can be motivated to walk forward for many hundreds of body lengths along a stable but seemingly arbitrary bearing relative to the visual cue11—a behaviour called menotaxis11,36,37. Previous work has shown that menotaxis is an EPG-dependent behaviour11,37 and that the EPG phase encodes the fly’s heading angle during this task11.
FC2 cells signal a goal angle
We imaged GCaMP7 (ref. 38) fluorescence from EPG and FC2 neurons (Extended Data Fig. 1a–c) as flies performed menotaxis. We focused on time periods when flies were stabilizing a consistent angle while walking forward, which we call menotaxis bouts (Fig. 1f, black highlight in trajectory, Fig. 1g and Extended Data Fig. 2a–f).
Similar to the way in which EPG cells express bumps of activity that shift around the ellipsoid body and protocerebral bridge2,34,39 (Fig. 1h, top), we found that FC2 cells express a calcium bump that shifts across the left–right axis of the fan-shaped body (Fig. 1i, top and Extended Data Fig. 3i). Both the EPG and the FC2 bumps had a phase that generally correlated with the position of the bar over the course of a recording (EPG: r = 0.88, FC2: r = 0.61; Extended Data Fig. 3a,b), which would be expected for bumps that track either heading or goal angles. During menotaxis bouts, when flies were stabilizing a specific heading angle, we observed that both the EPG and FC2 bumps remained at a relatively stable position (Fig. 1h, bottom and Fig. 1i, bottom). To dissociate whether the FC2 and EPG bumps better track the goal or heading angle, we virtually rotated flies ±90° while they performed menotaxis. Specifically, we discontinuously jumped the bar, in open loop, and then returned the system to closed-loop control after a 2-s delay. Following such rotations, flies typically slowed their forward velocity and made a corrective turn to realign themselves with their previous heading angle11 (Extended Data Fig. 2g–j). We reasoned that the fly’s goal had stayed constant throughout this perturbation on trials where flies clearly returned to their previous heading (Methods). On such trials, heading and goal signals are expected to behave differently: a bump that tracks the heading angle should rotate ±90° and a bump that tracks the goal angle should remain fixed (Fig. 1j).
We found that the EPG phase, on average, rotated approximately ±90°, in lockstep with the fly’s heading, during virtual rotations of the fly, whereas the FC2 phase, on average, did not measurably deviate (Fig. 1k–o and Extended Data Fig. 3c–e). The stability of the FC2 phase during virtual rotations was not due to a general inability of the FC2 phase to rotate rapidly (Extended Data Fig. 3f,g). On some trials (but not on average) we observed that the intensity of the FC2 bump decreased during virtual rotations (Fig. 1l and Extended Data Fig. 3j–n). This decrease in signal strength could be because flies often slowed down in response to a virtual rotation (Extended Data Fig. 2j), and FC2 activity decreases with decreasing forward walking velocity (Extended Data Fig. 3q). The FC2 signal also varied with flies’ turning velocity and the consistency of the heading direction (Extended Data Fig. 3o–q).
Together, these results support a model in which the EPG phase signals the allocentric heading angle and the FC2 phase signals the allocentric goal direction. If the FC2 bump can indeed signal the fly’s goal angle to downstream circuits, experimentally repositioning the FC2 bump to different left/right positions along the fan-shaped body should induce flies to walk along experimenter-defined goal directions.We next tested this hypothesis.
Experimentally controlling the goal angle
We optogenetically activated FC2 neurons in a contiguous subset of fan-shaped body columns while monitoring the fly’s walking behaviour (Fig. 2a and Extended Data Fig. 4). Specifically, we co-expressed the red-shifted channelrhodopsin CsChrimson40 and sytGCaMP7f4 in FC2 neurons and used a two-photon laser to repeatedly reposition the FC2 bump at one of two locations, separated by approximately half the width of the fan-shaped body (Fig. 2b and Extended Data Fig. 4a,b). If the position of the FC2 bump in the fan-shaped body signals the fly’s goal direction, this perturbation should cause a fly to repeatedly switch its heading between two angles separated by approximately 180° (Extended Data Fig. 4e,f). Indeed, flies tended to stabilize a consistent heading angle when we stimulated a given region of the fan-shaped body (Fig. 2c,e and Extended Data Fig. 4g). Moreover, the behavioural angles flies stabilized for the two stimulation locations differed by 166°, on average, similar to the approximately 180° predicted from the anatomical stimulation locations (Fig. 2c,e–g and Extended Data Fig. 4e). Control flies that did not express CsChrimson showed no measurable change in FC2 calcium activity during stimulations (Extended Data Fig. 4c) and showed more behavioural overlap between the two stimulation locations (Fig. 2d–f), as expected from the fact that flies are unlikely to spontaneously flip-flop between two goal angles 180° apart. On average, flies took longer to reach their predicted goal heading on trials in which they started further away from the goal (Extended Data Fig. 4i). Flies also took longer, or were less likely, to reach their predicted goal on trials in which they were standing still prior to stimulation (Extended Data Fig. 4j), suggesting that the ability of FC2 activity to guide locomotor turns depends on the flies’ locomotor state.
Previous work has shown that each fly learns an idiosyncratic offset between its heading (relative to the bar position) and its EPG phase2,34,41,42, such that for one fly the EPG bump might be at the top of the ellipsoid body when the bar is directly in front and for another fly the bump might be at the bottom. Although individual experimental flies stabilized a consistent goal angle relative to the bar for a given FC2 stimulation location in the fan-shaped body, the value of the stabilized angle differed from fly to fly (Extended Data Fig. 4g,h). Because past work has shown that the fan-shaped body inherits its azimuthal reference frame from EPG cells4, these data are consistent with the FC2 phase encoding the fly’s goal angle in the same allocentric reference frame used by the EPG neurons to encode the fly’s heading.
To perform tasks such as menotaxis, flies need to turn to align their heading and goal angles, and they also need to translate forward when these two angles are aligned and slow down or stop when they are misaligned11. Consistent with this intuition, in our stimulation experiments, flies increased their forward walking velocity when their heading and predicted goal angles were aligned (Extended Data Fig. 4k). Overall, these stimulation experiments provide further evidence that FC2 neurons can communicate a goal angle in allocentric coordinates to downstream neurons to guide behaviour.
Feedback inhibition in FC2 cells
Stimulating FC2 neurons in specific columns of the fan-shaped body led to a decrease of calcium signal in non-stimulated columns (Extended Data Fig. 4c). The further away an FC2 column was from the stimulation site, the larger was its decrease in activity (Extended Data Fig. 4d). This result suggests that active FC2 cells inhibit less active FC2 cells, perhaps for the purpose of promoting that only a single bump of activity, or a single goal angle, exists in the neuronal population at any one time.
Conjunctive tuning to heading and goal angles
Given that EPG and FC2 cells have activity associated with the fly’s heading and goal angles, respectively, we next explored how these two signals might be compared to guide locomotion. Early theoretical work presciently suggested how heading and goal angles, encoded in arrays of neurons, could be read out to generate a turning signal25 and, more recently, how the array-like anatomy of the central-complex could implement a heading to goal comparison16. In Drosophila, it has been specifically suggested that PFL3 cells12,24,43, a columnar cell class with compelling anatomy, might function to compare goal and heading signals to guide turns12,24,26–28.
PFL3 cells receive the bulk of their synaptic input in the protocerebral bridge and fan-shaped body, and express the bulk of their synaptic output in the lateral accessory lobes (LALs)12,13, which symmetrically flank the central complex (Fig. 3a). In the bridge, PFL3 cells are postsynaptic to EPG cells12,13, from which they can receive signals related to the fly’s heading angle (Extended Data Fig. 5a–c). The majority of their inputs in the bridge, however, come from a set of local interneurons called ∆7 cells, which disynaptically connect EPG cells to PFL3 cells12,13 (Extended Data Fig. 5a,d–g). The ∆7 cells could shape the heading tuning of PFL3 cells in subtle but important ways4,12. PFL3 cells also receive strong synaptic input from FC2 neurons in the fan-shaped body12,13 (Extended Data Fig. 5h–k), and thus they could receive goal angle-related information there. Individual PFL3 neurons project to either the left or right LAL where they synapse onto descending neurons (that is, neurons connecting the brain to the ventral nerve cord) involved in steering behaviour12,13,24. We will define ‘left’ and ‘right’ PFL3 neurons on the basis of the side of the LAL to which a given neuron projects (which is typically, but not always, opposite to the side of their innervation in the bridge). PFL3 neurons thus seem perfectly poised to compare heading inputs in the bridge with goal inputs in the fan-shaped body to affect steering signals in the LAL.
To test whether PFL3 neurons combine heading- and goal-related information, we conducted whole-cell patch-clamp recordings from these cells while flies performed menotaxis (Fig. 3b and Extended Data Figs. 1f,g and 6a–c). We interspersed ±90° virtual rotations (Fig. 3b, red arrow), using the same virtual reality environment and protocol as in our imaging experiments. We identified many menotaxis bouts in these data, which enabled us to assign a behavioural goal angle—defined as the fly’s mean heading angle during a menotaxis bout—to all analysed moments in a trajectory (Extended Data Fig. 2a–f and Methods).
Analysing full recording sessions (which could be up to 2 h long), we generated membrane potential (Vm) and spike-rate tuning curves to the fly’s heading. Both the Vm and the spike rate of PFL3 neurons were strongly tuned to heading, with different cells showing different preferred heading directions (Fig. 3c and Extended Data Fig. 6d,e). The Vm tuning curves, in particular, were sinusoidally shaped (Fig. 3d, Extended Data Fig. 6d). These results are consistent with PFL3 neurons receiving heading input from EPG and ∆7 neurons in the bridge.
To test whether the activity of PFL3 neurons also depends on the fly’s goal angle, we re-plotted the heading-tuning curves of PFL3 neurons parsed by the fly’s goal angle (Fig. 3 and Extended Data Fig. 7). For similar heading directions, the spiking activity of PFL3 neurons varied markedly depending on the fly’s goal. Specifically, the spike-rate tuning curves to heading from left PFL3 neurons had strongly reduced amplitudes when the fly’s goal was to the right of the cell’s preferred heading direction (Fig. 3e and Extended Data Fig. 7a). Because individual flies typically adopted only a few goal angles during an experiment, we averaged the tuning curves across all flies and cells to generate a population-averaged estimate for how the goal angle modulates heading tuning in PFL3 neurons (Fig. 3f). On average, left PFL3 neurons expressed tuning curves of largest amplitude when the fly’s goal was approximately 50° to 70° to the left of the cell’s preferred heading direction (Fig. 3f), and we observed the opposite trend in right PFL3 neurons (Extended Data Fig. 7b, bottom). This goal-dependent modulation was not trivially explained by the fact that flies regulate their forward and turning velocities as a function of their heading relative to goal angle34 alongside the activity of PFL3 neurons correlating with these variables (Extended Data Fig. 8).
A model for single-cell PFL3 responses
The conjunctive tuning of PFL3 neurons to heading and goal angles (Fig. 3f), along with the shape of the spike-rate versus Vm curve (Extended Data Fig. 9c), enabled us to formulate a model of the single-cell tuning properties of PFL3 neurons (Extended Data Fig. 9a,d and Methods). Specifically, we modelled the PFL3 spike rate as a nonlinear function of the sum of two sinusoids. One sinusoid represents the EPG and ∆7 input in the bridge, which is expected4 and observed to show sinusoidal tuning to heading (Fig. 3d and Extended Data Fig. 6d)4. The second sinusoid represents the goal input in the fan-shaped body, which also appears to be sinusoidal (Extended Data Fig. 9d). We thus modelled the activity of a single PFL3 neuron as , where H is the fly’s heading angle, G is the goal angle, and Hpref and Gpref are the preferred heading and goal angles, respectively, for the PFL3 cell being modelled. The parameter d accounts for the relative strengths of the heading- and goal-dependent inputs. The form of the nonlinear function f was obtained from the firing rate versus Vm curves of actual PFL3 neurons (Extended Data Fig. 9b,c and Methods). We fit this model to the data in Fig. 3f. Because the curves in this figure have been shifted by the preferred heading angle Hpref, the fit only depends on the difference Gpref − Hpref, which is approximated as being the same for all cells, and on d and the three parameters describing the function f (Methods). This model captures the heading and goal dependences of spike-rate tuning curves from PFL3 cells quite well (Fig. 3f, R2 = 0.95).
A circuit model for goal-directed steering
To gain intuition for how PFL3 neurons with the above single-cell properties could direct turning toward a goal, we consider a scenario consisting of two PFL3 neurons (one left and one right) that project to a common fan-shaped body column. Because these two cells receive shared inputs in the fan-shaped body (Extended Data Fig. 5j,k), any differences in their activity would be determined entirely by their heading input from the bridge, which is expected to be different because their preferred heading directions are offset from one another (Fig. 4a, red and blue arrows). If the fly’s heading is aligned with the right cell’s preferred heading angle, the activity of the right cell will be greater than that of the left cell. This would create an asymmetry in the left and right LAL activity appropriate for directing a rightward turn (Fig. 4a, bottom). The opposite would be true if the fly were aligned with left cell’s preferred heading. In this simple scenario, a fly would orient along a fixed angle, midway between the preferred heading angles of the left/right pair (purple arrow). However, with only two PFL3 neurons at its disposal, a fly would be limited to a single, inflexible goal angle. This limitation is removed by considering a model of the full PFL3 population.
The model of the full PFL3 population is based on the single-cell fit described in the above section, but rather than fitting the difference in preferred heading and goal angles, Hpref and Gpref, we determined these angles separately and independently for each PFL3 cell on the basis of connectomics data12,13 (Fig. 4b). All other parameters (d and the parameter describing f) are taken from the fit in Fig. 3f. As in the two-cell scenario described in the previous paragraph, each fan-shaped body column is innervated by two PFL3 neurons, one projecting an axon to the right LAL and the other projecting to the left LAL. Critically, pairs of PFL3 neurons that innervate the same column in the fan-shaped body receive inputs from different glomeruli in the protocerebral bridge (Fig. 4b). Each bridge glomerulus can be assigned an angle based on the direction the fly would be heading if the EPG or ∆7 bumps expressed their maximum activity within that glomerulus4 (Fig. 4b, grey arrows and Extended Data Fig. 5a–f). The preferred heading angles of PFL3 neurons can be inferred from these bridge angles on the basis of PFL3 projections from the bridge to the fan-shaped body (red and blue angles in Fig. 4b and Extended Data Fig. 5g). The preferred goal angles are obtained by dividing the full 360° spanned by the columns of the fan-shaped body into twelve equally spaced values (Fig. 4b, purple arrows). We divided the fan-shaped body into twelve columns based on anatomical considerations described in Extended Data Fig. 5k. Collectively, this anatomy results in an array of twelve left/right PFL3 pairs with preferred heading and preferred goal angles that span azimuthal space (Methods).
The full model operates in a manner that is a generalization of our description of Fig. 4a; its operation for three different heading-goal relationships is shown in Fig. 4c–e. When the heading and goal angles align (Fig. 4d), the activity of left and right PFL3 cells does not match within every column, but it does match overall. As a result, the left and right LAL signals, which are given by sums over all of the left or right PFL3 neurons, are equal (Fig. 4d). We assume that the turning signal generated by the PFL3 cells is the difference between the right and left LAL activities. Thus, when the heading and the goal align, there is no net turning signal. If the fly is headed to the right of the same goal (Fig. 4c), the goal input does not change from the previous example, but the heading signal does. This breaks the left/right balance, making the total activity of the left PFL3 cells greater than that of the right PFL3 cells. The resulting imbalance in the left and right LAL signals then generates a turn signal to the left. Conversely, if the goal direction changes (Fig. 4e), the change in the goal signal breaks the balance, resulting, in this case, in greater total right than left PFL3 activity in the LAL, producing a rightward turning signal.
Our model predicts the summed PFL3 activity in the left and right LALs as a function of the fly’s heading relative to its goal angle (Fig. 4f, red and blue curves). The difference between these two signals corresponds to a steering signal that we expect flies to use in stabilizing their trajectory during menotaxis (Fig. 4f, black curve). This predicted turning signal has a sinusoidal shape—a feature also seen in previous modelling studies16,24,26,28—in close agreement with past behavioural measurements in menotaxis11. The predicted turning signal also explained the behavioural data herein; for example, when we used the experimentally measured FC2 bump as the goal input to the model—while synthesizing a heading input using the bar position—we observed a good correspondence between the sinusoidal turning signal predicted by the model and the observed turning behaviour of flies (Extended Data Fig. 9g–j).
If the difference between the right and left summed LAL activities controls turning, the fly will maintain a heading defined by the angle where the turning signal is zero and its slope is negative (the zero crossing at the centre of the bottom panel in Fig. 4f). In the model, we find that this ‘zero’ heading direction is exactly equal to the goal angle, on average, and has a standard deviation of only 0.06° across the full range of goal directions (Extended Data Fig. 9f). The extreme accuracy of this turning signal, which is also evident in previous modelling studies16,24,26,28, is the result of symmetries in the preferred PFL3 heading and goal angles extracted from the connectome (Supplementary Discussion).
PFL3 physiology supports the model
To test the predictions of the model, we performed two-photon calcium imaging of the axon terminals of PFL3 neurons in the right and left LALs (Fig. 5a). Transient increases in the right-minus-left GCaMP signal were, on average, followed by an increase in rightward turning (with around 100 ms latency) and vice versa (Fig. 5b,c), as expected if a LAL asymmetry in PFL3 activity acts to promote turning in the appropriate direction. Note that these asymmetries, while preceding corrective turns toward the goal, generally trailed the flies’ heading relative to goal by around 200 ms (Extended Data Fig. 10a). Because there is a delay of approximately 200 ms between when a fly changes its heading and when that change is registered by the EPG calcium signal in the protocerebral bridge34 (Extended Data Fig. 3b), this latency provides additional support for a bridge-driven input to PFL3 cells inducing their asymmetric signals in the LAL and thus corrective behaviour.
To further test the model, we plotted the PFL3 GCaMP activity in the left and right LAL, separately, as well as the difference between these two signals, as a function of the fly’s heading relative to the goal. The left and right PFL3 curves (Fig. 5d, top two rows)—which peaked at headings approximately ±70° from the fly’s goal—alongside the difference between these two signals (the turning curve; Fig. 5d, bottom row), matched our expectations from the model (Fig. 4f); the shapes of the model curves are quite close to those of the data curves, although there are small shifts between them along the horizontal axis (Extended Data Fig. 9e).
To test whether experimentally activating PFL3 cells in the LAL could cause flies to turn, we optogenetically stimulated either the left or right LAL of flies that co-expressed CsChrimson and jGCaMP7f in PFL3 neurons (Fig. 5e). Co-expressing GCaMP in the same cells allowed us to calibrate our stimulation levels to elicit a desired level of GCaMP signal. We observed an increase in ipsilateral turning during the 2-s stimulation period, which was not observed in control flies that did not express CsChrimson (Fig. 5f–h). In addition, when we performed the same experiment with PFL1 neurons12,31,43—a morphologically similar cell type with different connectivity12,13—we did not observe an increase in turning velocity during stimulation (Fig. 5g,h), even though the LAL GCaMP signal indicated that PFL1 neurons were strongly activated during these experiments. The result for PFL1 neurons shows that ipsilateral turning is not an inevitable outcome of strong asymmetric stimulation of any cell class in the LAL. On a minority of trials (8%), stimulating PFL3 neurons did not elicit ipsilateral turning despite the fact that we measured a higher fluorescence signal on the side of the LAL that we stimulated (Extended Data Fig. 10b–d). This result suggests that the effect of PFL3 activity on locomotor behaviour may be probabilistic and gated by downstream signals.
PFL3 silencing and navigational behaviour
As a final test of the model, we sought to assess the impact of impairing PFL3 synaptic activity on navigational behaviour. Our split-Gal4 lines enabled us to target only a subset of the 24 PFL3 cells12,44 in the Drosophila brain (Extended Data Fig. 1d–i and Methods). As a result, we did not expect strong behavioural effects in menotaxis because the unimpaired PFL3 cells could allow individuals to stabilize a subset of goal angles in this task. To get flies to use a variety of angles, we developed a new navigational memory task in which head-fixed flies could be conditioned to orient along multiple goal angles chosen by the experimenter. We reasoned that challenging individual flies to orient along many goal angles could expose an otherwise latent behavioural deficit in flies with only a subset of PFL3 cells silenced. The behavioural paradigm that we developed makes use of a set of airflow tubes around the fly, which can deliver air to the animal from any direction around the yaw axis45 (Fig. 6a). By rotating the air direction in closed loop with the fly’s turns on the ball, this system simulated wind arriving from a consistent allocentric angle in the world (for example, from the west) (Fig. 6b). The bar on the LED display also rotated in closed loop with the fly’s turns, in lockstep with the wind but with a fixed, experimentally imposed offset between the two stimuli.
Flies began each trial with only the closed-loop bar present, as in menotaxis. Subsequently, closed-loop airflow came on for 30 s (Fig. 6c) and flies reliably oriented upwind in this 30 s period (that is, performed anemotaxis46,47) (Fig. 6d,e). After the airflow was turned off, we virtually rotated the flies 180° by instantaneously jumping the bar 180° on the LED arena. After this bar jump, flies typically reoriented themselves to the just-experienced upwind direction (Fig. 6d,e). That is, they actively repositioned the bar to the same general angle in the arena as it was located in the 30-s ‘during wind’ period. Flies could stabilize multiple different heading angles in the ‘after wind’ period, sometimes even tracking all six prior wind directions that were tested over the course of the experiment (Fig. 6g,h). In control experiments in which the airflow was kept at zero throughout, we observed no directional preference toward the zero-flow wind direction (Extended Data Fig. 11a).
To quantify performance on this task, we computed the absolute difference between the flies’ heading angle and the wind direction (from the wind-on period) at every timepoint (Extended Data Fig. 11b). The difference between heading and wind angles during a 30 s window, starting 5 s after the wind turned off—which we refer to as the test period—decreased with repeated exposure to the same wind direction in a three-trial block (Fig. 6f and Extended Data Fig. 11c). We therefore analysed the second and third trial of each block in subsequent analyses. As additional metrics of the flies’ performance, we computed a standard performance index (Extended Data Fig. 11d and Methods) and also the absolute value of the difference between the fly’s mean heading during the test period and the previously experienced wind direction, which we refer to as the fly’s wind-direction error (Fig. 6j).
To assess whether effective performance in this task relies on the EPG heading signal, we expressed in EPG cells the dominant-negative temperature-sensitive dynamin mutant shibirets48. EPG>shibirets flies oriented upwind when the airflow was on (Fig. 6i), consistent with the hypothesis that an allocentric sense of heading is not required for basic anemotaxis28. However, after the airflow was turned off, EPG>shibirets flies did not orient in the previously experienced upwind direction (Fig. 6j), suggesting that learning and/or expressing a learned goal direction in this task requires an intact heading system. We interpret these results to mean that flies formed a memory of the allocentric heading or wind angle during the wind period, and that they used this memory as a goal angle to guide navigation for several minutes after the wind disappeared.
Using our split-Gal4 driver line (57C10-AD ∩ VT037220-DBD), we then tested for the behavioural effects of expressing in PFL3 neurons either shibirets or the tetanus toxin light chain49 (TNT), which cleaves synaptobrevin and also disrupts synaptic transmission. We found that PFL3>TNT flies had a larger wind-direction error during the test period than control flies expressing an inactive form of TNT (Fig. 6j and Extended Data Fig. 11g). In addition, PFL3>TNT flies, on average, oriented along fewer correct directions in the test period compared with control flies (Fig. 6k). We found similar but weaker trends when comparing PFL3>shibirets flies with control flies in which the PFL3 split-Gal4 driver line was replaced by an ‘empty’ split-Gal4 driver, or when using a different split-Gal4 driver line (27E08-AD ∩ VT037220-DBD) to drive TNT expression in PFL3 neurons (Extended Data Fig. 11d–f). The small reduction in the number of goal directions stabilized in silenced flies (0.55 to 1.33 fewer directions) comports with the magnitude of the effect expected from model simulations in which 7–17 PFL3 cells are silenced (Extended Data Fig. 11h). This number is in line with the number of PFL3 cells we estimated to have targeted for silencing in experimental flies, by visual inspection of TNT antibody labelling (10 ± 1.6 cells per brain, Extended Data Fig. 11i,j and Methods).
Discussion
When performing behaviours such as phototaxis or anemotaxis, sensorimotor transformations within an egocentric reference frame are often sufficient: if light or wind is perceived on the left, turn left. However, if an animal wishes to orient toward a remembered direction or location in the environment, the underlying computations are simpler if the animal employs a common allocentric reference frame for signalling variables of interest. Past work has shown that EPG signalling and downstream computations that are reliant on EPG signalling operate within an allocentric reference frame2,4,5,11. The fact that silencing EPG neurons prevents flies from performing our wind-induced angular memory task suggests that flies store angular memories in allocentric coordinates, consistent with results from menotaxis experiments11,37 and from a visually guided operant-learning task26.
Once a fly has formed an allocentric angular memory, this memory needs to be transformed into a goal signal that guides behaviour. Past work has described allocentric signals in the fly central complex related to the fly’s current state (that is, the heading or travelling angles); here, we describe the FC2 activity bump, which signals a desired state, or goal direction, in the same coordinate frame. Whereas our results support the hypothesis that FC2 neurons communicate an angular goal to downstream circuits, the FC2 calcium signal need not store the fly’s goal. Indeed, during menotaxis, we noticed moments in which the FC2 bump signal drifted in the fan-shaped body even though the fly’s goal on a longer timescale appeared unchanged (Extended Data Fig. 3h, teal arrow). The goal memory could be stored in a set of synaptic weights to the FC2 system26 or in a latent molecular signal within the FC2 population, for example, neither of which would necessarily be reflected in FC2 calcium.
For the central complex to control behaviour, allocentric signals need to be converted to egocentric signals that are appropriate for the motor system. Our work provides a physiological account for how PFL3 neurons accomplish this coordinate transformation. Mathematically, the PFL3 circuit can be considered to be projecting a vector that encodes the fly’s allocentric goal angle—signalled by the position of the FC2 bump in the fan-shaped body—onto two axes linked to the fly’s heading direction (Extended Data Fig. 12). One axis represents the fly’s heading angle rotated clockwise and the second axis represents the fly’s heading angle rotated anticlockwise by the same amount. The difference between the projections of the goal vector onto these axes indicates how much and in which direction the fly should turn to orient itself toward the goal angle.
In addition to controlling their heading angle by turning left or right, flies need to control their forward walking velocity on the basis of whether their heading is aligned with their goal11. It has been suggested that PFL2 neurons, a sister cell type to PFL3 neurons, could serve this function because individual PFL2 neurons receive similar heading and goal inputs as individual PFL3 cells in the central complex while sending bilaterally symmetric output projections to the left and right LAL12,26,28. The accompanying article provides experimental evidence that PFL2 activity drives increases in rotational speed and decreases in forward velocity when flies are oriented far from their goal angle50. Given that FC2 neurons provide synaptic input to PFL2 neurons12 and that flies regulate their forward walking velocity on the basis of whether their heading is aligned with their FC2-defined goal angle (Extended Data Fig. 4k), it is possible that the FC2 bump also functions as a goal signal for this second heading-vs-goal comparison26.
Studies in mammals have identified neurons that track an animal’s egocentric bearing to a point in space, an object in the local environment or a goal location7–10. For instance, there are neurons in the bat hippocampus that fire maximally when a landing perch is at a specific angle relative to the bat’s current heading7. Analogous to the bat neurons, the summed population activity of PFL3 neurons in the left or right LAL is tuned to a specific heading angle relative to the fly’s goal (Fig. 5d, red and blue curves). This observation suggests that the circuit computations implemented by the PFL3 system may ultimately have analogies in the mammalian brain.
Although our experiments were limited to tasks that require flies to determine in which direction to walk but not necessarily how far, we speculate that the FC2–PFL3 circuit also functions to regulate turning when an insect is navigating towards a 2D location in space. Using a purely angular, rather than a full vectorial (angle and distance), comparison as the final step in deciding whether to turn right or left might be a general principle used in many navigational behaviours.
Methods
Fly husbandry
Drosophila melanogaster flies were raised at 25 °C on a 12-h light:dark cycle. All physiological and behavioural experiments were performed on 1- to 4-day-old female flies. For optogenetic experiments, experimental and control crosses were kept in a box with a blue gel filter (Tokyo Blue, Rosco) as a cover—to minimize exposure to light within the excitation spectrum of CsChrimson while also not keeping the flies in complete darkness; eclosed flies from such experiments were placed onto food containing 400 µM all-trans retinal for at least one day.
Fly genotypes
To image EPG neurons during menotaxis experiments (Fig. 1 and Extended Data Fig. 3), we used +/−; +/+; UAS-GCaMP7f/60D05-Gal4 or +; UAS-tdTomato/+; UAS-GCaMP7f/60D05-Gal4.
To image FC2 neurons during menotaxis experiments (Fig. 1 and Extended Data Fig. 3), we used either +; VT065306-AD/+; VT029306-DBD/UAS-GCaMP7f or +; VT065306-AD/UAS-tdTomato; VT029306-DBD/UAS-sytGCaMP7f.
To stimulate FC2 neurons while imaging (Fig. 2 and Extended Data Fig. 4) we used +; VT065306-AD/UAS-CsChrimson-tdTomato; VT029306-DBD/UAS-sytGCaMP7f. For control flies we used +; VT065306-AD/UAS-tdTomato; VT029306-DBD/UAS-sytGCaMP7f.
To label PFL3 neurons for patch-clamp experiments (Fig. 3 and Extended Data Figs. 6–9) we used +; VT000355-AD/UAS-2xeGFP; VT037220-DBD/+.
To label PFL3 neurons for calcium imaging only (Fig. 5a–d and Extended Data Figs. 9i and 10a) we used +; 57C10-AD/UAS-tdTomato; VT037220-DBD/UAS-GCaMP7f.
To stimulate PFL3 neurons while imaging (Fig. 5e–h and Extended Data Fig. 10b–d) we used +; VT000355-AD/UAS-GCaMP7f; VT037220-DBD/UAS-CsChrimson-tdTomato. For control flies we used +; VT000355-AD/UAS-tdTomato; VT037220-DBD/UAS-GCaMP7f (Fig. 5g,h).
To stimulate PFL1 neurons while imaging (Fig. 5g,h) we used +/−; VT000454-AD/ UAS-GCaMP7f; VT001980-GAL4/UAS-CsChrimson-tdTomato.
To characterize the expression pattern of VT065306-AD; VT029306-DBD (Extended Data Fig. 1a,b), 57C10-AD; VT037220-DBD (Extended Data Fig. 1d,e), VT00355-AD; VT037220-DBD (Extended Data Fig. 1f,g) and 27E08-AD; VT037220-DBD (Extended Data Fig. 1h,i) we crossed each of these lines to UAS-RedStinger; UAS-mCD8-GFP.
For multicolour flip-out of VT065306-AD; VT029306-DBD we used hs-FLPG5.PEST (Extended Data Fig. 1c).
To express shibirets in PFL3 neurons, during the wind-induced angular memory task, we used +; 57C10-AD/+; VT037220-DBD/UAS-shibirets (Extended Data Fig. 11). To express shibirets in EPG neurons we used +/−; 60D05-Gal4/+; UAS-shibirets/+ (Fig. 6 and Extended Data Fig. 11). For control flies we used +/−; empty-AD/+; empty-DBD/UAS-shibirets, which were also used for ‘no wind’ control experiments (Fig. 6 and Extended Data Fig. 11).
To express TNT in PFL3 neurons, during the wind-induced angular memory task, we used either +; 57C10-AD/UAS-TNT(E); VT037220-DBD/+ (Fig. 6 and Extended Data Fig. 11) or +; 27E08-AD/UAS-TNT(E); VT037220-DBD/+ (Extended Data Fig. 11). For control flies we used +; 57C10-AD/UAS-TNT(Q); VT037220-DBD/+ (Fig. 6 and Extended Data Fig. 11) and +; 27E08-AD/UAS-TNT(Q); VT037220-DBD/+ (Extended Data Fig. 11).
Origins of fly stocks
We obtained the following stocks from the Bloomington Drosophila Stock Center (BDSC), the Janelia FlyLight Split-Gal4 Driver Collection or from other laboratories: VT000454-p65AD; VT001980-GAL4.DBD (SS02239)51, VT000355-p65AD (attP40)51, 57C10-p65AD (attP40) (BDSC 70746), VT037220-Gal4.DBD (attP2) (BDSC 72714), R60D05-Gal4 (attP2) (BDSC 39247), empty-AD; empty-DBD (BDSC 79603), 27E08-p65AD (BDSC 70048), UAS-2xeGFP (Dickinson laboratory), 20XUAS-IVS-jGCaMP7f (VK05) (BDSC 79031), 20XUAS-IVS-jGCaMP7f (su(Hw)attP5) (BDSC 80906), 10XUAS-sytGCaMP7f (attP2) (BDSC 94619), UAS-tdTomato (attP40) (BDSC 32222), UAS-CsChrimson-tdTomato (VK22) and UAS-CsChrimson-tdTomato (VK05) (gifts from D. Anderson, B. Pfeiffer and G. Rubin), UAS-mCD8-GFP (attP2) (BDSC 32194), UAS-RedStinger (attP40) (BDSC 8546), hs-FLPG5.PEST (BDSC 64085), pJFRC99-20XUAS-IVS-Syn21-Shibire-ts1-p10 (VK00005) (gift from G. Rubin), UAS-TNT(E) (BDSC 28837) and UAS-TNT(Q) (BDSC 28839).
Generation of genetic driver lines and immunohistochemistry
To generate split-Gal4 lines targeting FC2 and PFL3 neurons, we used the Fiji plugin Color MIP tool52 and NeuronBridge53 to find suitable pairs of hemi-driver lines. We validated that the split-Gal4 lines generated target the cells of interest by means of immunohistochemistry (Extended Data Figs. 1 and 11i,j).
We dissected the brains and incubated them in either 2% paraformaldehyde (PFA) for 55 min at room temperature or in 1% PFA overnight at 4 °C. We blocked and de-gassed brains in a blocking solution consisting of 5% normal goat serum (NGS) in 0.5% Triton X-100, phosphate buffered saline (PBT).
For GFP and RedStinger labelling experiments (Extended Data Fig. 1a,b,d–i), we used a primary antibody solution of 1:100 chicken anti-GFP (Rockland, 600-901-215), 1:500 rabbit anti-dsRed (Takara 632496) and 1:10 mouse anti-Bruchpilot (nc82, DSHB) in 5% NGS/PBT and a secondary antibody solution consisting of 1:800 goat anti-chicken:Alexa Fluor 488 (Invitrogen A11039), 1:400 goat anti-rabbit: Alexa Fluor 594 (Invitrogen A11037) and 1:400 goat anti-mouse:Alexa Fluor 633 (Invitrogen A21052) in 5% NGS/PBT. For TNT (Extended Data Fig. 11i,j) we used a primary solution of 1:1,000 rabbit anti-TNT (Cedarlane, 65873(SS)) and a secondary solution of 1:800 goat anti-rabbit:AlexaFluor 488 (Invitrogen A11034).
For heat-shock multicolour flip-out experiments54 (Extended Data Fig. 1c), we used a primary antibody solution of 1:300 rabbit anti-HA tag (Cell Signaling 3724S), 1:200 rat anti-Flag tag (Novus NBP1-06712) and 1:10 mouse anti-Bruchpilot in 5% NGS/PBT. The secondary antibody solution used was 1:500 donkey anti-rabbit:Alexa Fluor 594 (Jackson Immuno Research 711-585-152), 1:500 donkey anti-rat:Alexa Fluor 647 (Jackson Immuno Research 712-605-153) and 1:400 goat anti-mouse:Alexa Fluor 488 (Invitrogen A11029) in 5% NGS/PBT, followed by a tertiary antibody solution of 1:500 DyLight 550 anti-V5 Tag (AbD Serotec MCA1360D550GA) in 5% normal mouse serum PBT.
For visualizing biocytin-labelled neurons after patch-clamp experiments (Extended Data Fig. 6a), the primary antibody solution we used was 1:10 mouse anti-nc82 in 1% NGS/PBT and the secondary antibody solution was 1:800 goat anti-mouse:Alexa Fluor 488 and 1:1,000 streptavidin:Alexa Fluor 568 (Invitrogen S11226) in 5% NGS/PBT.
Brains were mounted in Vectashield and images were acquired using a Zeiss LSM780 confocal microscope with a 40×/1.20 NA water-immersion objective or a 10× air objective.
Estimating the number of PFL3 cells targeted for silencing
To estimate how many PFL3 cells were targeted by our split-Gal4 lines in the neuronal silencing experiments of Fig. 6 and Extended Data Fig. 11a-h, we stained for expression of TNT in the brains of 23 flies (57C10-AD ∩ VT037220-DBD: 12 brains, 27E08-AD ∩ VT037220-DBD: 11 brains) (Extended Data Fig. 11i–j) that had the exact genotype used in those behavioural experiments. Because the other cell types that are targeted by the split-Gal4 line, like PEG cells, have somas that are spatially intermingled with those of PFL3 cells, we could not simply count the number cell bodies in the dorsal part of the brain to determine the number of PFL3 cells targeted by TNT in each fly. We instead visually inspected the anatomical z-stacks and estimated the number of discernible neurites that projected from the fan-shaped body to each side of the LAL. This approach yielded, on average, an estimate of approximately 10 PFL3 cells targeted by TNT in each brain (57C10-AD ∩ VT037220-DBD: 9.65 ± 1.68, 27E08-AD ∩ VT037220-DBD: 9.89 ± 1.51, mean ± s.d.).
Fly tethering and preparation
We glued flies to custom holders that allowed for physiological measurements from the brain, under a saline bath, while the body remained dry and capable of executing tethered locomotor behaviour, as described previously33,34. When imaging neuronal activity in the protocerebral bridge or performing electrophysiology, we tilted the fly’s head down such that the brain was viewed from the posterior side. When imaging neuronal activity in the LALs or the fan-shaped body, the fly’s head was not tilted and the brain was viewed from the dorsal side. Glue was added at the junction of the fly’s thorax and wings (that is, around the scutellum) to prevent tethered flight and the proboscis was glued to the head to minimize brain motion associated with large proboscis movements. Brains were exposed by cutting and removing a small piece of cuticle with a 30-gauge syringe needle followed by removal of trachea and fat cells overlying the brain with forceps.
For closed-loop wind experiments, in which physiology was not performed simultaneously, we pin-tethered flies to a tungsten pin. Glue was added between the head and the thorax to prevent head movements. Glue was also added around the scutellum, to glue the wings to the thorax, to prevent tethered flight.
A previous study11 noted that wild-type flies typically perform menotaxis behaviour when food deprived for 8–16 h and heated to 34 °C. In the present study, we noticed that for some genotypes, the same level of food deprivation would yield unhealthy flies. As such, we opted for a shorter period of food deprivation for most experiments. We typically performed experiments at least 3 h after tethering flies. During this interval, we kept tethered flies inside a box with a wet piece of tissue paper to prevent desiccation. For FC2 stimulation experiments, we placed flies on plain agarose roughly 14 h before tethering. In all plate-tethered experiments, we heated the tethered fly by perfusing 26–30 °C saline over the fly’s head using a closed-loop temperature control system (Warner Instruments, CL-100). For pin-tethered experiments, we heated flies using a 980 nm infrared diode laser (RLDH980-200-3, Roithner). The intensity of the laser was controlled via pulse-width modulation in closed loop with a temperature reading from a thermal camera image (C2, Teledyne FLIR). The temperature set point was assigned to be 32 °C for TNT experiments and 35 °C for shibirets experiments.
Virtual reality setup
For both two-photon calcium imaging and patch-clamp experiments, we placed flies in a virtual reality setup described previously34. In brief, tethered flies were positioned over an air-cushioned foam ball2,34 (Last-A-Foam FR-4618, General Plastics) that had a diameter of 8 mm. The ball’s movements were visualized with a Chameleon CM3-U3-13Y3M (Teledyne FLIR) camera, whose 3D pose was tracked at 50 Hz using FicTrac55. We used a cylindrical LED display that spanned 270° of angular space around the fly35. In all experiments, the fly’s yaw rotations on the ball controlled the position of an 11°-wide vertical blue bar34. We covered the arena with sheets of blue gel filter (Tokyo Blue, Rosco) in order to prevent blue light bleed-through into the photomultiplier tubes. In patch-clamp experiments, we placed a steel mesh in front of the arena to electrically shield the headstage, as well as a nylon mesh to minimize reflections.
For closed-loop wind experiments, we used a similar virtual reality setup, but with the addition of a device that could deliver wind from 36 directions around the yaw axis, first described in ref. 45. The design of this device took inspiration from past wind-delivery devices for Drosophila56–59. In brief, the wind device consisted of two separate parts: a circular manifold surrounding the fly and a rotating spigot, which could deliver wind to the tubes in the manifold. The rotating spigot was placed outside the LED arena. Both components were assembled from a set of custom 3D printed parts (PolyJet plastic). The circular manifold had 36 equally spaced openings and these were connected to the rotating spigot via 36 transparent plastic tubes (internal diameter 1/16 inch, Tygon E-3603, Saint-Gobain). The spigot received pressurized, filtered, air from the wall, whose flow rate was regulated by a mass flow controller (Alicat Scientific). A stepper motor was used to rotate the spigot, thereby changing which tubes in the manifold expelled air. Because the spigot’s nozzle was 20° wide, it spanned two to three openings at any one time. The position of the spigot was controlled in closed loop with the yaw rotations of the ball using the same controller system used to update the position of the vertical blue bar on the LED arena. Importantly, because the airflow tubes were fixed in place, wind rotating around the fly did not present a confounding visual stimulus. The flow controller was used to turn the air on and off over the course of an experiment. During the ‘wind period’, the airflow entering the spigot was set to 1 standard litre per minute (slpm), except for no wind control experiments in which the airflow was set to 0 slpm. For these experiments, data were collected on two separate rigs that were constructed to be as identical as possible.
Calcium imaging
We performed two-photon calcium imaging as described34, with certain changes indicated below. We used a Scientifica Hyperscope and a Chameleon Ultra II Ti:Sapphire femtosecond pulsed laser (Coherent) tuned to 925 nm. We performed volumetric imaging, using galvo-galvo mode (Cambridge Technologies MicroMax) to scan the xy plane and a piezo device (PI, P-725.4CA) to move a 16×/0.8 NA objective (Nikon) along the z axis. Emission light was split using a 565 nm dichroic mirror. We used a 500-550 nm bandpass filter for the green signal and a 590–650 nm bandpass filter for the red signal. Emission photons were detected and amplified using GaAsP detectors (Hamamatsu, H10770PA-40). ScanImage60 (2018b) software was used to control the microscope.
For Fig. 5a–d, we used ScanImage’s MultipleROI feature to define two 50 × 50-pixel ROIs for each side of the LAL. We scanned the LAL with two z slices per volume, yielding a volume rate of 9.16 Hz. For Fig. 1, we scanned the protocerebral bridge or the fan-shaped body at 4.95 Hz using a 128 × 64-pixel ROI with 3 z slices. In standard imaging experiments (Figs. 1 and 5a–d), we used a laser power of ~25 mW (measured after the objective). Imaging recordings lasted up to 26 min. Occasionally, the fly’s brain would slowly sink over the course of a recording. To correct for this motion, we manually adjusted the position of the objective via a microscope-stage motor during the recording.
Optogenetic stimulation during imaging
We used the same two-photon light path to image and focally stimulate neurons, using ScanImage’s MultipleROI feature. We defined two ROIs which we refer to as the imaging ROI and the stimulation ROI (Extended Data Fig. 4a). The imaging ROI included the entire structure of interest (LALs or fan-shaped body). We scanned this ROI with a low laser power (10 mW), which did not change throughout the recording. The stimulation ROI was smaller than the imaging ROI. We scanned the stimulation ROI with a higher laser power (50 or 70 mW) and the location of this ROI changed throughout a recording. Within each z slice, we first scanned the imaging ROI and then the stimulation ROI. We only used pixel values from the imaging ROI for the analysis of fluorescence changes. We used a MATLAB script to change the location of the stimulation ROI automatically during an experiment. To register the timing of a change in the location of the stimulation ROI, we recorded the x and y galvo positions over time.
For Fig. 2, we alternated between stimulating one of two positions in the fan-shaped body (referred to as location A and B). When we wished to not stimulate any fan-shaped body location—that is, between trials—we positioned the stimulation ROI to a more anterior position in the brain, which lacked CsChrimson-tdTomato expression (Extended Data Fig. 4b). This approach ensured that the average laser power per volume remained constant throughout the experiment, which is important because flies could show behavioural reactions to changes in illumination intensity. We used a stimulation power of ~50 mW in these experiments. We imaged three z slices and the stimulation ROI existed in all three slices. The acquisition rate was 3.32 Hz. The duty cycle was ~0.67 (the number of pixels in the stimulation ROI divided by the total number of scanned pixels). If we acquired more than one recording per fly, the locations of the stimulation and imaging ROIs were adjusted as needed between recordings.
For Fig. 5e–h, we alternated from stimulating the left or right LAL. Between trials, we moved the stimulation ROI to a location anterior to the LAL that did not have any CsChrimson-tdTomato expression. We used a stimulation power of ~70 mW in these experiments. We used a single z-slice to scan the LAL with an acquisition rate of 4.97 Hz and the duty cycle was ~0.33.
We used a lower laser power in the imaging ROI so as to minimize two-photon excitation of CsChrimson. However, we noticed that during the inter-trial period the FC2 activity sometimes appeared non-physiological. For instance, the middle columns of the fan-shaped body, which are located more superficially, sometimes appeared to be persistently active during the inter-trial period, irrespective of the fly’s behaviour (for example, Fig. 2c). We therefore suspect that at even low laser intensities we might have been optogenetically stimulating neurons to some extent. We therefore did not analyse the fly’s behaviour during inter-trial periods because these were associated with unphysiological activation of the system.
Patch-clamp electrophysiology
We performed patch-clamp experiments as described previously33, with some changes indicated below. We perfused the brain with an extracellular solution61 bubbled with carbogen (95% O2, 5% CO2). The composition of the extracellular solution (in mM) was as follows: 103 NaCl, 3 KCl, 5 TES, 10 trehalose dihydrate, 10 glucose, 2 sucrose, 26 NaHCO3, 1 NaH2PO4, 1.5 CaCl2 and 4 MgCl2 (280 ± 5 mOsm). The composition of the intracellular solution61 (in mM) was as follows: 140 potassium aspartate, 1 KCl, 10 HEPES, 1 EGTA, 0.5 Na3GTP, 4 MgATP (pH 7.3, 265 mOsm). For some recordings the solution also included 13 mM biocytin hydrazide (Invitrogen, B1603) and 20 mM Alexa Fluor 568 (Invitrogen, A10437), which could be used to fill the neuron for subsequent verification of the identity of the cell from which we were recording.
We illuminated the fly’s brain via an 850 nm LED (Thorlabs) coupled to an achromatic lens pair (MAP10100100-A, Thorlabs) that focused the light from the LED onto a small spot on the fly’s head. We used borosilicate patch pipettes (BF150-86-7.5, Sutter Instruments) with resistances of 6-13 MΩ. Recordings were conducted in current-clamp mode (MultiClamp 700B, Molecular Devices) with zero injected current. The voltage signal was low-pass filtered at 4 kHz before sampling at 10 kHz. Plots have been corrected for a 13-mV liquid-liquid junction potential. For recordings in which we included biocytin hydrazide and Alexa Fluor 568 in the intracellular solution, we visualized the recorded, filled cell, by taking a manual z-stack on our epifluorescence patch-clamp microscope while illuminating with a 565 nm LED (pE-100, CoolLED). We also dissected the brain and performed immunohistochemistry, staining for biocytin, to verify the patched cell’s identity and anatomy.
Because the split-Gal4 line that we used for patch-clamp experiments (VT00355-AD ∩ VT037220-DBD) labels both PFL3 and PEG neurons (Extended Data Figs. 1f,g and 6a), we initially verified the cell type identity of all cells to be included in this paper via immunohistochemistry. Three PEG neurons and eight PFL3 neurons were identified by this method. Since recordings of verified PFL3 and PEG neurons were clearly distinguishable by their spike amplitudes and resting potential dynamics (Extended Data Fig. 6a–c), we classified the remaining recordings based on these electrophysiological criteria (7 PEG neurons and 13 PFL3 neurons).
To help categorize a recorded PFL3 neuron as innervating the left or right LAL, we targeted PFL3 cells with somas far from the midline as these PFL3 cells project exclusively to the contralateral LAL. Of the eight PFL3 neurons whose anatomy we verified via immunohistochemistry, all projected to the contralateral LAL. For an additional two PFL3 neurons we were able to verify that they projected contralaterally via the epifluorescence z-stack. We classified the remaining 11 PFL3 neurons based on their soma location. We discarded one recording from a soma located close to the midline since its identity as a left or right PFL3 could not be definitively established.
Because our recordings could approach 2 h in length, we sometimes observed a slow depolarizing drift in the membrane potential over time, accompanied by a decrease in spike size, consistent with a slowly increasing access resistance. We trimmed these recordings by visual inspection to only include the portion in which the membrane potential and spike size were stable. Four cells were discarded as there was no period when these criteria were met. After trimming, the average recording duration was 46 min (ranging from 6 to 120 min).
Experimental structure
In all physiological experiments, we allowed the fly to walk in closed loop with the bar for approximately 5–30 min as we prepared for data collection (that is, during desheathing and seal attempts in patch-clamp measurements or during ROI selection in imaging experiments). This time period gave the fly experience with all possible angular bar positions, which is expected to reinforce the formation of a stable map between the position of the bar on the screen and the EPG heading-estimate in the central complex41,42.
For menotaxis experiments (Figs. 1, 3 and 5a–d), we used bar jumps (that is, virtual rotations of the fly) to periodically assess whether the fly was actively maintaining its heading direction. Bar jumps served the additional role of ensuring that a fly sampled heading angles away from its goal angle, which allowed us to generate tuning curves to heading. Specifically, every 2 min, we instantaneously repositioned the bar by ±90° from its current position. The bar then remained static at this new location for 2 s, after which it returned to being under closed-loop control by the fly. For Figs. 1 and 5a–d each recording included five +90° bar-jump events and five –90° bar-jump events, presented in a random order. We typically collected two recording files from a given fly (a few flies had one or three recordings). In electrophysiology experiments, which could sometimes run as long as 2 h, bar jump events occurred throughout, until the end of an experiment.
For the stimulation experiments in Fig. 2, each recording consisted of five location A and five location B trials, alternating repetitively (that is, not randomized). The stimulation period lasted 30 s and the inter-trial period lasted 60 s. We collected up to two recording files from a given fly.
For the stimulation experiments in Fig. 5e–h, each fly experienced five left and five right LAL stimulation trials, presented in a random order. The stimulation period lasted 2 s and the inter-trial period lasted 30 s. We collected one recording file per fly.
For the wind-induced memory task (Fig. 6), each fly experienced six different allocentric wind directions (that is, the angle of the wind relative to the bar) in blocks of three trials with a constant allocentric wind angle, for a total of eighteen trials. The 6 wind directions we presented were –135°, –90°, –45°, +45°, +90° and +135°. These angles were selected based on two considerations. First, we wished to avoid allocentric wind directions in which the bar would be located in the 90° gap at the back of the LED arena when the fly is oriented upwind (that is, a 180° allocentric wind direction) since without a visual cue flies are expected to have a poorer estimate of their heading angle. Second, we wished to avoid allocentric wind directions in which the bar would be located directly in front of the fly when orienting upwind (that is, a 0° allocentric wind direction) because orienting toward a bar (that is, front-fixation) is not expected to require a heading versus goal comparison in the central complex11,37. Wind directions were presented in one of two orders, either (–135°, –90°, –45°, +45°, +90°, +135°) or (+135°, +90°, +45°, –45°, –90°, –135°), with the exact order chosen randomly for each fly. For each trial, airflow remained on for 30 s and was followed by a 2-s, 180° bar jump after the airflow was turned off. The bar jump ensured that if flies simply kept walking straight after the airflow turned off, this would not lead to a high performance index or indication of angular memory. The inter-trial period, which also included the ‘test’ period where we assessed the flies’ wind-induced heading memory, lasted 60 s. There was a 3-min period in between the end the wind period of the last trial of a wind-direction block and the start of the wind period of the next wind-direction block. We collected one recording file per fly. In preliminary experiments, it seemed that flies formed stronger wind-induced memories of an allocentric direction when the six possible wind directions were presented in a consistent, clockwise or anticlockwise sequence—as was done in the reported experiments—rather than appearing in a completely random sequence. This observation makes ethological sense in that allocentric wind presented from very different directions over time might lead flies to downgrade the relevance of wind, very generally, as a useful stimulus for allocentric navigation.
Data acquisition
All time series data were digitized with a Digidata 1440 A (Molecular Devices) at 10 kHz using the PClamp software suite (Clampex 11.1.0.23 and Axoscope 10.7.03), except two-photon images, which were saved as tiff files using ScanImage at frequencies ranging from ~4-10 Hz, as described above. To align imaging data with behavioural data, we used a voltage signal of the y galvo flyback, which marks the end of an imaging frame, as an alignment point. For each imaging volume, the midpoint between the start of the volume’s first z-slice and the end of its last z-slice was used as its time stamp.
Data analysis
Processing of behavioural data
The yaw, pitch, and roll angles of the ball were sampled at 50 Hz, and aligned to our imaging data files using the ball camera’s trigger signal. We shifted the acquired ball-position data backward in time by 30 ms due to our measured latency between the trigger pulse for acquiring a frame and when FicTrac finished processing the image. For behaviour only closed-loop wind experiments—which did not require aligning behavioural and neuronal data—no camera triggers were used and all signals were downsampled to 50 Hz.
For Figs. 1 and 5b and Extended Data Figs. 3, 4, 8 and 9g,j we used a 500-ms boxcar filter to smooth the forward walking velocity or turning velocity signal. For several analyses we excluded timepoints when the fly was standing still, or nearly still, which we defined as any moment when the fly’s filtered forward walking velocity was ≤1 mm s−1. The fly’s virtual 2D trajectory was computed using the bar position, to estimate the fly’s heading, alongside the sideward and forward ball rotations to estimate the fly’s translational velocity. In Fig. 1, to visualize the relationship between neuronal phases and the fly’s orientation over time, we plotted the position of the bar on the arena (instead of the fly’s heading) since the EPG phase tracks the inverse of the fly’s heading (which is equivalent to the bar position)4. In Fig. 2, we flipped the heading direction x-axis to make it easier to compare with Fig. 1.
Processing of menotaxis behavioural data
To analyse the fly’s menotaxis behaviour, we isolated straight segments (which we call menotaxis bouts) of the fly’s 2D virtual trajectory using the Ramer–Douglas–Peucker algorithm62,63 (Extended Data Fig. 2a–e). This algorithm simplifies a set of x, y coordinates by iteratively reducing the number of points in the trace. The parameter ε determines the maximum allowed distance between the simplified and original trajectories. We then computed the fly’s displacement L for each segment of the simplified trajectory. For all analyses we used ε = 25 mm and only analysed segments with L > 200 mm. In other words, we analysed menotaxis bouts where the fly displaced itself more than 200 mm (roughly equivalent to 70 body lengths), without deviating from its course by more than 25 mm (roughly 8 body lengths). Aside from bar-jump (that is, virtual rotation) experiments (where we used the pre-jump heading angle as the fly’s goal angle) and Extended Data Fig. 10a (see ‘LAL imaging analysis’), we defined the fly’s goal angle as the mean heading angle during each menotaxis bout. For this calculation, we excluded timepoints when the fly was standing still.
The values chosen for parameters ε and L were conservative, in that they tended to break up portions of the fly’s trajectory where one might have considered the fly’s goal to have remained unchanged into smaller bouts. We preferred this bias over the risk of potentially lumping two bouts together, where the fly’s true goal angles might have been different.
To obtain a continuous estimate of the stability of the flies’ heading angle (Extended Data Fig. 3o,p), we computed the flies’ mean heading vector length (R) similarly as described previously11. In brief, each heading sample point was treated as a unit vector. Each timepoint was then assigned a value of R by taking the mean of the heading vectors within a 30, 60 or 120 s window centred on that timepoint. For this calculation, timepoints in which flies were standing still were first omitted (since this would increase the value of R for trivial reasons); trajectories were concatenated across the omitted standing events, such that analysis windows were not necessarily analysing a continuous trace in time.
Processing of imaging data
To correct for motion artefacts, we registered two-photon imaging frames using the CaImAn64 Python package. We defined ROIs for the left and right side of the LAL, the glomeruli of the bridge and columns of the fan-shaped body using a custom graphical user interface written in Python. ROIs were manually drawn using either the time averaged signal or the local correlation image of each z slice. In the case of the fan-shaped body, we used a semi-automated method to define columns as described previously4. In brief, we first defined an ROI including the entire fan-shaped body. This ROI was then subdivided into 16 columns of equal angular size using two lines that defined the lateral edges of the fan-shaped body. For each ROI, we defined ΔF/F0 as equal to (F − F0)/F0, where F is the mean pixel value of an ROI at a single timeframe and F0 is the mean of the lowest 5% of F values.
Neuronal phase analysis
We computed the FC2 phase in the fan-shaped body using a population vector average2,4. We computed the EPG phase in the protocerebral bridge as described previously4,34. For each timepoint, we treated the glomeruli ΔF/F0 in the bridge as a vector of length 16 and took the Fourier transform of this vector. The phase of the Fourier spectrum at a period of 8.5 glomeruli was used as the EPG phase.
To overlay the FC2 or EPG phase with the bar position (Fig. 1 and Extended Data Fig. 3), we subtracted from the phase its mean offset from the bar position. This offset was calculated, for each recording, by taking the mean circular difference between the phase angle and bar angle, excluding timepoints when the bar was in the 90° gap at the back of the arena or when the fly was standing still. In Fig. 1m,n and Extended Data Fig. 3c,d, we nulled the FC2 or EPG phase in the baseline period by subtracting its mean position, 1 s prior to the bar jump, from every sample point. In Fig. 1o and Extended Data Fig. 3e, we calculated the mean of this adjusted phase during the last 1 s of the open-loop period after a bar jump. To combine +90° and –90° bar jumps for analysis, the mean phase in the last 1 s of the open-loop period was multiplied by −1 for −90° jumps.
In Fig. 1m–o, we imposed strict requirements for a bar jump trial to be included in the analysis. First, the bar jump needed to occur during a menotaxis bout (see ‘Processing of menotaxis behavioural data’). Second, we required that the fly return to its previous heading angle following a bar jump —that is, trials when the mean bar position from 5 to 10 s after the start of the bar jump was within 30° from the mean bar position 5 s before the bar jump. Third, the bar needed to jump to a visible position on the arena (rather than the rear 90°, where we had no LED panels). Finally, we only included trials when the FC2 or EPG population vector average amplitude (PVA) (see Extended Data Fig. 3k for a description of how the PVA is computed) was greater than 0.3. These criteria were sensible, in that they selected for trials where we could be confident that the fly’s goals had not drifted and that our neural signal estimates were of high quality. However, they were stringent enough that they led us to analyse only 7% of all trials. In Extended Data Fig. 3c–e, we eliminated the first two of these requirements, leading us to analyse 59% of all trials and the results were generally the same.
We used the corrcc function from the pycircstat python package (https://github.com/circstat/pycircstat) to compute the correlation between the EPG or FC2 phase and the bar position. For this calculation we excluded timepoints when the fly was standing still or when the bar was located in the 90° gap.
In Extended Data Fig. 3f,g, rapid changes in the FC2 phase position were detected by finding peaks in the filtered phase velocity (500-ms boxcar filter) using the SciPy65 function signal.find_peaks. In addition, we required that the FC2 PVA within 1 s from the peak phase velocity was above 0.15 at all timepoints and that the mean PVA during this time was above 0.25. These criteria helped ensure that genuine changes in the FC2 bump position were detected rather than spurious changes in the FC2 phase due to a poorly estimated phase. To overlay all of the detected changes in FC2 phase position, as well as the flies’ heading during these moments (Extended Data Fig. 3g), we aligned traces to the start of the peak in phase velocity. In order to combine traces where the peak in the FC2 phase velocity was either positive or negative, we flipped the FC2 phase for traces where the peak phase velocity was positive.
Neuronal activity bump analysis
In Extended Data Fig. 3l–n,p,q, we used three different metrics to quantify the EPG or FC2 activity/bump at every timepoint: the population vector average amplitude (PVA), the mean ΔF/F0 taken across all column or glomerulus ROIs and the maximum − minimum ΔF/F0 (column or glomerulus ROI with maximum ΔF/F0 minus column or glomerulus ROI with the minimum ΔF/F0). In Extended Data Fig. 3q, for each fly, we binned data points based on the fly’s forward walking velocity or turning velocity and computed the mean FC2 activity/bump metric for each bin. Likewise, in Extended Data Fig. 3p, we binned data points based on the fly’s instantaneous mean heading vector length (see ‘Processing of menotaxis behavioural data’) and computed the mean FC2 activity bump metric for each bin. Timepoints in which flies were standing still (that is, when the mean forward walking speed was below 1 mm s−1) were removed from the time series before performing this analysis because the fly’s mean heading vector length is undefined during standing events.
FC2 stimulation analysis
To compare the effect of columnar stimulation of FC2 neurons across flies, we nulled the heading angle using the following procedure. For each fly, we computed its mean heading during a stimulation A trial, excluding timepoints when the fly was standing still. We then took the mean heading across all stimulation A trials and subtracted this value from the fly’s heading angle in all trials. The histograms in Fig. 2c–f used 10° bins and also excluded timepoints when the fly was standing still. In some trials, flies were standing still throughout the entire trial (1.7% of all trials), which resulted in the trial being discarded for relevant analyses.
For Extended Data Fig. 4c, an ROI was considered inside the stimulation ROI if it had at least one pixel within the boundaries of the stimulation ROI scan path and was otherwise considered outside the stimulation ROI. In Extended Data Fig. 4d, we only analysed ROIs that were outside the stimulation ROI. The change in the column ROI ΔF/F0 was computed by dividing the mean ΔF/F0 during the 30 s stimulation period by the mean the ΔF/F0 during the 5 s before the stimulation. To calculate an ROI’s distance from the stimulation site (in number of ROIs), we first defined the stimulation site as the column ROI with the highest fraction of pixels inside the stimulation ROI. For each ROI we then computed its wrapped distance in number of ROIs. For instance, column ROI 2 and column ROI 15 have a (wrapped) distance of three, given that there are 16 columns in our analysis. Since our stimulation ROI could overlap with multiple column ROIs, in Extended Data Fig. 4d, there are no column ROIs with a distance of one.
In Extended Data Fig. 4e, to compute the stimulation location angle, we treated the fraction of pixels of each column ROI that were inside the stimulation ROI (see red colour map in Fig. 2c,d) as an array. Using this array, we computed the stimulation location angle with the same population vector average method used to compute the FC2 phase. We then took the mean difference between the two stimulation phases (A and B) for each fly. To compute the mean FC2 phase position during the stimulation period (Extended Data Fig. 4f–h), we excluded timepoints when the fly was standing still.
In Extended Data Fig. 4i–k, for each fly and stimulation location, we predicted the fly’s goal heading by adding the angular difference between the two stimulation locations in the fan-shaped body (as described above) to the fly’s mean heading direction during trials of the opposite stimulation location.
In Extended Data Fig. 4i, we grouped trials based on the fly’s heading relative to the predicted goal heading 2 s before the stimulation onset. In Extended Data Fig. 4j, we instead grouped trials based on whether the fly was standing still prior the stimulation onset (defined as any trial where the fly’s filtered forward walking velocity was below 1 mm s−1 at all timepoints 5 s before the start of the stimulation).
LAL imaging analysis
To detect transient increases in LAL asymmetries (Fig. 5b,c), we first smoothed the right – left LAL ΔF/F0 signal using a Gaussian filter (σ = 200 ms). We then detected peaks in the filtered signal using the SciPy function signal.find_peaks. Peaks were defined as timepoints where the filtered signal was above 0.1 ΔF/F0 for at least 1 s, spaced from other peaks by at least 3 s, and had a prominence of one. To detect transient decreases in LAL asymmetries, we flipped the right – left LAL ΔF/F0 signal and then applied the same algorithm. In Fig. 5c, we aligned the fly’s turning velocity and the right – left LAL ΔF/F0 signal to the timepoint of the peak neural signal and upsampled both the fly’s turning velocity and the right – left LAL ΔF/F0 to a common 100 Hz time base. In Extended Data Fig. 10a, we plot the exact same data as in Fig. 5c, but instead show the flies’ heading relative to goal (rather than the rate of change of that signal or turning velocity) in reference to the neural peaks. For this analysis only, we defined the fly’s goal angle as the mean heading angle in a 60 s window sliding window. We obtained similar results when only looking at peaks that occurred during a menotaxis bout, where we could define the goal in our more standard way.
To plot the LAL activity as a function of the fly’ heading relative to its goal angle (Fig. 5d), we only analysed data during menotaxis bouts (see ‘Processing of menotaxis behavioural data’). Because there is a ~200 ms delay between a change in the fly’s heading and a change in the EPG phase34, we expected the LAL ΔF/F0 signal to be likewise delayed relative to behaviour. Therefore, in Fig. 5d only, we shifted the LAL ΔF/F0 signal forward in time by ~218 ms (2 imaging volumes) prior to relating the signal to the fly’s behaviour. We believe that this is the most appropriate signal to analyse, but our conclusions are the same if we do not apply this shift. For each fly, we calculated the mean LAL ΔF/F0 by binning the data based on the fly’s heading relative to its goal using 10° bins. Timepoints in which flies were standing still were removed from the time series prior to analysis.
Processing of electrophysiological data
To detect spikes, we first filtered the membrane voltage (Vm) trace with a Butterworth bandpass filter. We then detected peaks in the filtered Vm trace above a specified threshold, spaced by >5 ms, using the SciPy function signal.find_peaks. Although this criterion means we could not detect spike rates above 200 Hz, the activity levels of all our cells stayed well below this upper limit. Different cut-off frequencies and thresholds were hand selected for each cell so as to yield spike times that matched what one would expect from visual inspection of the data. To remove spikes from the Vm trace—for analyses of the membrane voltage in Fig. 3c,d and Extended Data Figs. 6d, 7c,d and 9b,c—we discarded Vm samples within 10 ms of a spike by converting those samples to empty entries (that is, the not-a-number (NaN) data type).
When analysing electrophysiological data in comparison to the fly’s heading or goal angle (Fig. 3c–f and Extended Data Figs. 6–9), we downsampled the cell’s Vm or spike rate to the ball camera frame rate (50 Hz) by either averaging the spike-rate or the spike-removed Vm in the time interval between two camera triggers. In Fig. 3b we plotted the spike rate using a 1-s boxcar filter.
Tuning curves
To generate the tuning curves in Fig. 3c,d, we binned the electrophysiological time series data according to the fly’s heading, using 15° bins. We then calculated the mean spike rate and the spike-removed Vm for each bin. To estimate a cell’s preferred heading angle, we fit the spike-removed Vm tuning curve with a cosine function, with the offset, amplitude and phase of the cosine (the phase is the resulting preferred angle) as fitting parameters. In performing this fit, we excluded timepoints when the bar was located in the 90° gap at the back of the arena because the EPG system is expected to track the fly’s heading less faithfully during these moments2,34,39. We used Vm rather than spike rate for estimating the cell’s preferred heading angle because Vm was much less modulated by the fly’s goal angle than the spike rate (Extended Data Fig. 7), and thus it was less likely to lead to goal-modulation-related biases in our estimate of the preferred heading angle.
For Fig. 3e, f and Extended Data Figs. 7, 8, we only analysed data from timepoints that contributed to a menotaxis bout (see ‘Processing of menotaxis behavioural data’). For each bout, we computed a relative goal angle by subtracting the cell’s preferred heading angle from the fly’s goal angle. Likewise, for each timepoint, we computed a relative heading by subtracting the cell’s preferred heading angle from the fly’s current heading angle. We then calculated the mean firing rate (or spike-removed Vm) binned by the fly’s relative goal angle using 45° bins (columns in Fig. 3f) and by the fly’s relative heading angle, also using 45° bins (x-axis in Fig. 3f). To generate tuning curves (except Extended Data Fig. 8), we removed timepoints when the fly was standing still for the time series, before analysis. By contrast, for Extended Data Fig. 8c–e we only included timepoints when the filtered forward walking velocity of the fly was between −0.5 mm s−1 and 0.5 mm s−1 and the fly’s turning velocity was between –5° s−1 and 5° s−1 (that is, the fly was standing still and not turning in place rapidly).
Fitting the PFL3 tuning curves
The data contributing to the tuning curves in Fig. 3f were binned according to the heading and goal angles relative to the electrophysiologically preferred heading angle of the cell being studied, which was always made to equal zero. We refer to these relative heading and goal angles as H′ and G′ and we expressed the PFL3 activity in the single-cell model as , with . This form for f, which is called a softplus function, was suggested by examining the shifted spike-rate versus Vm curves in Extended Data Fig. 9c (see below). We then fit the parameters Gpref – Hpref, d, a, b and c by minimizing the squared difference between f and the data. The same value of Gpref – Hpref was used for each cell. The optimal parameters were Gpref – Hpref = −48°, d = 0.63, a = 29.23 Hz, b = 2.17, c = −0.7. The connectomic analysis discussed in the next section indicates that the difference between the preferred heading and goal angles, Gpref – Hpref, is expected to be −67.5°, on average. Several technical and biological reasons could account for the difference between the expected and fitted values. For example, a misestimation the cell’s preferred heading direction (see ‘Tuning curves’) could cause the measured Gpref – Hpref to be smaller than its average anatomical value. In the full model, described in ‘Full PFL3 model’, we used the angles from the connectome analysis.
Fitting our model to the mean turning curves in Fig. 3f accounted for 95% of the variance in these data. In addition, we used our model, with the above parameter values, to predict the time series of the firing rates of individual PFL3 neurons during menotaxis over 20 ms intervals. The model accounted for ~30% of the variance in these unaveraged data. The relatively low amount of variance explained is unlikely the result of tuning to either forward or angular velocity because averaged data that depended only on heading explained 93% and 92% of the variance of the heading/forward velocity and heading/angular velocity data shown in Extended Data Fig. 8a,b. An analysis of spike count variability showed approximately Poisson spike-count variability, and this is a likely source of the extra variance in the unaveraged data.
For the fits shown in Extended Data Fig. 6d, the data were fit to , with A, Hpref and V0 as fitting parameters, by minimizing the squared difference between this expression and the data points.
Spike-rate versus Vm curves
Extended Data Fig. 9b shows the relationship between the spike-rate and Vm (spikes removed) obtained from our whole-cell recordings. To generate this plot, we used the data shown in Fig. 3 and Extended Data Fig. 7 (that is, we included timepoints when the fly was performing menotaxis and not standing still). We binned the data according to the fly’s goal angle relative to the cell’s preferred heading angle (using the same 45° bins as in Fig. 3 and Extended Data Fig. 7) and also according to each cell’s Vm (4 mV bins). We used a cut-off of −46 mV, since at more depolarized membrane potentials spikes were not as well estimated and might have been missed. To include right PFL3 neurons in this analysis, we flipped the goal heading relative to the cells’ preferred heading values of right PFL3 cells prior to averaging across all cells.
To generate Extended Data Fig. 9c, in which the curves from Extended Data Fig. 9b are aligned, we shifted the curves for different goal directions along the horizontal (Vm) axis by amounts determined to minimize the squared difference between the spike rates in each bin across the different goal directions and a common function of the form , where is the shifted membrane potential (black curve in Extended Data Fig. 9c). In other words, we computed the shifts that made the spike-rate curves for different goal directions maximally align. The resulting voltage shifts are plotted in Extended Data Fig. 9d. The parameters α and β of this fit are distinct from the parameters for the fits in Fig. 3f, and it is the parameters of the latter fit that are used to build the full model.
Full PFL3 model
For the full population model, the response of each PFL3 cell is expressed as
with the 12 left and 12 right PFL3 cells all modelled with the same function f and parameters d, a, b and c described in the section on fitting the PFL3 tuning curves. The values of the preferred angles, however, differ across the cells, and their values were obtained from the connectome12,13 (Fig. 4b and Extended Data Fig. 5g). For the preferred goal angles, we used the values Gpref = −(15°, 45°, 75°, 105°, 135°, 165°, −165°, −135°, −105°, −75°, −45°, −15°) for both the left and right PFL3s. For the preferred heading angles, we began by assigning angles to the 18 glomeruli across both sides of the protocerebral bridge, from left to right: −22.5°, 22.5°, 67.5°, 112.5°, 157.5°, −157.5°, −112.5°, −67.5°, −22.5°, 22.5°, 67.5°, 112.5°, 157.5°, −157.5°, −112.5°, −67.5°, −22.5°, 22.5° (Extended Data Fig. 5e). These angles were projected down to the fan-shaped body using the wiring diagram shown in Fig. 4b. There are 18 bridge angles but only 14 of them are used for these projections because the left two outermost glomeruli and the right two outermost glomeruli (first and last two entries in the above list) are not innervated by PFL3 cells. Individual PFL3 cells innervate with their dendrites either one or two of the innermost 14 bridge glomeruli. For the PFL3 cells that innervate two bridge glomeruli, we used the angle corresponding to the innermost of the innervated pair (see Extended Data Fig. 5f,g). The resulting preferred heading angles for the PFL3 population are therefore as follows: for the right PFL3 cells (that is, the PFL3 cells projecting to the right LAL), Hpref = −(67.5°, 112.5°, 157.5°, 157.5°, −157.5°, −112.5°, −112.5°, −67.5°, −22.5°, −22.5°, 22.5°, 67.5°) and, for the left PFL3 cells (that is, the PFL3 cells projecting to the left LAL), Hpref = −(−67.5°, −22.5°, 22.5°, 22.5°, 67.5°, 112.5°, 112.5°, 157.5°, −157.5°, −157.5°, −112.5°, −67.5°). The overall minus sign in these two lists of angles (and in the expression above for the preferred goal direction angles) reflects the fact that angles extracted from the connectome, which are given inside the parentheses, are referenced to the ellipsoid body, whereas the preferred angles listed here are referenced to heading angles, and the EPG bump and heading angles differ by a minus sign. These preferred angles determine the directions of the vectors shown within the fan-shaped body compartments in Fig. 4b, with angles measured positive anticlockwise and the zero-angle pointing directly downward.
In the analysis described in the previous paragraph, we used glomerular angles implied by the Δ7 innervation of the protocerebral bridge (Extended Data Fig. 5e–g). Alternatively, we could have used glomerular angles based on the innervation of EPG neurons (Extended Data Fig. 5c). We opted to use the Δ7 scheme because Δ7 neurons provide the majority of PFL3 neurons’ synaptic input in the protocerebral bridge12,13 (Extended Data Fig. 5a).
We also assumed that the PFL3 cells form twelve functional columns in the fan-shaped body due to anatomical considerations (Extended Data Fig. 5k). PFL3 neurons can, alternatively, be viewed as forming nine columns12. The model was also tested assuming nine columns (in this case, the preferred goal angles used were -(0°, 45°, 90°, 135°, 180°, −135°, −90°, −45°, 0°)), and qualitatively similar results were obtained. Note that in this 9-column angle assignment, the first and last columns represent the same angle, which would mean that the entire left/right extent of the fan-shaped body would encode more than 360º, a feature that we do not favour and which contributed to our using the 12-column model.
To simulate the effect of silencing subsets of PFL3 neurons (Extended Data Fig. 11h), we used the model described above, but set the response of randomly selected PFL3 cells to zero for all heading and goal angles. For each number of PFL3 cells silenced (from 0 to 24), we took the circular averaged error between flies’ intended goal, G, and the zero heading from their PFL3 turning curve across 5,000 simulations. We added noise to the goal direction input of the model, with an amplitude chosen to make the model with no silenced neurons match the performance of PFL3 > TNTinactive control flies.
Predicting PFL3 output using FC2 activity as the goal signal
To predict the PFL3 output signal in Extended Data Fig. 9g,h,j we used our full PFL3 model, as described above. As a goal input to this model, we used our FC2 imaging data during menotaxis. As a heading input to the model, we used a computer-generated (that is, synthetic) EPG and ∆7 heading signal (see below) for each timepoint; we could not use a measured heading input because we did not co-image EPG or ∆7 neurons during the relevant experiments. Before inputting the FC2 imaging data into the model, at every timepoint we first interpolated the ΔF/F0 array of the 16 imaging ROIs to a 12-ROI array in order to match the 12 columns used in our model. We then normalized the interpolated ΔF/F0 of each ROI independently such that each ROI’s signal ranged from negative one (the minimum value observed in the ROI) to positive one (the maximum value observed in the ROI). The resulting activity in each column ROI was used in place of the term in the equation for each PFL3 neuron. To generate the synthetic EPG/∆7 heading signal, we had the phase of the synthetic bumps of activity in the bridge invariably track the angle of the bar on the arena. We time-shifted the phase of the synthetic EPG/∆7 signal forward by ~200 ms in relation to the bar’s instantaneous position on the LED display. This latency was chosen so that the synthetic data accorded as closely as possible with past measurements on how the real EPG/∆7 phase lags changes in bar position34 (Extended Data Fig. 3b). Recall that the EPG phase has a variable, fly to fly, offset to the bar position on the LED screen, which means that there will be an arbitrary offset between the FC2 phase in the brain and the expected bar position that a given fly stabilizes on the LED display. To account for this arbitrary offset, we added a fixed offset to the bar position so that its angular position and the FC2 phase aligned on average—which makes sense if one assumes that flies, on average, maintain a heading that is aligned with their goal angle. We used the inverse of this new, offset, bar position over time as the phase of the EPG/∆7 heading signal (that is, the fly’s heading) or H, in the expression , which determines the heading input into each PFL3 neuron in the model. We could then predict the difference between the left and right population-level PFL3 activity at every timepoint using the same function f and parameters d, a, b and c as in our single-cell model and full PFL3 model. In Extended Data Fig. 9j, we binned data points that fell within a menotaxis bout—excluding timepoints when the fly was standing still—by the fly’s heading relative to goal angle and computed the mean predicted R–L signal and the fly’s filtered turning velocity for each bin. For this analysis, we first shifted the predicted R–L signal by ~200 ms forward in time in time since our LAL imaging data indicates that this is the latency where the relationship between R–L activity and the fly’s heading relative to goal angle is maximal (Extended Data Fig. 10a, see also ‘LAL imaging analysis’). We also shifted the fly’s turning velocity by ~200 ms earlier in time to account for the expected delay between the processing of internal, navigation-related, information to compute the fly’s heading relative to goal error and the execution of a motor command11.
Analysis of the wind-induced angular memory task
In Fig. 6, for each trial, the allocentric wind direction was computed by taking the mean of the difference between the bar position and the spigot angle, at every timepoint, during the time period when the airflow was on. This value was not necessarily identical to the nominal allocentric wind direction set by our code because of inertial/mechanical latencies associated with the air-delivery spigot needing to physically rotate to deliver air from a new direction. The set point and trial-computed allocentric wind direction could differ by up to 13°.
To generate the histograms in Fig. 6e and Extended Data Fig. 11a, we computed the fly’s heading relative to the wind direction by taking the difference between the fly’s heading on the ball and the allocentric wind direction, at every timepoint, during either the 30-s period when the wind was on or during the 30-s period starting 5 s after the wind was turned off, referred to as the test period. In the test period, the allocentric wind direction experienced in the most recent wind-on period was used as the alignment point for the histogram. We did not include the 5 s after the wind was turned off since this time period includes a 2-s open-loop 180° bar jump and because flies do not instantly correct for this virtual rotation.
In Fig. 6f and Extended Data Fig. 11b,c, the absolute distance to wind was taken to be absolute value of the flies’ heading relative to the wind direction, computed as described above.
To generate the plots in Fig. 6h, for each fly and wind-direction block, we computed the flies’ mean heading direction during the test period of the block’s second and third trial and plotted this value as a function of the same block’s mean allocentric wind direction. The absolute difference between these two values yielded the fly’s wind-direction error during the test period, which is plotted, averaged across all six directions, in Fig. 6j. To compute the fly’s wind-direction error in in Fig. 6i, we applied the same analysis as described above, but in this case, we used the flies’ mean heading direction during the wind period.
In Fig. 6k, for each wind-direction block, a fly was considered to have oriented along the correct direction if its wind-direction error during the test period was less than 30°. In other words, its mean heading direction during the test period needed to be within ±30° from the allocentric wind direction.
The flies’ performance index (PI) was defined as the fraction of time that a fly spent oriented toward the 180° hemifield centred on the previously experienced allocentric wind direction minus the fraction of time that a fly spent oriented toward the opposite hemifield (Extended Data Fig. 11d).
For the above analyses (except when computing the allocentric wind direction), we first removed from the time series timepoints when the fly was standing still. Five out of the 331 flies in our dataset stood still during the entire test period of both the second and third trial of at least one of the wind-direction blocks. Because this would result in an undefined goal angle for one of the wind-direction blocks, we excluded these flies from all analyses. Of the remaining 326 flies, 5 flies stood still during either the entire second or the entire third trial of a wind-direction block, which resulted in these flies only having one trial analysed for that wind-direction block.
Statistics
For Fig. 1o, to assess whether the FC2 phase changed during a bar jump, relative to its position immediately prior, we performed a V-test66 (Rayleigh test for uniformity where the alternative hypothesis is a known mean angle μ) with μ = 0° (P = 6.65 × 10−4). To assess whether the EPG phase tracks the bar during a bar jump we performed a V-test with μ = 90° (P = 7.99 × 10−3). The same tests applied to Extended Data Fig. 3e yielded μ = 0° (P = 7.69 × 10−8) for the FC2 phase and μ = 90° (P = 2.49 × 10−5) for the EPG phase.
For Fig. 2g, to assess whether the difference in flies’ mean heading direction for stimulation A and B was within the expected difference based on the stimulation locations in the fan-shaped body, we performed a V-test with μ equal to the angular difference between the two stimulation location angles (Extended Data Fig. 4e). For flies expressing CsChrimson in FC2 neurons, this was μ = −173.4° (P = 1.49 × 10−3). For control flies that did not express CsChrimson, this was μ = −164.9° (P = 0.93). The expected difference of both groups is not exactly the same since the stimulation ROIs are defined manually without knowledge of the column ROIs (which are only defined later during the imaging analysis).
For Fig. 5h, to assess whether flies expressing CsChrimson in PFL3 neurons showed a change in ipsilateral turning velocity relative to control flies only expressing jGCaMP7f, we performed a two-sided Welch’s t-test (P = 1.93 × 10−5). To compare flies expressing CsChrimson in PFL1 neurons with control flies we used a two-sided Welch’s t-test (P = 0.76).
For Fig. 6j, we performed a two-sided Mann–Whitney U-test to assess whether flies expressing TNT in neurons labelled by PFL3 line 1 (57C10-AD ∩ VT037220-DBD) had a lower error during the test period than control flies expressing TNTinactive instead. This yielded P = 0.05 for our first experimental replicate (rep. 1) and P = 1.20 × 10−6 for our second experimental replicate (rep. 2). To combine these two P values, we used Fisher’s method, which yielded P = 1.08 × 10−6. Likewise, in Extended Data Fig. 11e, we applied the same test to assess whether flies expressing shibirets in neurons labelled by PFL3 line 1 had a lower error during the test period than control flies in which shibirets was driven by an empty split driver line (P = 0.29) and whether flies expressing TNT in neurons labelled by PFL3 line 3 (27E08-AD ∩ VT037220-DBD) had a lower error during the test period than flies expressing TNTinactive instead (P = 0.05). We also performed a two-sided Mann–Whitney U-test to assess whether PFL3 line 1>TNT flies (rep. 2) had a greater error during the wind-on period than TNTinactive control flies (P = 3.15 × 10−3). In Extended Data Fig. 11g—in which we selected flies whose wind-direction error during the wind-on period was between 12° and 45°—we performed the same test to assess whether PFL3 line 1>TNT flies (rep. 2) had a lower error during the test period than TNTinactive control flies (P = 6.47 × 10−4). For Fig. 6k and Extended Data Fig. 11f, we performed two-sided Mann–Whitney U-tests to assess whether flies with PFL3 cells targeted for silencing oriented along fewer correct goal directions during the test period than control flies: PFL3 line 1>TNT versus PFL3 line 1>TNTinactive (rep. 1: P = 0.04, rep. 2: P = 5.25 × 10−7 and Fisher’s method: P = 3.90 × 10−7), PFL3 line 3>TNT versus PFL3 line 3>TNTinactive (P = 0.07) and PFL3 line 1>shibirets versus empty split>shibirets flies (P = 0.15).
All p-values are reported without correction for multiple comparisons.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Online content
Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41586-023-07006-3.
Supplementary information
Source data
Acknowledgements
The authors thank members of the Maimon laboratory for helpful discussions; J. Green, C. Lyu and I. Ishida for feedback on the manuscript; Y. Wiesenfeld and Q. Zhao for help with preliminary experiments on the wind-induced angular memory task; T. Mohren and I. Ishida for developing the closed-loop airflow system and providing technical support; H. Akhlaghpour for developing the laser-based closed-loop temperature control system used in pin-tethered experiments; S. Sethi and C. Lyu for technical advice on patch-clamp experiments; A. Janke for help in interpreting immunohistochemistry images; J. Weisman for the design and fabrication of various 3D printed parts; T. Nöbauer for help in setting up two-photon light paths; J. Petrillo for the fabrication of fly plates for imaging and electrophysiology experiments; and G. Jaindl for software advice for simultaneous imaging and stimulation experiments. Stocks obtained from the Bloomington Drosophila Stock Center (NIH P40OD018537) were used for 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. L.F.A. was supported by the Simons, Gatsby and Kavli Foundations and by NSF NeuroNex Award DBI-1707398. G.M. is a Howard Hughes Medical Institute Investigator.
Extended data figures and tables
Author contributions
P.M.P. and G.M. conceived the project. P.M.P. performed all experiments and analyses containing imaging or electrophysiology. P.M.P. conceived of the the wind-induced angular memory task and developed it with input from L.Z. and G.M. L.Z. performed the wind-induced angular memory task experiments. P.M.P. and L.Z. analysed the wind task data. P.M.P. and V.P. performed immunohistochemistry experiments. P.M.P., L.Z., L.F.A. and G.M. jointly interpreted the data. L.F.A. developed and implemented the models. P.M.P., L.F.A. and G.M. wrote the paper.
Peer review
Peer review information
Nature thanks Stanley Heinze and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Data availability
Source data for scatter plots and tuning curves, minimally processed data (such as mean fluorescence time series) and immunohistochemistry stacks are available at 10.5281/zenodo.10145317. Raw data can be made available upon request. Source data are provided with this paper.
Code availability
Code for processing and analysing data is available at 10.5281/zenodo.10232698.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data
is available for this paper at 10.1038/s41586-023-07006-3.
Supplementary information
The online version contains supplementary material available at 10.1038/s41586-023-07006-3.
References
- 1.Taube JS, Muller RU, Ranck JB. Head-direction cells recorded from the postsubiculum in freely moving rats. I. Description and quantitative analysis. J. Neurosci. 1990;10:420–435. doi: 10.1523/JNEUROSCI.10-02-00420.1990. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Seelig JD, Jayaraman V. Neural dynamics for landmark orientation and angular path integration. Nature. 2015;521:186–191. doi: 10.1038/nature14446. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Heinze S, Homberg U. Maplike representation of celestial E-vector orientations in the brain of an insect. Science. 2007;315:995–997. doi: 10.1126/science.1135531. [DOI] [PubMed] [Google Scholar]
- 4.Lyu C, Abbott LF, Maimon G. Building an allocentric travelling direction signal via vector computation. Nature. 2022;601:92–97. doi: 10.1038/s41586-021-04067-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Lu J, et al. Transforming representations of movement from body- to world-centric space. Nature. 2022;601:98–104. doi: 10.1038/s41586-021-04191-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Høydal ØA, Skytøen ER, Andersson SO, Moser M-B, Moser EI. Object-vector coding in the medial entorhinal cortex. Nature. 2019;568:400–404. doi: 10.1038/s41586-019-1077-7. [DOI] [PubMed] [Google Scholar]
- 7.Sarel A, Finkelstein A, Las L, Ulanovsky N. Vectorial representation of spatial goals in the hippocampus of bats. Science. 2017;355:176–180. doi: 10.1126/science.aak9589. [DOI] [PubMed] [Google Scholar]
- 8.Ormond J, O’Keefe J. Hippocampal place cells have goal-oriented vector fields during navigation. Nature. 2022;607:741–746. doi: 10.1038/s41586-022-04913-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Wang C, et al. Egocentric coding of external items in the lateral entorhinal cortex. Science. 2018;362:945–949. doi: 10.1126/science.aau4940. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Campagner D, et al. A cortico-collicular circuit for orienting to shelter during escape. Nature. 2023;613:111–119. doi: 10.1038/s41586-022-05553-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.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. 2019;22:1460–1468. doi: 10.1038/s41593-019-0444-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Hulse BK, et al. A connectome of the Drosophila central complex reveals network motifs suitable for flexible navigation and context-dependent action selection. eLife. 2021;10:e66039. doi: 10.7554/eLife.66039. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Scheffer LK, et al. A connectome and analysis of the adult Drosophila central brain. eLife. 2020;9:e57443. doi: 10.7554/eLife.57443. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Baird E, Byrne MJ, Scholtz CH, Warrant EJ, Dacke M. Bearing selection in ball-rolling dung beetles: is it constant? J. Comp. Physiol. A. 2010;196:801–806. doi: 10.1007/s00359-010-0559-8. [DOI] [PubMed] [Google Scholar]
- 15.Toledo S, et al. Cognitive map–based navigation in wild bats revealed by a new high-throughput tracking system. Science. 2020;369:188–193. doi: 10.1126/science.aax6904. [DOI] [PubMed] [Google Scholar]
- 16.Stone T, et al. An anatomically constrained model for path integration in the bee brain. Curr. Biol. 2017;27:3069–3085.e11. doi: 10.1016/j.cub.2017.08.052. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Finkelstein A, et al. Three-dimensional head-direction coding in the bat brain. Nature. 2014;517:159–164. doi: 10.1038/nature14031. [DOI] [PubMed] [Google Scholar]
- 18.Petrucco L, et al. Neural dynamics and architecture of the heading direction circuit in zebrafish. Nat. Neurosci. 2023;26:765–773. doi: 10.1038/s41593-023-01308-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Varga AG, Ritzmann RE. Cellular basis of head direction and contextual cues in the insect brain. Curr. Biol. 2016;26:1816–1828. doi: 10.1016/j.cub.2016.05.037. [DOI] [PubMed] [Google Scholar]
- 20.Beetz MJ, et al. Flight-induced compass representation in the monarch butterfly heading network. Curr. Biol. 2022;32:338–349.e5. doi: 10.1016/j.cub.2021.11.009. [DOI] [PubMed] [Google Scholar]
- 21.Beetz MJ, Kraus C, el Jundi B. Neural representation of goal direction in the monarch butterfly brain. Nat. Commun. 2023;14:5859. doi: 10.1038/s41467-023-41526-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Cregg JM, et al. Brainstem neurons that command mammalian locomotor asymmetries. Nat. Neurosci. 2020;23:730–740. doi: 10.1038/s41593-020-0633-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Huang K-H, Ahrens MB, Dunn TW, Engert F. Spinal projection neurons control turning behaviors in zebrafish. Curr. Biol. 2013;23:1566–1573. doi: 10.1016/j.cub.2013.06.044. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Rayshubskiy, A. et al. Neural control of steering in walking Drosophila. Preprint at bioRxiv10.1101/2020.04.04.024703 (2020).
- 25.Wittmann T, Schwegler H. Path integration—a network model. Biol. Cybern. 1995;73:569–575. doi: 10.1007/BF00199549. [DOI] [Google Scholar]
- 26.Dan, C., Kappagantula, R., Hulse, B. K., Jayaraman, V. & Hermundstad, A. M. A neural circuit architecture for rapid behavioral flexibility in goal-directed navigation. Preprint at bioRxiv10.1101/2021.08.18.456004 (2024). [DOI] [PubMed]
- 27.Goulard R, Buehlmann C, Niven JE, Graham P, Webb B. A unified mechanism for innate and learned visual landmark guidance in the insect central complex. PLoS Comput. Biol. 2021;17:e1009383. doi: 10.1371/journal.pcbi.1009383. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Matheson AMM, et al. A neural circuit for wind-guided olfactory navigation. Nat. Commun. 2022;13:4613. doi: 10.1038/s41467-022-32247-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Power ME. The brain of Drosophila melanogaster. J. Morphol. 1943;72:517–559. doi: 10.1002/jmor.1050720306. [DOI] [Google Scholar]
- 30.Hanesch U, Fischbach K-F, Heisenberg M. Neuronal architecture of the central complex in Drosophila melanogaster. Cell Tissue Res. 1989;257:343–366. doi: 10.1007/BF00261838. [DOI] [Google Scholar]
- 31.Wolff T, Iyer NA, Rubin GM. Neuroarchitecture and neuroanatomy of the Drosophila central complex: A GAL4-based dissection of protocerebral bridge neurons and circuits: Drosophila central complex anatomy and neurons. J. Comp. Neurol. 2015;523:997–1037. doi: 10.1002/cne.23705. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Seelig JD, et al. Two-photon calcium imaging from head-fixed Drosophila during optomotor walking behavior. Nat. Methods. 2010;7:535–540. doi: 10.1038/nmeth.1468. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Maimon G, Straw AD, Dickinson MH. Active flight increases the gain of visual motion processing in Drosophila. Nat. Neurosci. 2010;13:393–399. doi: 10.1038/nn.2492. [DOI] [PubMed] [Google Scholar]
- 34.Green J, et al. A neural circuit architecture for angular integration in Drosophila. Nature. 2017;546:101–106. doi: 10.1038/nature22343. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Reiser MB, Dickinson MH. A modular display system for insect behavioral neuroscience. J. Neurosci. Methods. 2008;167:127–139. doi: 10.1016/j.jneumeth.2007.07.019. [DOI] [PubMed] [Google Scholar]
- 36.Heisenberg, M. & Wolf, R. Vision in Drosophila: Genetics of Microbehavior (Springer-Verlag, 1984).
- 37.Giraldo YM, et al. Sun navigation requires compass neurons in Drosophila. Curr. Biol. 2018;28:2845–2852.e4. doi: 10.1016/j.cub.2018.07.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Dana H, et al. High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nat. Methods. 2019;16:649–657. doi: 10.1038/s41592-019-0435-6. [DOI] [PubMed] [Google Scholar]
- 39.Turner-Evans D, et al. Angular velocity integration in a fly heading circuit. eLife. 2017;6:e23496. doi: 10.7554/eLife.23496. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Klapoetke NC, et al. Independent optical excitation of distinct neural populations. Nat. Methods. 2014;11:338–346. doi: 10.1038/nmeth.2836. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Kim SS, Hermundstad AM, Romani S, Abbott LF, Jayaraman V. Generation of stable heading representations in diverse visual scenes. Nature. 2019;576:126–131. doi: 10.1038/s41586-019-1767-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Fisher YE, Lu J, D’Alessandro I, Wilson RI. Sensorimotor experience remaps visual input to a heading-direction network. Nature. 2019;576:121–125. doi: 10.1038/s41586-019-1772-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Lin C-Y, et al. A comprehensive wiring diagram of the protocerebral bridge for visual information processing in the Drosophila brain. Cell Rep. 2013;3:1739–1753. doi: 10.1016/j.celrep.2013.04.022. [DOI] [PubMed] [Google Scholar]
- 44.Schlegel, P. et al. Whole-brain annotation and multi-connectome cell typing quantifies circuit stereotypy in Drosophila. Preprint at bioRxiv10.1101/2023.06.27.546055 (2024).
- 45.Ishida, I. G., Sethi, S., Mohren, T. L., Abbott, L. F. & Maimon, G. Neuronal calcium spikes enable vector inversion in the Drosophila brain. Preprint at bioRxiv10.1101/2023.11.24.568537 (2023).
- 46.Bell WJ, Kramer E. Search and anemotactic orientation of cockroaches. J. Insect Physiol. 1979;25:631–640. doi: 10.1016/0022-1910(79)90112-4. [DOI] [Google Scholar]
- 47.Zolin A, et al. Context-dependent representations of movement in Drosophila dopaminergic reinforcement pathways. Nat. Neurosci. 2021;24:1555–1566. doi: 10.1038/s41593-021-00929-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Poodry CA, Edgar L. Reversible alteration in the neuromuscular junctions of Drosophila melanogaster bearing a temperature-sensitive mutation, shibire. J. Cell Biol. 1979;81:520–527. doi: 10.1083/jcb.81.3.520. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Sweeney ST, Broadie K, Keane J, Niemann H, O’Kane CJ. Targeted expression of tetanus toxin light chain in Drosophila specifically eliminates synaptic transmission and causes behavioral defects. Neuron. 1995;14:341–351. doi: 10.1016/0896-6273(95)90290-2. [DOI] [PubMed] [Google Scholar]
- 50.Westeinde, E. A. et al. Transforming a head direction signal into a goal-oriented steering command. Nature10.1038/s41586-024-07039-2 (2024). [DOI] [PMC free article] [PubMed]
- 51.Wolff T, Rubin GM. 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. 2018;526:2585–2611. doi: 10.1002/cne.24512. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.Otsuna, H., Ito, M. & Kawase, T. Color depth MIP mask search: a new tool to expedite split-GAL4 creation. Preprint at bioRxiv10.1101/318006 (2018).
- 53.Clements, J. et al. NeuronBridge: an intuitive web application for neuronal morphology search across large data sets. Preprint at bioRxiv10.1101/2022.07.20.500311 (2022). [DOI] [PMC free article] [PubMed]
- 54.Nern A, Pfeiffer BD, Rubin GM. Optimized tools for multicolor stochastic labeling reveal diverse stereotyped cell arrangements in the fly visual system. Proc. Natl Acad. Sci. USA. 2015;112:E2967–E2976. doi: 10.1073/pnas.1506763112. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 55.Moore RJD, et al. FicTrac: a visual method for tracking spherical motion and generating fictive animal paths. J. Neurosci. Methods. 2014;225:106–119. doi: 10.1016/j.jneumeth.2014.01.010. [DOI] [PubMed] [Google Scholar]
- 56.Handler A, et al. Distinct dopamine receptor pathways underlie the temporal sensitivity of associative learning. Cell. 2019;178:60–75.e19. doi: 10.1016/j.cell.2019.05.040. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Okubo TS, Patella P, D’Alessandro I, Wilson RI. A neural network for wind-guided compass navigation. Neuron. 2020;107:924–940.e18. doi: 10.1016/j.neuron.2020.06.022. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 58.Currier TA, Nagel KI. Multisensory control of orientation in tethered flying Drosophila. Curr. Biol. 2018;28:3533–3546.e6. doi: 10.1016/j.cub.2018.09.020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 59.Kaushik PK, Renz M, Olsson SB. Characterizing long-range search behavior in Diptera using complex 3D virtual environments. Proc. Natl Acad. Sci. USA. 2020;117:12201–12207. doi: 10.1073/pnas.1912124117. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 60.Pologruto TA, Sabatini BL, Svoboda K. ScanImage: flexible software for operating laser scanning microscopes. Biomed. Eng. Online. 2003;2:13. doi: 10.1186/1475-925X-2-13. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 61.Wilson RI. Role of GABAergic inhibition in shaping odor-evoked spatiotemporal patterns in the Drosophila antennal lobe. J. Neurosci. 2005;25:9069–9079. doi: 10.1523/JNEUROSCI.2070-05.2005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 62.Ramer U. An iterative procedure for the polygonal approximation of plane curves. Comput. Graph. Image Process. 1972;1:244–256. doi: 10.1016/S0146-664X(72)80017-0. [DOI] [Google Scholar]
- 63.Douglas DH, Peucker TK. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartographica. 1973;10:112–122. doi: 10.3138/FM57-6770-U75U-7727. [DOI] [Google Scholar]
- 64.Giovannucci A, et al. CaImAn an open source tool for scalable calcium imaging data analysis. eLife. 2019;8:e38173. doi: 10.7554/eLife.38173. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 65.Virtanen P, et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods. 2020;17:261–272. doi: 10.1038/s41592-019-0686-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 66.Jammalamadaka, S. R. & Sengupta, A. Topics in Circular Statistics (World Scientific, 2001).
- 67.Turner-Evans DB, et al. The neuroanatomical ultrastructure and function of a biological ring attractor. Neuron. 2020;108:145–163.e10. doi: 10.1016/j.neuron.2020.08.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Source data for scatter plots and tuning curves, minimally processed data (such as mean fluorescence time series) and immunohistochemistry stacks are available at 10.5281/zenodo.10145317. Raw data can be made available upon request. Source data are provided with this paper.
Code for processing and analysing data is available at 10.5281/zenodo.10232698.