[Paper Review] Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
The paper investigates how neural networks generalize beyond memorization on small algorithmic datasets, revealing a late generalization phenomenon called grokking and analyzing data efficiency, optimization time, and regularization effects.
In this paper we propose to study generalization of neural networks on small algorithmically generated datasets. In this setting, questions about data efficiency, memorization, generalization, and speed of learning can be studied in great detail. In some situations we show that neural networks learn through a process of "grokking" a pattern in the data, improving generalization performance from random chance level to perfect generalization, and that this improvement in generalization can happen well past the point of overfitting. We also study generalization as a function of dataset size and find that smaller datasets require increasing amounts of optimization for generalization. We argue that these datasets provide a fertile ground for studying a poorly understood aspect of deep learning: generalization of overparametrized neural networks beyond memorization of the finite training dataset.
Motivation & Objective
- Study generalization behavior of neural networks trained on small algorithmic datasets.
- Characterize the grokking phenomenon where generalization improves long after overfitting begins.
- Assess data efficiency and how dataset size affects optimization time to generalization.
- Evaluate the impact of regularization and optimization settings on grokking.
- Visualize learned embeddings to understand emergent structure.
Proposed method
- Use a decoder-only transformer trained on binary operation tables a ∘ b = c with abstract symbols as tokens.
- Evaluate generalization by measuring validation accuracy after long optimization budgets.
- Systematically vary dataset size and optimization settings to observe effects on grokking.
- Test multiple binary operations and analyze how symmetry and group structure affect learning.
- Apply ablations including weight decay, gradient noise, and learning rate to assess data efficiency.
- Visualize output-layer embeddings to interpret learned structure.
Experimental results
Research questions
- RQ1Does grokking occur across a range of binary operations and dataset sizes?
- RQ2How does optimization time to generalization scale as the training data fraction decreases?
- RQ3What regularization or optimization tricks most improve data efficiency and grokking?
- RQ4What structure emerges in the learned embeddings for modular arithmetic tasks?
- RQ5Are there qualitative patterns in loss and accuracy curves that characterize grokking?
Key findings
- Grokking occurs on several binary operations, with validation accuracy rising from chance long after training accuracy has already saturated.
- For smaller datasets, the time to generalize grows rapidly as data fraction decreases, showing a double-descent-like behavior in validation loss.
- Weight decay significantly improves data efficiency and generalization compared to other interventions.
- Some symmetric operations generalize with less data, and certain non-symmetric ones require more data to grok.
- Embeddings sometimes reveal interpretable structures, such as circular/topological organization in modular arithmetic.
- The optimum learning rate window for grokking is relatively narrow and optimization budgets can be large to observe the effect.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.