A real fly circuit drives a car
Can a readout trained on one track use the real fly circuit to drive a track it has never seen?
What we measured
- Live, 40 s on the held out track
- 0 crashes and about 78 m, 3 of 3 seeds
- Same readout on a rewired circuit
- 28 to 33 crashes in 40 s; random wiring 32 to 35
- Held out score after training
- 12.0 of about 14 possible in a 6 s episode (metres of progress minus 4 per crash)
- Hand written readout (DNa02 right minus left)
- 3.9 on the same held out track
- Training, real circuit
- held out score about 12 by generation 1 or 2 in 4 of 4 runs
- Training, rewired circuits
- slower; 3 of 4 rewirings reach 11.4 to 11.8, one stayed unstable (6.0). Random and silenced circuits do not learn
- Train it yourself
- /train/fly-steering
What happens
Two range sensors feed the fly's LPLC1 neurons, which respond to approaching objects: a wall close on the left excites the left LPLC1 cells, a wall on the right the right ones. Activity then travels through the real FlyWire wiring to ten descending neuron types on each side.
A readout of those 20 firing rates sets the steering angle. It was trained in our training lab for 10 generations on an oval track, driven both ways. What you see is a different, longer track that it never trained on.
The circuit is never changed; only the 21 readout numbers were learned. Switch to a rewired brain: the same readout, now reading a circuit it was not trained on, usually drives into the wall.
Inspired by: Fly Dino and fly-craftax, which also train only a readout on a fixed connectome circuit.
How the brain is wired to the world
The mapping is part of the experiment design. Everything between senses and motor output is the connectome.
- Wall close on the left → LPLC1 left
- Wall close on the right → LPLC1 right
- Trained readout of 20 descending neurons (DNa01, DNa02, DNp09 and others, each side) → steering
- Throttle constant
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
Run it locally
Every experiment can also use the local runner, which simulates the brain on your own computer. It is required for connectomes too large for a browser.
git clone https://github.com/berkeyc/connectome-lab.git cd connectome-lab pip install -r local/requirements.txt python local/runner.py # listens on ws://localhost:8765
Then choose “Local runner” in the player controls and press Restart. Your browser may ask for permission to connect to a local device.