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.