Home › Glossary › Research › Grokking

Advanced · Research

Grokking

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A training phenomenon where a network memorizes the training set quickly but only generalizes much later, after many additional optimization steps.

Technical Definition

A training phenomenon where a network memorizes the training set quickly but only generalizes much later, after many additional optimization steps.

How it works

Grokking (Power et al., 2022) was first observed on small Transformers learning modular arithmetic. Train accuracy hits 100% almost immediately while validation accuracy is at chance, then after 10⁴–10⁶ extra steps validation accuracy rapidly rises to 100%. Analyses link grokking to a phase transition from memorizing circuits to algorithmic ones, often driven by weight decay; it is a key testbed for mechanistic interpretability.

Related Concepts

  • Overfitting — When a model learns noise and specific patterns in training data too well, causing it to perform poorly on new, unseen data.
  • Generalization — A model's ability to perform well on new, unseen data — not just its training set.
  • Double descent — A phenomenon where model test error is low for both very simple and very complex models, but high for models with intermediate complexity.
  • Mechanistic Interpretability — A research program that reverse-engineers neural networks into human-understandable circuits, features, and algorithms.