off policy

projects fly fast weights flipping the sum toward home

Turning the sum into a direction home: two unstudied cell types flip it

As a fly walks away from food, it stores the sum of its steps, a vector pointing from the food to itself. To walk back, it must follow that vector in reverse, so something has to flip the stored memory before it reaches the neurons that steer. We searched the wiring diagram for routes that flip it. Two routes do, each through a cell type that nobody has recorded, hΔM and hΔI. In a simulation, only a flipped sum brings the fly back to the food.

What is known

Finding 3 proposed that two cell types, hΔH and hΔI, store the fly’s running sum of steps. That sum is a vector from the food to the fly. To get home, the fly must walk along the reverse vector, from itself to the food.

The fly steers with PFL3 neurons. PFL3 compares the fly’s heading with a goal direction it receives from FC2 neurons, and turns the fly until the two match1,2. If the stored sum reached PFL3 as it is, the fly would walk further from the food. Somewhere on the way to PFL3, the sum must be turned by 180°.

The fan-shaped body can do this with wiring alone. Its columns stand for compass directions, so moving a signal to the column half the ring away turns it by 180°. hΔ cells have exactly this shape: a dendrite, which mostly receives input, and an axon, which mostly sends output, in columns about half the ring apart3. A signal that enters an hΔ cell on its dendrite leaves turned by 180°. A signal that enters on its axon leaves unturned.

So our goal was to find routes from the store cells to PFL3 that pass through an hΔ cell’s dendrite.

What we found in the wiring

First, the store cells do not turn the sum themselves. hΔB, which reports each step, contacts them on their axons, not their dendrites: 95% of its synapses onto hΔH and 82% onto hΔI. What they store therefore leaves them unturned.

We then listed every route to PFL3 from the store candidates and from FC2, either direct or through one other columnar cell type, with at least 150 synapses at each step. For each route, we added up how far each step shifts the signal around the ring (Table 1).

Table 1 | Every strong route to PFL3 from the store candidates and FC2, and how far it turns the signal.

route to PFL3synapses per stepturn
hΔH → FC2 → PFL32,437 · 2,47823°
hΔI → PFL33,46812°
hΔA → PFL33,88114°
FC2 → hΔM → PFL31,073 · 2,428178°
hΔA → hΔI → PFL31,388 · 3,468195°
FC2 → hΔA → PFL3154 · 3,881179°

The direct routes leave the signal within 23° of where it started. Two strong routes turn it by about 180°, and both pass through an hΔ cell’s dendrite (Fig. 1):

hΔH (store)holds +D FC2 (goal)+D hΔArecent travel hΔM hΔI PFL3steering 2,437 7,690 · unrotated 1,073 2,428 3,881 · unrotated 1,388 3,468 blue: unrotated, “keep going” red: rotated by ~180°, “go back” numbers: synapses, MaleCNS
Fig. 1 | Routes from the store to the steering neurons. PFL3 receives the stored sum unturned from FC2 and hΔA (blue), and turned by half the ring through hΔM, after FC2, and through hΔI, before it (red). Numbers are synapse counts in MaleCNS.

A third route, through hΔA, also turns the signal, but its first step has only 154 synapses.

This gives hΔH’s sum a way home, through FC2 and then hΔM. It gives hΔI’s own sum none. hΔI turns hΔA’s signal around, but what hΔI itself receives from hΔB reaches PFL3 unturned. If hΔI is a store, we found no route that turns its sum around.

What we simulated

A route that turns the sum by 180° should bring the fly home, but PFL3 steers by a simple rule and the fly’s path is noisy. So we tested the idea in a simulated fly.

The fly walked away from food on a random path, adding up its steps, and then steered with PFL3’s rule toward a goal set by the stored sum. When the sum was not turned, the fly never came back: in 40 runs, none came within 0.5 units of the food, and the fly ended about as far away as it had walked out. When the sum was turned by 180°, 35% of runs came back to the food. This steering rule is crude, so even a perfect turn brings only some runs home.

We then passed the stored sum through each measured route and compared the direction it gave PFL3 with the true direction home. Both turning routes pointed within 34° of home. Every direct route pointed 142° or more away.

PFL3 receives both copies, and the unturned one is larger. FC2 sends 2,478 synapses straight to PFL3, but only 1,073 to hΔM. When we combined the two routes in proportion to their synapse counts, the sum pointed away from home. So for the fly to get home, something must weaken the direct copy or strengthen the turned one. What does this is not known.

Recording hΔM together with FC2 should show their activity half the ring apart. Silencing hΔM and hΔI should stop a fly from returning to food while leaving it able to hold a steady heading.

Methods

Data. MaleCNS v1.0, at the level of cell types. The main connections replicate in hemibrain v1.2: hΔM → PFL3 2,463 synapses, hΔA → hΔI 1,170 (63% half the ring apart), hΔI → PFL3 3,214. We read only the abstract of the Avritzer thesis.

Columns and branches. hΔ cells are named by the column of their dendrite3, and the step signal sits on hΔB’s axon5. For each connection, we took the average shift in columns between the two cells. A route’s turn is the sum of its steps’ shifts, measured from the step signal. A shift of about 180° from an hΔ cell’s name means the contact is on its dendrite, and about 0° means its axon.

Route screen. Sources were the store candidates (hΔA, hΔG, hΔH, hΔI and hΔJ) and the FC2 types. Targets were PFL3, PFL2 and PFL1. Routes were direct or through one columnar cell type, with at least 150 synapses at each step. The screen also found PFR_a → hΔI → PFL3 (174°), but PFR_a’s input to hΔI is spread over many columns. The table shows the routes to PFL3 from the cell types discussed here.

Simulation. Eight columns. The fly walked out on a random path for 30 time units (a median of 11 units from the food), storing its steps as in finding 3. It then steered for 60 time units with its turning rate proportional to the sine of the angle between goal and heading. A run counted as returned if the fly came within 0.5 units of the food. Each condition had 40 runs. The direction error for each route is the median angle between the goal it delivers and the true direction home, sampled along 60 random walks without steering.

Code (in the fly-circuit-exploration repository): data/derived/fb_offset_stats.csv, data/derived/fb_column_offsets.csv, simulations/closed_loop_return.py, simulations/closed_loop_routes_tspace.py. Corrections to earlier versions are in docs/audit-2026-09-13.md.

References

  1. 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).
  2. Westeinde, E. A. et al. Transforming a head direction signal into a goal-oriented steering command. Nature 626, 819–826 (2024).
  3. 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).
  4. Avritzer, S. C. An Angular Working-Memory Signal that Guides Drosophila Navigational Trajectories. PhD thesis, The Rockefeller University (2026).
  5. Lyu, C., Abbott, L. F. & Maimon, G. Building an allocentric travelling direction signal via vector computation. Nature 601, 92–97 (2022).