cadence / connectome / helpBack to the demo

Connectome

Two small animals whose nervous systems were mapped cell by cell: the gaze circuit of a young zebrafish, and the whole body of a marine worm larva. Here that measured wiring runs as a Cadence brain in your browser, steers the animal's body, and, in the fish, learns what you teach it.

What it shows about CadenceCadence can run real animal wiring as a living brain: every cell's activity settles with the cells it is wired to, step by step in real time, and the brain keeps a real state. The fish holds a glance in its own activity, a small memory. Teach it to hold its gaze, to let it go and to hold it again, and the strengths of its measured connections change while it lives and keep what they learned.

What you see

The demo has two pages, switched by the tabs at the top: the larva (it opens first) and the fish. Both show the animal in a tank on the left and its brain, live, on the right.

THE LARVA THE FISH HELP ▸ Teach this fishhold its gaze, let it return, hold again green · gold 1 2 3 4 5 6 7 8
The fish page, drawn simply. The larva page has the same layout without the teaching panel. The numbers match the list below.
  1. The tabs. The larva, the fish, and this help.
  2. Teach this fish (the fish page only). Opens the teaching controls: choose a lesson, teach it, test the gaze, pause learning. A line under them says what to try next.
  3. The tank. The animal swims in a tank you can turn: drag to orbit, scroll to zoom. The camera follows the animal.
  4. The buttons under the tank. What you can do to the animal: tap the glass, switch or move the light, feed the fish, make it glance left or right, follow it with the camera, pause, set the time speed.
  5. The brain, live. The traced cells of the animal, laid out as in its body, lit green by their activity in the running brain. On the larva, gold flashes where a cell repairs its activity as the brain settles after a change. On the fish, gold marks cells whose incoming connections a lesson changed: learning.
  6. The learning key (the fish page). Green is activity, gold is learning, and a line counts the connections the last lesson changed.
  7. The colour key. The kinds of cells, each in its colour. Point at one to read what it does.
  8. The status line. On the fish page: the lesson chosen, how the last fixation went and whether learning is on. On the larva page: what is measured and what the model adds.

Every button and every part of the brain explains itself when the pointer rests on it; parts marked with a question mark open a card on a click too.

Why it matters

What a connectome is. A connectome is the complete wiring diagram of a nervous system: every nerve cell, and which cell connects to which, by how many synapses. Scientists make one by cutting a piece of brain into thousands of very thin slices, imaging each slice with an electron microscope, and tracing every cell and every contact through the stack. The fish wiring here, one side of a young zebrafish's hindbrain, has 2,884 neurons and 75,195 synapses. The larva's covers its whole body: 25,609 cells.

Why running it and teaching it is remarkable. A wiring diagram by itself does nothing. It says who connects to whom, not what the circuit does. To run it, every cell needs a response and activity has to flow through the measured connections; to teach it, the strengths of those connections have to change through practice while the wiring itself, who connects to whom, stays as measured. Cadence does both with local rules: each cell settles its activity with the cells it hears from, and a lesson changes each connection from the activity at its two ends. Nothing is sent backwards through layers.

So measured anatomy becomes a brain you can watch, poke and teach, in real time. The fish's gaze circuit learns to hold a glance, to let it go, and to hold it again, and in every one of 12 seeded runs it did all three. The larva's whole-body wiring turns it toward a light and stops it after a tap, with no autopilot in between: the turn and the stop come out of the wiring, read from its real motor cells. For anyone building brains, this is a way to start from nature's wiring instead of a blank network of layers.

A real state, a real memory. Holding a gaze is a memory: after a glance ends, the fish's integrator neurons keep the eye position in their own lasting activity. In the running brain that activity is the brain's state, carried from moment to moment, as it is in the animal.

What you can do

On the larva page

On the fish page

  1. Open Teach this fish. With Hold your gaze chosen, press Teach this lesson. The fish practises for 10 minutes of fish time (time runs eight times faster during a lesson), glancing around by itself. Gold flashes in the brain mark connections changing, and the bars show how much of a glance it holds five seconds later. Learning then pauses so you can see the result.
  2. Choose Let it return and press Teach this lesson again. On the same brain, for two and a half fish minutes, the connections learn to let the gaze drift back. The bars fall.
  3. Choose Hold your gaze and teach once more. The same brain learns to hold again. The bars climb back.

How it works

From wiring to a running brain. Each measured cell becomes a Cadence patch, and each recorded connection stays between the same two cells and carries its measured synapse count. The model adds what the anatomy does not record: whether a connection excites or inhibits, how strongly a synapse counts, how a cell responds to its input, the time scale, and how the senses and muscles connect to the body. Each step, a cell moves its activity toward the combined input from the cells it hears from; the brain settles where every cell agrees with its inputs. The fish brain takes 25 steps per fish second, the larva's 25 per larva second, fast enough to run in real time on the page.

The larva. The lamp drives the photoreceptors of its eyes, a tap drives the touch receptors of its collar, ultraviolet drives its ciliary photoreceptors. The brain's own motor cells, read through declared mappings, set how hard the cilia on each side beat and how the muscles pull. Its connections stay fixed: the larva runs, it does not learn.

sensory neuron
Cells that sense, among them the eyes' photoreceptors and the collar's touch receptors.
interneuron
Neurons between sensing and acting.
motor neuron
Neurons that drive muscles and cilia, among them the ciliomotor neuron MC that stops the cilia after a tap.
muscle, ciliated cell
What moves the body: the long muscles, and the ciliary bands whose beating hairs swim the larva.

The fish. The measured half of the hindbrain runs twice, one copy per side. A glance (a saccade) sends a burst into the circuit; the integrator neurons keep that activity, and the eye position is read from the abducens neurons that drive the eye muscles. Swimming, hunting and escape come from a fixed autopilot, which is not learned.

integrator
Neurons whose lasting activity holds the eyes where a glance put them. The connections into them are the ones that learn.
abducens
Motor neurons that turn the eye, and internuclear neurons that carry the command to the other eye.
DO, axial, vSPN
Neurons of the balance system, of the body's axial movements, and neurons that project toward the spinal cord.

How the fish learns. Every connection starts at 0.8 of the selected strength, where an untaught gaze drifts back within a second. One second after a glance, the brain notes the integrator's activity. At the next glance, or after ten seconds of looking, if that activity slipped by more than 5%, the brain takes a lesson toward a target: 95% of the noted activity for "hold your gaze", a quarter of it for "let it return". The lesson compares a nudged settle with a free one, and every connection changes from the activity of its own two cells. The wiring never changes; only connection strengths do, within bounds, keeping their signs. The teacher reads the circuit's own activity; it does not see the tank.

Deeper pages. The demo's other pages go further: from wiring to a learning circuit, what is measured, what is modeled, the measured wiring, neuron by neuron, the same wiring with its weights fixed, spiking neurons against rate patches, measured wiring against shuffled wiring and the model choices in numbers. The mathematics is in two preprints: Agreement and Surprise and Cadence: Learning Through Local Patch Settlement.

The numbers

ReadingValue
The fish wiring: neurons · connections · synapses2,884 · 44,969 · 75,195
The larva wiring: cells · connections · synapses25,609 · 18,970 · 32,202
Untaught fish: share of a glance held after 12 s0.00
After "hold your gaze": held after 12 s / 24 s0.77–0.87 / 0.61–0.76
After "let it return": held after 12 s0.01–0.04
After holding again: held after 12 s0.79–0.89
Runs that hold, return and hold again12 of 12
On this page, through its buttons: held after 5 s, untaught / taught to hold / to return / to hold again (left, right half)0.006 / 0.87, 0.87 / 0.20, 0.30 / 0.93, 0.92
Larva, lamp on its left / right for 3 s: turn toward it21.6° left / 35.0° right
Larva, tap: cilia stop signal within 0.5 s, with a tap / without0.45 / 0.14

Where each number comes from, in the connectome/ folder of the repository: the wiring sizes from web/data/brain.json and web/data/larva_brain.json (the compiled nets, described in MODEL_CARD.md); the fish's learning from web/data/learning_reteach.json (3 seeds × 2 sides × 2 glance sizes = 12 runs, in node, on the page's own engine and teacher; ranges over the 12 runs; the hold and return readings are the same in web/data/learning_release.json); the page's own readings from receipts/learning_ui-20261113.json (this page in a headless Chromium, teaching through its buttons: 10, 2½ and 10 fish minutes); the larva's turns and its tap from receipts/scenario_larva-20261113.json (this larva page in a headless Chromium; the run of 7 October 2026, receipts/scenario_larva.json, read 21.6°, 34.5°, 0.37 and 0.14).

Limits

Keys

SpacePause or resume the animal and its brain