Differentiable morphogenesis · WebGPU

Teach one cell to become an organism.

Synaptic unrolls a neural cellular automaton through time, trains its shared local rule with backpropagation, then streams the same weights into Automata for a live growth and regeneration simulation.

training in browser
3 × 3 perception identity · Sobel x · Sobel y
zero padded
48 → 128 → 16 shared pointwise MLP
ReLU activation
Residual update 50% stochastic fire mask
random 64–96-step tape
Life mask pre + post alpha tests
damage sample pool

Training target

Flower · 24 × 24 premultiplied RGBA

Automata inference

Responsive live grid · exact artifact handoff · click or drag to damage after regeneration

Phase 1 · growth · 0%
01 Growth seed → target · repeated quality checks 0% active
02 Stability retained states · repeated quality checks 0% waiting
03 Regeneration 96 damaged batches · ≥90% strict passes 0% waiting
iteration0
loss
rollout
train step
damaged samples0
auto resets0
initializing WebGPU…

How it works

One local rule, learned through time.

Every cell runs the same tiny neural network. Repeating that local rule turns one living seed into a target that can persist and eventually repair itself.

01 · CELL RULE

See the neighborhood, then predict a change.

A cell stores premultiplied RGBA plus twelve learned hidden channels. Fixed, zero-padded identity and Sobel x/y filters read each channel's 3 × 3 neighborhood. The resulting 48 values enter a shared pointwise network; a 50% fire mask applies its residual update. Pre- and post-update alpha masks keep growth attached to living cells and clear dead hidden state.

16 channels × 3 filters → 48 → 128 ReLU → 16 Δ
02 · TRAINING TAPE

Judge an unfolding process, not one frame.

Each optimizer update records a random 64–96-generation trajectory. The same target is scored at each of its final sixteen states, so the organism must stay correct instead of briefly passing through the image. Its loss combines RGBA L1 + L2 error, local Sobel edge alignment, and an explicit alpha-shape L1 + L2 penalty across every cell and batch sample: zero is an exact match, and lower is better. The shape term directly teaches which cells should live or die instead of leaving silhouette coverage only to curriculum scoring. A hidden-state overflow penalty also pulls every channel back toward the stable −1…1 range before a large value can turn into an exploding rollout.

BPTT (backpropagation through time) carries those errors backward through the entire tape. Adam (adaptive moment estimation) then turns the resulting gradients into weight updates using momentum and an adaptive step size for each weight.

rollout → pixel + edge + shape + overflow loss → BPTT → Adam
03 · SAMPLE POOL

Practice growth, persistence, and repair.

Evolved grids return to persistent pool slots and become later starting states. This experiment retains 512 histories while keeping the GPU batch at eight. The worst selected sample is replaced by a fresh seed, while healthy samples eventually receive round or elongated target-anchored cuts and must recover the complete target. This widens the target's basin of attraction: more partial, old, and differently damaged states naturally evolve back toward it.

seed + retained + damaged states → target attractor

An evidence-based curriculum

A phase advances only after a full rolling evidence window meets its confidence and pass-rate bar. The score uses the worst sample in each batch—not its average—and combines target-normalized image loss, living-cell bounds, and coverage of visible target cells. Every later phase must also preserve the earlier skills. If confidence stops improving for sixteen full evidence windows, training keeps its best weights but flushes stale states, resets Adam's momentum, and briefly restarts with a higher learning rate.

01 · Growth
Fresh seed → target. No pool or damage. 16 observations at 92% confidence; relative loss ≤ .08, target coverage ≥70%, and living count 60–160%.
02 · Stability
Retained pool states → target. 32 observations at 92% confidence; relative loss ≤ .06, target coverage ≥80%, and living count 70–145%.
03 · Regeneration
Target-anchored cuts → target. 96 damaged batches at 97% confidence with ≥90% strict passes; relative loss ≤ .04, target coverage ≥90%, living count 80–125%, and damage ramps 50–100%.