projects fly fast weights storing the steps in synapses
Adding up the steps: the fly may remember the way home in its synapses
To walk back to food, a fly keeps a running sum of its steps. One cell type, hΔB, reports each step, but which cells add the steps up is unknown. A store in synapses needs four things: each step as input, a signal to write it, a signal to reset it, and a way out to the cells that steer. We searched the fly’s wiring diagram for cells that have all four. Four cell types qualify. The best of them, hΔH, and a weaker one, hΔI, have never been recorded. In simulation, their wiring can store most of the path.
What is known
A fly that walks away from food in the dark can walk straight back to it. To do this, it must keep a running sum of its steps: a vector from the food to where it is now.
The steps are thought to be added up in the fan-shaped body, a brain region divided into columns that together span the full 360° of compass directions. Depending on the cell type, there are 8 columns, each covering 45°, or 12, each covering 30°. One cell type, hΔB, reports each step: when the fly walks north, hΔB is most active in the north column1,2.
hΔB belongs to a family of cell types, hΔA to hΔM. Each hΔ cell has two branches in the fan-shaped body: a dendrite, which mostly receives input, and an axon, which mostly sends output, in columns about half the ring apart3. hΔB reports only the current step, not the sum. The question is which cells downstream of it add the steps up.
A brain can hold a sum in two ways. In activity, neurons keep firing to hold it. In synapses, each step strengthens the synapses for its own direction, and the pattern of strengths across the columns is the sum (Fig. 1). In a neighbouring circuit, Gorko4 found that a direction the fly remembers is not carried in the activity of the neurons that feed it, and proposed that it is stored in their synapses. We looked for a store of the second kind.
Fig. 1 | Storing a walk in synapse strengths. The fly walks 6 steps north, 4 south and 3 east. Each step strengthens the synapses in the column of hΔB’s activity; the arrow is the vector read from the strengths.
What we found in the wiring
We used MaleCNS, a map of every neuron and synapse in one male fly’s brain, and checked each connection on this page in a second map, the hemibrain, from a female fly. Our goal was to find cells that receive hΔB’s step signal and also have the other properties a store in synapses needs. Such a store needs four things:
- Each step, in its own column. An input that delivers each step to the column for its direction, so that a step north strengthens only the north synapses.
- A write signal. A neuromodulator that lets those synapses change while the fly walks. It must reach every cell, so that a step in any direction can be written. In the fly’s best-studied memory centre, the mushroom body, dopamine plays this role.
- A reset. A second signal, also reaching every cell, that clears the store when the fly finds food.
- An output. Connections to the cells that steer: FC2, which holds the fly’s goal direction, and PFL3, which turns the fly toward it5,6.
A wiring diagram can test requirements 1 and 4 directly. For 2 and 3 it can show only which neuromodulatory neurons reach every cell, not what they do.
We scored every cell type in the fan-shaped body against these four, without choosing candidates in advance. Four hΔ types meet most of them (Table 1). Each receives several neuromodulatory cell types, and for each we picked the ones that reach every cell. hΔH receives five dopamine types, and only FB5H reaches all of its cells; hΔI receives seven, and only FB4M does.
Table 1 | The four cell types that best meet the requirements of a store in synapses, ranked by how much of a walk their wiring can store.
| requirement | 1. hΔH (8 cells) | 2. hΔA (12 cells) | 3. hΔI (17 cells) | 4. hΔG (8 cells) |
|---|---|---|---|---|
| 1. step input from hΔB: synapses, share in the matching column | 1,010, 82% | 2,216, 64% | 3,575, 48% | 736, 63% |
| 2. candidate write: dopamine on every cell | FB5H, 8 of 8 cells | FB4M, 12 of 12 cells | FB4M, 17 of 17 cells | none (FB4M reaches 2 of 8) |
| 3. candidate reset: octopamine on every cell | OA-VPM3, 8 of 8 cells | none (OA-VPM3 reaches 7 of 12) | none (OA-VPM3 reaches 1 of 17) | none (OA-VPM3 reaches 7 of 8) |
| 4. output to FC2 / PFL3 | 2,776 / 1,448 synapses | 135 / 3,881 synapses | 125 / 3,468 synapses | 3,171 / 582 synapses |
| simulated store, share of a perfect one | 86% | 76% | 56% | 45% |
| other: serotonin on every cell | none (FB4Y reaches 7 of 8) | FB4Y, 12 of 12 cells | FB4Y, 17 of 17 cells | none (FB4Y reaches 0 of 8) |
| recorded | no | yes7 | no | yes8 |
After we posted, we learned that two of the four had already been recorded, in two dissertations. hΔA holds the fly’s direction of travel over the past 7–10 seconds7, and hΔG tracks the distance it walked over the past few seconds8. A trip away from food and back can take minutes. So we focus on the two that have not been recorded, hΔH and hΔI (Fig. 2).
hΔH meets all four. hΔI has a candidate write signal and an output to PFL3, but no reset and almost no output to FC2. In both, hΔB’s synapses land on the axon, not the dendrite (95% for hΔH, 82% for hΔI), so the synapses a step would strengthen sit on the cells’ output branch.
The roles in rows 2 and 3 are our guesses. We call the dopamine neurons write signals by analogy with the mushroom body. FB4M gets 13% of its input from the neurons that carry the fly’s walking velocity, so it may be active while the fly walks; what drives FB5H is not known. We call OA-VPM3, a pair of octopamine neurons, the reset because it is the only input other than dopamine that reaches every hΔH cell. In the mushroom body it makes recent memories take priority over older ones9, but nothing yet shows that it fires when the fly finds food. hΔI’s largest neuromodulatory input is serotonin from FB4Y, whose role here is unknown.
We also asked whether the wiring could instead support a store in activity. It cannot rule one out. To keep firing, the cells of an activity store must excite each other. We measured this as the share of each cell type’s input that comes from its own type, counting input from cells tuned to the same direction as positive and from cells tuned to the opposite direction as negative. The compass neurons, which do hold their activity10, score 0.05 by this measure. Several fan-shaped-body types score as high or higher, up to 0.15. So synapse counts cannot tell the two kinds of store apart.
What we simulated
Wiring that meets the four requirements could still store a walk badly, if the steps are delivered to the wrong columns. So we asked how much of a walk each cell type’s measured wiring could store. A simulated fly took a random walk. At each moment, hΔB was most active in the column of the fly’s heading, and each candidate’s synapses were strengthened in the proportions its wiring from hΔB dictates. At the end, we read the stored sum as a vector and compared its length with that of a perfect store, which writes each step into its own column only.
hΔH kept 86% of the perfect store, hΔA 76%, hΔI 56% and hΔG 45%. To check that the test can fail, we ran hΔJ, which receives more hΔB synapses than any other type but splits them between two opposite columns. Its writes cancel, and it kept 14%.
So hΔH and hΔI have the wiring to hold the way home in their synapses. Whether they do needs recordings: of hΔH and hΔI as a fly walks away from food and back, and with their dopamine input blocked on the way out.
Methods
Data. MaleCNS v1.0, at the level of cell types, with predicted transmitters. Every connection named on this page is also present in hemibrain v1.2. We read only the abstracts of the two theses.
Columns. Each fan-shaped-body neuron carries a column label, which we converted to an angle using its type’s number of columns (12 for hΔA, hΔB, hΔI and hΔJ; 8 for hΔG and hΔH). hΔ cells are named by the column of their dendrite3. A synapse is in the matching column when the two cells’ columns lie within 22.5° of each other.
Write and reset. Transmitters are predicted from the electron-microscope images, not measured. A cell counts as reached by a neuromodulatory neuron if it receives at least 10 synapses from it. All dopamine, octopamine and serotonin inputs, in synapses: to hΔH, OA-VPM3 361, FB5H 249, FB4Y 167, FB4M 94, FB1H 71, FB2A 20, FB4L 4, ExR3 1; to hΔI, FB4Y 937, FB4M 380, FB1H 151, FB1C 127, OA-VPM3 72, FB5H 69, FB4L 64, FB2A 26, ExR3 2, EL 2, PAM09 1.
Self-excitation. For each type, the synapses it receives from its own type as a fraction of its total input, each weighted by the cosine of the angle between the two cells’ columns and signed by predicted transmitter.
Simulation. Eight columns, 60 random walks. hΔB’s activity was a rectified cosine centred on the heading. Each candidate’s synapses grew by that activity passed through its measured column offsets from hΔB, with no forgetting. The reported number is the median ratio of the stored vector’s length to the perfect store’s.
Code (in the fly-circuit-exploration repository): scripts/recurrence_modes_v2.py, data/derived/fb_column_offsets.csv, data/derived/cx_ext_cell_edges.csv, simulations/site_readout_error.py. Corrections to earlier versions are in docs/audit-2026-09-13.md.
References
- Lu, J. et al. Transforming representations of movement from body- to world-centric space. Nature 601, 98–104 (2022).
- Lyu, C., Abbott, L. F. & Maimon, G. Building an allocentric travelling direction signal via vector computation. Nature 601, 92–97 (2022).
- Hulse, B. K. et al. A connectome of the Drosophila central complex reveals network motifs suitable for flexible navigation and context-dependent action selection. eLife 10:e66039 (2021).
- Gorko, B. E. The Drosophila fan-shaped body stores a vector in an allocentric coordinate system. PhD dissertation, University of California, Santa Barbara (2025).
- Mussells Pires, P., Zhang, L., Parache, V., Abbott, L. F. & Maimon, G. Converting an allocentric goal into an egocentric steering signal. Nature 626, 808–818 (2024).
- Westeinde, E. A. et al. Transforming a head direction signal into a goal-oriented steering command. Nature 626, 819–826 (2024).
- Avritzer, S. C. An Angular Working-Memory Signal that Guides Drosophila Navigational Trajectories. PhD thesis, The Rockefeller University (2026).
- Janke, A. A Neuronal Circuit Motif for Leaky Vector Integration. PhD thesis, The Rockefeller University (2025).
- Kapoor, I. & Waddell, S. A modulatory attentional gate promotes recent memory expression in Drosophila. bioRxiv (preprint) (2024).
- Seelig, J. D. & Jayaraman, V. Neural dynamics for landmark orientation and angular path integration. Nature 521, 186–191 (2015).