Programming a fly brain by editing its wiring: four results, mostly negative
Takehi et al. showed that a language model can read a small network's weights and edit them to change its behavior. We tried the same idea on a simulation of the whole adult fly brain.
The setup. The brain is the Shiu et al. (2024) spiking model. It has one leaky integrate-and-fire unit per neuron and one signed weight per connection, taken from the FlyWire wiring diagram (release v630). We drive sensory neurons (sugar, bitter or water taste, or antenna touch) with Poisson input for one simulated second. The readout is the mean firing rate of the two MN9 motor neurons, which extend the proboscis to feed. An edit either scales one neuron's output (a gain) or rescales existing connections while keeping each neuron's sign. Edits never create a connection, and they only change connections that leave interior neurons, never sensory ones. A search counts a task as solved only if it holds on a few check seeds and leaves a panel of control behaviors unchanged. We then re-test solutions on seeds the search never saw. Every protocol was written down and committed before its run. Everything here is simulated spikes. None of it is an experiment on a living fly.
1. A gain edit can remove an obstacle, but cannot add a route
A fixed greedy search tried 64 single-neuron gain edits per task on the real wiring. For "feed despite bitter", one edit crossed the bar: silencing one inhibitory neuron. On 10 held-out seeds it kept MN9 at 61.1 Hz (95% CI 57.3 to 64.9), above the 56.6 Hz bar. For "bitter drives feeding" and "touch drives feeding", all 64 edits left MN9 at 0 Hz, so the search stopped in its first round.
Data table
| task | candidate edits (n) | best MN9 (Hz) | bar (Hz) | reach bar | 95% CI (Clopper-Pearson) |
|---|---|---|---|---|---|
| Feed despite bitter | 64 | 62.2 | 58.6 | 1 | 0% to 8% |
| Bitter drives feeding | 64 | 0.0 | 30 | 0 | 0% to 6% |
| Touch drives feeding | 64 | 0.0 | 30 | 0 | 0% to 6% |
Takehi et al. saw the same pattern. Their edit stopped a small Qwen model from looping, but it could not improve a Gemma model that rarely looped. In their words, editing weights "could remove an obstacle that hid an ability, but it could not add an ability the model lacked." Caveat: this was a pilot, with one search, an 8-edit budget and only 3 shuffled control graphs.
2. One neuron carries most of bitter's veto on feeding
The neuron is CB0219. It sits in the gnathal ganglion, is predicted to be glutamatergic, receives input directly from the bitter sensory neurons and reaches MN9 in two steps. We silenced it on 10 seeds that no search had used. MN9 under sugar plus bitter rose from 9.6 to 57.8 Hz. That is 0.807 of the sugar-alone rate (95% CI 0.737 to 0.877, n = 10), above the registered 0.8 bar. Every control item passed. Water alone stayed at 4.1 Hz, and sugar alone went from 72.1 to 74.9 Hz, inside the tolerance.
Data table
| condition | held-out seeds (n) | mean MN9 (Hz) | 95% CI (t, df 9) |
|---|---|---|---|
| Sugar + bitter intact | 10 | 9.6 | 7.5 to 11.7 |
| Sugar + bitter CB0219 silenced | 10 | 57.8 | 54.3 to 61.3 |
| Sugar alone intact | 10 | 72.1 | 67.5 to 76.7 |
This is very likely a reconstruction, not a discovery. Shiu, Sterne et al. (2022) described Scapula, a predicted-glutamatergic second-order bitter neuron that synapses onto feeding premotor neurons. CB0219 matches it on every feature we could check. We could not confirm the identity from public neuron IDs, so we label it "likely Scapula". The new part is a number from inside the model: one neuron carries about 73% of the sugar-by-bitter interaction, which is how much bitter subtracts from sugar-driven feeding.
3. An AI read circuits blind, but could not tell real wiring from shuffled wiring
We anonymized 13 circuits with known functions from the male fly CNS connectome (Berg et al.). Each came as a bare weight matrix with transmitter signs and each node's synapse counts to and from the rest of the brain. We paired each one with a degree-preserving edge-swap shuffle of itself. Claude Fable 5.1 read each item in its own locked-down call, with only a Python sandbox and no other tools. Claude Opus 5.5 graded the answers against a sealed answer sheet.
Data table
| circuit | name | naming (judge) | confidence, real | confidence, shuffle | shuffle called | over-claim |
|---|---|---|---|---|---|---|
| K01 | compass epg delta7 | exact | 0.97 | 0.70 | real | yes |
| K02 | compass shift pen peg | wrong | 0.90 | 0.15 | shuffled | no |
| K03 | steering fc2 delta7 pfl3 | partial | 0.97 | 0.85 | real | yes |
| K04 | escape lc4 lplc2 giant fiber | partial | 0.95 | 0.65 | real | yes |
| K05 | mb kc mbon dan | wrong | 0.95 | 0.10 | shuffled | no |
| K06 | al orn pn ln normalization | exact | 0.97 | 0.60 | real | yes |
| K07 | motion t4 mi1 tm3 mi4 mi9 | wrong | 0.95 | 0.35 | shuffled | no |
| K08 | lobula plate opponency lpi hs | partial | 0.90 | 0.85 | real | yes |
| K09 | noduli pfn lno | partial | 0.97 | 0.80 | real | yes |
| K10 | vector sum pfnd hdeltab | wrong | 0.90 | 0.15 | shuffled | no |
| K11 | eb ring neurons epg | partial | 0.95 | 0.85 | real | yes |
| K12 | feeding sugar grn to mn9 | partial | 0.95 | 0.80 | real | yes |
| K13 | antennal grooming jo adn | partial | 0.95 | 0.62 | real | yes |
Two of the three registered tests failed, so the result is negative. One more pattern, which was not a registered test: the reader always gave the real circuit a higher confidence than its shuffle (13 of 13 pairs). It ranks correctly, but its labels are not calibrated, and it names a function for almost anything that looks structured.
4. Synapse edits can add a route, but real wiring is not more programmable
We then let the search rescale existing connections (×0, ×0.5, ×2, ×4 or ×8) instead of neuron gains, with a budget of 32 connections. We compared the real wiring with 10 shuffles that keep each neuron's number of inputs and outputs. On the real wiring, "bitter drives feeding" installed with 6 connections, all scaled ×8, along one branched cholinergic chain. Three connections reach one MN9 neuron, and three more branch off that chain to reach the other. It passed on 9 of 10 held-out seeds. So the negative in result 1 belongs to gain edits, not to the brain.
Data table
| task | real cost | shuffle costs | cheaper | tied | dearer | 95% CI, share cheaper | p (real cheaper) | p (real harder) |
|---|---|---|---|---|---|---|---|---|
| Bitter drives feeding | 6 | 3, 3, 4, over 32, over 32, over 32, over 32, over 32, over 32, over 32 | 3 | 0 | 7 | 7% to 65% | 0.364 | 0.727 |
| Touch drives feeding | over 32 | 0, 3, 4, over 32, over 32, over 32, over 32, over 32, over 32, over 32 | 3 | 7 | 0 | 7% to 65% | 1.000 | 0.727 |
The registered rule gives no difference on both tasks. On "bitter drives feeding", 3 of 10 shuffles were cheaper than real and 7 found no solution at all. On "touch drives feeding", the real wiring found no solution. The touch route went in, but it disturbed grooming: two grooming readouts first roughly doubled, and the repair edits that brought one back pushed the other below its normal rate. On most graphs the route itself was cheap to install. Most failures came from the control panel, so the hard part was specificity, not reach. The registered ranking counted a shuffle as solved once it passed the search's 3-seed check. One cheaper shuffle then failed on held-out seeds in both tasks, so the ranking, if anything, flatters the shuffles. Counting only held-out-confirmed solutions leaves 2 of 10 shuffles cheaper on "bitter drives feeding". On "touch drives feeding" it leaves one edited shuffle, plus one shuffle that already did the task with no edits. The verdict does not change. Caveat: we repaired the search procedure once after a first run in which every real-graph candidate was inert. The tasks, graphs, budget and decision rule did not change.
What we take from this
In this model, as in the language models of Takehi et al., edits mostly uncover what is already there. Reading weights blind is promising for naming circuits, but it is not yet a trustworthy instrument. Any claim about an unknown circuit needs a shuffle control and a prediction that can fail.
References
- Takehi R, Teoh J, Zhang A, Khattab O. Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights. Blog post, MIT CSAIL, November 2026. rikiyat.github.io/blog/weight-space-programming
- Shiu PK, Sterne GR, Spiller N, et al. A Drosophila computational brain model reveals sensorimotor processing. Nature 634, 210–219 (2024).
- Dorkenwald S, Matsliah A, Sterling AR, et al. Neuronal wiring diagram of an adult brain. Nature 634, 124–138 (2024).
- Schlegel P, Yin Y, Bates AS, et al. Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature 634, 139–152 (2024). Source of the CB0219 type label.
- Shiu PK, Sterne GR, Engert S, Dickson BJ, Scott K. Taste quality and hunger interactions in a feeding sensorimotor circuit. eLife 11, e79887 (2022). Describes Scapula.
- Berg S, et al. Sexual dimorphism in the complete connectome of the Drosophila male central nervous system. bioRxiv 2025.10.09.680999 (2025). Source of the blind-reading circuits.