A fruit fly's connectome driving microduck in the twin (and a duck-sim walking fix)

#12
by HW01 - opened

I connected the complete FlyWire connectome of an adult fruit fly (138,639 neurons, 54M synapses, the brain model of Shiu et al. 2024) to a microduck in the MuJoCo twin (scripts/duck-sim, the real daemons), and let the fly's descending neurons drive it.

Duckophila: microduck in MuJoCo, left; the fly brain driving it, right

  • The ToF becomes the fly's looming detectors (LPLC2/LC4). A ball thrown at the duck's face fires the fly's giant fibre (its escape neuron) on the side the ball comes from, and the duck flinches through intents robotd already has (robot.sound, robot.look, robot.pose, robot.move). A hand at petting speed (0.2 m/s) does not trigger it.
  • The camera becomes the fly's motion detectors (T4/T5), each placed at its own visual column from FlyWire's column map. In a rotating striped drum, the fly's head neuron DNp15 turns the duck's head with the stripes, at a closed-loop gain of ~0.3–0.4, and the walking body follows the head.

Nothing is trained or tuned in the brain. What's the fly's and what's my glue code is listed in the README.

Useful for anyone driving the twin: duck-sim's duck didn't actually walk. It loaded the pre-v5 alpha_walking + alpha_stand policies on the robot model without backlash. velstand only walks on the backlash model. PR with numbers: https://github.com/pollen-robotics/microduck/pull/513 . Even with that fix, velstand ignores yaw under ~0.55 rad/s on the spot and sometimes won't take a first slow step below ~0.1 m/s.

A correction, now that it has controls. I repeated everything with statistics and with brains that are wired wrong (same neurons, same weights, targets shuffled with every neuron's degree kept; and with signs flipped).

  • The side claim above was overstated. The giant fibre on the ball's side carries only 58% of the giant-fibre spikes, and 54% when the same input goes to random visual neurons instead of LPLC2/LC4. So the escape is barely lateralised.
  • The startle needs the real wiring. It happened in 19 of 20 fast throws through the full stack, and in 0 of 20 with the connectome rewired. It's only partly specific, though: driving random visual neurons still startles about half the time, against every time with LPLC2/LC4.
  • The head reflex is specific. DNp15 is the strongest rotation-follower of 383 paired descending neuron types. The head gain is 0.28 [0.24, 0.32], and 0.00 rewired.
  • The speed threshold is mine, not the fly's. There are also false alarms: walking at a wall at 0.3 m/s startles 6 times in 20.

The full table is here: https://github.com/first-it-consulting/duckophila#controls-and-statistics

The correction post is the best part of this thread. Plenty of people would have shipped the first version's claims — you re-ran everything with rewired-brain controls and published the weaker, truer numbers next to the strong ones. The head reflex is the result that convinces me: strongest of 383 descending neuron types, gain 0.28 with an interval, and exactly 0.00 with the wiring shuffled. And thank you for the velstand note buried in the middle — that the twin's duck only walks on the backlash model will quietly save a lot of people a confusing afternoon.

Sign up or log in to comment