Embodied Classification with Neural Cellular Automata

An MNIST digit is placed at the centre of an 80×80 grid. One update rule — 8,768 parameters, applied at every cell, seeing only its own 3×3 neighbourhood — is iterated for 45 steps. Ten circular regions sit on a ring around the digit, and the model is trained so that at the end of the rollout the region belonging to the digit's class has the highest mean activation while the other nine stay dark. The prediction is therefore read off as a location on the grid, not from a classification head: the grid has to change shape until the answer is visible in its form. This reaches 95.5% on the MNIST test set, which is well below what an ordinary small convnet gets. The interest is in the mechanism, not the score — the signal has to travel from the digit to the right region using nothing but local communication.

Run it

20fps

80×80 grid · channel 0 step 0
prediction
region activation
each region over the rollout

The leading circle is outlined in white; a dashed green circle marks the true class when the model gets it wrong. “Lead” is the gap between the top region and the runner-up.

How it works

An ordinary classifier collapses an image to a label through a head that reads the whole feature map at once. This model has no head. The answer is a place. Ten circular regions (radius 8 px) sit at 36° intervals on a ring 27 px from the centre, one per class. The network's only job is to make the region for the true digit brighter than the other nine, and the prediction is simply whichever circle has the highest mean channel-0 activation. Nothing else ever reads the state.

Every cell runs the same 8,768-parameter rule and sees only its own 3×3 neighbourhood. So to answer, activation has to cross about 27 px of empty grid from the digit at the centre out to the correct circle — and that takes many steps of purely local communication, with the grid visibly changing shape the whole way. There is no global coordinator: the routing has to be baked into the shared rule and re-enacted from scratch on every rollout.

How it learns: a phase transition

Training does almost nothing for a long time. Accuracy sits at chance (~11%) for the first 20,000 steps while the rule flails, and then, somewhere around step 25,000, it snaps: 55% at the next validation point, 84% five thousand steps later. The model has found how to build a coherent directional wavefront, and once it can, accuracy climbs steadily to ~95%.

Test accuracy during training

champion run · seed 0 · validated every 5k steps

Validation runs every 5,000 steps, so the jump is only localised to within one interval, and this is a single seed — we did not test whether the timing is consistent across seeds.

What helps, what hurts, and what generalises

Two ingredients borrowed from growing-NCA and morphogenesis work — alive masking and stochastic firing — turn out to be actively harmful here. Both exist to keep empty cells empty, which is exactly the wrong instinct when a signal has to cross empty space. Switching alive masking on drops the model back to chance; lowering the fire rate below 1.0 fragments the wavefront. Retrained on other datasets the recipe holds up better than you might expect — Fashion-MNIST lands at 87.5%, CIFAR-10 at 50.5% — and a pool-tuned checkpoint keeps its answer far past its training horizon, losing only 0.4 pp at 5× the trained length.

Ablations

best test acc, mean of 2 seeds

    Other datasets

    same rule and geometry, retrained

      Past the training horizon

      champion_s0_stable, trained at T=45

        The four layouts

        The model dropdown in the demo offers four variants that differ only in how much spatial scaffolding the automaton is handed. A static (frozen, read-only) channel holds information the rule can read on every step but never overwrite — a persistent hint that survives the whole rollout.

        The striking part is how little the scaffolding matters: handing the network the geometry outright buys under a point over the plain no-static baseline. The routing is genuinely learnable from nothing.

        Setup

        grid
        80×80, toroidal
        state
        16 channels
        rule
        Sobel perception → 128-unit MLP → Δstate
        regions
        10 circles, r=8, ring r=27
        loss
        full-screen MSE, all timesteps
        training
        200k steps, fire rate 1.0, no alive mask