Embodied Classification with Neural Cellular Automata

An EMNIST digit is placed at the centre of an 80×80 grid. One update rule, 8,320 trainable 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. Our model, trained from random initialization, reaches 96.13% on the 40,000-image EMNIST Digits test set. The interest is in the mechanism, not just the score: the signal has to travel from the digit to the right region using nothing but local communication.

Run it

20fps

Loading our EMNIST model…

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,320-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 our model learns

This rule starts with random weights, not a pretrained checkpoint. Clean validation accuracy rises from 5.57% at initialization to 71.07% after 5,000 updates and 90.49% after 15,000. Training stops at 80,000 updates, when validation reaches 96.05%. The curve below uses a separate 20,000-image holdout, not the official test set.

Validation accuracy during training

our EMNIST run · seed 0 · every 5k updates

Validation runs every 5,000 updates at a fixed 45-step rollout. This is one training seed. The best validation checkpoint is selected before evaluating the official test set.

Results on unseen digits

The selected checkpoint correctly classifies 38,453 of 40,000 official EMNIST Digits test images at 45 steps: 96.13%. Each digit class has 4,000 test images. The ten gallery examples above are deliberately chosen to be correct; they do not measure accuracy. Longer rollouts and hand-drawn inputs are exploratory, not evaluated benchmarks for this model.

Digits 0–4

official test accuracy, %

    Digits 5–9

    official test accuracy, %

      Dataset split

      EMNIST Digits images

        Our layout: no static channels

        A static channel would hold a frozen copy of the digit or a mask of the output regions. Our model uses neither. Only channel 0 is seeded with the input digit; the other 15 start at zero, and every channel is free to change on every step.

        Training uses 30–45 rollout steps and mild affine augmentation on 25% of inputs. The browser defaults to the measured 45-step horizon. Changing the step count in drawing mode lets you explore the dynamics, but we have not established long-horizon stability.

        Setup

        grid
        80×80, toroidal
        state
        16 channels
        rule
        Sobel perception → 128-unit MLP → Δstate
        regions
        10 circles, r=8, ring r=27
        loss
        final MSE + 0.1 × spatial CE
        training
        80k updates, fire rate 1.0, no alive mask