The phenomenon — a model that understands 4,000 steps late
The classic setup: teach a network 40% of the answers to (a + b) mod 97, hold out the rest. Press train. Training accuracy (white) hits 100% almost instantly — pure memorization. Test accuracy (gold) flatlines near 1%… and keeps flatlining… and then climbs a cliff. One catch: on a linear time axis you can't even see the story — hit the log button.
Curve dynamics are a faithful simulation of the published grokking runs (Power et al. 2022) — the shapes, gap and suddenness match the paper; this page doesn't train a real transformer in your tab.
Swiss cheese → wallpaper — watch the table become a formula
What does the model know in each phase? This is the full answer table for (a + b) mod 23 — every cell colored by the model's answer. Drag the training-progress slider. Early: the cells it was taught are right (scattered swiss cheese) and everything else is noise. After the click: the whole table snaps into diagonal stripes — the periodic structure of modular addition. It didn't fill in more cells; it found the pattern that generates all cells.
Green = correct answer, red = wrong. Which held-out cells are wrong during memorization is re-randomized per run; the striped end-state is the true structure of mod-23 addition.
The impatient teacher — weight decay sets the alarm clock
Grokking has a dial: weight decay, the steady tax on large weights. Memorization needs big, specific weights; the general formula is compact. Decay slowly bleeds the phone book while the formula survives. Drag the dial and run: more decay, earlier click. Zero decay — the silence outlasts your budget. Too much — the model can't even hold the training set.
Time-to-grok vs decay follows the published relationship (stronger regularization → earlier, until collapse); each run adds a marker to the summary strip below the curves so you can map the dial's whole range.
Inside the click — two solutions, one body
The cleanest mental model: during the silence, two circuits share the network. The memorization circuit (red bar) is strong, heavy, and taxed hard by weight decay. The generalizing circuit (green bar) is weak but efficient, and it grows quietly because it explains the data more cheaply. Press run and watch the bars: test accuracy doesn't move until green overtakes red — but green's growth is visible long before the click. That's an early-warning signal accuracy can't give you.
Circuit strengths follow the efficiency-competition account of grokking (memorization pays rent per example; the general circuit pays once). More training data → memorization gets more expensive → earlier crossover. Both effects play out live.
Spot the grokker — three flatlines walk into a bar
The expensive skill: at step 2,000, a pre-grok run, a hopeless overfit, and a too-cold learning rate all look like the same flat line. Each round shows three unlabeled train/test curve pairs cut off mid-run — click the one that will grok. Then the future is revealed and your streak updates. The tells are subtle but real: the grokker's train accuracy is already perfect while its weight-norm trace (thin line) is falling; the overfit's gap grows with rising norm; cold-lr hasn't even finished memorizing.
Round parameters (grok time, noise, which panel) are randomized every time; your click is judged against the generator's ground truth.