Train / Fruit fly visuomotor circuit (FlyWire)

Teach a real fly circuit to drive

Does the real wiring carry enough information about the walls for a simple readout to steer, and does it learn faster than a rewired circuit?

Loading 3D view…
Fly ·
Real wiringReadout from generation 0

Learning curve

press Train
No generations yet. Press Train: every generation adds a point for the best candidate, the population mean and the held out test.
Untrained (generation 1 mean)–
Best on training–
Held out, current readout–

Inside the circuit

live, current readout
readout neuronsfiring rateweight
All spikes, last 2 seconds

Saved runs

tick runs to overlay their held out curves

No saved runs yet. Train the real circuit and a control, save both, and compare their curves here.

What is being trained

The car has two range sensors. A wall close on the left drives the left LPLC1 neurons, a wall close on the right drives the right ones. LPLC1 are visual projection neurons that respond to approaching objects and help flies avoid collisions.

From there, activity travels through the real FlyWire wiring (every synapse among the 1,325 neurons of this circuit) to ten descending neuron types on each side of the brain, the cells that carry commands from the brain to the legs.

A readout of 21 numbers per action turns those 20 firing rates into a steering angle. Training searches for those numbers with the cross entropy method: try a population of readouts, keep the best, sample around them, repeat. The circuit itself never changes.

Every candidate drives both ways round a training track. After each generation the current best guess drives a track it has never seen, so you can tell learning from memorising.

Inspired by: Fly Dino (Mert Cobanov) and fly-craftax, which also keep the connectome fixed and train only a readout.

How to read the result

Fixed: the wiring, the synapse counts, the transmitter signs and the neuron model (Shiu et al. 2024). Learned: 21 readout numbers.

A rising curve alone proves little: a trained readout can often make use of any network. The evidence is in the comparison. Train the real circuit, save it, train a rewired control, and overlay the two held out curves. If the real wiring learns faster or generalises better, the specific map carries information the controls lack.

Senses: Wall close on the left → LPLC1 left; Wall close on the right → LPLC1 right. Readout neurons: DNa01 left, DNa01 right, DNa02 left, DNa02 right, DNa03 left, DNa03 right, DNb05 left, DNb05 right, DNa11 left, DNa11 right, DNp01 left, DNp01 right, MDN left, MDN right, DNp09 left, DNp09 right, DNg13 left, DNg13 right, DNp03 left, DNp03 right.

Training uses a 0.25 ms simulation step (the lab uses 0.1 ms); firing rates in these circuits differ by about 2 percent. Dataset: Subcircuit of FlyWire v783: inputs LC4, LPLC2, LPLC1, LC16; outputs DNa01, DNa02, DNa03, DNb05, DNa11, DNp01, MDN, DNp09, DNg13, DNp03; paths with at least 40 synapses per step. About this dataset