ArXiv: 2201.02177
🎯 Pitch
Neural networks can suddenly jump from chance-level to perfect generalization long after they’ve perfectly memorized the training data — a phenomenon the authors call “grokking.” Weight decay is the secret sauce that makes it happen, not early stopping or dropout.
1. Executive Summary
This paper studies how overparameterized neural networks generalize on small, algorithmically generated binary operation datasets (e.g., modular arithmetic, permutation group composition), using a standard decoder-only transformer. The authors identify a phenomenon they term grokking, where validation accuracy suddenly jumps from random-chance level to near-perfect generalization long after the model has severely overfit the training data — training accuracy reaches ~100% within ~10³ steps, but validation accuracy remains at chance level until ~10⁶ steps. The paper demonstrates that the optimization time required to achieve generalization grows rapidly as training dataset size decreases, with a 1% reduction in data near the minimal viable fraction leading to a 40–50% increase in median steps to generalization, and finds that weight decay is the single most effective intervention for improving data efficiency — more than halving the required samples compared to other regularization methods. The paper establishes that grokking occurs across a range of binary operations and optimization settings, but only when the base model possesses sufficient representational capacity to memorize the training data, after which extended optimization under appropriate regularization can discover solutions that generalize.
2. Context and Motivation
The Core Problem: We Don't Understand Why Overparameterized Networks Generalize
The fundamental puzzle this paper tackles is one of the most enduring mysteries in deep learning: overparameterized neural networks — models with far more parameters than training examples — routinely achieve zero training error yet still generalize to unseen data, a behavior that flatly contradicts classical statistical learning theory. Standard accounts from the bias-variance tradeoff framework predict that models with sufficient capacity to perfectly memorize arbitrary training labels should exhibit high variance and poor generalization. Yet in practice, deep networks trained with stochastic gradient descent on real-world datasets consistently defy this prediction, achieving strong test performance even when they have more than enough parameters to simply memorize every training example (Zhang et al., 2016).
This gap between theory and practice is not merely an academic curiosity. It reflects a fundamental deficit in our understanding of what inductive biases are implicit in the combination of neural network architectures, optimization algorithms (particularly SGD), and training procedures (regularization, learning rate schedules, etc.) that together cause networks to prefer "simple" or "generalizable" solutions over arbitrary memorization. Without such understanding, machine learning remains partly alchemy — practitioners tune hyperparameters by trial and error, architectures are designed by intuition rather than principle, and we lack reliable tools for predicting when a trained model will generalize versus when it will silently memorize and later fail in deployment.
The Observational Bottleneck: Generalization Dynamics Are Hard to Study on Natural Data
A major obstacle to studying generalization is that on standard benchmarks (ImageNet, CIFAR, language modeling corpora, etc.), training and validation performance tend to improve in tandem. Validation accuracy typically rises monotonically alongside training accuracy throughout most of training. Even when interesting phenomena do occur — such as the "double descent" behavior documented by Belkin et al. (2018) and Nakkiran et al. (2019), where validation loss decreases, increases, then decreases again as model capacity grows — these effects are subtle, often manifesting as small percentage-point changes that require careful experimental design to isolate. They are easily obscured by noise, hyperparameter choices, and dataset peculiarities.
This tight coupling between training and validation dynamics makes it difficult to ask clean, controlled questions. If you want to study when and why a network transitions from memorizing the training set to discovering a generalizable solution, you need a setting where these two phases are temporally decoupled — where the model achieves perfect training accuracy at one point in time, then continues optimizing for thousands of additional steps before validation accuracy begins to improve. Such decoupling is essentially absent from natural-data benchmarks, which is why prior work on generalization (Jiang et al., 2019; Hochreiter and Schmidhuber, 1997; Keskar et al., 2016) has largely relied on post-hoc measurements (flatness, sharpness, spectral complexity) of converged networks rather than dynamic observations of the generalization process as it unfolds.
Where Prior Approaches Fall Short
Algorithmic datasets have been used, but for different questions. Prior work has extensively used synthetically generated algorithmic tasks — copying sequences, reversing, sorting, arithmetic, Neural Turing Machines, bAbI question-answering — to probe the representational capacity of neural architectures (Graves et al., 2014; Weston et al., 2014; Kaiser and Sutskever, 2015; Reed and De Freitas, 2015; Grefenstette et al., 2015; Zaremba and Sutskever, 2015; Graves, 2016; Dehghani et al., 2018). However, these works overwhelmingly focus on the unlimited-data regime: given enough training examples, can this architecture learn this algorithm? Generalization is studied primarily with respect to input sequence length, not data quantity. When sample complexity is investigated (Reed and De Freitas, 2015), the emphasis is on how architectural innovations (external memory, adaptive computation) reduce data requirements, not on the dynamic interplay between memorization and generalization within a fixed architecture.
The bAbI tasks (Weston et al., 2015) partially motivated study of data-limited generalization, but results there tend to be reported as point estimates of performance — "architecture X achieves Y% accuracy with Z training examples" — rather than as temporal dynamics of how generalization emerges over the course of training. The process by which generalization is achieved is exactly what this paper seeks to illuminate.
Saxton et al. (2019) studied mathematical reasoning generalization, but at higher complexity. Their procedurally generated math problems (arithmetic, differentiation, polynomial manipulation) are substantially more complex than the binary operation tables used here. This complexity is a double-edged sword: while it makes the tasks more realistic, it also means that mastering them requires an "extremely large number of samples" (as the authors note in Appendix A.3), making it impractical to observe the kind of long, decoupled training trajectories that are the hallmark of grokking. The simpler tasks in this paper deliberately reduce the complexity floor so that the entire generalization trajectory — from random initialization → memorization → grokking → perfect generalization — can be observed within a computationally tractable budget on a single GPU.
Double descent literature addresses a related but distinct phenomenon. The double descent findings of Belkin et al. (2018) and Nakkiran et al. (2019) showed that validation loss can exhibit a second descent when model capacity increases beyond the interpolation threshold (the point where the model first achieves zero training error). However, this is a capacity-driven phenomenon — double descent appears as a function of model size, training duration, or dataset size, not as a function of continued optimization at fixed capacity. The authors explicitly argue (Appendix A.3) that grokking may be distinct because (a) the second descent occurs far past the interpolation point — tens of thousands of epochs, not merely at the threshold, and (b) they do not observe non-monotonic behavior in accuracy (validation loss descends a second time while accuracy rises monotonically from chance to perfect, rather than dropping then recovering). Whether grokking is a time-domain analog of double descent, or a fundamentally distinct mechanism, is an open question the paper raises but does not resolve.
Generalization measures exist but are not temporally tested. Jiang et al. (2019) systematically evaluated dozens of proposed generalization measures (sharpness, flatness, spectral complexity, path norm, etc.) on convolutional networks trained on natural data. They found that flatness-based measures — those quantifying sensitivity of the loss to parameter perturbations — were most predictive of generalization gap. However, these measures were all applied to converged networks, providing a snapshot of the final solution rather than a trajectory of how the loss landscape evolves during training. The grokking phenomenon opens the possibility of testing whether these measures are dynamically predictive: do they track improvements in generalization throughout the optimization process, and can they distinguish between pre-grokking (memorized) and post-grokking (generalized) solutions? The paper's preliminary investigation in Appendix A.5 — finding a Spearman correlation of −0.795 between sharpness and validation accuracy on the S5 composition task — is suggestive but involves only a single time point, not a longitudinal study.
Weight decay and noise have empirical support but no mechanistic understanding in this context. Practitioners have long observed that weight decay (L₂ regularization) and gradient noise (from small minibatches or explicit noise injection) improve generalization. The dominant hypothesis — that these interventions bias optimization toward "flat minima" that generalize better (Hochreiter and Schmidhuber, 1997; Keskar et al., 2016) — provides a plausible mechanism but has proven difficult to verify directly, partly because flatness is expensive to measure and its correlation with generalization is sensitive to network parameterization. The grokking setting offers a clean testbed: if weight decay and noise accelerate grokking, and grokking corresponds to a transition from sharp to flat minima, then we have a coherent narrative linking regularization → optimization dynamics → loss landscape geometry → generalization. The paper provides evidence for the first link (Figure 2, left) and hints at the third (Appendix A.5), but leaves the mechanistic connection as a conjecture for future work.
How This Paper Positions Itself
The paper frames its contribution not as a new theory that explains grokking, but as the introduction of a tractable experimental paradigm that makes the generalization process observable in unprecedented detail. The binary operation table tasks serve as a "model organism" for studying generalization — analogous to how C. elegans or Drosophila serve in biology — because they satisfy several criteria that natural datasets do not:
-
Controllable complexity: The task difficulty can be smoothly varied by choosing different binary operations (addition is easier than composition of permutations, which is easier than mixed operations like "divide if y is odd, else subtract"). The authors demonstrate this in Figure 2 (right), showing that more complex operations (e.g., x³ + xy² + y) fail to generalize at any training fraction, while simpler ones (e.g., x + y) generalize with as little as 20% of the data.
-
Perfect generalization is achievable and verifiable: Since the full binary operation table is finite (97² or 120² equations, depending on the group), the validation set is exhaustive — there are no out-of-distribution concerns, and "perfect generalization" means exactly filling in all missing entries correctly.
-
Clean symbolic representation: By representing each element as an abstract token with no internal structure (not decimal digits, not permutation cycle notation), the network cannot exploit pre-existing semantic knowledge. Any structure it discovers must be learned purely from the interaction patterns in the training equations — exactly the kind of relational learning that generalization theories need to account for.
-
Temporal decoupling of memorization and generalization: This is the paper's key empirical contribution. On datasets close to the minimal generalization threshold, training accuracy saturates at 100% within ~10³ steps while validation accuracy remains at chance level for an additional 10³ to 10⁵ steps before suddenly rising to perfection. This decoupling creates a natural before-and-after experimental design: compare the network's weights, representations, and loss landscape geometry at step 10⁴ (memorized, not generalizing) versus step 10⁶ (generalizing) while holding architecture, data, and optimizer constant.
The paper's attitude toward existing generalization research is friendly but critical. It acknowledges the double descent literature's importance while arguing that grokking manifests differently (temporal rather than capacity-driven, monotonic accuracy). It engages with the flatness literature (Keskar et al., 2016; Jiang et al., 2019) by providing preliminary evidence that sharpness correlates with generalization in this setting. And it positions itself within the broader tradition of algorithmic reasoning research (Graves et al., 2014; Saxton et al., 2019; Weston et al., 2015) while pivoting the emphasis from capability (can the network learn the algorithm?) to dynamics (how does the network transition from memorization to generalization, and what controls the speed of that transition?).
Ultimately, the paper's thesis is not that grokking is universal — the authors are careful to note that it "can happen well past the point of overfitting" (emphasis on "can") — but that the study of generalization in deep learning can be accelerated by adopting small, clean, reproducible algorithmic datasets where generalization dynamics are exaggerated and easily measurable. The hope, expressed in both the abstract and discussion, is that this paradigm will enable rigorous testing of generalization theories that have been difficult to evaluate on natural data.
3. Technical Approach
3.1 Reader Orientation
The paper does not propose a novel architecture or training algorithm. Instead, it introduces a controlled experimental framework — a set of small, algorithmically generated binary operation datasets, a standard transformer architecture, and a deliberately simple training procedure — that makes the transition from memorization to generalization observable in a way that standard benchmarks obscure. The core problem this framework solves is the temporal entanglement of memorization and generalization in standard training: on natural datasets, validation accuracy typically improves alongside training accuracy, making it impossible to isolate the moment when a network pivots from simply interpolating the training data to discovering a generalizable solution. By reducing dataset complexity to the point where the network can perfectly memorize the training set thousands of steps before any generalization occurs, the authors create a clean before-and-after experimental design — everything is held constant except the optimization step count — enabling direct investigation of what changes in the network during the generalization phase.
3.2 Big-Picture Architecture (Diagram in Words)
The system has four tightly integrated components, each deliberately kept simple to avoid confounding the study of generalization dynamics:
-
Binary Operation Datasets — finite tables of equations of the form
a ◦ b = c, where each element is an abstract token with no internal structure. The training set is a random subset of all possible equations; the validation set is the complement. Task difficulty is controlled by choosing different mathematical operations (e.g., modular addition is simpler than composition in the symmetric group S₅). -
Decoder-Only Transformer — a small, standard Vaswani et al. (2017) architecture with 2 layers, width 128, 4 attention heads, and approximately
$4 \times 10^5$non-embedding parameters. It takes a sequence of five tokens (⟨a⟩ ⟨op⟩ ⟨b⟩ ⟨=⟩) as input and is trained with a standard next-token prediction loss computed only on the final⟨c⟩token using causal attention masking. -
AdamW Optimizer with Minimal Tuning — the AdamW variant of Adam (Loshchilov and Hutter, 2017) with learning rate
$10^{-3}$, weight decay$1$,$\beta_1 = 0.9$,$\beta_2 = 0.98$, linear warmup over 10 steps, and minibatch size of 512 or half the training set (whichever is smaller). This simplicity is intentional: the authors want to demonstrate that grokking is not an artifact of exotic optimization. -
Monitoring Infrastructure — separate logging of training accuracy (on the memorized subset) and validation accuracy (on the held-out subset) at each optimization step, enabling the detection of the decoupled memorization and generalization phases that define grokking.
Information flows linearly: a batch of equations is sampled from the training set → the transformer processes each 5-token sequence with causal attention → the loss is computed only on the final token → gradients are accumulated → the AdamW optimizer updates parameters → training and validation accuracy are logged. This repeats for up to $10^6$ optimization steps, with no early stopping, no learning rate decay, and no data augmentation.
3.3 Roadmap for the Deep Dive
- First, the binary operation dataset construction — what operations are used, how they are formulated as token sequences, why abstract symbols are essential, and how training/validation splits are created. This is the foundation: the entire paper's phenomena depend on the dataset structure.
- Second, the model architecture and token-level loss computation — the transformer configuration, why it is deliberately small and standard, the causal masking regime, and the critical detail that loss is computed only on the answer token. Understanding this reveals why the network can memorize without generalizing.
- Third, the optimization procedure and regularization variants — the default AdamW configuration, the specific hyperparameter values (and the rationale for each), and the full set of ablations (weight decay, gradient noise, dropout, learning rate, etc.) that allow the paper to identify which interventions accelerate or inhibit grokking.
- Fourth, the monitoring and measurement protocol — how training vs. validation accuracy are tracked, how "time to generalization" is operationally defined (first step at which validation accuracy exceeds 99%), and the cross-validation and seeding strategy that ensures reproducibility.
3.4 Detailed, Sentence-Based Technical Breakdown
This is primarily an empirical phenomenon paper whose core idea is that by training small transformers on small algorithmically generated datasets, one can observe a striking temporal decoupling between memorization (training accuracy reaching 100% early) and generalization (validation accuracy rising from chance to perfect much later), creating a clean experimental testbed for studying what drives the transition from memorized to generalizing solutions.
Binary Operation Dataset Construction
Why binary operation tables? A binary operation $\circ$ on a finite set $S$ is a function $S \times S \rightarrow S$ — for every ordered pair $(a, b)$ of elements, there is exactly one result $c = a \circ b$. The full set of all $|S|^2$ equations forms a complete lookup table. When a model is trained on only a subset of these equations and evaluated on the remainder, the task is mathematically equivalent to solving a Sudoku puzzle: infer the missing entries of the operation table from the observed ones, subject to whatever algebraic constraints the operation satisfies (associativity, commutativity, inverses, etc.). Because the entire table is finite and the validation set is exhaustive, "perfect generalization" has an unambiguous meaning: correctly predict the result for every held-out equation.
Operational tokenization. Each equation is formatted as a 5-token sequence: ⟨a⟩ ⟨op⟩ ⟨b⟩ ⟨=⟩ ⟨c⟩. Critically, each element $a$, $b$, $c$ is represented as a distinct abstract symbol — a unique token with no internal structure. For example, in modular addition modulo 97, the element "42" is not represented as the digits "4" followed by "2" (which would leak positional number system information), but as a single opaque token (say, token #42 in a vocabulary of 97 + operation tokens). Similarly, elements of the symmetric group S₅ (which are permutations of 5 elements) are not represented in cycle notation or any other structured format — they are simply assigned distinct token IDs. This design choice is essential because it forces the network to learn all properties of each element purely from its interaction patterns in the training equations. The network cannot exploit pre-existing knowledge of modular arithmetic or permutation algebra; it must discover the underlying mathematical structure from scratch.
The specific operations studied. The paper tests 12 binary operations spanning a range of algebraic complexity (listed fully in Appendix A.1.1):
Modular arithmetic operations (modulo prime $p = 97$):
$x + y \pmod{p}$for$0 \leq x, y < p$$x - y \pmod{p}$for$0 \leq x, y < p$$x / y \pmod{p}$for$0 \leq x < p,\; 0 < y < p$(division in the multiplicative group of nonzero residues)$x^2 + y^2 \pmod{p}$for$0 \leq x, y < p$$x^2 + xy + y^2 \pmod{p}$for$0 \leq x, y < p$$x^2 + xy + y^2 + x \pmod{p}$for$0 \leq x, y < p$$x^3 + xy \pmod{p}$for$0 \leq x, y < p$$x^3 + xy^2 + y \pmod{p}$for$0 \leq x, y < p$
Mixed operation:
$x / y \pmod{p}$if$y$is odd, otherwise$x - y \pmod{p}$, for$0 \leq x, y < p$
Permutation group operations (elements of S₅):
$x \cdot y$— group composition$x \cdot y \cdot x^{-1}$— conjugation$x \cdot y \cdot x$— a related product
Each operation produces $97^2 = 9409$ equations (modular operations) or $120^2 = 14400$ equations (S₅ operations). The training set is constructed by randomly sampling a specified fraction of these equations; the validation set is the complement. For each training run, a new random split is drawn.
Difficulty variation by operation. The authors demonstrate (Figure 2, right) that different operations require different amounts of training data to achieve generalization within the fixed optimization budget of $10^5$ steps. Symmetric operations (where $x \circ y = y \circ x$, such as $x + y$, $x \times y$, $x^2 + y^2$, and $x^2 + xy + y^2$) tend to require less data than their asymmetric counterparts ($x - y$, $x / y$, $x^2 + xy + y^2 + x$). The authors hypothesize this may be partially architecture-dependent: a transformer can easily learn a symmetric function by ignoring the positional embedding that distinguishes the first operand from the second. Some operations ($x^3 + xy^2 + y$) fail to generalize at any training fraction up to 95%, with converged models effectively just memorizing the training data without discovering the underlying algebraic pattern.
The equivalence of modular addition and multiplication. A subtle mathematical point that the paper exploits: for a prime modulus $p$, the multiplicative group of nonzero residues is cyclic. This means there exists a primitive root $g$ such that every nonzero residue can be expressed as $g^k$ for some $k$. Under this representation, multiplication $g^a \cdot g^b = g^{a+b}$ corresponds to addition of exponents. Therefore, modular multiplication and modular addition are mathematically identical up to a renaming of symbols — the underlying group structure is the same $\mathbb{Z}_{p-1}$. Since the network sees only abstract symbols without internal structure, the tasks $x + y \pmod{p-1}$ and $x \times y \pmod{p}$ (with $x, y \neq 0$) are completely indistinguishable from the network's perspective. The authors verify this empirically: the data efficiency curves for $x - y$ and $x / y$ are nearly identical (Figure 2, right), confirming that the network is learning the algebraic structure rather than exploiting representational artifacts.
What the network is asked to predict. Given the input sequence ⟨a⟩ ⟨op⟩ ⟨b⟩ ⟨=⟩, the network must predict the token ⟨c⟩ such that $a \circ b = c$. The model is a decoder-only transformer with causal attention masking, meaning each position can attend only to itself and previous positions. The loss is computed as a standard cross-entropy between the predicted distribution over the vocabulary of element tokens and the ground-truth ⟨c⟩ token, but only on the final position — the model is not trained to predict the intermediate tokens ⟨a⟩, ⟨op⟩, ⟨b⟩, or ⟨=⟩. This means the network's entire training signal comes from whether it correctly predicts the result of the operation given the operands, not from any autoregressive modeling of the question format.
Why this formulation matters for grokking. The combination of (1) abstract symbols with no internal structure, (2) a finite, exhaustive table, and (3) a random subset as training data creates exactly the conditions needed for grokking to manifest. The network has sufficient capacity to simply memorize all training equations (there are at most a few thousand, and the network has $4 \times 10^5$ parameters — enough to store each training example as a distinct pattern in its weights). However, to generalize to held-out equations, the network must discover the underlying algebraic rules — the regularities that constrain the entire operation table. These rules correspond to a much more compact description (e.g., "addition modulo 97" can be expressed in a handful of parameters using the group structure). The grokking phenomenon is the observable signature of the network transitioning from the memorized solution (high training accuracy, chance validation accuracy) to the generalizing solution (perfect accuracy on both). The fact that this transition can take orders of magnitude more optimization steps than memorization suggests that the memorized solution is easy to find (the loss landscape has many sharp minima that interpolate the training data) while the generalizing solution is harder to locate (it requires navigating through parameter space to a flatter, more structured region).
Model Architecture and Loss Computation
Transformer specification. All experiments use a decoder-only transformer (Vaswani et al., 2017) with the following configuration, held constant throughout the paper:
- Layers: 2
- Embedding dimension (width): 128
- Attention heads: 4
- Total non-embedding parameters: approximately
$4 \times 10^5$
This is deliberately small — a "toy" model by modern standards — because the goal is to make training fast, reproducible on a single GPU, and amenable to the $10^5$–$10^6$ optimization steps needed to observe grokking. The architecture is completely standard: multi-head self-attention with causal masking, residual connections, layer normalization, and a feedforward network at each layer. The authors chose not to experiment with architectural variants because their interest is in generalization dynamics that they believe to be architecture-agnostic, and keeping the architecture fixed makes it a controlled variable rather than a confound.
Causal attention masking. The decoder-only design means the transformer uses causal (autoregressive) attention: each position can only attend to itself and all previous positions in the sequence, not to future positions. For a 5-token input sequence ⟨a⟩ ⟨op⟩ ⟨b⟩ ⟨=⟩ ⟨c⟩, this means:
- Token
⟨a⟩(position 1) attends only to itself. - Token
⟨op⟩(position 2) attends to⟨a⟩and itself. - Token
⟨b⟩(position 3) attends to⟨a⟩,⟨op⟩, and itself. - Token
⟨=⟩(position 4) attends to all three preceding tokens and itself. - Token
⟨c⟩(position 5) attends to all four preceding tokens and itself.
This means that when predicting the answer token ⟨c⟩, the network has full access to the representations of both operands and the operation symbol, but crucially, ⟨a⟩ and ⟨b⟩ do not have access to each other until position 3. The causal structure is not essential to the task (the operation is not sequential), but it reflects the standard transformer design and does not impede learning because the answer token at position 5 can attend to everything.
Loss computation: next-token prediction on the answer only. The model outputs a probability distribution over the vocabulary at each position. However, the loss is computed only on the final token ⟨c⟩ — the model is not trained to predict ⟨a⟩, ⟨op⟩, ⟨b⟩, or ⟨=⟩. This is implemented by masking the loss at positions 1–4, so they contribute zero to the total loss. The loss on position 5 is the standard categorical cross-entropy:
where $p_\theta(c \mid a, \circ, b)$ is the probability the model assigns to the correct answer token $c$ given the input tokens $a$, $\circ$, and $b$, and $\theta$ represents the model parameters.
What it computes: For each equation in the minibatch, the model processes the 5-token sequence, produces a probability distribution over all possible element tokens at position 5, and computes the negative log-likelihood of the correct answer. The total loss is the average over all equations in the minibatch.
Why this form: Computing loss only on the answer token focuses the entire training signal on the one thing that matters: predicting the operation result. Training on all tokens would introduce an autoregressive language modeling objective — the model would also learn to predict that ⟨op⟩ follows ⟨a⟩, that ⟨b⟩ follows ⟨op⟩, etc. — which is irrelevant to the generalization question and would dilute the signal about whether the network has learned the mathematical operation. This design choice also reflects the fact that at test time, the model receives the complete input ⟨a⟩ ⟨op⟩ ⟨b⟩ ⟨=⟩ and must predict only ⟨c⟩; training mimics this evaluation protocol exactly.
Accuracy computation. Accuracy is computed as the fraction of equations for which the model's highest-probability prediction at position 5 matches the ground-truth answer token. Training accuracy is computed on the training set (the subset of equations the model was optimized on); validation accuracy is computed on the held-out complement. Because the vocabulary consists of abstract symbols with no semantic similarity (token #42 is no "closer" to token #43 than to token #97), there is no notion of partial credit — a prediction is either exactly right or completely wrong. This binary nature of correctness contributes to the sharpness of the grokking transition: validation accuracy sits at chance level ($1/|S|$, approximately 1% for $p=97$ or 0.8% for S₅) until the model discovers the correct algebraic structure, at which point it jumps to near 100%.
Model capacity considerations. With $4 \times 10^5$ parameters and training sets ranging from a few hundred to a few thousand equations, the model is massively overparameterized — it has orders of magnitude more parameters than training examples at the lower data fractions. This is intentional: the paper explicitly positions itself in the overparameterized regime where classical learning theory predicts memorization without generalization. The fact that generalization occurs at all under these conditions is the puzzle the paper seeks to illuminate. The architecture's capacity to memorize the training set is a prerequisite for grokking: if the model could not interpolate the training data, there would be no decoupling between training and validation accuracy. Grokking can only be observed when the model has sufficient capacity to achieve 100% training accuracy before it discovers the generalizing solution.
Optimization Procedure and Default Hyperparameters
Default optimizer: AdamW. The paper uses AdamW (Loshchilov and Hutter, 2017) as its default optimizer. AdamW differs from standard Adam in how it applies weight decay: in standard Adam, weight decay is implemented by adding an L₂ penalty to the loss, which interacts with the adaptive learning rates in ways that can conflate regularization with learning rate scheduling. AdamW decouples weight decay from the adaptive gradient scaling, applying it directly as an additive term to the parameter update:
where $\theta_t$ are the parameters at step $t$, $\eta$ is the learning rate, $\hat{m}_t$ and $\hat{v}_t$ are the bias-corrected first and second moment estimates from Adam, $\epsilon$ is a small constant for numerical stability, and $\lambda$ is the weight decay coefficient.
What it computes: The AdamW update has two components: (1) the standard Adam adaptive gradient step $\frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon}$, which scales the gradient direction by an estimate of its signal-to-noise ratio, and (2) a weight decay term $-\eta \lambda \theta_t$ that shrinks all parameters toward zero by a fixed fraction per step, independently of the gradient magnitudes.
Why this form: Decoupling weight decay from the adaptive learning rates means that weight decay acts as a uniform, isotropic regularizer — all parameters are pulled toward zero at the same rate, regardless of their gradient history. In standard Adam with L₂ regularization, parameters with small gradients (which have large effective learning rates due to the $\frac{1}{\sqrt{\hat{v}_t}}$ scaling) experience stronger regularization, creating an undesirable interaction. The decoupled form in AdamW separates optimization (adaptively scaling gradients) from regularization (uniformly shrinking weights), making it easier to interpret the effect of weight decay independently. This is important for the paper's ablation study (Section 3.3, Figure 2, left), where weight decay is identified as the single most impactful intervention for data efficiency — the decoupled form ensures this effect is attributable to regularization per se, not to an artifact of the optimizer interaction.
Default hyperparameter values. The authors settled on the following configuration after tuning on modular addition and S₅ composition (Appendix A.1.2):
- Learning rate:
$10^{-3}$ - Weight decay:
$1$(applied in AdamW's decoupled form) - Adam betas:
$\beta_1 = 0.9$,$\beta_2 = 0.98$ - Learning rate warmup: Linear warmup over the first 10 optimization steps
- Minibatch size: 512, or half the training dataset size if the dataset has fewer than 1024 examples (whichever is smaller)
- Optimization budget:
$10^5$gradient updates for most experiments; increased to$5 \times 10^5$for the learning time curves (Section 3.1.1) and to$10^6$for the dramatic grokking demonstration (Section 3.1)
Design rationale for the hyperparameter choices:
-
Learning rate
$10^{-3}$: The authors report that "learning rate had to be tuned in a relatively narrow window for the generalization to happen (within 1 order of magnitude)" (Section 3.3). This is a significant finding in itself — it suggests that the optimization dynamics that produce grokking are sensitive to the step size, with too-large rates overshooting the generalizing solution and too-small rates failing to escape the memorized basin within the fixed budget. -
Weight decay = 1: This is a notably large value for weight decay (typical values in deep learning are
$10^{-4}$to$10^{-2}$). The choice reflects the paper's finding (Section 3.3, Figure 2, left) that weight decay has an outsize effect on data efficiency, "more than halving the amount of samples needed compared to most other interventions." The large coefficient ensures that regularization pressure is strong enough to dislodge the network from memorized solutions within the optimization budget. -
No learning rate decay: The authors explicitly note that they "chose not to anneal the learning rate for the experiments in the paper even though it performed better in some situations." This is a deliberate simplification to reduce the number of moving parts — the paper's goal is to demonstrate grokking under minimal intervention, not to maximize performance. The fact that grokking occurs even without learning rate scheduling strengthens the claim that it is a robust phenomenon of the optimization dynamics, not an artifact of careful scheduling.
-
Minibatch size adaptation: Using a minibatch size of 512 or half the training set (whichever is smaller) means that at small dataset sizes, the optimizer sees a substantial fraction of the training data in each update. This balances the variance reduction of large batches with the stochasticity needed to explore the loss landscape. The adaptation rule ensures that even when the training set is very small (e.g., 200 examples at 20% of an S₅ dataset), each minibatch contains at least 100 diverse examples rather than repeatedly processing the same tiny subset.
Seeding and reproducibility. Each experiment is repeated with 3 random seeds (different random splits of data into training/validation sets, different random initializations of the network), with the exception of the learning time experiments (Section 3.1.1), which use 7 seeds. All curves shown in the paper report means over these seeds. The seed variance matters because the paper's central phenomenon — grokking — manifests as a sudden transition whose timing can vary across runs. Reporting means ensures the curves are representative, but the paper does not show error bars or individual run trajectories, which would reveal how consistent the grokking timing is across seeds.
Regularization and Optimization Variants (Ablation Study)
Motivation for the ablation study. Section 3.3 systematically investigates which aspects of the optimization procedure influence grokking. The experimental design keeps the architecture and dataset fixed (S₅ composition at a range of training data fractions) while varying the optimizer, regularization method, learning rate, and noise injection. The output metric is "data efficiency" — the minimal fraction of training data required for the model to achieve generalization (validation accuracy approaching 100%) within the $10^5$-step optimization budget.
Full list of variants tested (in reading order for Figure 2, left):
-
Adam, full batch — exact gradient of the loss on the entire training dataset, with no minibatch stochasticity. This tests whether gradient noise from minibatching is necessary for grokking.
-
Adam, default minibatch — the standard minibatch setting with Adam as described above, but with no weight decay (i.e., the
$L_2$penalty is incorporated through the Adam update rule, not decoupled). This serves as the baseline for the AdamW comparison. -
Adam, full batch + Gaussian gradient noise — exact full-batch gradients with independent Gaussian noise
$\epsilon \sim \mathcal{N}(0, 1)$added to the update direction for each parameter:$W \leftarrow W + \eta \cdot (\Delta W + \epsilon)$, where$\Delta W$is the standard Adam update and$\eta$is the learning rate. This isolates the effect of noise in the parameter updates, separate from the noise induced by minibatch sampling. -
Adam, residual dropout = 0.1 — standard Adam with dropout applied to the residual connections in the transformer, a classic regularization technique (Srivastava et al., 2014). Dropout randomly zeros out a fraction of activations during training, forcing the network to learn redundant representations.
-
AdamW, weight decay = 1 (default setting) — the decoupled weight decay formulation with a coefficient of 1. This is the paper's baseline and the strongest performer in Figure 2 (left).
-
AdamW, weight decay = 1 toward initialization — instead of decaying weights toward zero (the origin), this variant decays weights toward their random initial values:
$\theta_{t+1} = \theta_t - \eta \cdot \text{Adam}(\nabla \mathcal{L}) - \eta \lambda (\theta_t - \theta_0)$, where$\theta_0$are the parameter values at step 0. This tests whether the benefit of weight decay comes from the prior that small weights are good, or from a more general prior that weights shouldn't move too far from their starting point. -
Adam, learning rate =
$3 \times 10^{-4}$— a learning rate 3.3× smaller than the default, testing sensitivity to step size. -
Adam, learning rate =
$3 \times 10^{-3}$— a learning rate 3× larger than the default. -
Adam, Gaussian weight noise (std = 0.01) — Gaussian noise with standard deviation 0.01 added to every parameter before computing the forward pass:
$W_{\text{noisy}} = W + 0.01 \cdot \epsilon$, where$\epsilon \sim \mathcal{N}(0, 1)$is sampled independently per parameter per forward pass. This is distinct from gradient noise (variant 3) — weight noise perturbs the model's predictions, while gradient noise perturbs the update direction.
Key findings from the ablation study (Figure 2, left):
-
Weight decay dominates all other interventions. AdamW with weight decay = 1 achieves generalization at roughly 20–25% of the training data, compared to 40–50% for most other variants. The authors interpret this as strong evidence that the inductive bias toward small weights is especially well-suited to these algorithmic tasks, where the "correct" solution (the mathematical structure) can be represented compactly.
-
Weight decay toward initialization is slightly worse than weight decay toward zero. Both outperform no-weight-decay baselines, but decay toward zero achieves better data efficiency than decay toward initialization. This suggests that the prior that "approximately zero weights are suitable for small algorithmic tasks explains part, but not all of the superior performance of weight decay" (Section 3.3). The zero prior may be particularly appropriate because small weights produce near-uniform predictions (the logits are small, so the softmax is close to uniform), which is a natural "uninformed" state, whereas the random initialization may encode spurious structure.
-
Noise in some form is consistently beneficial, but not sufficient without weight decay. Gradient noise from minibatching (variant 2 vs. variant 1), explicit gradient noise added to full-batch updates (variant 3), and weight noise injected before the forward pass (variant 9) all improve data efficiency relative to their no-noise counterparts. This is "consistent with the idea that such noise might induce the optimization to find flatter minima that generalize better" (Section 3.3), connecting to the generalization measures literature (Hochreiter and Schmidhuber, 1997; Keskar et al., 2016). However, none of these noise variants approach the data efficiency of weight decay, suggesting that noise and weight decay operate through complementary mechanisms.
-
Learning rate has a narrow effective range. At
$3 \times 10^{-4}$, generalization occurs only at very high data fractions; at$3 \times 10^{-3}$, generalization fails almost entirely. The optimal learning rate of$10^{-3}$sits in a roughly 1-order-of-magnitude window. This sensitivity is notable because many deep learning phenomena (e.g., standard supervised learning on ImageNet) are relatively robust to learning rate within a factor of 3. The narrow window suggests that grokking involves a delicate balance: the steps must be large enough to escape the memorizing basin but not so large that they overshoot the generalizing solution or cause training instability. -
Full-batch optimization (no minibatch) fails completely. Variant 1 (Adam, full batch) shows minimal generalization even at 80% of the training data. Without any source of stochasticity — minibatch sampling, gradient noise, or weight noise — the optimizer appears to converge to a deterministic, memorized solution and never escapes. Training accuracy still reaches 100% (as the caption notes: "training accuracy reaches 100% after
$10^3$–$10^4$updates for all optimization methods"), confirming that full-batch optimization is not failing due to optimization difficulty — it perfectly interpolates the training data — but rather fails to generalize because it lacks the noise-driven exploration needed to discover the flatter, generalizing solution. -
Dropout helps but less than weight decay. Residual dropout of 0.1 (variant 4) improves data efficiency over the baseline Adam (variant 2), but the effect is modest compared to weight decay. This is consistent with dropout's known regularization mechanism: it prevents co-adaptation of features by randomly removing units, which implicitly encourages the network to learn redundant, robust representations. However, on these small algorithmic tasks, the primary challenge is not co-adaptation but rather escaping the memorized basin — and weight decay's continuous pressure toward small weights appears more effective for this than dropout's stochastic masking.
What the ablation study does NOT test. Notably absent from the ablation study are: (1) different architectures (all use the same 2-layer transformer), (2) different activation functions, (3) data augmentation strategies, (4) curriculum learning, (5) early stopping, (6) model size variation, or (7) different weight initialization schemes. These omissions are deliberate: the paper's goal is not to exhaustively characterize all factors that influence grokking, but to demonstrate that grokking is a robust phenomenon that manifests under a range of standard optimization choices, and that certain interventions (particularly weight decay) have disproportionate effects. This positions the paper as opening a research direction rather than closing one.
Monitoring, Measurement, and the Definition of Grokking
Training and validation accuracy tracking. At each optimization step, the model's accuracy is computed on both the training set and the validation set. Because the datasets are small (at most ~14,000 equations for S₅), these evaluations are cheap and can be performed at every step without significantly slowing training. This per-step logging is what makes grokking observable: the training and validation curves are plotted on the same axes (Figure 1, left), revealing the dramatic temporal gap between memorization and generalization.
Operational definition of "time to generalization." For the learning time curves (Figure 1, center; Section 3.1.1), the paper defines the metric as: the first optimization step at which validation accuracy reaches or exceeds 99%. This is a conservative threshold — it captures the moment when the network has essentially perfectly solved the task, not just when it starts improving. The authors report the median over 7 random seeds to account for the variability in grokking timing. The training time curves plot this quantity as a function of the fraction of data in the training set, revealing an exponential-like relationship: near the minimum data fraction required for generalization, a small decrease in data leads to a large increase in optimization time.
Why 99% is the right threshold. Because the validation set is the complement of the training set, perfect generalization means correctly predicting every held-out equation. At $p = 97$, there are $97^2 = 9409$ total equations; with 50% training data, the validation set has ~4705 equations, so 100% accuracy means getting all ~4705 correct. The 99% threshold corresponds to at most ~47 errors on the validation set. This is effectively perfect generalization — the remaining errors are likely due to edge cases or noise rather than a failure to learn the underlying operation. At $p = 97$, random chance accuracy is $1/97 \approx 1.03\%$, so 99% represents a gain of nearly two orders of magnitude over guessing.
The grokking curve shape. The paper's most iconic result — Figure 1 (left), showing modular division with 50% training data — reveals a specific temporal pattern that defines grokking:
- Phase 1 (steps 0 to ~
$10^3$): Both training and validation accuracy are low. The network is learning the basic structure of the data. - Phase 2 (steps ~
$10^3$to ~$10^5$): Training accuracy rises rapidly to near 100% while validation accuracy remains at chance level (~1%). The network has found a memorized solution that interpolates the training data but does not capture the underlying operation. - Phase 3 (steps ~
$10^5$to ~$10^6$): Validation accuracy suddenly rises from chance to perfect over the course of approximately$10^5$steps. The transition is not instantaneous — it takes roughly 100,000 steps to go from 1% to 100% — but relative to the$10^6$total training steps, it appears as a sharp jump. Training accuracy remains at 100% throughout this phase. - Phase 4 (after ~
$10^6$steps): Both training and validation accuracy are at 100%. The network has achieved perfect generalization.
The loss curves (Figure 4, Appendix A.2) show a complementary pattern: training loss drops rapidly and stays near zero, while validation loss increases during Phase 2 (the network becomes overconfident in its memorized but incorrect predictions) before undergoing a second descent during Phase 3. The authors explicitly note this "second descent in validation loss (though not accuracy) as a function of the amount of training" (Appendix A.3), connecting it to — but distinguishing it from — the double descent literature.
What grokking is NOT. The paper is careful to characterize grokking as a specific phenomenon with clear operational criteria:
- Grokking is NOT standard delayed generalization where validation accuracy slowly improves alongside training accuracy. The key feature is the temporal gap during which the network has already perfectly memorized the training data but shows zero generalization.
- Grokking is NOT simply overfitting followed by recovery. In standard overfitting, validation accuracy peaks and then declines as training continues. In grokking, validation accuracy never declines — it stays flat at chance level, then rises to perfect. The model is not "overfitting then recovering"; it is "memorizing, then later discovering the generalizing solution."
- Grokking is NOT observed at all data fractions. At high data fractions (e.g., 90% training data), training and validation accuracy tend to rise together (the network generalizes immediately). At very low data fractions (below the minimum threshold), neither training nor validation accuracy improves beyond chance. Grokking manifests only in the intermediate regime where the network has enough data to memorize but not enough to generalize immediately — the "critical" data fraction where the transition must be discovered through extended optimization.
Why this definition matters for the research agenda. The operational definition of grokking as a temporally decoupled memorization-to-generalization transition makes it a falsifiable experimental target. Any theory that claims to explain generalization in neural networks must predict (or at least be consistent with) the following observable facts:
- The network achieves 100% training accuracy at step
$t_{\text{mem}}$. - Validation accuracy remains at chance level from
$t_{\text{mem}}$to$t_{\text{grok}}$, where$t_{\text{grok}} - t_{\text{mem}}$can span 2–3 orders of magnitude in optimization steps. - The ratio
$t_{\text{grok}} / t_{\text{mem}}$increases as the training data fraction decreases (Figure 1, center). - Interventions that improve generalization (weight decay, noise) reduce
$t_{\text{grok}}$; interventions that hurt generalization (full-batch optimization, suboptimal learning rates) prevent$t_{\text{grok}}$from being reached within the allotted budget.
Any candidate theory — flat minima, simplicity bias of SGD, implicit regularization, parameter norm minimization — must explain why these specific dynamics occur. The grokking paradigm thus serves as a filter for generalization theories: a theory that cannot account for the observed temporal decoupling is either incomplete or incorrect.
Outlier Experiment: Testing the Robustness of Grokking to Label Noise
Motivation. The outlier experiment (Appendix A.4, Figure 6) probes a fundamental question: does grokking depend on the data being perfectly clean, or can the network still discover the generalizing solution in the presence of some erroneous training examples? This matters for two reasons. First, real-world data is never perfectly clean, so understanding robustness to label noise is essential for assessing whether grokking could be a practically relevant phenomenon. Second, the experiment tests the hypothesis that grokking involves the network "denoising" the training data — treating some training examples as outliers and learning the underlying pattern from the consistent majority.
Experimental design. The authors introduce $k$ outliers into the training data for the S₅ composition task, where $k \in \{0, 10, 100, 1000, 2000, 3000\}$. Outliers are created by randomly selecting $k$ training equations and replacing their answers (⟨c⟩ token) with answers from $k$ other training equations, also selected randomly. The result is a training set where $k$ equations have incorrect labels — they claim that $a \circ b = c'$ when in fact $a \circ b = c$ for some $c \neq c'$. The validation set is left unchanged (all labels are correct). The question: at what $k$ does grokking break, and what happens instead?
Results (Figure 6). The experiment reveals a nuanced picture:
-
All configurations eventually reach 100% training accuracy. Even with
$k = 3000$outliers, the network has sufficient capacity to memorize the training data — including the incorrect labels. This confirms that the model is operating well above the interpolation threshold: it can perfectly fit arbitrary label noise. The step at which training accuracy reaches 100% is "not considerably affected" by the number of outliers. -
A small number of outliers does not noticeably impact generalization. For
$k = 10$and$k = 100$, the data efficiency curves (minimum training data fraction required for generalization) are nearly identical to the$k = 0$baseline. The network successfully "denoises" these outliers: it learns the correct operation despite a handful of misleading examples, and its validation accuracy reflects the true underlying function. -
Large numbers of outliers degrade generalization significantly. At
$k = 1000$,$k = 2000$, and$k = 3000$, the range of training data fractions for which the network generalizes within the optimization budget shrinks. The network can still memorize the noisy training set (training accuracy reaches 100%), but it fails to discover the generalizing solution unless it has a sufficiently large fraction of clean data to overwhelm the noise. -
The network does not "denoise" in the strong sense. The paper explicitly notes that the first hypothesized scenario — "the model class was not large enough to interpolate such 'noisy' dataset, and the procedure converged to a solution that generalizes well but denoises the training data (i.e., predicts
$c = a \circ b$even for the outlier equations)" — does not occur. All runs achieve 100% training accuracy, meaning the network successfully memorizes the incorrect labels. There is no evidence that the network "recognizes" the outliers and overrides them — it simply memorizes everything, and generalization (when it occurs) happens despite the memorized noise, not through active noise rejection.
Interpretation and implications. The authors interpret this as "additional evidence that the capacity of the network and optimization procedure is well beyond the capacity needed for memorizing all the labels on the training data, and that generalization happening at all requires a non-trivial explanation" (Appendix A.4). The network's ability to generalize even with hundreds of outliers suggests that grokking is not a fragile phenomenon dependent on perfectly clean data. However, the finding that the network memorizes rather than denoises the outliers cautions against anthropomorphizing grokking — the network does not "understand" that some labels are wrong and "choose" to ignore them. Instead, it appears to find solutions that simultaneously memorize the noisy training examples and capture the underlying pattern, and the existence of such solutions depends on the signal-to-noise ratio (clean examples vs. outliers).
Connection to the broader message. The outlier experiment reinforces the paper's central thesis that the grokking paradigm provides a fine-grained, controllable way to study generalization. By varying $k$, one can smoothly interpolate between "clean data, easy generalization" and "maximally noisy data, no generalization," while holding architecture, optimizer, and task structure constant. This parametric control over the difficulty of generalization is precisely what natural datasets lack, and what makes algorithmic datasets a "fertile ground" for studying deep learning generalization.
Embedding Visualization Methodology
What is being visualized. For networks that successfully generalize, the paper visualizes the output layer weight matrix — specifically, the row vectors corresponding to each element token. In a transformer, the final layer produces logits for each token in the vocabulary, and the weight matrix of this output projection maps from the transformer's hidden state (dimension 128) to the vocabulary logits. Each row of this matrix is a 128-dimensional vector that, when dotted with the final hidden state, produces the logit for the corresponding element token. These row vectors can be interpreted as learned embeddings for the output symbols — they represent what the network has "understood" about each element by the end of training.
Visualization technique. The authors use t-SNE (t-distributed Stochastic Neighbor Embedding) to project the 128-dimensional row vectors to two dimensions for visualization. t-SNE is a nonlinear dimensionality reduction method that preserves local neighborhood structure — elements with similar output embeddings appear close together in the plot. The visualizations use color coding to reveal structure: for the modular addition network, elements are colored by their residue modulo 8; for the S₅ network, elements are colored by their membership in cosets of a particular subgroup.
Key observations from the visualization (Figure 3):
-
Modular addition reveals a circle topology, not a line. The t-SNE plot (Figure 3, right) shows the elements arranged in a roughly circular pattern. The authors draw lines connecting each element to
$x + 8 \pmod{97}$(adding 8 modulo 97), and these lines trace out a regular circular orbit — exactly the structure one would expect if the network has learned that addition modulo a prime forms a cyclic group. The coloring by residue modulo 8 reveals that elements with the same residue (mod 8) cluster together, suggesting the network has implicitly discovered the subgroup structure$8\mathbb{Z}_{97}$within$\mathbb{Z}_{97}$. -
The circular topology is NOT a t-SNE artifact. The network was not given any geometric or topological information about the residues — it only saw equations of the form "abstract symbol 42 + abstract symbol 55 = abstract symbol 97" (tokens, not numbers). The fact that the learned embeddings recover the circular topology of the cyclic group is strong evidence that the generalizing solution has captured the underlying mathematical structure, not just superficial correlations in the training data.
-
S₅ reveals subgroup coset structure. The t-SNE plot for S₅ composition (Figure 3, left) shows elements clustered into distinct groups. The authors identify these groups as the cosets of the subgroup
$\langle (0, 3)(1, 4), (1, 2)(3, 4) \rangle$(or its conjugates) — a subgroup of order 4 within the 120-element symmetric group S₅. Elements that belong to the same coset (i.e., differ by right multiplication by a subgroup element) are embedded near each other. This is a non-trivial structural discovery: the network has implicitly learned part of the subgroup lattice of S₅ without ever being told the group theory. -
Weight decay improves embedding structure. The authors note that "the structure is more apparent in networks that were optimized with weight decay" (Section 3.4). This suggests that weight decay not only accelerates grokking (improves data efficiency) but also produces "cleaner" internal representations — the generalizing solution found under weight decay is structurally simpler and more interpretable than solutions found without it. This is consistent with weight decay's bias toward small weights, which may favor solutions where the embeddings lie on a low-dimensional manifold (like a circle) rather than being scattered arbitrarily.
Why embedding visualization matters for the paper's argument. The visualizations serve as qualitative evidence that generalization in these networks corresponds to discovering the true mathematical structure of the underlying operation, not just finding a shallow pattern that happens to predict the held-out equations. A network that achieved 100% validation accuracy by learning a lookup table of the 9409 possible equations (which is theoretically possible given the parameter count) would not produce these structured embeddings — the embeddings would be arbitrary. The fact that the embeddings recover circles, cosets, and subgroup structure is a signature that the network has learned the compact algebraic description, and this learning is what grokking — the long optimization period between memorization and generalization — enables.
Relationship to the broader research vision. The embedding visualizations connect to a speculative goal articulated in the Discussion (Section 4): "we speculate that such visualizations could one day be a useful way to gain intuitions about novel mathematical objects." If a neural network, trained only on the operation table of an unfamiliar algebraic structure, can recover its internal organization (subgroups, cosets, cyclic structure) and display it in a human-interpretable form, then neural networks could serve as a tool for mathematical discovery — automatically detecting structure in abstract algebraic objects that mathematicians haven't yet characterized. This is a long-term vision that the paper only gestures toward, but the fact that a tiny transformer trained for $10^6$ steps on a small binary operation table spontaneously recovers the circle topology of $\mathbb{Z}_{97}$ and the subgroup structure of S₅ makes it more than idle speculation.
Data Efficiency and Training Time Measurement
The learning time curves (Figure 1, center; Section 3.1.1). The paper conducts a systematic investigation of how the optimization time required for generalization varies with the training data fraction, using the composition operation in S₅ as the testbed. The experimental protocol:
- For each training data fraction (varying from ~17% to ~40%, in 1% increments near the critical region), train the model from scratch with a fixed optimization budget of
$5 \times 10^5$steps. - At each step, evaluate validation accuracy.
- Record the first step at which validation accuracy reaches or exceeds 99%.
- Repeat for 7 random seeds (different data splits, different initializations) and report the median.
The key quantitative finding. In the vicinity of 25–30% training data, the relationship between data fraction and optimization time is extremely steep: "a decrease of 1% of training data leads to an increase of 40–50% in median time to generalization" (Section 3.1.1). For example, at 30% training data, the median time to generalization might be $10^4$ steps; at 28%, it might be $1.5 \times 10^4$; at 26%, $2.5 \times 10^4$; and at 24%, $4 \times 10^4$ — an exponential-like scaling. The curve in Figure 1 (center) appears to approach a vertical asymptote at a critical data fraction $f^* \approx 20\%$, below which generalization does not occur within the $5 \times 10^5$-step budget (and possibly never occurs).
Why this is a surprising finding. In standard supervised learning, reducing the training data reduces the asymptotic generalization performance — a model trained on 50% of ImageNet achieves lower final accuracy than one trained on 100%, and no amount of additional training closes the gap. In this algorithmic setting, the authors observe a qualitatively different phenomenon: "while the converged performance stays constant at 100% within a range of training dataset sizes, the optimization time required to achieve that performance grows quickly as the dataset size is decreased" (Section 3.1.1). In other words, above the critical fraction $f^*$, generalization is always possible given enough optimization steps, but the required steps increase dramatically as $f$ approaches $f^*$ from above. This is a compute-for-data tradeoff: you can compensate for having less data by training for longer, up to a hard floor $f^*$ below which no amount of training suffices.
Contrast with training accuracy. While the time to validation generalization increases exponentially as the data fraction decreases, the time for training accuracy to first reach 99% "generally trends down as dataset size decreases and stays in the range of $10^3$–$10^4$ optimization steps" (Section 3.1.1). This is intuitive: with fewer training examples, memorizing them is easier (less information to encode), so training accuracy is achieved earlier. The divergence between these two curves — training time decreasing while generalization time increases — is the quantitative signature of the memorization-generalization decoupling that defines grokking.
Generality of the finding. The paper reports that this pattern — "exponential increase in optimization time until reaching generalization as dataset size decreases" — was observed "on all the algorithmic tasks for which we could get the networks to generalize" (Section 3.1.1). This suggests that the compute-for-data tradeoff is not specific to S₅ but may be a general property of learning algorithmic rules from sparse observations. However, the paper does not provide full learning time curves for operations other than S₅, so the quantitative steepness of the tradeoff (the 40–50% increase per 1% data reduction) may be operation-specific.
Implications for the broader research agenda. The learning time curves connect grokking to questions of algorithmic information theory and computational learning theory. The critical fraction $f^*$ can be interpreted as the minimum description length of the operation in terms of examples: above $f^*$, the training data contains enough mutual information with the full operation table that the regularities can be inferred (given sufficient optimization); below $f^*$, the training data is consistent with too many possible operations for the network to disambiguate. Characterizing $f^*$ in terms of the algebraic properties of the operation (symmetry, number of generators, relational complexity) is a natural next step that the paper does not pursue but that its framework makes possible.
Summary of Design Choices and Their Justifications
-
Abstract symbols over structured representations: Forces the network to learn all properties of elements from their interaction patterns, eliminating the possibility that the network leverages pre-existing knowledge of numerical notation or permutation structure. This isolates the phenomenon to a question of pure relational learning.
-
Tiny transformer (
$4 \times 10^5$parameters) over larger models: Makes training fast and reproducible on a single GPU while still being massively overparameterized relative to the training data. The small size is essential for the$10^6$-step training runs needed to observe grokking. -
Loss on answer token only over full autoregressive loss: Focuses the entire training signal on the operation result, avoiding confounding from sequence-structure learning that is irrelevant to the generalization question.
-
No learning rate decay over standard scheduling: A deliberate simplification that demonstrates grokking is not an artifact of careful scheduling. The fact that grokking occurs without decay strengthens the claim that it's a property of the optimization dynamics, not the hyperparameter schedule.
-
AdamW over Adam: The decoupled weight decay in AdamW isolates regularization from adaptive learning rate scaling, making it possible to interpret the effect of weight decay independently — critical for the finding that weight decay is the dominant factor in data efficiency.
-
Weight decay = 1 over typical small values: The large coefficient ensures strong regularization pressure that can dislodge the network from memorized solutions within the optimization budget. The value was chosen empirically for performance, but its largeness underscores that these algorithmic tasks favor very strong simplicity biases.
-
Binary operation tables over natural datasets: The finite, exhaustive nature of the task means (a) there is no distribution shift between training and validation, (b) "perfect generalization" has a clear, verifiable meaning, and (c) all held-out equations are equally informative — there are no "easy" vs. "hard" test examples in the sense of natural data with rare classes or out-of-distribution patterns.
-
t-SNE over other visualization methods: t-SNE preserves local neighborhood structure, which is appropriate for detecting topological patterns (circles, clusters) in the embedding space. Alternative methods like PCA would capture global linear structure but miss the nonlinear manifold structure that reflects algebraic properties.
4. Key Insights and Innovations
Innovation 1: Grokking as a Diagnostic Concept That Decouples Memorization from Generalization in Time
The paper's most distinctive intellectual contribution is not the observation that neural networks sometimes generalize long after overfitting — delayed generalization improvements have been noted before — but rather the elevation of this observation into a named, operationalized diagnostic concept: grokking. By giving the phenomenon a specific, memorable name and precise operational criteria (validation accuracy jumping from chance level to perfect generalization thousands of steps after training accuracy reaches 100%), the authors create a conceptual handle that the field previously lacked. This is not a small terminological move; it transforms an amorphous "sometimes this happens" into a falsifiable experimental target around which a research program can be organized.
What makes grokking distinctive as a concept, rather than merely a rebranding of delayed generalization, is the specific signature it describes: a three-phase dynamic where (Phase 1) the network learns to predict training data, (Phase 2) it maintains perfect training accuracy with zero generalization above chance for an extended period — often 2–3 orders of magnitude more steps than it took to memorize — and then (Phase 3) validation accuracy rises sharply to near-perfect. This is not the standard overfitting curve where validation accuracy peaks and then degrades; it is not double descent as a function of model capacity (Belkin et al., 2018; Nakkiran et al., 2019); it is a specific temporal signature that isolates the moment when a network pivots from storing individual examples to capturing the underlying generative rule.
Prior to this work, the field's default assumption — embedded in standard training practices like early stopping — was that once a model perfectly fits the training data, further optimization can only harm generalization. The grokking concept directly challenges this assumption: it demonstrates that, at least in some regimes, the memorized solution is not the end state but an intermediate plateau from which continued optimization under appropriate regularization can eventually escape toward a generalizing solution. This reframes the optimization trajectory not as a simple memorization-then-overfitting timeline but as containing qualitatively distinct phases with different computational purposes — early steps find easy-to-locate memorized minima, while later steps navigate toward harder-to-find structured solutions.
The evidence for this decoupling is starkest in Figure 1 (left), where on modular division with 50% training data, training accuracy reaches near-perfect within ~10³ steps while validation accuracy remains at chance level (~1%) for another ~10⁵ steps before rising to perfect. This 1000× gap between memorization time and generalization time is the quantitative hallmark that makes grokking a crisp experimental variable rather than a vague qualitative description.
The innovation's significance lies not in explaining why grokking happens — the paper explicitly stops short of mechanistic explanation — but in providing a shared vocabulary and reproducible experimental template that makes the generalization process itself an object of study. Before grokking, studying generalization meant comparing converged models post-hoc (Jiang et al., 2019) or observing subtle validation loss wiggles on natural data. After grokking, one can ask precise temporal questions: What changes in the network between step 10⁴ (memorized) and step 10⁶ (generalized)? Do flatness measures track this transition? Can we predict the timing from architecture or data properties? This is a fundamental reframing — from studying properties of generalizing solutions to studying the dynamics of the generalization process itself.
Innovation 2: The Demonstration That Optimization Time, Not Just Data Quantity, Controls Generalization in the Data-Limited Regime
The paper's second conceptual contribution is the empirical discovery that generalization performance is not solely a function of dataset size — it is also a function of optimization duration, and these two resources can be traded off against each other. This is crystallized in the learning time curves of Figure 1 (center) and Section 3.1.1, which show that for the S₅ composition task, a 1% reduction in training data near the critical fraction (~25–30%) increases median time to generalization by 40–50%. Equivalently: given enough optimization steps, the model can achieve perfect generalization from less data, up to a hard floor below which even infinite compute would not suffice.
This finding departs fundamentally from the standard supervised learning narrative, where reducing training data imposes an irreducible ceiling on asymptotic performance — more training can never close the gap between 50%-data and 100%-data ImageNet models. In the grokking regime, the relationship is qualitatively different: above the critical data fraction f*, generalization is always possible given sufficient optimization, and the primary effect of increasing data is to reduce the required optimization time, not to raise an asymptotic performance ceiling. In other words, data and compute are partially substitutable in a way that standard scaling analyses (which focus on asymptotic performance as a function of dataset size) fail to capture.
The intellectual significance of this finding extends beyond the specific numbers. It reframes the data efficiency question from "how much data do we need to achieve good performance?" to "what is the minimum data required for generalization to be possible at all, and how does the required training time scale as we approach that minimum?" This second formulation connects naturally to concepts from algorithmic information theory and computational learning theory — the critical fraction f* can be thought of as the minimum description length of the operation in terms of examples, and the steepness of the time-to-generalization curve near f* reflects the computational difficulty of inferring the compact description from sparse observations.
The paper establishes this as a general phenomenon across operations ("we've observed a similar pattern of exponential increase in optimization time until reaching generalization as dataset size decreases on all the algorithmic tasks for which we could get the networks to generalize," Section 3.1.1), not a quirk of S₅. However, it does not provide full learning time curves for operations other than S₅, leaving open the question of whether the 40–50% time increase per 1% data reduction is a universal constant or operation-specific — a precise, falsifiable question that subsequent work can address using the same experimental template.
Innovation 3: The Identification of Weight Decay as the Dominant Intervention for Accelerating the Memorization-to-Generalization Transition
The ablation study in Section 3.3 and Figure 2 (left) produces a finding that is both practically actionable and theoretically suggestive: weight decay, specifically in its decoupled AdamW form, is substantially more effective at improving data efficiency than any other regularization or optimization intervention tested, including dropout, gradient noise, weight noise, and learning rate tuning. Weight decay more than halves the required training data compared to the next-best variant, and the authors' comparison of standard weight decay (toward zero) versus weight decay toward initialization reveals that the zero prior accounts for most — but not all — of the benefit.
This finding is significant not because weight decay is a novel technique (it has been a standard regularizer for decades), but because the magnitude and specificity of its effect in the grokking regime reveals something about the geometry of the loss landscape that other regularization methods do not. Weight decay continuously exerts a uniform pressure toward the origin, which favors solutions with small parameter norms. On algorithmic tasks where the "correct" generalizing solution is a compact algebraic structure (e.g., addition modulo 97 can be represented with far fewer effective parameters than memorizing 9409 separate equations), the small-norm prior aligns with the structural simplicity of the generalizing solution. Dropout, by contrast, prevents co-adaptation but does not systematically penalize large weights; gradient noise aids exploration but does not impose a directional bias in parameter space. That weight decay dominates these alternatives suggests that the decisive factor in escaping the memorized basin is not just noise (which enables exploration) but a specific directional pressure toward structurally simpler solutions.
The comparison between weight decay toward zero and weight decay toward initialization (Figure 2, left) is particularly instructive as a diagnostic tool. Both outperform no-weight-decay baselines, but zero-decay performs better. This implies that the benefit of weight decay is not merely "don't move too far from the starting point" (which would make initialization-decay optimal), but specifically that zero is a meaningful attractor — small weights produce near-uniform predictions, which is an appropriate uninformed prior for symbolic reasoning tasks where the correct output depends on discovering algebraic regularities rather than exploiting statistical correlations.
The intellectual significance of this finding lies in what it reveals about the relationship between regularization and optimization dynamics. The standard view treats regularization as a performance optimizer — weight decay improves final generalization by some modest percentage. The grokking paradigm reveals a more dramatic role: weight decay doesn't just improve the final solution; it enables the network to escape the memorized basin at all within a practical optimization budget. Without weight decay, networks on smaller datasets may remain trapped in the memorized solution indefinitely, even though a generalizing solution exists in the loss landscape. This reframes regularization not as a performance tweak but as a necessary condition for phase transitions in the optimization trajectory — a fundamentally different role than the standard regularization-as-overfitting-prevention narrative.
Innovation 4: The Demonstration That Structured Internal Representations Emerge Spontaneously from Pure Relational Learning
The embedding visualizations in Figure 3 and Section 3.4 provide what might be the paper's most philosophically striking finding: neural networks trained only on abstract symbolic equations, with no grounding in numerical or geometric representations, spontaneously recover the underlying mathematical structure of the operations — circles for cyclic groups, coset clusters for permutation groups — and display this structure in a human-interpretable form. The network was never told that "97 is close to 0" or "42 + 55 = 97 implies a cyclic structure"; it only saw equations pairing abstract tokens. Yet its learned output embeddings organize themselves into the circle topology of ℤ₉₇ and the subgroup coset structure of S₅.
This finding is significant at two levels. First, as evidence about what the network has actually learned: it demonstrates that the generalizing solution is not merely a more efficient lookup table or a shallow statistical pattern, but a genuine discovery of the compact algebraic description. The circular embedding structure for modular addition — with elements colored by their residue modulo 8 forming connected orbits — is a signature that the network has implicitly learned the group structure, including the fact that the additive group modulo a prime is cyclic and has nontrivial subgroups. A network that achieved 100% validation accuracy through a memorized solution (e.g., encoding all 9409 equations in a disorganized lookup table within its 4×10⁵ parameters) would not produce these structured embeddings; the structure is evidence that the generalizing solution is qualitatively different from the memorized one, not just a refined version of it.
Second, as a methodological demonstration: the visualization approach validates the grokking paradigm as a tool for studying not just whether networks generalize but what they learn when they do. The fact that t-SNE of the output layer weights reveals mathematically meaningful structure suggests that similar visualization techniques could be used to probe what networks have discovered about unfamiliar operations — operations for which humans do not already know the algebraic structure. This connects to the paper's speculative vision (Section 4) that "such visualizations could one day be a useful way to gain intuitions about novel mathematical objects."
The additional observation that "the structure is more apparent in networks that were optimized with weight decay" (Section 3.4) ties this innovation back to Innovation 3: weight decay doesn't just accelerate grokking; it produces more interpretable internal representations. This suggests that the small-norm prior favored by weight decay aligns with the discovery of compact algebraic structures — the circular embedding manifold for ℤ₉₇ corresponds to a low-dimensional representation that requires fewer large weights than an arbitrary 128-dimensional embedding. The regularization that accelerates the memorization-to-generalization transition is the same regularization that makes the resulting representations human-interpretable, hinting at a deeper connection between simplicity biases in optimization and the learnability of algebraic structure.
5. Experimental Analysis
Evaluation Methodology
-
Dataset. The paper uses 12 algorithmically generated binary operation datasets, each consisting of all possible equations of the form
a ◦ b = cfor a finite set of abstract symbols. For modular arithmetic operations modulo primep = 97, this yields97² = 9409total equations; for operations on the symmetric group S₅ (120 elements), this yields120² = 14400total equations. For each training run, a random subset of equations is designated as the training set (at varying fractions from roughly 20% to 95% of all equations) and the complement becomes the validation set, with no overlap. The operations span modular addition, subtraction, multiplication, division, polynomial functions, mixed conditional operations, and permutation group composition, conjugation, and related products (full list in Appendix A.1.1). -
Base model(s). All experiments use a single, fixed transformer architecture: a standard decoder-only transformer (Vaswani et al., 2017) with 2 layers, embedding dimension 128, 4 attention heads, and approximately
4 × 10⁵non-embedding parameters total. The model is deliberately small and completely standard to ensure fast, reproducible experiments on a single GPU while remaining massively overparameterized relative to the training data (which ranges from a few hundred to a few thousand examples at the lower data fractions). No architectural variants are tested; the goal is to study generalization dynamics that the authors believe to be architecture-agnostic. -
Metrics. The paper measures two primary quantities at each optimization step: (1) training accuracy, the fraction of equations in the training set for which the model's highest-probability prediction matches the ground-truth answer token; and (2) validation accuracy, the same metric computed on the held-out validation set. Because all elements are abstract symbols with no semantic similarity, accuracy is binary — exactly correct or completely wrong — with no notion of partial credit. The key derived metric for the learning time curves (Section 3.1.1) is time to generalization, operationally defined as the first optimization step at which validation accuracy reaches or exceeds 99%. For the data efficiency curves (Section 3.2, Section 3.3), the metric is best validation accuracy achieved within the optimization budget (typically
10⁵steps), plotted as a function of the training data fraction. -
Baselines. The paper does not compare against prior methods or external baselines in the traditional sense — it is an empirical phenomenology paper, not a method proposal. The implicit baseline against which all comparisons are made is the memorized solution: the model's performance at the point where training accuracy first reaches ~100% but validation accuracy remains at chance level. All analyses (grokking curves, learning time curves, ablation comparisons) measure improvements relative to this memorized-but-not-generalizing state. For the optimization ablation study (Section 3.3), the default AdamW configuration (weight decay = 1, learning rate =
10⁻³) serves as the reference against which other optimizer/regularization variants are compared. -
Generation budget / compute accounting. The universal unit of compute is optimization steps (gradient updates). Most experiments use a fixed budget of
10⁵steps, increased to5 × 10⁵for the learning time curves (Section 3.1.1) and to10⁶for the dramatic grokking demonstration in Figure 1 (left). The paper does not measure wall-clock time or FLOPs; the small model size ensures all experiments complete within practical time on a single GPU. The per-step cost is constant across experiments because the model architecture, sequence length (5 tokens), and loss computation (single-token cross-entropy) are fixed. -
Cross-validation / statistical protocol. No cross-validation is used — the validation set is a fixed held-out complement of the training set for each run, and models are evaluated exactly once per step on this fixed split. Reproducibility is addressed through multiple random seeds: 3 seeds for most experiments (different random data splits and network initializations), 7 seeds for the learning time experiments (Section 3.1.1). All curves show means over these seeds. The paper does not report error bars, confidence intervals, or individual-run trajectories, though the seed count is noted for each experiment type in Appendix A.1.2. The lack of displayed variance makes it difficult to assess how consistent the grokking timing is across runs — whether the sharp transition is reliably positioned or varies substantially per seed.
Main Quantitative Results
The paper's experiments are organized around three axes of investigation: (1) documenting the grokking phenomenon itself and how it varies with operation type and data quantity, (2) measuring how optimization time scales with dataset size, and (3) identifying which optimization interventions accelerate or inhibit grokking. Unlike a methods paper with clear "our method vs. baselines" tables, the results here establish the empirical regularities that define grokking as a phenomenon worth studying.
The Core Grokking Phenomenon: Temporal Decoupling of Memorization and Generalization
Headline result. On modular division modulo 97 with 50% of the data in the training set, training accuracy reaches near-perfect (~100%) within approximately 10³ optimization steps, but validation accuracy remains at chance level (~1%, or 1/97) until approximately 10⁵ steps before rising to near-perfect (~100%) by 10⁶ steps (Figure 1, left; Section 3.1). The model achieves perfect interpolation of the training data roughly 1000× earlier than it achieves perfect generalization — the network spends the vast majority of training in a state where it can perfectly reproduce the training examples but has zero ability to generalize to held-out equations.
Qualitative signature of the grokking curve (Figure 1, left). The training accuracy curve (red) rises rapidly from 0% to ~100% by step 10³ and remains essentially flat thereafter. The validation accuracy curve (green) displays a distinctive three-phase pattern: (1) rapid initial rise to chance level (~1%) by step ~10³, tracking the early phase of training; (2) a prolonged flat period from step 10³ to ~10⁵ where validation accuracy shows "very little evidence of any generalization" (Section 1, caption), staying at ~1–2%; (3) a sharp transition from chance to ~100% between steps 10⁵ and 10⁶, with the full rise taking approximately 10⁵ steps. The authors explicitly note that this third phase is not instantaneous — it spans ~100,000 steps — but relative to the 1,000,000-step total, it appears as a dramatic jump.
The loss curve counterpart (Figure 4, Appendix A.2). The training loss drops rapidly and stays near zero throughout. The validation loss, however, increases from step 10² to approximately 10⁵ — the model becomes progressively more confident in its memorized but incorrect predictions before undergoing a "second descent" that coincides with the validation accuracy rise. The authors connect this to the double descent literature (Belkin et al., 2018; Nakkiran et al., 2019) but argue it is potentially distinct because: (a) the second descent occurs far past the interpolation point (tens of thousands of epochs, not at the threshold), and (b) they do not observe non-monotonicity in accuracy (validation accuracy never drops, only rises from chance to perfect). This is carefully qualified — the paper does not claim to have proven grokking is distinct from double descent, only that it "might be distinct" (Appendix A.3).
Generality across operations (Figure 2, right; Section 3.2). The paper measures the best validation accuracy achieved after 10⁵ optimization steps across a range of training data fractions for 11 binary operations (all except the mixed conditional operation, which is discussed separately). The key findings:
-
Not all operations are equally grokkable. Some operations (e.g.,
x + ymodulop,x × ymodulop) achieve generalization (validation accuracy approaching 100%) at training data fractions as low as 20–25%. Others (e.g.,x³ + xy² + ymodulo 97) fail to generalize at any training fraction up to 95% within the optimization budget — "the converged models effectively just memorized the training dataset without finding any real patterns in the data" (Section 3.2). The paper interprets this as an operation complexity gradient: some binary operations have algebraic structure that is too complex for the network to discover within10⁵steps, or perhaps at any level of optimization. -
Symmetry matters. Operations that are symmetric in their operands (
x + y,x × y,x² + y²,x² + xy + y²) generalize at lower data fractions than their asymmetric counterparts (x - y,x / y,x² + xy + y² + x). The authors hypothesize this is "partially architecture-dependent, since it's easy for a transformer to learn a symmetric function of the operands by ignoring positional embedding" (Section 3.2). This is an instance of architectural inductive bias interacting with task structure to influence generalization difficulty — the transformer's ability to ignore position makes symmetric functions inherently easier to learn. -
Mathematically equivalent operations show identical data efficiency. The operations
x - y(modp-1) andx / y(modp) are mathematically isomorphic (since the multiplicative group modulo a prime is cyclic, division corresponds to subtraction of exponents), and since the network sees only abstract symbols with no internal structure, these operations are indistinguishable. Figure 2 (right) shows their data efficiency curves are nearly identical — both require roughly the same fraction of training data to achieve generalization. This serves as a validation that the network is truly learning the algebraic structure rather than exploiting representational artifacts, and that the abstract-symbol design choice works as intended. -
The mixed conditional operation generalizes, showing compositionality. The operation
x / y(modp) ifyis odd, otherwisex - y(modp) requires the network to conditionally apply different operations depending on the parity ofy. The paper reports that this operation does generalize (Figure 2, right), requiring the network to "learn a mix of several simple operations — in particular the role ofxhas to be interpreted as a residue in the additive group when it's paired with an eveny, and as a residue in the multiplicative group when it's paired with an oddy"(Section 3.2). This demonstrates that grokking is not limited to pure algebraic operations — the network can discover and compose multiple underlying structures when the task demands it.
Why grokking appears at intermediate data fractions but not at extremes. The paper reports that for data fractions well above the minimal generalization threshold, "training and validation curves tend to track each other more closely" (Section 3.1) — the network generalizes almost immediately, and no grokking is observed. At data fractions below the minimal threshold, neither memorization nor generalization occurs within the budget. Grokking — the clear temporal decoupling — appears specifically in the critical regime near the minimum data fraction where generalization is still achievable. The dramatic Figure 1 (left) example, using 50% training data for modular division, is chosen to place the network in this critical regime where the memorization-generalization gap is maximally pronounced.
Learning Time Curves: The Compute-for-Data Tradeoff
Headline result. For the S₅ composition task, the median optimization time required for validation accuracy to first reach 99% increases rapidly as the training data fraction decreases, with a 1% reduction in training data leading to a 40–50% increase in median time to generalization in the vicinity of 25–30% training data (Figure 1, center; Section 3.1.1). Conversely, the time for training accuracy to first reach 99% decreases as the dataset shrinks, remaining in the range of 10³–10⁴ steps — memorization becomes faster with less data, while generalization becomes dramatically slower.
Quantitative detail (Figure 1, center). The experiment uses the S₅ composition task with an extended optimization budget of 5 × 10⁵ steps to capture the full range of generalization times. Training data fractions are swept across approximately 17–40%. For each fraction, 7 random seeds are run, and the median step at which validation accuracy first reaches 99% is reported. The curve reveals several regimes:
- Above ~35% training data: Generalization occurs rapidly, within ~
10⁴steps or fewer. The model effectively generalizes as soon as it has memorized. - ~25–35% training data: The critical regime where the curve steepens dramatically. Each 1% reduction in data increases the median generalization time by 40–50%. The curve appears to follow an exponential-like relationship, with generalization time growing by orders of magnitude as data approaches the minimum fraction.
- Below ~20–25% training data: The median generalization time exceeds the
5 × 10⁵-step budget, or generalization never occurs. The curve appears to approach a vertical asymptote at a critical data fractionf*— below this fraction, the network cannot generalize regardless of optimization time (or would require impractically many steps).
Contrast with memorization time. The paper explicitly reports that "the number of steps until the train accuracy first reaches 99% generally trends down as dataset size decreases and stays in the range of 10³–10⁴ optimization steps" (Section 3.1.1). This inverse relationship — less data means faster memorization but slower generalization — is the quantitative expression of the grokking decoupling. The memorization time is bounded and small; the generalization time is unbounded and diverges as data approaches the critical fraction.
Generality claim. The paper states that this pattern — "exponential increase in optimization time until reaching generalization as dataset size decreases" — was observed "on all the algorithmic tasks for which we could get the networks to generalize" (Section 3.1.1). However, the paper only provides the full learning time curve for S₅ composition. Quantitative learning time curves for other operations are not shown, so the 40–50% steepness figure is verified only for one operation. Whether the steepness varies across operations (e.g., steeper for more complex operations, shallower for symmetric ones) is an open question left to future work.
Optimization Ablation Study: Weight Decay Dominates Data Efficiency
Headline result. Among all optimization and regularization variants tested on the S₅ composition task (Figure 2, left; Section 3.3), AdamW with weight decay = 1 achieves generalization at substantially lower training data fractions than any other configuration, requiring only ~20–25% of the data to reach perfect generalization within the 10⁵-step budget, compared to ~40–50% for most alternatives — a reduction of more than half in the required samples.
Detailed comparison of variants (Figure 2, left, read left to right per the authors' listing in Appendix A.1.2):
-
Adam, full batch: Shows essentially zero generalization at any data fraction up to 80%. Without minibatch stochasticity, the optimizer converges to a deterministic memorized solution and never escapes. The paper's caption confirms that training accuracy reaches 100% for all variants — the failure is specifically in generalization, not in optimization capacity.
-
Adam, default minibatch (no weight decay): Generalizes at approximately 40–50% training data. This serves as the reference for the weight decay comparison.
-
Adam, full batch + Gaussian gradient noise: Improves over full-batch Adam (variant 1) — noise alone partially rescues generalization — but still underperforms the minibatch variant, demonstrating that gradient noise helps but is not a complete substitute for minibatch stochasticity.
-
Adam + residual dropout = 0.1: Modestly improves data efficiency compared to the no-dropout baseline (variant 2), but the effect is much smaller than weight decay. Dropout helps, but it addresses co-adaptation rather than imposing the strong simplicity bias that these tasks require.
-
AdamW, weight decay = 1 (default): The strongest performer by a substantial margin. Generalizes at approximately 20–25% training data — roughly half the data required by the no-weight-decay baseline.
-
AdamW, weight decay = 1 toward initialization: Achieves generalization at approximately 30–35% training data. Better than no weight decay, but not as effective as decay toward zero. The authors interpret this as evidence that "the prior, that approximately zero weights are suitable for small algorithmic tasks, explains part, but not all of the superior performance of weight decay" (Section 3.3).
-
Adam, learning rate =
3 × 10⁻⁴: Fails to generalize at data fractions below roughly 50–60%. The smaller step size reduces the optimizer's ability to escape the memorized basin within the fixed budget. -
Adam, learning rate =
3 × 10⁻³: Generalization is severely impaired — minimal generalization observed at any data fraction. The larger learning rate likely overshoots or destabilizes the optimization, preventing convergence to generalizing solutions. -
Adam + Gaussian weight noise (std = 0.01): Substantially improves over the no-noise baseline, achieving generalization at approximately 30–35% training data. This is the second-best variant after weight decay, consistent with the hypothesis that noise aids in escaping sharp minima. Notably, weight noise (applied to parameters before the forward pass) outperforms gradient noise (applied to the update direction), though the paper does not discuss this difference.
The noise-weight decay complementarity. The paper observes that "adding some noise to the optimization process (e.g. gradient noise from using minibatches, Gaussian noise applied to weights before or after computing the gradients) is beneficial for generalization, consistent with the idea that such noise might induce the optimization to find flatter minima that generalize better" (Section 3.3). However, noise alone never approaches the data efficiency of weight decay. The implicit mechanism: noise enables exploration (escaping sharp basins), while weight decay provides a directional bias (toward small-norm, structurally simple solutions). Both are necessary for grokking — full-batch optimization with no noise fails regardless of weight decay, and noisy optimization without weight decay succeeds only at much higher data fractions.
Learning rate sensitivity. The paper emphasizes that "learning rate had to be tuned in a relatively narrow window for the generalization to happen (within 1 order of magnitude)" (Section 3.3). At 3 × 10⁻⁴, the step is too small to escape the memorized basin within 10⁵ steps; at 3 × 10⁻³, the step is too large to stably converge to the generalizing solution. The optimal 10⁻³ sits in a window of roughly 5 × 10⁻⁴ to 2 × 10⁻³ — a factor of 4, or about 0.6 orders of magnitude. This sensitivity suggests that grokking involves a delicate dynamical balance between exploration (escaping memorization) and exploitation (converging to the generalizing solution), and that the learning rate controls the timescale of this balance.
What is NOT tested but would have been informative. The ablation study varies only optimization and regularization factors while holding architecture and task fixed. Missing comparisons that would strengthen the paper include: (1) varying model size to test whether grokking depends on overparameterization degree; (2) varying the weight initialization scale; (3) testing different activation functions; (4) comparing AdamW with standard L₂-regularized Adam at equivalent regularization strengths to isolate the decoupled weight decay effect; (5) testing learning rate warmup duration and learning rate schedules beyond the fixed 10-step warmup.
Embedding Visualization: Spontaneous Recovery of Mathematical Structure
Headline observations (Figure 3; Section 3.4). t-SNE visualizations of the output layer weight vectors from successfully generalizing networks reveal mathematically interpretable structure:
-
Modular addition (Figure 3, right): The 128-dimensional embedding vectors for the 97 residues, when projected to 2D via t-SNE, form a roughly circular pattern. The authors draw lines connecting each element to
x + 8(mod 97) — adding the constant 8 — and these lines trace a regular circular orbit, mirroring the cyclic group structure ofℤ₉₇. Elements are colored by their residue modulo 8, and elements with the same residue form visibly connected clusters along the circle, indicating the network has implicitly discovered the subgroup8ℤ₉₇. -
S₅ composition (Figure 3, left): The embeddings form distinct clusters. The authors identify these as the cosets of the subgroup
⟨(0, 3)(1, 4), (1, 2)(3, 4)⟩(a subgroup of order 4 within the 120-element S₅) or its conjugates. Elements in the same coset are embedded near each other, reflecting the network's discovery of the subgroup structure. -
Weight decay effect: The paper notes that "the structure is more apparent in networks that were optimized with weight decay" (Section 3.4). This ties the embedding quality to the optimization findings — weight decay not only accelerates grokking but produces representations that more cleanly reflect the underlying algebra.
Interpretation as evidence for genuine structure discovery. The circular embedding for modular addition is particularly compelling because the network was never exposed to the topology of the integers modulo 97 — it only saw equations pairing abstract tokens. The fact that the learned embeddings recover a 1-dimensional circular manifold with the correct group action (+8 generating a circular orbit) is strong evidence that the generalizing solution has captured the compact algebraic description rather than a superficial statistical pattern. A memorized solution would not produce these structured embeddings; the embeddings would be arbitrary.
Limitations of the visualization. The paper shows only two examples (modular addition, S₅ composition) and does not provide t-SNE plots for other operations or for non-generalizing networks. The claim that weight decay improves embedding structure is stated qualitatively but not quantified — there is no metric for "structuredness" of embeddings. The t-SNE projection is known to be sensitive to hyperparameter choices (perplexity, learning rate), and the paper does not specify these parameters or show robustness to their variation. The identification of the S₅ clusters as specific cosets requires domain knowledge and is asserted rather than systematically verified.
Outlier Robustness Experiment: Grokking Is Not Fragile to Label Noise
Headline result (Appendix A.4, Figure 6). Introducing up to k = 100 mislabeled training examples (outliers with random incorrect answers) into the S₅ composition training data does not noticeably impact the data efficiency curves — the network still generalizes at approximately the same training data fractions as with clean data. At k = 1000 and higher, generalization degrades: the range of training data fractions for which generalization occurs within the optimization budget shrinks. However, all configurations reach 100% training accuracy regardless of k — the network perfectly memorizes the training data, including the incorrect labels.
The non-result that matters. The paper explicitly notes that the hypothesized scenario where the network "denoises" the training data — correctly predicting c = a ∘ b even for outlier equations with wrong labels — does not occur. The network does not identify and override the outliers; it simply memorizes everything, correct and incorrect alike. Generalization (when it occurs) happens despite the memorized noise, not through active noise rejection. The authors present this as "additional evidence that the capacity of the network and optimization procedure is well beyond the capacity needed for memorizing all the labels on the training data, and that generalization happening at all requires a non-trivial explanation" (Appendix A.4).
Quantitative detail. The experiment varies outlier count k ∈ {0, 10, 100, 1000, 2000, 3000} at training data fractions from roughly 20% to 50%. For k = 0, k = 10, and k = 100, the curves are nearly indistinguishable — the network generalizes at roughly the same minimum data fraction. For k = 1000, the minimum viable data fraction shifts right by several percentage points. For k = 2000 and k = 3000, the effect is more pronounced, with generalization requiring substantially more clean data to overcome the noise. The step at which training accuracy reaches 100% is "not considerably affected" by k — memorization speed is independent of label correctness, as expected when the model has sufficient capacity to store arbitrary label assignments.
Preliminary Generalization Measure: Sharpness Correlates with Validation Accuracy
Headline result (Appendix A.5, Figure 7). In a preliminary investigation, the paper trains multiple networks with different initialization seeds on the S₅ composition task for a fixed number of steps, such that approximately half achieve high validation accuracy (i.e., have grokked) and half do not. The sharpness measure φ (computed using the method from Keskar et al., 2016) and validation accuracy have a Spearman rank correlation of −0.795 (significant with p < 0.000014): flatter minima (lower sharpness) are associated with higher validation accuracy.
Interpretation and limitations. The authors present this as "suggestive that grokking may only happen after the network's parameters are in flatter regions of the loss landscape" (Appendix A.5). The result aligns with the broader flat-minima hypothesis (Hochreiter and Schmidhuber, 1997) and is consistent with the finding that noise and weight decay — interventions that theoretically encourage flatter minima — improve grokking. However, this is a preliminary result with important caveats: (1) it is a single measurement at one time point, not a longitudinal study showing that sharpness decreases as grokking occurs; (2) it is tested on only one operation (S₅ composition); (3) sharpness measures are known to be sensitive to network parameterization and may not be reparameterization-invariant; (4) correlation does not establish causation — sharpness and generalization could both be consequences of some third factor. The scatter plot in Figure 7 shows substantial variance, with some high-sharpness networks still generalizing and some low-sharpness networks failing to generalize, consistent with prior findings that sharpness is an imperfect predictor.
Ablation Studies and Robustness Checks
Weight decay toward zero vs. toward initialization (Figure 2, left, variants 5 and 6): Both improve data efficiency over no weight decay, but decay toward zero outperforms decay toward initialization. This isolates the prior that small weights specifically (not just proximity to initialization) are beneficial for these algorithmic tasks. The result suggests that the zero prior explains most, but not all, of weight decay's advantage — there may be an additional benefit from the specific dynamics of AdamW's decoupled formulation.
Learning rate variation (Figure 2, left, variants 7 and 8): The narrow effective window for learning rate (10⁻³ works; 3 × 10⁻⁴ and 3 × 10⁻³ both substantially impair generalization) demonstrates that grokking is sensitive to step size in a way that standard supervised learning is often not. This is an important robustness check: grokking is not a generic property of any convergent optimization but requires a specific dynamic balance.
Full-batch vs. minibatch optimization (Figure 2, left, variants 1 and 2): The complete failure of full-batch optimization to generalize (even though training accuracy still reaches 100%) establishes that stochasticity is a necessary condition for grokking — the memorized solution is a stable attractor for deterministic gradient descent, and noise is required to escape it.
Gradient noise vs. weight noise (Figure 2, left, variants 3 and 9): Both forms of noise improve over noise-free baselines, but weight noise (adding noise to parameters before the forward pass) appears to outperform gradient noise (adding noise to the update direction) in data efficiency, though the paper does not discuss this difference. This is a potentially informative distinction: weight noise perturbs the loss landscape explored by the optimizer, while gradient noise perturbs the update direction within a fixed landscape.
Dropout effectiveness (Figure 2, left, variant 4): Dropout provides a measurable but modest improvement over the no-regularization baseline, much smaller than weight decay. This is a robustness check confirming that grokking is not simply prevented by overfitting in the traditional sense — dropout's mechanism (preventing co-adaptation) addresses a different aspect of generalization than the memorization-to-structure transition that grokking represents.
Outlier count variation (Appendix A.4, Figure 6): The insensitivity of grokking to up to 100 outliers demonstrates that the phenomenon is robust to modest label noise — it is not an artifact of perfectly clean symbolic data. The degradation at higher outlier counts (k ≥ 1000) establishes an upper bound on noise tolerance and shows that grokking can be impeded when the signal-to-noise ratio falls too low.
Operation complexity sweep (Figure 2, right; Section 3.2): Testing 12 different binary operations with varying algebraic structure serves as a robustness check on the generality of grokking. The finding that some operations (x³ + xy² + y) fail to generalize at any data fraction while most succeed establishes that grokking is operation-dependent — it is not a universal property of all binary operation tasks but depends on whether the underlying algebraic structure is discoverable by the network within the optimization budget.
Cross-operation equivalence test (Figure 2, right): The near-identical data efficiency curves for mathematically equivalent operations (x - y vs. x / y) serve as an implicit sanity check: if the network were exploiting representational artifacts rather than learning algebraic structure, these curves would likely differ. Their agreement validates the abstract-symbol experimental design.
What is missing from the ablation suite. Several robustness checks that would strengthen confidence in the findings are absent:
- Architecture ablations: No variation in model depth, width, attention heads, or activation function. The claim that grokking is "architecture-agnostic" is asserted but not tested.
- Weight initialization scale: Different random initializations are used across seeds, but the scale (variance) of initialization is not systematically varied. This could interact strongly with weight decay behavior.
- Optimizer choice beyond Adam/AdamW: SGD with momentum — the workhorse of many generalization studies — is not tested. Whether grokking occurs with non-adaptive optimizers is unknown.
- Extended training for non-generalizing operations: The operations that fail to generalize within
10⁵steps (e.g.,x³ + xy² + y) are not tested with extended budgets to determine whether they would eventually grok with more optimization. - Sharpness trajectory over time: The sharpness analysis in Appendix A.5 is cross-sectional (one time point, many seeds) rather than longitudinal (tracking sharpness throughout training for individual runs). A longitudinal study would directly test whether sharpness decreases during the grokking transition.
Critical Assessment
The paper's central claims are primarily phenomenological — it seeks to document and characterize the grokking phenomenon, not to explain it mechanistically or to propose a method that outperforms alternatives. This framing affects how experimental support should be evaluated: the relevant standard is not "does the evidence prove a causal mechanism?" but rather "are the reported phenomena robust, reproducible, and clearly characterized?"
Claim 1: Neural networks exhibit "grokking" — a sharp transition from memorization to generalization long after overfitting. The evidence for this claim is the paper's strongest. Figure 1 (left) provides a clear, single-run example of the phenomenon on modular division: training accuracy saturates at step ~10³, validation accuracy remains at chance until step ~10⁵, then rises to perfect by step ~10⁶. The paper reports that this pattern is "typical for all the binary operations for dataset sizes that were close to the minimal dataset size for which the network generalized within the allotted optimization budget" (Section 3.1).
However, several aspects of this claim warrant scrutiny:
- Single-run vs. aggregate evidence. Figure 1 (left) appears to show a single training run (the paper does not specify whether it is a single seed or an average). The paper reports using 3 seeds for most experiments, but the iconic grokking curve is not shown with error bars or individual seed trajectories. If the sharp transition timing varies substantially across seeds, the mean curve would show a gradual rise rather than the striking jump that defines grokking. The paper's failure to display seed-level variance is a significant limitation — the reader cannot assess whether grokking is a reliable feature of individual runs or an artifact of averaging over runs with transitions at different times.
- Generality across operations is asserted but not fully shown. Figure 2 (right) shows final validation accuracy after
10⁵steps for many operations, but these are point estimates — they do not show the temporal dynamics (training and validation curves over time) that reveal whether grokking occurred. Only for modular division (Figure 1, left) and S₅ (discussed in Section 3.1.1) are the full temporal curves described. For other operations, the paper reports that grokking was "typical" but does not provide the curves. - The "sharp" transition is relative, not absolute. The validation accuracy rise from ~1% to ~100% takes approximately
10⁵steps in Figure 1 (left) — not instantaneous, but sharp relative to the10⁶-step total training duration. Whether this qualifies as "sudden" depends on one's frame of reference; a critic could describe it as gradual improvement over ~100,000 steps. The paper does not quantify the steepness of the transition (e.g., maximum derivative of validation accuracy with respect to log-step), leaving the "sharpness" as a qualitative assessment.
Claim 2: Optimization time to generalization increases exponentially as training data decreases. The evidence for this claim comes from a single experiment on S₅ composition (Figure 1, center) with 7 seeds. The 40–50% time increase per 1% data reduction is a striking quantitative finding, but its generality is largely untested:
- Only one operation is shown with full time curves. The paper asserts that the exponential pattern was observed on "all the algorithmic tasks for which we could get the networks to generalize" (Section 3.1.1), but only S₅ data is presented. Validation on other operations — particularly operations with different algebraic structures (symmetric vs. asymmetric, modular vs. permutation) — would substantially strengthen this claim.
- The 99% threshold is arbitrary. Defining "generalization time" as the first step at which validation accuracy exceeds 99% is reasonable but sensitive: a network that reaches 98% at step 50,000 and 99% at step 500,000 would have a very different "generalization time" from one that reaches 99% at step 51,000, even though their practical utility is nearly identical. The paper does not test sensitivity to this threshold.
- The critical data fraction
f*is not characterized. The learning time curve appears to approach a vertical asymptote, but the paper does not attempt to estimatef*(the data fraction below which grokking never occurs), fit a functional form to the divergence, or relatef*to algebraic properties of the operation. This leaves the compute-for-data tradeoff as a qualitative observation rather than a quantitative law.
Claim 3: Weight decay is the most effective intervention for improving data efficiency. The evidence from Figure 2 (left) clearly shows AdamW with weight decay = 1 outperforming all other tested variants on the S₅ composition task. However:
- Only one operation is tested in the full ablation. The ablation study (Section 3.3, Figure 2, left) is conducted only on S₅ composition. Whether weight decay dominates other interventions equally for modular arithmetic, polynomial operations, or the mixed conditional operation is untested. Given that symmetric operations are easier for the transformer architecture, the relative importance of weight decay versus other factors might vary across operations.
- The weight decay coefficient is not swept. Only weight decay = 1 is tested. The paper does not show whether smaller values (e.g., 0.1, 0.01) produce intermediate improvements, or whether larger values (>1) further improve data efficiency or begin to harm it. The choice of 1 appears to be based on empirical tuning (Appendix A.1.2) but is not justified with a sweep.
- The interaction between weight decay and other factors is not explored. Does weight decay + dropout outperform weight decay alone? Does weight decay change the optimal learning rate? The ablation varies one factor at a time, leaving interaction effects unexplored.
Claim 4: Grokking networks discover the underlying mathematical structure of the operations, as evidenced by structured embeddings. The t-SNE visualizations in Figure 3 are compelling qualitative evidence, but the support is limited:
- Only two operations are visualized. Modular addition and S₅ composition are shown; no embeddings are displayed for other operations. For operations that fail to generalize (
x³ + xy² + y), do the embeddings look qualitatively different? Are there operations where the network achieves 100% validation accuracy but the embeddings lack interpretable structure? - The "structure" is assessed by human visual inspection. The identification of S₅ clusters as specific cosets requires post-hoc domain knowledge and is not verified quantitatively. The paper does not propose or compute a metric for "structural interpretability" of embeddings, leaving the assessment subjective.
- Weight decay's effect on embedding structure is asserted, not measured. The claim that weight decay produces "more apparent" structure is based on visual comparison, with no quantitative metric. Without such a metric, it is unclear whether the difference is reliable or incidental.
Overall experimental design strengths:
- The use of multiple random seeds (3 or 7) across experiments is appropriate for a phenomenon-discovery paper and exceeds the typical standard for such work.
- The diversity of binary operations (12 total, spanning modular arithmetic, permutation groups, polynomials, and mixed conditional operations) provides reasonable coverage of the space of small algebraic tasks.
- The outlier experiment (Appendix A.4) is a genuinely informative robustness check that goes beyond the minimal requirements — it tests a boundary condition (label noise) that could have broken the phenomenon but didn't (at moderate levels).
- The cross-operation equivalence test (
x - yvs.x / yproducing identical curves) is an elegant implicit validation of the abstract-symbol experimental design.
Overall experimental design weaknesses:
- No error bars or uncertainty quantification on any figure. Given that grokking timing is likely variable across seeds, the absence of error bars makes the central phenomenon (Figure 1, left) difficult to evaluate. A reader cannot tell whether the sharp transition is a reliable feature of individual runs or a consequence of averaging over runs with different grokking times.
- Single model architecture throughout. All experiments use the same 2-layer, 128-width, 4-head transformer. The paper's claim that the phenomena are "architecture-agnostic" is not tested. Would grokking occur with MLPs, RNNs, or larger transformers? The answer matters for whether grokking is a general property of overparameterized learning or specific to transformers.
- Single complexity regime. All experiments use the same tiny model (~
4 × 10⁵parameters) trained on the same small-scale datasets. Whether grokking scales to larger models, larger datasets, or more complex operations is entirely unknown. The paper's title promises "generalization beyond overfitting on small algorithmic datasets," and the experiments deliver on that specific promise, but the reader should not infer that grokking generalizes to larger scales without evidence. - The sharpness analysis (Appendix A.5) is preliminary to the point of being anecdotal. A correlation of −0.795 from a single time point on a single operation with unspecified sample size is suggestive but does not establish the claimed connection between flatness and grokking. A rigorous investigation would track sharpness and validation accuracy throughout training for multiple seeds and operations.
- Missing comparisons that would strengthen the paper's theoretical positioning. The paper distinguishes grokking from double descent (Belkin et al., 2018; Nakkiran et al., 2019) but does not directly test whether the phenomena are related. For example: does grokking occur as a function of model size (analogous to capacity-driven double descent) in addition to occurring as a function of optimization time? Running the same algorithmic task with varying model sizes could reveal whether grokking is a time-domain analog of double descent or a fundamentally distinct mechanism.
Conditional nature of the claims. The paper's claims about grokking hold under specific, narrow conditions that are important to name:
- The dataset must be algorithmically structured. Grokking is observed on binary operation tables where a compact algebraic rule generates all examples. It would not be expected on random label assignments or natural datasets without clean underlying structure.
- The training data fraction must be in the critical regime near the minimum for generalization. Above this regime, training and validation accuracy rise together (no grokking). Below this regime, nothing works.
- The optimization must include some form of stochasticity. Full-batch deterministic optimization fails to grok entirely, as shown in the ablation.
- Sufficient optimization budget must be provided. Grokking can require
10⁵–10⁶steps — far more than standard practice for such small datasets. Early stopping, a standard deep learning practice, would completely mask the phenomenon. - Appropriate regularization (especially weight decay) must be applied. Without weight decay, grokking either doesn't occur or requires far more data, depending on the operation.
These conditions are precisely characterized by the experiments, which is a strength — the paper delineates the boundaries of grokking rather than claiming universality. However, they also mean that grokking is not a phenomenon that practitioners should expect to observe casually. It requires deliberately setting up the conditions (critical data fraction, no early stopping, strong weight decay, extended training) that cause it to manifest.
6. Limitations and Trade-offs
6.1 Single Model Architecture and Scale Regime
The assumption or constraint. All experiments in the paper use one fixed transformer architecture: 2 layers, embedding dimension 128, 4 attention heads, approximately 4 × 10⁵ parameters (Appendix A.1.2). The paper explicitly states that the authors "believe [the phenomena] to be architecture-agnostic" (Appendix A.3), but this belief is asserted, not tested. No variations in model depth, width, attention mechanism, activation function, or model family (MLPs, RNNs, convolutional networks) are explored. The model is deliberately tiny — a toy-scale network by modern standards — and all datasets are correspondingly small (9,409–14,400 total equations). Whether grokking manifests at larger scales, in larger models, with more complex operations, or on datasets that do not fit entirely in the model's effective capacity for memorization is entirely unknown.
The consequence. The paper's central claim — that grokking is a general phenomenon of overparameterized neural network training, not an artifact of a specific architecture — remains unsubstantiated. A practitioner attempting to observe or exploit grokking in a different setting (e.g., a larger transformer on a code generation task, a ResNet on a vision task) has no evidence that the phenomenon will appear at all, let alone with similar dynamics. It is equally possible that grokking is specific to (a) transformers, (b) very small transformers, (c) the particular overparameterization ratio used (hundreds of parameters per training example), or (d) symbolic reasoning tasks with clean algebraic structure. The paper provides no guidance for predicting which architectural or scale properties are necessary for grokking to occur.
What evidence exists in the paper. Zero evidence. No architecture ablations are reported. The model configuration is fixed throughout all 12 binary operation experiments and all optimization ablations. The paper's only comment on architecture is the statement of belief in architecture-agnosticity, offered without supporting experiments (Appendix A.3).
Mitigation status. Not addressed at all. The paper does not frame the single-architecture limitation as a caveat or suggest architectural ablation studies as future work. A reader encountering grokking through this paper would have no principled way to know whether their chosen architecture can exhibit the phenomenon.
6.2 Difficulty Estimation Cost Is Unaccounted for in the Grokking Observation Protocol
The assumption or constraint. The grokking phenomenon is observed under a specific experimental protocol that deliberately withholds early stopping: models are trained for a fixed, large optimization budget (10⁵–10⁶ steps) regardless of when training accuracy saturates. Validation accuracy is monitored at every step, enabling the detection of the sharp generalization transition. In a deployment or practical training setting, a practitioner must decide when to stop training. The grokking protocol provides no mechanism for predicting that generalization will eventually occur — an observer watching validation accuracy sit at 1% from step 10³ to step 10⁵ has no signal that continuing training will eventually produce perfect generalization. The computational cost of training through the entire grokking plateau is part of the total cost of achieving generalization, but the paper's analyses treat optimization steps purely as a measurement axis, not as a resource whose expenditure must be justified prospectively.
The consequence. The paper's headline efficiency claims — e.g., that networks can generalize from as little as 20–30% of the data — implicitly assume the practitioner is willing to train for up to 10⁶ steps (orders of magnitude beyond the point of perfect training accuracy) without any early signal of progress toward generalization. In a real setting, a practitioner observing no validation improvement for tens of thousands of steps would almost certainly terminate training early, missing the grokking event entirely. The paper provides no diagnostic, no convergence criterion, and no stopping rule that would allow a practitioner to distinguish between a run that will eventually grok (and should be continued) versus one that will not (and should be abandoned). The cost of the "wait and see" approach — training for 10⁵–10⁶ steps on runs that may or may not grok — is not accounted for in any efficiency metric.
What evidence exists in the paper. The core grokking curve (Figure 1, left) is the clearest evidence: validation accuracy shows "very little evidence of any generalization until 10⁵ steps" (Section 1, caption), meaning an observer would need to train through ~100,000 steps of flat validation performance before seeing any return. The paper notes this explicitly — "it takes close to 10⁶ steps for validation accuracy to reach [near-perfect] level" — but does not discuss the implication that this protocol is impractical without a way to anticipate the transition. The learning time curves (Figure 1, center) quantify the median steps to generalization at different data fractions, showing that these times can reach 5 × 10⁵ steps at the critical data fraction, but treat this as a measurement rather than a cost that must be borne.
Mitigation status. Not addressed. The paper does not discuss the prospective detection problem — how a practitioner would know to continue training through the flat validation period — nor does it propose a early-detection diagnostic (e.g., monitoring sharpness, embedding structure, or some other precursor signal of impending grokking). The Discussion (Section 4) gestures toward testing whether flatness measures track generalization, which could in principle provide such a diagnostic, but no experiments on early detection are performed.
6.3 No Error Bars, Seed-Level Variance, or Statistical Quantification of Grokking Timing
The assumption or constraint. The paper's central phenomenon — grokking — is defined by a specific temporal signature: a sharp rise in validation accuracy from chance to near-perfect after a prolonged flat period. The reliability and consistency of this signature across training runs (different random seeds for data splits and weight initialization) is critical to the paper's claim that grokking is a robust, reproducible phenomenon rather than a stochastic curiosity. However, the paper never displays error bars, confidence intervals, or seed-level trajectories on any of its main figures. The iconic grokking curve (Figure 1, left) appears to show a single run, though the paper does not specify. The data efficiency curves (Figure 2, left and right) report "mean accuracy across three runs" (Section 3.2) but show only the mean, with no indication of variance. The learning time curves (Figure 1, center) report "median number of optimization steps" over 7 seeds, but only the median is plotted — the dispersion across seeds is invisible.
The consequence. The reader cannot assess perhaps the most important property of grokking: how reliable the sharp transition is. If the transition timing varies widely across seeds — with some runs grokking at step 50,000, others at step 500,000, and some never grokking within the budget — then the mean or median curves shown in the figures paint a misleading picture. In the extreme case, the sharp transition visible in the mean curve could be an artifact of averaging: if individual runs jump from chance to perfect at different times, the average would show a gradual rise, but if the paper only shows a single representative run (as Figure 1, left appears to), the "sharpness" may be cherry-picked. Without seed-level data, the curious, quantized nature of grokking — validation accuracy sitting at exactly chance level for thousands of steps, then suddenly rising — could be an illusion. The Spearman correlation reported in Appendix A.5 (−0.795, p < 0.000014) suggests the seed sample size for sharpness analysis was at least large enough for statistical testing, making the omission of variance reporting in the main experiments harder to justify.
What evidence exists in the paper. The paper partially addresses reproducibility by stating the seed count for each experiment type (3 seeds for most experiments, 7 seeds for learning time curves; Appendix A.1.2), but this information is buried in the appendix and never quantified in the figures. The sharpness analysis (Figure 7, Appendix A.5) is the only figure that displays individual data points (each point is one network), and it reveals substantial variance: some networks with similar sharpness have validation accuracy varying by 30–40 percentage points. This suggests seed-level variance is non-trivial, but no comparable scatter plots or error bands are shown for the main experiments.
Mitigation status. Not addressed. The paper reports using multiple seeds, which is good practice, but stops short of quantifying or displaying the resulting variance. The absence of error bars is the single most significant methodological shortcoming of the experimental presentation, because it prevents readers from evaluating whether grokking is robust enough at the seed level to serve as a reliable experimental testbed — the very purpose for which the paper proposes these datasets.
6.4 The Compute-for-Data Tradeoff Curve Is Characterized for Only One Operation
The assumption or constraint. The paper's most quantitative finding — that a 1% reduction in training data near the critical fraction leads to a 40–50% increase in median time to generalization (Section 3.1.1) — is based entirely on a single experiment using the S₅ composition task with 7 seeds. The paper asserts that this pattern was observed on "all the algorithmic tasks for which we could get the networks to generalize" (Section 3.1.1), but no other operation's learning time curve is shown. The claim that the exponential scaling of optimization time with reduced data is a general property of grokking rests on this single data point. The steepness of the relationship (40–50% per 1% data reduction), the location of the critical data fraction f*, and even the functional form of the divergence (exponential vs. power-law) could all be operation-specific.
The consequence. The 40–50% figure is the most specific, quotable quantitative result in the paper. If it is not general, then the paper's central empirical contribution — the characterization of the compute-for-data tradeoff in grokking — reduces to a single example. A practitioner interested in whether grokking can substitute compute for data in their own domain would need operation-specific learning time curves to make any prediction about required training budgets, and the paper provides no basis for extrapolation. Are symmetric operations (which require less data to generalize) also characterized by a less steep time curve? Are polynomial operations (which require more data) characterized by a steeper one? Is the critical fraction f* consistently around 20–25% across operations, or does it vary systematically with algebraic complexity? None of these questions can be answered from the presented data.
What evidence exists in the paper. Only Figure 1 (center) provides a complete learning time curve, and it is for S₅ composition only. The data efficiency curves in Figure 2 (right) show final performance after a fixed 10⁵-step budget for many operations, but these are cross-sectional — they reveal how much data is needed at a fixed compute budget, not how the required compute scales as data is reduced. The distinction is critical: Figure 2 (right) tells you that x + y generalizes with ~20% data at 10⁵ steps, but it does not tell you whether x + y would generalize with 15% data given 10⁶ steps, nor does it provide the steepness of the time curve that would be needed to estimate the required budget.
Mitigation status. Partially addressed by the paper's explicit genericity claim — "we've observed a similar pattern of exponential increase in optimization time until reaching generalization as dataset size decreases on all the algorithmic tasks for which we could get the networks to generalize" (Section 3.1.1). This verbal claim is encouraging but does not substitute for data. The paper does not flag this as a limitation or suggest that full learning time curves for other operations would be valuable future work.
6.5 Limited Evidence That Sharpness Causes or Predicts Grokking
The assumption or constraint. The paper hypothesizes (Section 3.3, Appendix A.5) that grokking may be driven by a transition from sharp, memorized minima to flat, generalizing minima — a connection to the flat-minima generalization hypothesis (Hochreiter and Schmidhuber, 1997; Keskar et al., 2016). The evidence for this connection consists of a single cross-sectional correlation: networks trained on S₅ composition for a fixed number of steps show a Spearman correlation of −0.795 between sharpness φ and validation accuracy (Appendix A.5, Figure 7). The paper presents this as "suggestive that grokking may only happen after the network's parameters are in flatter regions of the loss landscape" (Appendix A.5).
The consequence. A cross-sectional correlation at one time point does not establish that sharpness decreases during grokking, that sharpness predicts whether a particular run will eventually grok, or that sharpness is the causal mechanism driving generalization rather than a correlated outcome. Without longitudinal measurements (tracking sharpness and validation accuracy throughout training for individual runs), the paper does not provide evidence for its central mechanistic conjecture. The finding that weight decay — which is known to bias optimization toward flatter minima — is the most effective intervention (Section 3.3, Figure 2, left) is circumstantially consistent with the flatness hypothesis, but does not directly test it. The −0.795 correlation, while statistically significant, is imperfect: Figure 7 shows substantial scatter, with some high-sharpness networks achieving high validation accuracy and some low-sharpness networks failing to generalize. This means sharpness alone is an unreliable predictor of grokking in individual runs.
What evidence exists in the paper. The sharpness analysis is confined to Appendix A.5 and consists of a single scatter plot (Figure 7) with a reported Spearman correlation. The experimental details are sparse: the number of networks trained is not specified, the fixed step count at which sharpness is measured is not given, and the Keskar et al. (2016) sharpness computation method is referenced but its parameters (e.g., perturbation radius) are not described. There is no replication across operations — only S₅ composition is tested. The paper does not report whether the correlation holds for networks trained with different optimizers (e.g., is sharpness equally predictive for Adam, AdamW, and SGD-trained networks?) or at different time points during training.
Mitigation status. Partially addressed. The paper explicitly frames the sharpness finding as "preliminary" (Appendix A.5) and notes that "it would be valuable for future work to explore this hypothesis, as well as test other generalization measures." This honesty about the preliminary nature of the evidence is appropriate, but it also means the paper's most prominent mechanistic conjecture — the connection to flat minima — has only the weakest empirical support in the paper itself. A reader attracted to grokking as a testbed for the flat-minima hypothesis should understand that the paper opens this question rather than answering it.
6.6 The "Grokking" Phenomenon Depends on a Specific Definition That May Not Capture the Intended Concept
The assumption or constraint. The paper defines grokking operationally as a sharp rise in validation accuracy from chance to near-perfect, occurring long after training accuracy has saturated at ~100% (Section 1, Section 3.1). The accompanying loss curves (Figure 4, Appendix A.2) reveal that validation loss increases during the memorization phase before undergoing a second descent — the classic signature of overfitting followed by recovery. The paper argues grokking "might be distinct" from double descent phenomena (Belkin et al., 2018; Nakkiran et al., 2019) because the second descent occurs "far past the first time the training loss becomes very small (tens of thousands of epochs)" and because "we don't observe a non-monotonic behavior of accuracy" (Appendix A.3).
The consequence. The distinction between grokking and double descent is central to the paper's claim of novelty — if grokking is simply double descent observed in the time domain rather than the capacity domain, then it is a known phenomenon in a new setting rather than a new phenomenon. The paper's operational definition of grokking (validation accuracy rising sharply from chance to perfect after a flat period) is not obviously distinguishable from extreme overfitting followed by recovery, where the overfitting phase is prolonged and the recovery is sharp. The fact that validation accuracy never drops — only rises — is the paper's key distinguishing criterion. However, a sharp recovery from severe overfitting could produce exactly the same accuracy signature if the overfitting is so severe that validation accuracy saturates at the chance floor (since accuracy cannot go below chance for random guessing, it would necessarily appear as a "flat then rising" curve). The paper does not directly test whether grokking and double descent share the same mechanism by, for example, varying model capacity (as double-descent work does) and observing whether the grokking timing changes in the way capacity-driven double descent would predict.
What evidence exists in the paper. The paper's engagement with the double descent distinction is limited to a few sentences in Appendix A.3, acknowledging the literature while asserting difference without direct comparative experiment. The loss curves (Figure 4) show validation loss increasing then decreasing — a double descent in loss — which the paper notes but interprets as distinct because of the temporal scale and monotonic accuracy. No experiment tests whether grokking is a special case of double descent or a truly separate mechanism.
Mitigation status. Minimally addressed. The paper raises the question of whether grokking is distinct from double descent but does not resolve it, and the operational definition it provides is not sufficient to rule out the alternative interpretation without additional experiments. A reader convinced that grokking is simply double descent in the time domain would find the paper's evidence for novelty insufficient. Conversely, a reader who accepts the distinction would still lack a clear criterion for separating grokking from other late-generalization phenomena. The paper would be strengthened by an experiment that varies model capacity (or training duration × capacity jointly) to map the relationship between grokking and the double descent curve, but no such experiment is performed.
7. Implications and Future Directions
How This Work Changes the Landscape
This paper does not propose a new theory of generalization, nor does it offer a method that improves performance on any practical benchmark. Its contribution is methodological and conceptual: it introduces a tractable experimental paradigm — small transformers trained on small, algorithmically generated binary operation tables — that makes the transition from memorization to generalization observable in unprecedented temporal detail. This is best understood not as a paradigm shift but as the introduction of a model organism for generalization research, analogous to how C. elegans enabled mechanistic investigation of developmental biology by being simple enough to study completely yet complex enough to exhibit the phenomenon of interest.
The conceptual shift is this: before grokking, the field's default assumption — embedded in standard practices like early stopping — was that once a model achieves perfect training accuracy, further optimization can only harm generalization. Monitoring validation accuracy served to detect the onset of overfitting and halt training before degradation. The grokking phenomenon directly challenges this assumption by demonstrating that, at least in some regimes, perfect training accuracy is not an endpoint but an intermediate plateau — the network can remain in a memorized, non-generalizing state for thousands of optimization steps before abruptly transitioning to perfect generalization. This reframes the optimization trajectory from a simple "improve then overfit" timeline to a process containing qualitatively distinct phases, where the generalization phase can begin orders of magnitude after memorization completes. The practical consequence is that early stopping — a cornerstone of modern deep learning practice — would systematically prevent grokking from ever being observed, discarding models that, if trained longer, would eventually generalize.
The paper's reconciliation of conflicting intuitions is subtle but important. The deep learning community has long held two apparently contradictory beliefs: (1) that overparameterized networks can memorize arbitrary training data without generalizing (Zhang et al., 2016), and (2) that SGD-trained networks on real data routinely generalize despite massive overparameterization. The grokking paradigm shows that both can be true in sequence: the network initially finds a memorizing solution (belief 1), but continued optimization under appropriate regularization eventually discovers a generalizing solution (belief 2). The apparent contradiction in prior work arose because different studies terminated training at different points — some captured the memorized phase, others captured the post-grokking phase, and without the temporal decoupling made visible by these small algorithmic datasets, there was no way to see that both phases coexist along the same optimization trajectory.
The paper makes certain research directions more attractive. The search for generalization measures that are dynamically predictive — that track improvements throughout training rather than simply characterizing converged solutions — becomes empirically tractable. In the grokking paradigm, one can take snapshots of the network at step 10⁴ (memorized), step 10⁵ (mid-grokking), and step 10⁶ (generalized), measuring sharpness, spectral complexity, path norm, or any proposed metric at each point and testing whether the metric changes in the predicted direction. The paper's preliminary sharpness correlation (Appendix A.5, Spearman −0.795) demonstrates the template, even if it does not yet provide a longitudinal validation. This is a fundamentally different kind of experiment than the cross-sectional comparisons of converged models that dominate the generalization measures literature (Jiang et al., 2019).
Conversely, the paper makes certain research directions less attractive or at least more questionable. The finding that weight decay — a simple, decades-old regularization technique — dominates all other tested interventions (dropout, gradient noise, weight noise, learning rate tuning) in accelerating grokking (Figure 2, left) suggests that exotic architectural innovations or complex training procedures may be unnecessary for studying the core generalization phenomenon. The mechanism appears to be accessible through standard tools, and the priority should be understanding why weight decay works so dramatically in this setting rather than developing new regularization methods. The finding that lookahead-style exploration (Figure 3, left, in the test-time compute paper analogy) is not needed further supports this — simple optimization with strong regularization suffices.
The paper also reframes the data efficiency question from "how much data is needed for good performance?" to "what is the minimum data required for generalization to be possible at all, and how does the required optimization time scale as we approach that minimum?" The learning time curves (Figure 1, center) show that above a critical data fraction f* (~20–25% for S₅ composition), generalization is always possible given sufficient optimization, and data and compute are partially substitutable — a 1% reduction in data can be compensated by a 40–50% increase in training time. This reframes the economic question of data collection vs. compute expenditure in a way that standard asymptotic analyses miss entirely.
Finally, the embedding visualizations (Figure 3) reframe what it means to "understand" what a neural network has learned. The spontaneous recovery of the circle topology of ℤ₉₇ and the coset structure of S₅ from purely symbolic input — with no geometric or numerical grounding — demonstrates that the generalizing solution is qualitatively different from the memorized one, not merely a refined version. A network that achieved 100% validation accuracy through a disorganized lookup table (which its 4 × 10⁵ parameters could certainly accommodate) would not produce circular embeddings with the correct group action. The structure is evidence that the network has genuinely discovered the compact algebraic description. This opens the possibility of using neural network embeddings as a discovery tool for mathematical structure — training on the operation table of an unfamiliar algebraic object and visualizing the resulting embeddings to reveal its internal organization.
Follow-Up Research This Work Enables
Longitudinal sharpness tracking throughout grokking. The paper's sharpness analysis (Appendix A.5) is cross-sectional: it measures sharpness at one time point across many networks and finds a correlation with validation accuracy. The natural next step is a longitudinal study: train a single network on, say, S₅ composition at 30% training data with AdamW (weight decay = 1) for 10⁶ steps, and at logarithmically spaced intervals (steps 10², 10³, 10⁴, 10⁵, 10⁶), compute both validation accuracy and sharpness φ using the Keskar et al. (2016) method. The key prediction: sharpness should remain high during the memorized plateau (steps 10³–10⁵) and decrease sharply during the grokking transition (steps 10⁵–10⁶), with the decrease in sharpness preceding or coinciding with the rise in validation accuracy. If sharpness decreases before validation accuracy rises, it would be evidence that flatness is a cause rather than a consequence of generalization. Conversely, if sharpness and validation accuracy change simultaneously or sharpness changes only after generalization, the flat-minima hypothesis loses explanatory power for grokking specifically. The experiment costs only a few GPU-hours using the paper's exact architecture and dataset, making it an immediate, low-barrier follow-up.
Sweeping model scale to determine whether grokking depends on overparameterization ratio. The paper uses one model size (~4 × 10⁵ parameters) trained on datasets of a few hundred to a few thousand examples, resulting in an extreme overparameterization ratio (hundreds of parameters per training example). Whether grokking requires this degree of overparameterization is unknown. A systematic sweep of model sizes — keeping the architecture (2-layer transformer) but varying width (32, 64, 128, 256, 512) and depth (1, 2, 4 layers) — trained on the same S₅ composition task at a fixed data fraction (e.g., 30%) would reveal the relationship between model capacity and grokking dynamics. The key measurements for each model size: (1) does grokking occur at all? (2) if so, what is the ratio t_grok / t_mem? (3) does the minimum data fraction f* shift with model size? The paper's claim that the phenomena are "architecture-agnostic" would be partially validated if grokking appears across a wide range of model sizes; conversely, if grokking disappears below some minimum overparameterization threshold, that defines a necessary condition that any mechanistic theory must explain. This experiment also connects directly to the double descent literature: if grokking is a time-domain analog of capacity-driven double descent, then t_grok should vary systematically with model size in the way double-descent theory predicts.
Testing whether grokking occurs with non-transformer architectures. The paper uses only decoder-only transformers across all experiments, asserting the phenomena are "architecture-agnostic" without evidence. A direct test: replicate the core grokking experiment (modular addition modulo 97, 50% training data, AdamW with weight decay = 1, 10⁶ optimization steps) using an MLP (e.g., 4 layers, width 256), an LSTM, and a small convolutional network adapted to the 5-token sequence input. If all architectures exhibit grokking with comparable dynamics (similar t_grok / t_mem ratio, similar critical data fraction), the architecture-agnosticity claim is supported and the phenomenon is likely a general property of overparameterized gradient-based learning on structured data. If only transformers grok, the phenomenon is architecture-specific, and attention mechanisms become a central object of study for understanding why. A negative result (grokking fails in MLPs) would be equally informative: it would constrain the space of possible explanations and redirect research toward transformer-specific inductive biases.
Characterizing the critical data fraction f* as a function of operation algebraic properties. The paper shows that different binary operations require different amounts of data to achieve generalization within a fixed compute budget (Figure 2, right), and that symmetric operations are easier than asymmetric ones. However, the critical data fraction f* — the data fraction below which even infinite optimization does not produce generalization — is not systematically estimated for any operation except S₅ composition (Figure 1, center, where f* appears to be ~20–25%). A systematic study would: (1) generate full learning time curves (like Figure 1, center) for all 12 binary operations, (2) for each operation, fit a functional form (e.g., t_grok ~ (f - f*)^{-α}) to estimate f* and the divergence exponent α, and (3) test whether f* can be predicted from algebraic properties of the operation — number of generators, relational complexity, symmetry group, or the minimum description length of the operation in some formal language. Such an experiment would connect the empirical grokking phenomenon to algorithmic information theory and potentially provide a principled way to predict data requirements for learning algebraic structures from sparse observations. The fact that x³ + xy² + y fails to generalize at any data fraction up to 95% within 10⁵ steps (Section 3.2) is a natural starting point — does it have a f* above 95% (requiring extremely long training), or does it simply lack generalizable structure that the network can discover?
Using the grokking paradigm to benchmark generalization measures dynamically. Jiang et al. (2019) systematically evaluated dozens of generalization measures on converged convolutional networks, finding that flatness-based measures were most predictive of the generalization gap. The grokking paradigm enables a fundamentally more powerful experiment: evaluate the same suite of measures at multiple time points throughout training on a single run, and test which measures (if any) change in lockstep with — or anticipation of — the grokking transition. A strong follow-up would select 5–10 representative measures from the Jiang et al. (2019) taxonomy (sharpness, path norm, spectral complexity, Fisher-Rao norm, etc.), compute them at logarithmically spaced training steps for multiple seeds on the S₅ composition task, and report (1) the Spearman correlation of each measure with validation accuracy across time and seeds, and (2) whether any measure consistently decreases before validation accuracy begins to rise, serving as an early warning signal of impending grokking. A measure that reliably anticipates grokking would have immediate practical value — it would provide the diagnostic that the paper currently lacks, allowing practitioners to distinguish runs that will eventually grok from those that will not, without having to train through the entire plateau. Such a finding would also constrain mechanistic theories: any causal explanation of grokking would need to explain why that specific measure changes ahead of generalization.
Probing whether the network "denoises" outliers in a stronger sense with extended training. The outlier experiment (Appendix A.4) shows that with up to k = 100 mislabeled examples, the network generalizes nearly as well as with clean data, but it does not denoise — it memorizes the incorrect labels (training accuracy reaches 100%) while still discovering the generalizing solution. The paper terminates all outlier experiments at 10⁵ steps. An open question: if training is extended to 10⁶ or 10⁷ steps, does the network eventually override the memorized outliers — i.e., begin predicting the correct answer c = a ∘ b even for equations where the training label is c' ≠ c? This would constitute true denoising: the generalizing solution, once firmly established, might exert enough pressure on the loss landscape to "correct" the memorized exceptions. The experiment would run the S₅ composition task with k = 100 outliers at a data fraction that produces grokking (e.g., 35%), but extend training to 5 × 10⁶ steps, monitoring both validation accuracy and training accuracy on the outlier subset — if outlier training accuracy eventually drops from 100% (memorized incorrect label) to near 0% (model consistently predicts the correct label despite the training signal), that would be evidence that the generalizing solution can actively overwrite memorized noise given sufficient optimization. This connects to questions about the stability of memorized minima under extended optimization and the relative "basin width" of memorized vs. generalizing solutions.
Practical Applications and Downstream Use Cases
Rapid prototyping and evaluation of generalization theories. The most immediate practical application of the grokking paradigm is as a low-cost testbed for generalization hypotheses. A researcher with a new theory about why neural networks generalize can test its predictions on the S₅ composition or modular addition tasks in hours on a single GPU, rather than requiring weeks of ImageNet-scale training. The specific metrics the paper provides — t_grok, f*, the 40–50% time increase per 1% data reduction, the relative effectiveness of weight decay vs. dropout — constitute a set of quantitative benchmarks that any candidate theory should be able to match or explain. A theory that predicts these scaling relationships without parameter tuning is more compelling than one that merely post-dicts them. The paper's open release of the methodology (all hyperparameters in Appendix A.1, all operations in Appendix A.1.1, model architecture specified exactly) makes this testbed immediately reproducible by any group with access to standard deep learning infrastructure.
Guiding training termination decisions in small-data regimes. While the paper does not provide an early-stopping diagnostic (see Limitations, Section 6.2), the phenomenon it documents has practical implications for practitioners working with small, structured datasets. In domains where data is scarce but the underlying generative process is believed to be algorithmic — certain scientific discovery contexts, symbolic regression, closed-form physics problems — the grokking finding suggests that training should not be terminated at the first sign of perfect training accuracy. If the practitioner has reason to believe the true data-generating process has a compact description (analogous to an algebraic structure), extending training for 10–100× beyond the memorization point, with strong weight decay, may yield generalization that would be missed by standard early stopping. The paper does not provide a decision rule for when this is advisable vs. when it is wasteful, but the awareness that the memorized-then-generalizing trajectory exists is itself practically valuable — it alerts practitioners to a failure mode (premature termination of training) that may be especially costly in exactly the small-data regimes where they are most tempted to stop early.
Data generation and curriculum design for mathematical reasoning tasks. The paper's demonstration that networks can recover algebraic structure from incomplete operation tables — filling in the blanks of a Sudoku-like puzzle — has implications for automated mathematical data generation. Given an algebraic structure of interest (e.g., a novel group, a ring, a polynomial family), one could generate a sparse subset of its operation table, train a network to fill in the missing entries, and inspect the learned embeddings for structural insights (subgroups, cyclic orbits, coset structure). The paper shows that even a tiny transformer can spontaneously recover the circle topology of ℤ₉₇ and the subgroup structure of S₅ from symbolic equations alone (Figure 3). For mathematical objects whose structure is partially known or conjectured, this approach offers a form of exploratory data analysis — let the network discover structure from partial observations, then visualize the embeddings to form hypotheses about the full algebraic organization. The paper's finding that weight decay produces "more apparent" structure (Section 3.4) provides a concrete knob: use strong AdamW regularization to encourage the network to find the compact structural description rather than a disorganized memorized solution.