papers / grokking2022
Next task →
Research Papers/Scaling and emergent behavior/Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
Scaling and emergent behavior · #6 · emerging

Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets

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

1. Research problem

On small algorithmic datasets, networks can reach perfect training accuracy while test accuracy remains at chance for a long time before suddenly improving.

2. Motivation

The authors wanted to characterize this delayed generalization phenomenon and understand which training factors control it.

3. Previous approaches

Double descent described capacity-driven risk curves; delayed generalization after zero training error was known anecdotally as a curiosity.

4. Core contribution

Named and systematically studied grokking, showing it occurs on modular arithmetic and other algorithmic tasks and is influenced by weight decay, data size, and optimization.

5. Mathematical formulation

Training accuracy reaches 100% while validation accuracy stays near chance, then increases sharply after orders of magnitude more optimization steps.

6. Methodology

Train small transformers and MLPs on algorithmic datasets, track train/test accuracy, and ablate regularization, dataset size, and architecture.

7. Architecture

Small transformers and fully connected networks, typically one to two layers.

8. Experimental setup

Modular arithmetic tasks such as division modulo a prime, permutation tasks, and small algorithmic datasets.

9. Datasets

Synthetic datasets generated by modular arithmetic and related algorithmic rules.

10. Results

Demonstrated that generalization can occur long after memorization and that weight decay and long training are often essential, spurring mechanistic studies of circuit formation.

11. Limitations

Mostly demonstrated on tiny synthetic tasks; may not be representative of natural-language generalization; requires very long training.

12. Critical analysis

A clean empirical puzzle that connects optimization, implicit regularization, and circuit-level interpretability.

13. Implementation tasks

  • 1.Train a small transformer on modular addition and reproduce the delayed generalization curve.
  • 2.Sweep weight decay and dataset size to map when grokking occurs.
  • 3.Probe learned representations for Fourier-structure features if feasible.

14. Follow-up work

  • 1.Deep Double Descent (Nakkiran et al., 2019)
  • 2.Mechanistic interpretations of grokking via algorithmic circuits

15. Open research questions

  • 1.What internal change causes the sudden jump in test accuracy?
  • 2.Does grokking occur for natural data at meaningful scale?
16. Reproduce it. Record the hypothesis, configuration, dataset, metrics and discrepancies in the Experiment Tracker. A reproduction is not complete until you have run the experiments, performed at least one ablation and documented the differences from the reported numbers.