Drosophila visual system · closed-loop flight

Keep the fly on course

Wind keeps spinning the fly around. Switch its brain on and it steers back using its motion-detecting neurons, the reflex real flies use to fly straight. Then train it to do better.

The flight

The strip is the whole 360° world. The bright frame is the part the fly's eye covers, about 150° with one facet per 5°.

Spin, last 5 s –
In front of the fly
The fly's eye: 721 facets
Heading from above
Brain
Wind
Heading, last 20 s. Background shows who was steering: Brain off Simple reflex Trained decoder

Loading the fly's brain…

Train the fly

The simple reflex is a rule I wrote by hand: turn toward whichever way the motion detectors say the world is moving. A trained decoder can do better. The fly watches four other worlds spin at random speeds while its brain stays exactly as published. Least-squares regression then learns 8 weights, one per motion-detector type, that turn their activity into an estimate of how fast the fly is spinning. The fly turns against that estimate.

Training and the test flights take about 15 seconds on a laptop. The flight pauses meanwhile.

Inside the brain

Every square is one neuron, drawn where its column sits in the eye. Each panel is one cell type (all cells of a type share the same wiring). Click a panel to see its wiring and activity.

hyperpolarizedrestdepolarized

What's real here?

Real

The fly's visual system is the flyvis model from Lappalainen et al. (Nature, 2024): 45,669 neurons wired from its connectome, the same network as on the email page. Every response you see comes from simulating it.

Added for the simulation

The world, the wind and the steering rules. Only turning is simulated: no forward flight and no inertia. In a real fly, lobula plate cells pool the T4/T5 signals and descending neurons drive the wings. Those aren't in the model, so the simple reflex and the trained decoder stand in for them.

What to expect

Steering usually cuts the spin by 30–50%. The fly can't cancel it completely: its neurons react with a delay, and in strong wind the world moves faster than its motion detectors can track.

Model, weights and connectome: flyvis, MIT License © 2023 Janne K. Lappalainen, Fabian D. Tschopp, Mason McGill, Jakob H. Macke, Srinivas C. Turaga. This site isn't affiliated with the authors.