Grokking: Delayed Generalization
In Power et al.'s 2022 experiments, neural networks memorized modular arithmetic before suddenly generalizing thousands of training steps later. Training accuracy had already reached nearly 100%; held-out accuracy remained near chance, then climbed toward perfect performance. The network appeared finished long before it had learned the rule.
How it works
Take modular addition:
y = (a + b) mod p
A model sees only part of the addition table. Memorization assigns separate machinery to the observed pairs; generalization discovers a compact rule that works for every pair. Both solutions fit the training set, but only one fills its empty cells.
Nanda et al. (2023) opened a small modular-addition transformer and found three phases: memorization, circuit formation, and cleanup. The generalizing circuit used discrete Fourier components and trigonometric identities, turning addition into rotations around a circle. Its growth was gradual inside the weights; the visible jump happened when the memorizing components stopped drowning it out.
Grokking therefore resembles a phase transition only from outside. concept mechanistic interpretability reveals continuous internal work beneath the discontinuous score.
Why the delay happens
Regularization changes which solution survives. Weight decay penalizes large parameters, so a sprawling lookup table can lose ground to a smaller rule even after both achieve negligible training loss. Liu, Michaud, and Tegmark's 2022 Omnigrok experiments found generalization time scaling roughly as
t_grok ∝ 1 / λ
where t_grok is the delay and λ is the weight-decay strength. Constraining the weight norm could nearly remove the delay altogether.
Dataset size matters too. Power et al. found that smaller training subsets required more optimization before generalizing, and sufficiently small subsets might never grok. The event is not simply "train longer." Data coverage, initialization, optimizer, architecture, and regularization determine whether the generalizing route is reachable.
Where it shows up
| Setting | Memorization | Delayed change |
|---|---|---|
| Modular arithmetic, Power et al. 2022 | Training accuracy approaches 100% | Test accuracy rises from chance toward 100% |
| IMDb sentiment, Omnigrok 2022 | Overfitting within about 10² steps |
Generalization begins near 10³ steps |
| Molecular prediction, Omnigrok 2022 | Training fit arrives first | Test loss drops near 10⁴ steps |
The non-algorithmic results required unusual initialization or dataset choices, and their jumps were weaker. Grokking is an experimental clue about concept transformer architecture, not evidence that every flat validation curve hides an imminent breakthrough.
What's contested
Researchers agree that delayed generalization occurs in controlled settings. They do not agree on one universal cause. Competing accounts emphasize representation formation, competition between memorizing and generalizing circuits, optimizer dynamics, or the mismatch between training-loss and test-loss landscapes.
The leap to large language models remains unproven as of August 2026. A capability appearing abruptly under concept scaling laws might reflect hidden gradual learning, a threshold in evaluation, or a different mechanism entirely. Calling every late improvement "grokking" makes the term explain less.
Why this has to do with other realms
Water warms continuously before its observable state changes at 100°C under standard atmospheric pressure. Grokking offers a computational cousin: parameters move each step, but the measured capability stays flat until an internal circuit crosses a functional threshold. That makes it a concrete bridge to concept emergence, where smooth microscopic change produces a sharp macroscopic event.
The difference matters. Physics supplies an order parameter for a phase transition; neural networks rarely hand us one. Nanda's Fourier-based progress measures suggest that interpretability may supply the missing thermometer.
An open question
Can a model-independent progress measure predict grokking before test accuracy moves, or must each learned rule be reverse-engineered separately?
Key Sources
- Alethea Power, Yuri Burda, Harri Edwards, Igor Babuschkin, and Vedant Misra (2022), “Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets”: the original controlled demonstration.
- Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt (2023), “Progress Measures for Grokking via Mechanistic Interpretability”: the Fourier-circuit account of hidden progress.
- Ziming Liu, Eric J. Michaud, and Max Tegmark (2022), “Omnigrok: Grokking Beyond Algorithmic Data”: evidence that delayed generalization can appear beyond synthetic arithmetic.
Abhishek's take
The flat test curve is the part I distrust, not the late jump. A single score can hide a circuit assembling one Fourier component at a time, which makes internal progress measures more useful to me than another training dashboard.
Tags: #grokking #generalization #neural-networks #mechanistic-interpretability #representation-learning