Grokking -- the sudden generalisation that appears long after a model has perfectly memorised its training data -- has been widely observed but lacks a quantitative theory explaining the length of the delay. We show that grokking is a norm-driven representational phase transition in regularised training dynamics, and establish the Norm-Separation Delay Law: Tgrok−Tmem=Θ(γeff−1log(∥θmem∥2/∥θpost∥2)), where γeff is the optimiser's effective contraction rate (γeff=ηλ for SGD, γeff≥ηλ for AdamW). The upper bound follows from a discrete Lyapunov contraction argument; the matching lower bound from dynamical constraints of regularised first-order optimisation. Across 293 training runs spanning modular addition, modular multiplication, and sparse parity, we confirm three falsifiable predictions: inverse scaling with weight decay (R2=0.97), inverse scaling with learning rate (R2=0.92), and logarithmic dependence on the norm ratio (Pearson r=0.91). A fourth finding reveals that grokking requires an optimiser capable of decoupling memorisation from contraction: SGD fails entirely at the same hyperparameters where AdamW reliably groks. These results reframe grokking not as a mysterious optimisation artefact but as a predictable consequence of norm separation between competing interpolating representations. We further derive a practical three-input algorithm that predicts grokking delay at memorisation time with 34.6% mean absolute error (bootstrap 95% CI [30.0%, 39.4%], N=60 seeds), enabling principled early stopping.
Figures & tables
Figure 1: Conceptual overview of the Norm-Separation Delay Law. After memorisation ( Tmem ), weight decay contracts parameter norms exponentially from the high-norm memorisation region toward the low-norm Fourier manifold. The grokking delay is the time required for this exponential contraction to traverse the norm gap log(∥θmem∥2/∥θpost∥2) . Generalisation ( Tgrok ) occurs once parameters enter the Fourier region and the validation gap becomes detectable.
Symbol
Meaning
p
Modulus (problem size)
η
Learning rate
λ
Weight decay coefficient
Vt=∥θt∥2
Squared parameter norm at step t
Vmem,Vpost
Norm at memorisation / after grokking
V∞=ησ2/λ
Asymptotic noise floor
Table 1: Summary of notation.
Seed
Tmem
Tgrok
Delay
Vmem
Fitted ρ
Tescth
R2
42
800
1800
1000
3891
0.99865
1332
0.9992
43
800
2000
1200
3846
0.99862
1226
0.9993
44
800
1600
800
3916
0.99857
1368
0.9990
45
800
1600
800
3887
0.99847
1223
0.9991
46
800
1800
1000
3944
0.99857
1321
0.9989
47
800
2200
1400
3879
0.99862
1291
0.9987
Table 2: Lyapunov escape validation ( p=97 , η=10−3 , λ=1.0 , 10 seeds). The fitted rate ρ is the base of the exponential fit Vt=Aρt+C ; γfit=1−ρ ; Tescth=γfit−1log(Vmem/Vfinal) .
Figure 2: Lyapunov escape validation (real data). (a) Fitted contraction rates ρ across 10 seeds; all exceed the weight-decay baseline 1−ηλ=0.999 (green), confirming AdamW amplification ( γfit≈1.41⋅ηλ ). (b) Distribution of grokking times across 10 seeds (mean 1840±215 steps). (c) Norm separation: Vmem≈3900 vs Vpost≈300 across seeds.
λ
Regime
Grokked
Tgrok
Vmem
Vpost
logVpostVmem
T~
0.001
I
0/10
—
14808
15060
—
—
0.01
I
0/10
—
14686
11877
—
—
0.1
II
10/10
12700±1229
13419
1942
1.94
625±40
0.3
II
10/10
4900±539
10272
970
2.37
530±38
0.5
II
10/10
3150±320
6225
568
2.40
447±59
1.0
II
10/10
2100±374
2648
266
2.28
434±144
Table 3: Weight decay sweep ( p=97 , η=10−3 , 10 seeds per λ ). Regime: I (no grokking), II (reliable), III (over-regularisation).
p
Tgrok
Tmem
Delay
Vmem
Vpost
Tescth
53
2336±426
250
2086
5366
188
1679
67
2079±376
364
1715
5456
220
1610
89
1957±221
629
1328
4653
277
1416
97
1686±198
736
950
4297
307
1322
101
1721±217
779
942
4112
291
1326
113
1607±142
936
671
3645
390
1119
Table 4: Modulus dependence experiment (mean over 7 seeds per p ). Tescth=γfit−1log(Vmem/Vpost) .
η
Mean Tgrok
Tgrok⋅η
Seeds grokked
2.0×10−3
840±80
1.68±0.16
5/5
1.0×10−3
1760±150
1.76±0.15
5/5
5.0×10−4
5280±2010
2.64±1.01
5/5
2.0×10−4
35680±10189
7.14±2.04
5/5
1.0×10−4
100350±18500
10.04±1.85
4/5
Table 5: Learning rate sweep ( p=97 , λ=1.0 , 5 seeds). The rising Tgrok⋅η product reflects the noise floor effect from Theorem 3.2 .
Figure 3: Scaling laws. (a) Tgrok vs 1/λ in Regime II ( R2=0.97 ). (b) Tgrok vs 1/η ( R2=0.92 ). (c) Delay vs log norm ratio across 7 moduli ( r=0.91 ).
Figure 4: Cross-task generalization. (a) Modular multiplication: all 20 runs grok across 4 moduli. (b) Exponential fit quality ( R2 ) for all 20 multiplication runs; all exceed 0.988. (c) Sparse parity: Vfinal>Vmem in all 15 runs—no norm separation, no grokking.
Optimizer
Convention
Grokked
Tgrok
Vfinal
Fitted ρ
R2
SGD
w=2λ
0/5
—
3.6×10−5
—
—
SGD
w=λ
0/5
—
1.1×10−4
—
—
AdamW
w=λ
5/5
1760±150
233±35
0.99859±6.5×10−5
0.9990
Table 7: SGD vs AdamW ablation ( p=97 , η=10−3 , λ=1.0 , 5 seeds). SGD fails to memorise under these hyperparameters, precluding grokking entirely.
Figure 5: AdamW contraction analysis. (a) Fitted contraction rates across 10 seeds; all exceed the weight-decay baseline 1−ηλ by ∼ 41%. (b) Grokking success: AdamW groks in 5/5 seeds; SGD fails entirely. (c) R2 of exponential fits across all seeds (mean R2=0.9990 ).
p
Grokked
Tgrok
Delay
Vmem
Vpost
γfit
R2
53
5/5
4480±500
4280
10431
257
0.00180
0.992
67
5/5
4440±320
4040
9337
305
0.00170
0.992
89
5/5
4040±150
3440
8859
388
0.00158
0.992
97
5/5
3920±240
3320
9622
394
0.00156
0.992
Table 8: Modular multiplication: all 20 runs grok. Exponential contraction fits with R2>0.988 .
n
Grokked
Delay
Vmem
Vfinal
Vfinal/Vmem
20
5/5 †
0
141
231
1.64
30
5/5 †
0
112
220
1.97
40
5/5 †
−120
116
202
1.74
† Val. acc >95% achieved, but simultaneously with train acc — no delayed transition.
Table 9: Sparse parity: no grokking observed. Generalisation occurs simultaneously with (or before) memorisation; norm ratio is inverted ( Vfinal>Vmem ).
Figure 6: Phase diagram and cross-task universality. (a) Phase diagram in (η,λ) space showing three regimes. Red triangle: SGD fails where AdamW succeeds. (b) Delay vs log norm ratio for both addition (S1, blue circles) and multiplication (S9, coral diamonds); the linear relationship holds across tasks.
Prediction
Theory
Empirical Result
Lyapunov contraction rate
1−ηλ=0.999
0.99859±6.5×10−5 , R2=0.9990
T∝1/λ (Regime II)
slope = const
slope =1182 , R2=0.971 , CI [1082,1271]
Norm-ratio formula
γfit−1logVpostVmem
slope 1.08±0.15 , Pearson r=0.91
T∝1/η
slope = const
slope 10.62×103 , R2=0.921
Joint ηλ universality
T⋅ηλ= const
mean T⋅ηλ=9.58
Gap ∝R(fθ) (OLS)
positive slope
hi-res: 15.81, R2=0.767 ; lo-res: 13.49, R2=0.736
Table 10: Theoretical predictions versus empirical measurements across all experiments.
Contribution
Prior work
This paper
Empirical documentation
( Power et al., 2022 )
—
Circuit analysis
( Nanda et al., 2023 )
—
Qualitative phase transition
Various
—
Quantitative delay formula
—
✓
Tight upper + lower bounds
—
✓
Cross-task validation
—
✓
Table 11: Positioning of this work relative to prior grokking research.
Grokking is the delayed onset of generalization in neural networks, arising long after they fit the training data. Whether the weight norm causes this delay is disputed: some studies report a critical norm at the transition, others observe grokking with no fixed norm at all. We settle this by intervening on the norm during training rather than only observing it. Under free training with weight decay, networks grok when the weight norm reaches a value Wc that varies little across seeds and learning rates (CV 1 to 2 percent) and grows with the modular base as a power law. When we instead clamp the norm to a fixed multiple rho of Wc and hold it there, the network still groks, but the delay follows T_grok proportional to exp(alpha rho). One exponent, alpha near 7.5, fits this delay across four moduli (R^2 = 0.996). Over the swept ranges the held norm moves the delay by about 19x and the learning rate by only about 2x, and holding the norm above Wc slows grokking rather than preventing it. A final LayerNorm removes the dependence by decoupling weight scale from the network function; without it the exponential law returns. This pinned-norm delay is the exponential counterpart to the logarithmic delay predicted for a freely contracting norm.
Truong Xuan Khanh, Doan Hoang Viet, Luu Duc Trung +1
H&K Research Studio / Clevix LLC, Hanoi, Vietnam · Bac A Bank, Hanoi · Banking Academy of Vietnam
We give the first quantitative prediction of grokking delay under AdamW. Treating the delay as a first-passage time, we derive a closed-form law T_grok - T_mem = (1 / 2 kappa_LL eta lambda) log(V_mem / V_star), where V_t = ||theta_t||^2 is the squared parameter norm, V_star is an architecture-dependent threshold, and kappa_LL absorbs the AdamW correction to the clean-SGD contraction rate 2 eta lambda. Calibrating (kappa_LL, V_star) on a single hyperparameter cell predicts grokking delays on 26 held-out runs with MAPE 17.7% over a 41x delay range; the law generalises to MLPs (MAPE 18.0%, N=34) and degrades to 23.3% on cross-task extension (N=46, 43.5x range), with a structured residual in which V_star / V_mem stays comparatively stable within architecture (CV about 14% on the 1L transformer). First-passage of V_t is necessary but not sufficient. A quantile-margin theorem establishes that positive delay requires both norm separation V_mem > V_post and angular reachability of a threshold alpha_star = arcsin(C / V_T_mem^(1/2)), where C is computable from the empirical NTK feature map and the validation-margin quantile. Calibrating C on modulus p=89 predicts alpha_star = 47.2 degrees at p=97 (observed 47.8 degrees, error 1.3%) as a prior cross-cell prediction. Causal interventions that freeze the norm or remove weight decay at memorisation eliminate grokking (0/6 vs. 3/3 baseline), trapping the angular displacement near 12 degrees. kappa_LL is empirically measured per architecture rather than derived from (beta_1, beta_2, epsilon); within-architecture CV stays at most 15% across four architectures, but values differ by about 2x between architectural variants beyond depth alone. Empirical scope is algorithmic tasks (modular arithmetic, sparse parity) under AdamW; whether the law transfers to natural-language scale models is open.
Truong Xuan Khanh, Truong Quynh Hoa, Luu Duc Trung +1
H&K Research Studio, Clevix LLC, Hanoi, Vietnam · Banking Academy of Vietnam, Hanoi, Vietnam
Delayed generalization (\ie~grokking) refers to the phenomenon in which a neural network fits its training data early in training but only begins to generalize after a prolonged delay, often through an abrupt transition. Despite extensive empirical study, its underlying mechanism remains poorly understood. In this work, we first theoretically characterize a shell--core topological configuration of the reachable solution space induced by Adam's optimization dynamics with weight-shrinkage regularization, supported by empirical evidence. This optimization-induced topological configuration gives rise to grokking. In model's parameter space, random initialization solutions concentrate on a thin outer spherical shell, enclosing another spherical shell of memorization solutions, which in turn contains a core corresponding to the generalization solutions. Leveraging stopping-time theory, we then analyze the geometry of this topological configuration and the solution transition time at which optimization trajectories escape the memorization manifold and first reach the boundary of the generalization manifold. Our theoretical analysis derives grokking scaling laws for the learning rate, batch size, and ℓ2 regularization coefficient, which are further validated through experiments and shown to recover results from prior literature.
Róisín Luo, Christian Gagné, Jonas Ngnawé +2
Research Ireland – Centre for Research Training in AI · University of Galway · Universit´e Laval +2