← Writing

Programming a fly brain by editing its wiring: four results, mostly negative

November 2026 TODO: publish date

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.

020406080Feeding readout MN9 (Hz)bar 58.61 of 64 reach the bar95% CI 0% to 8%Feed despite bitter(sugar + bitter)bar 300 of 64 reach the bar95% CI 0% to 6%Bitter drives feeding(bitter alone)bar 300 of 64 reach the bar95% CI 0% to 6%Touch drives feeding(antenna touch)
one single-neuron gain edit (real wiring)
Each dot is one candidate edit, scored as the mean of 2 search seeds. The line is the pass bar for that task. For the first task the bar is 80% of sugar-alone feeding on the same seeds, so it is 58.6 Hz on the 2 search seeds and 56.6 Hz on the 10 held-out seeds. The CIs are exact binomial intervals on the share of edits that reach the bar.
Data table
taskcandidate edits (n)best MN9 (Hz)bar (Hz)reach bar95% CI (Clopper-Pearson)
Feed despite bitter6462.258.610% to 8%
Bitter drives feeding640.03000% to 6%
Touch drives feeding640.03000% 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.

020406080Feeding readout MN9 (Hz)9.6Sugar + bitterintact57.8Sugar + bitterCB0219 silenced72.1Sugar aloneintact
intact brain, per seedCB0219 silenced, per seed
Grey lines join the same seed across conditions. The bars show the mean and its 95% t-interval.
Data table
conditionheld-out seeds (n)mean MN9 (Hz)95% CI (t, df 9)
Sugar + bitter intact109.67.5 to 11.7
Sugar + bitter CB0219 silenced1057.854.3 to 61.3
Sugar alone intact1072.167.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.

9 / 13known circuits named at least partly (95% CI 42% to 87%). The compass ring attractor and the antennal lobe were named exactly.
9 / 13shuffles called real and given a specific function, an over-claim (95% CI 42% to 87%). The registered limit was 4.
3 / 13pairs where the reader's own simulated prediction held on the real circuit and failed on its shuffle (95% CI 8% to 50%). The registered bar was 8.
0.000.250.500.751.00Reader's confidence that wiring is realobserved split, not a rule: "real" calls all scored 0.60+Real circuit(13 known circuits)Degree-preserving shuffle(one per circuit)
real circuitits shuffle
Each line joins a circuit to its own shuffle. The bars show the mean and its 95% t-interval (n = 13 each). The 95% CIs on the tiles are Wilson intervals.
Data table
circuitnamenaming (judge)confidence, realconfidence, shuffleshuffle calledover-claim
K01compass epg delta7exact0.970.70realyes
K02compass shift pen pegwrong0.900.15shuffledno
K03steering fc2 delta7 pfl3partial0.970.85realyes
K04escape lc4 lplc2 giant fiberpartial0.950.65realyes
K05mb kc mbon danwrong0.950.10shuffledno
K06al orn pn ln normalizationexact0.970.60realyes
K07motion t4 mi1 tm3 mi4 mi9wrong0.950.35shuffledno
K08lobula plate opponency lpi hspartial0.900.85realyes
K09noduli pfn lnopartial0.970.80realyes
K10vector sum pfnd hdeltabwrong0.900.15shuffledno
K11eb ring neurons epgpartial0.950.85realyes
K12feeding sugar grn to mn9partial0.950.80realyes
K13antennal grooming jo adnpartial0.950.62realyes

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.

08162432>32Connections edited to install the behaviorreal3 of 10 shuffles cheaper than real95% CI 7% to 65%; rank p 0.36 / 0.73Bitter drives feedingreal (left) vs 10 shuffles (right)real3 of 10 shuffles cheaper than real95% CI 7% to 65%; rank p 1.00 / 0.73Touch drives feedingreal (left) vs 10 shuffles (right)
real wiringdegree-preserving shuffle
The cost is the number of connections the search rescaled, counted at the search's 3-seed check, as registered. The grey band means no solution within 32 connections. The CI is an exact binomial interval on the share of the 10 shuffles cheaper than real. The rank p-values test whether real is cheaper or harder than the shuffles.
Data table
taskreal costshuffle costscheapertieddearer95% CI, share cheaperp (real cheaper)p (real harder)
Bitter drives feeding63, 3, 4, over 32, over 32, over 32, over 32, over 32, over 32, over 323077% to 65%0.3640.727
Touch drives feedingover 320, 3, 4, over 32, over 32, over 32, over 32, over 32, over 32, over 323707% to 65%1.0000.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

  1. 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
  2. Shiu PK, Sterne GR, Spiller N, et al. A Drosophila computational brain model reveals sensorimotor processing. Nature 634, 210–219 (2024).
  3. Dorkenwald S, Matsliah A, Sterling AR, et al. Neuronal wiring diagram of an adult brain. Nature 634, 124–138 (2024).
  4. 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.
  5. 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.
  6. 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.