Skip to content
nonconvexcard

Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets

Alethea Power, Yuri Burda, Harri Edwards, Igor Babuschkin, Vedant Misra · 2022 · ICLR Workshop

DL Theorygrokkingdelayed generalisationmemorisationweight decay
Read the paper

The problem

It was assumed that if a network is going to generalise it does so while the training loss is still decreasing; nothing predicted that generalisation could appear long after training accuracy saturates.

The contribution

Documented that on small algorithmic tasks, validation accuracy jumps from chance to near-perfect thousands of optimisation steps after training accuracy reaches 100 percent.

What problem does this paper solve?

It exhibits a clean, reproducible experimental handle on the transition from memorisation to generalisation — a transition that in normal training is invisible because both happen together.

What mathematical objects are introduced?

None. The tasks are group operations: modular addition and multiplication, permutation composition, and similar, presented as a∘b=ca\circ b = c triples with a fraction of the multiplication table held out.

What assumptions are made?

The phenomenon requires small datasets relative to the model, and its onset depends strongly on weight decay — a fact the paper reports and which subsequent work has built explanations on.

What equations matter?

None in the paper. The most convincing follow-up analysis (Nanda et al., mechanistic interpretability) reverse-engineered the modular-addition circuit and found the network computes

a+b mod pa+b \bmod p

by embedding inputs on circles at several frequencies ω\omega, using trigonometric identities cos⁡ω(a+b)=cos⁡ωacos⁡ωb−sin⁡ωasin⁡ωb\cos\omega(a+b) = \cos\omega a\cos\omega b - \sin\omega a\sin\omega b realised by the attention and MLP layers, and reading off the answer by constructive interference. That is a complete mechanistic account — for that one task.

What theorem or result is important?

No theorem. The empirical result: a delay of 10210^2–104×10^4\times between fitting and generalising, robust across tasks and seeds.

What proof techniques are used?

None.

What prior mathematics is required?

Nothing beyond the basics; the follow-up analyses use discrete Fourier analysis on Zp\Z_p.

Limitations

The evidence is from small models on synthetic algorithmic data. Whether grokking occurs in large-scale training is unclear — related "emergence" phenomena have been argued to be artefacts of discontinuous metrics rather than discontinuous capabilities. Several competing explanations (memorisation-to-generalisation circuit competition, weight-norm dynamics, slow feature alignment) each fit some experiments.

Why it mattered

It separated two processes that are normally confounded, which made the memorisation-to-generalisation transition experimentally accessible. It is also one of the few cases where a deep network's learned algorithm has been fully identified, which is a proof of concept for mechanistic interpretability.

What came next