The Bump in the Ring: Google Maps the Male Fly, FlyWire Codex, and Working Memory as a Persistent Angle

12 min read✓ Done
The Bump in the Ring: Google Maps the Male Fly, FlyWire Codex, and Working Memory as a Persistent Angle

The Bump in the Ring

Google and Janelia just published a complete wiring diagram of an adult male fruit fly: brain, optic lobes, and the ventral nerve cord that plays the role of a spinal cord. The Google Research writeup and the companion visual essay landed on September 3, 2026. The counts are 166,700 neurons and about 125 million synapses. That is the largest complete brain map by neuron count so far.

The count is not what I keep coming back to.

I keep coming back to a bump of activity that sits on a ring of fewer than fifty cells, holds a heading in the dark, and gets read out as a steering command. That bump is working memory. It is also a ring buffer. It is the smallest closed self-updating memory loop I know of in nature.

This post is a reading of that map next to the 2024 FlyWire layer, the sparse motor codebook that comes out of it, and the architecture question I have been circling in Physics Concepts Every AI Engineer Should Know: once an agent can carry state across time, the question is no longer whether it can answer. The question is what it becomes after many updates.

What Happened

The new map is a collaboration between HHMI Janelia, Google Research, the MRC Laboratory of Molecular Biology, and the University of Cambridge. The flagship paper in Cell is Sexual dimorphism in the complete connectome of the Drosophila male central nervous system. Companion papers apply the same wiring to vision, taste, and social behavior.

The method is the decade-long connectomics stack: thin-section electron microscopy, flood-filling networks to grow 3D neurons from 2D pixels, and PATHFINDER, a reconstruction system trained partly on synthetic neurons. Human experts at Janelia still proofread. The public object lives in Neuroglancer and, now, as the MCNS dataset inside FlyWire Codex.

This is not the first complete fly brain. It is the first complete male central nervous system. The earlier layers matter:

  • October 2024, FlyWire: first complete adult female brain. 139,255 neurons, about 54.5 million synapses. Nature papers by Dorkenwald et al. and Schlegel et al..
  • June 2026, BANC: first female brain and nerve cord together. Bates, Phelps, Kim, Yang et al. in Nature. Distributed motor control, not a single brain CPU.
  • September 2026, male CNS: the same animal, other sex, full cord included. About 95 percent of cells are shared across sexes. The rest are dimorphic or sex-specific enough to drive courtship, aggression, and egg laying.

One visual from Google traces a path from R1 through R6 photoreceptors, through a male-specific intermediate named LoVP92 after the so-called love spot, and out to the DNg13 motor neuron. Sensation to muscle, cell by cell.

Codex Was the Index, Not a Brain Region

When people say "the 2024 Codex mapping," they are usually mixing two objects.

Codex is the Connectome Data Explorer. Arie Matsliah and Amy Sterling built it at Princeton so anyone could query the FlyWire graph without writing a custom pipeline. Cell types, pathways, twins, neuropils, shortest paths. Matsliah called it Google for the connectome. The 2023 note is Codex: Connectome Data Explorer.

Codex is not a neuropil. It is the random-access book of the wiring.

That matters because a map you cannot query is a museum piece. A map you can search is a compiler input. FlyWire opened the female brain in 2024. BANC opened the female cord in 2026. Google and Janelia opened the male CNS last week. Codex is where those graphs sit next to each other.

Sparse Motor Control

The other 2024 finding that people compress into "Codex" is this: the brain does not micromanage the body.

The neck connective is a bottleneck. Across the female and male maps there are roughly 1,300 descending neurons carrying commands from brain to cord, and roughly 1,800 to 2,400 ascending neurons carrying the body back up. Against 140,000 to 166,000 total cells, that is about one percent of the animal.

Those descending cells are not a single joystick. The 2024 Nature paper Descending networks transform command signals into population motor control showed that command-like descending neurons recruit networks of other descending neurons. The giant fiber that drives a ballistic escape jump has only a few partners. A forward-walk cell such as DNp09 recruits on the order of thirty. The median descending neuron connects to about four others.

BANC then flipped the classical picture. Effector cells — motor neurons, endocrine cells, viscera — are influenced first by sensors on the same body part. A leg is mostly run by that leg. Local loops do the work. Ascending and descending cells stitch those loops into behavior modules: flight steering, walking, grooming, feeding, threat. The central complex and mushroom body supervise. They do not puppet every muscle.

Some of those supervisors are almost insultingly small. PFL2 and PFL3 cells compare the fly's current heading to a stored goal and emit a steering command. BANC traces PFL1 into flight-steering descending neurons, and finds an ascending copy that can update the compass before the body has finished turning. That is an efference copy. A forward model. The loop writes its own next state.

Pospisil and colleagues' 2024 effectome analysis pointed the same direction: the dominant dynamical modes of the fly brain are sparse. On the order of fifty neurons sit in the top eigenmodes. Navigation concentrates in the ellipsoid body. The interesting computation is not evenly smeared across 166,000 cells.

The Bump

In 2015, Johannes Seelig and Vivek Jayaraman put a tethered fly on a ball in a tiny virtual-reality arena and imaged the ellipsoid body, a doughnut of tissue in the central complex. Neural dynamics for landmark orientation and angular path integration is still the paper I send people.

What they saw was a single sector of calcium activity. A bump. As the fly turned, the bump moved around the ring. A population vector of those cells decoded heading. When they painted the eyes black and shut off the lights, the bump kept moving with the fly's turns, accumulating error the way dead reckoning always does. When the fly stood still, the representation could persist. Their phrase: "persistent activity, a potential substrate for short-term memory."

The cells are EPG neurons, also called compass or wedge neurons. Their dendrites tile the ellipsoid body in about sixteen wedges. Each wedge is a preferred direction. At any moment, one localized bump is the heading. One bump. Not a cloud. Not a tape of recent headings. A position on a circle.

In 2017, Kim, Rouault, Druckmann, and Jayaraman showed why the bump is stable. Ring attractor dynamics in the Drosophila central brain. Local excitation plus global inhibition. Neighbors keep the bump together. The rest of the ring is suppressed. That is the textbook ring attractor, observed in a real brain, not just drawn on a whiteboard. They could write an artificial bump with optogenetics. The circuit then held the new heading with naturalistic dynamics.

The update rules are almost embarrassingly clean:

  • PEN cells carry angular velocity and shift the bump. Path integration.
  • Ring neurons bring visual landmarks and wind. Plasticity at those synapses tethers a scene to a heading.
  • If the lights go out, the bump is the last bound heading plus integrated self-motion.
  • PFL cells read the phase of the bump against a goal heading and turn that difference into left, right, or hold.

Memory here is not a stored token. Memory is where the bump sits. Amplitude can carry certainty. A 2023 ring-attractor model treated that amplitude as a circular Kalman filter. Drift is the failure mode. Local excitation and global inhibition are the error-correcting code.

Noorman and colleagues showed in 2024 that a continuous ring attractor can, in theory, be stitched together with as few as four neurons if the local excitation is tuned precisely. The fly spends precision of wiring, not neuron count. That is the sparsity I care about.

Ring Attractor as Memory Architecture

A transformer remembers with a KV cache. That cache is a tape. Tokens fall off the window. The failure mode is truncation.

A ring attractor remembers with a persistent activity packet on a circle. The failure mode is drift.

Those are different physics.

I have been using attractor language for agent memory for a while. In the physics note, an attractor is a state a system tends to move toward. Intent can act like one. A weakly measured agent wanders. A well-measured agent can converge. The archived geometric-memory notes pushed the same claim in a different coordinate system: memory as position on a manifold, not as a row in a table. The fly compass is the biological version of that argument.

Write it as a control loop and it looks like the agent harnesses everyone is now building:

  1. Hold a continuous state. The bump.
  2. Integrate a velocity. PEN cells.
  3. Bind an observation when it is stable. Ring-neuron plasticity.
  4. Compare state to a goal. PFL cells.
  5. Emit a sparse action. Descending neurons.
  6. Write an expected consequence back into the state. The ascending copy.

That is not a metaphor for recursive self-improvement. It is a working existence proof that a closed loop can persist, update, act, and correct itself with a handful of specialized cell types. The fly is not training a new network every wingbeat. It is moving a packet of activity on a compiled ring. The connectome is the compiled weight matrix.

Labs keep rediscovering the same motif. Path-integration RNNs grow grid-like and ring-like structure on their own. Recent recurrent nets trained to integrate a circular variable split into a persistent ring module and a dissipative velocity controller — the same split the fly already has between EPG memory and PEN shift. Ring attractors have been dropped into reinforcement-learning action selection because they keep neighboring actions neighboring. The architecture class is not obscure. It is just not the architecture class of a frontier transformer.

On the Name Codex

I have been quite sure, looking at this literature next to OpenAI's coding agent, that the name was not a coincidence.

The documented history does not support a direct naming. OpenAI announced Codex in 2021 as a GPT-3 descendant trained on public code. It powered early GitHub Copilot. Product leads later said they brought the name back in 2025 because it was a cool callback and because it sits next to code and execution. FlyWire Codex, the explorer, is a 2023 Princeton tool. The full female brain map is October 2024. The timeline does not give OpenAI the fly book as a source for the 2021 model.

The Latin root still does the work I wanted the coincidence to do.

A codex is a bound, random-access book. It replaced the scroll. You no longer have to unwind the whole tape to reach a page. FlyWire Codex is a random-access book of a mind. OpenAI Codex is a random-access book of software. The fly's descending bottleneck is a sparse codebook from perception to action. The bump is a random-access angle: overwrite in place, integrate velocity, persist without input.

Same word. Three compressions. Independent christenings. One architecture class.

That is the part I was certain about, and I am still certain about it. The fly already solved the memory primitive that agent labs are rediscovering the hard way.

East, West, and Who Publishes the Wiring

Connectomics is one of the rare places in this era where the map is the product and sharing is the strategy. Google, Janelia, Princeton, Cambridge, and Harvard keep putting the graphs in public viewers. You can open Codex tonight and walk from a photoreceptor to a motor neuron.

Frontier model weights still mostly do not work that way. East and West are both racing agent harnesses — coding loops, memory layers, hidden-state monitors — while the one fully compiled agent we can actually read is an insect. I do not treat that as a morality play. I treat it as a measurement advantage. If you want to know how sparse a working sensorimotor agent can be, the fly is no longer a cartoon. It is a dataset.

Google's motive is the one Viren Jain and Michal Januszewski keep stating: this class of problem needs AI, and mapping small nervous systems is the path toward nervous systems we cannot yet touch. Princeton's motive is the index. Janelia's motive is the circuit. The overlap is the thing I trust. When labs that do not ship the same products still publish the same graph, the graph is usually real.

My Read

For memory systems and local agents, the fly is not a mascot. It is a specification.

  • Persistent state should have a geometry, not only a log. A ring, a torus, a low-dimensional attractor. Position is the memory.
  • The motor interface should be sparse. A thousand action lines, not a million free parameters leaking into the world on every step.
  • Supervision should sit above local loops, not replace them. Most work should happen near the sensors that can correct it.
  • Confidence should live in the shape of the state — bump amplitude, basin depth — not only in a verbal hedge.
  • The loop should write expected consequences back into the state. Otherwise the agent is startled by its own hands.

I do not need a 166,000-unit simulation of a fly to use those rules. I need to stop treating the KV cache as the only kind of memory an agent is allowed to have.

What I Am Watching Next

  • Whether anyone instruments hidden state in a coding agent as a bump: one persistent packet, a phase, an amplitude, a drift term.
  • How much of BANC's distributed-control lesson survives when the "body" is a tool runtime instead of a leg.
  • Whether the male and female maps disagree in the central complex, or only in the courtship wiring.
  • How far a fifty-unit continuous working memory can carry a small local agent before it needs a tape again.

The fly already published the existence proof. Google and Janelia just handed us more of the compiled weights it lives inside.