How we borrow the wiring of a fly’s learning system to build a model that evaluates words.
01
What “learning with a fly brain” means here
We use connections reconstructed from one adult female Drosophila melanogaster brain. We train a mathematical readout on Scrabble games. We do not train the animal, simulate its movements, or claim its neurons naturally understand letters. The board supplies artificial input to a real wiring pattern.
EXPLORE THE MEASURED LOCATIONS
Our circuit, in context
FLYWIRE FAFB v783
Colored points are reference locations belonging to the exact neurons used by the model. Muted points sample the rest of the brain. Select a cell class to locate it in both views.
Loading measured coordinates…
3D REFERENCE MAP
Drag to rotate · arrows work too
2D PROJECTION
Click a colored point to inspect itX / Y · µm
SELECTED POPULATION
The mushroom-body learning circuit
Projection neurons provide input, Kenyon cells expand it, APL supplies inhibitory feedback, and MBONs provide an output route.
Choose a class, then a neuron, or click a colored point.
What these maps show, and what they do not
The source is Codex’s coordinates.csv.gz: community-marked reference positions associated with neuron root IDs. We retain all reference points for our 2,775 selected neurons, and one point for each of 7,000 sampled background neurons. A neuron can have multiple marks. Dots therefore do not represent a count of synapses.
The 3D view rotates the recorded coordinates; the 2D view projects those same coordinates onto XY, XZ, or YZ. Coordinates are converted from nanometers to micrometers. Native axes are preserved: we do not label screen-left as the animal’s left, apply an atlas registration, or infer unprovided soma centers.
These are not full neuron meshes, traced arbors, neuropil volumes, or a rendering of the mushroom-body lobes. The calyx and lobes are explained below; their boundaries are not present in this coordinate table. For full anatomical reconstructions, explore the source neurons in FlyWire Codex ↗.
The mushroom body supports associative learning. In its olfactory pathway, projection neurons carry signals from the antennal lobe toward the calyx, an input region where they contact Kenyon-cell dendrites. Kenyon-cell axons run into mushroom-body lobes, where MBONs read out activity. Our extraction uses this pathway’s connections, not an entire movement-control system. Cell-type and circuit reference ↗
PN
Projection neurons
146 CELLS · INPUT
Biologically, antennal-lobe projection neurons carry processed sensory signals into higher brain regions, including the mushroom-body calyx.
In Flyword: a fixed random projection converts board features into activity in the ALPNs with measured connections to our chosen KCs. These are artificial board signals, not odors.
KC
Kenyon cells
2,580 CELLS · EXPANSION
Kenyon cells are the mushroom body’s intrinsic neurons. Combining different PN inputs allows many distinguishable activity patterns.
In Flyword: measured PN → KC weights stay frozen. A binary firing cap keeps at most 129 KCs active. Their sparse activity is what the output layer learns from.
APL
Anterior paired lateral
1 CELL · INHIBITION
APL is a GABAergic feedback neuron. Experiments link KC–APL feedback to sparse odor coding and discrimination. Experimental evidence ↗
In Flyword: one measured KC → APL → KC feedback step inhibits activity before the 5% cap. The feedback gain and hard cap are modeling choices, not measured firing dynamics.
MBON
Mushroom-body output
48 CELLS · READOUT
MBONs provide output from mushroom-body compartments to downstream circuits. Their biological function does not assign them Scrabble-specific “approach” or “avoid” labels.
In Flyword: fitted KC coefficients are distributed over observed KC → MBON contacts. Summed contributions give an eventual-winner prediction; positive and negative colors depict the task readout.
The full mushroom body has additional inputs and modulatory cells. This model does not include dopamine-driven biological learning rules, DPM dynamics, a sensory body, muscles, or locomotor circuitry. In particular, a model-selected word is an action in this game, not simulated movement of a real fly.
THE OFFLINE TRAINING METHOD
Exactly what happens to a move
Reconstruct expert play
Replay the 2,566 raw scrabblr game records. Keep placement afterstates and each player’s known rack leave before refilling. Final scores determine the eventual-winner label; they are never included in the input.
Encode 1,115 binary features
Use board occupancy, two-bit tile-value buckets, available premium squares, seven rack slots and tiles remaining. The encoding does not include board-letter identity or the score difference. This limits what the model can learn.
Pass through frozen anatomy
A seeded, untrained projection drives 146 PNs. The 11,004 measured PN → KC edges use 173,587 synapses as weights, normalized by incoming strength. Signs come from presynaptic transmitter predictions: ACh positive; GABA/glutamate negative. These signs are assumptions about effect, not receptor measurements.
Inhibit and sparsify
Apply one measured APL feedback step at gain 0.5, rectify, then retain the strongest 5% of KC responses as binary activity. This compresses each candidate into a sparse code. There is no backpropagation into the input projection, PN → KC weights, or APL connections.
Fit only the output
Fit a regularized logistic readout on the KC features. Each KC’s learned coefficient is shared over its measured MBON contacts, and the MBON contributions are summed with a learned bias. This is a constrained task readout, not a learned reconstruction of a whole animal.
Test against two controls
Split by entire game: 2,044 training games and 511 test games, excluding 11 ties. Repeat training after 110,040 degree-preserving swaps in PN → KC connectivity. Also fit logistic regression directly on the raw input. Use the same held-out games for all three.
The current run does not show an advantage for real wiring over the degree-preserving shuffle. These are held-out winner-prediction accuracies, not game win rates. The playable opponent picks the legal candidate the circuit prefers most; immediate move score only breaks ties. Every move it plays is a valid word, but its choice among them is close to random. The animation still displays actual model activations for each candidate.