betaFeedback

WorksComputer Science

Subspace Crystallization in Grokking: Rank Compression Tracks the Phase Transition

Abstract

Grokking describes understanding something deeply and intuitively. In neural networks, it is the phenomenon where a network generalizes long after memorizing its training data. This delay has been linked to a fall in the effective rank of the network's weight matrices, but whether this rank compression drives grokking or follows it is still unresolved. We study a mean-field MLP and a one-layer transformer trained on modular arithmetic and observe that: (i) Compression follows the onset, not memorization. Every transformer memorizes its training data within 250 steps, while the grokking onset (the first step at which test accuracy reaches 95%) varies from 6,500 to 21,000 steps. The steepest fall in effective rank comes about 900 steps after the onset, however late the onset occurs, and networks that memorize without grokking compress far less. (ii) Subspace crystallization. We call the span of the fewest top singular directions of a weight matrix that preserve 99% of test accuracy its sufficient subspace. Its size can shrink as the margin between the correct and the best wrong output grows, so we also count the directions needed to keep the outputs within 10%. In the transformer, this count falls during the transition from a quarter or more of the available directions to about a tenth, which we call subspace crystallization. (iii) Imposing low rank does not speed up grokking. Against a factorized full-rank control, capping the rank of the transformer's MLP input weights delays the onset, and capping the rank of its embedding stops 15 of 20 runs from grokking. Compression is therefore a signature of grokking rather than its cause.

Introduction

Grokking [29], memorization followed by delayed generalization, offers a rare window into how circuits emerge from gradient descent: a clean phase transition from a lazy, memorizing regime to a rich, generalizing one [17]. Substantial progress exists on what grokking networks compute [28, 5, 11], and a recurring observation is that the effective rank (ER) of their weight matrices falls as test accuracy jumps [21, 8, 18]. This has led to proposals that a pressure toward low-rank, small-norm or efficient circuits causes grokking [28, 20, 35]. We ask two questions. (Q1) Does this rank compression cause grokking, or follow it? (Q2) Does the learned solution lie in the subspace spanned by a few leading directions of each weight matrix?

Preprint. The usual evidence cannot settle these questions, for three reasons. First, rank compression is usually observed after two events, memorization (the first step at which training accuracy reaches 99%) and the rise in test accuracy (Figure 1a), so the timing alone cannot explain which of the two it follows. Second, timing without interventions cannot show cause. Lastly, the compactness of a solution is naturally measured by truncating each weight matrix to lower and lower rank until test accuracy drops. Keeping a weight matrix’s kk strongest singular directions gives the closest rank-kk matrix, which acts only within their span. The span of the fewest top directions that leave the test accuracy unchanged, which we call the sufficient subspace, is then taken as the subspace the solution needs, analogous to the intrinsic dimension of Li et al. [ [19]. Accuracy, however, only checks which output is largest. The margin between the correct-class output and the largest other output sets how far the outputs can move before a prediction changes. As margins grow, more directions can be deleted before any prediction changes, so the count can fall even though the network’s outputs still depend on those directions.

Two rows of scatter and line plots showing compression and effective-rank decrease around the grokking onset

Figure 1. (a) Step of the steepest effective-rank decrease of WinW_{\mathrm{in}} against the grokking onset (left) and the step at which training accuracy reaches 99% (right). Blue: seeds 0–14. Orange: held-out seeds 15–29. Dashed line: identity.

(b) Number of directions of each weight matrix needed to keep the network’s outputs within 10% (left) and test accuracy (right), with each seed aligned at its own onset tgt_g.

Compression follows the grokking onset, and the directions needed to keep the outputs fall during the transition (one-layer transformer, 29 grokked seeds). (a) Every seed fits its training data by step 250, yet compression follows the grokking onset across a threefold range of onset times. (b) The number of directions needed to keep the outputs within 10% falls during the rise in test accuracy and settles at 8–13 per matrix.

We address these questions with geometric metrics (effective rank, stable rank, sparsity, inverse participation ratio) and multiple interventions (truncation of weight matrices to their top, bottom or random singular directions, complement interventions, transplant patching with orthogonal alignment, a nuclear-norm penalty, rank caps compared with factorized controls, and optimizer swaps). We study modular addition (a+b)(a+b) mod 97 in two architectures with multiple random initializations. In the transformer, we analyze the embedding WEW_{\mathrm{E}}, the unembedding WUW_{\mathrm{U}}, and the input and output matrices WinW_{\mathrm{in}} and WoutW_{\mathrm{out}} of its MLP block. We call the first step at which test accuracy reaches 95% the grokking onset. To separate memorization from the onset, we follow the transformer with a checkpoint every 250 steps and compare networks that grok with networks that memorize but never grok. To count directions without the margin, we judge each truncation by how much it changes the network’s outputs. To test cause, we limit the rank of a weight matrix throughout training and compare each limit with a factorized full-rank control. We test the timing results on held-out transformer seeds and on two further tasks, abab mod 97 and (a+b)(a+b) mod 113. Our results point to compression as a signature of grokking rather than its cause.

Contributions

  • Compression follows grokking, not memorization (§6). Every transformer memorizes its training data within 250 steps, but the steepest fall in the effective rank of WinW_{\mathrm{in}} comes about 900 steps after the grokking onset, whether the onset occurs at step 6,500 or 21,000. Networks that memorize without grokking lower this effective rank by 15–23%, against 60±5%60 \pm5\% in those that grok. In the MLP, rank compression follows the onset in all 45 runs across three tasks. The timing replicates on 15 held-out seeds and, in the MLP, on two further tasks.

  • Subspace crystallization: the transformer’s solution narrows to a low-dimensional subspace (§5, §7). Before the transition, no weight matrix can be truncated below 27–53 directions without changing the network’s outputs by more than 10%. After the transition, 8–13 directions suffice (Figure 1b). We call this narrowing of the subspace that the outputs depend on subspace crystallization. It is consistent with the removal of memorizing components described by Nanda et al. [ [28]. We judge truncations by the outputs rather than only by the test accuracy. In the MLP trained with mean-squared error, truncation to 65 of 128 directions keeps the test accuracy, but keeping the outputs within 10% needs 122–127.

  • Imposing low rank before the transition does not speed up grokking (§6.4). If rank compression drove grokking, removing directions in advance should help. Instead, against a factorized full-rank control, capping WinW_{\mathrm{in}} at rank 32, 24 or 16, all above the 13 directions its solution needs, never lowers the mean onset, and capping WEW_{\mathrm{E}} prevents grokking in 15 of 20 runs. Compressing the MLP’s first layer with a nuclear-norm penalty before the onset also delays grokking, and comparing with the unfactorized network instead of the factorized control would wrongly suggest that low rank speeds grokking up, because the factorization changes the onset by itself.

We also report three secondary results. The late fall of effective rank in the MLP is set by AdamW’s ϵ\epsilon: once the square root of its second-moment estimate falls below ϵ\epsilon, its updates reduce to gradient descent with momentum and learning rate lr/ϵ\mathrm{lr}/\epsilon (§4). Different MLP seeds share their hidden representation up to an orthogonal rotation, but not with networks trained on another task or on random labels (§5). The Fourier inverse participation ratio (IPR), which measures how periodic the hidden units are [Doshi et al., [9]], rises before the onset but also in every network that never groks, so it cannot serve as a label-free early-warning signal (§ 6.5). Table 1 summarizes the evidence for the three contributions in both architectures.

MLPTransformer
1. Compression follows grokking, not memorization
Compression starts after test accuracy rises45 of 45 runs28 of 29 seeds
Fall in effective rank10% if grokked60 ± 5% if grokked, 15–23% if not
2. Subspace crystallization: the transformer’s solution contracts into a low-dimensional subspace as it groks
Directions needed per matrixAccuracy: from 110 to 65 of 128<br>Outputs: 122–127 of 128 (MSE)Outputs: from 27–53 to 8–13, during the transition
3. Imposing low rank does not speed up grokking
Rank caps against a factorized control (Table 4)Caps delay the onsetWinW_{\mathrm{in}}: onset unchanged or delayed<br>WEW_E: 15 of 20 runs fail to grok

Table 1. Evidence for the three contributions in both architectures. Effective rank is measured on W1W_1 (MLP) and WinW_{\mathrm{in}} (transformer). Output counts are the fewest directions per matrix that change the network’s outputs by at most 10%.

Related Work

Grokking. Grokking was given its first mechanistic account by Nanda et al. [ [28], who identified the learned algorithm as a sparse Fourier cosine decomposition, formed in phases of memorization, circuit formation and cleanup. Chughtai et al. [ [5] extended this to general group composition, and Gromov [ [11] established exact solvability with analytic weights. Proposed causes of the delay include circuit efficiency [35], the weight norm [20], softmax collapse [30] and a transition from lazy to rich training [17]. Lei and Xu [ [18] describe grokking as construction followed by compression, tracked through the network’s Jacobian, consistent with our timing results. We add the separation of compression from memorization, negative controls and a replication on held-out seeds and tasks. Musat [ [27] proves that, in the limit of small learning rate and weight decay, gradient descent after memorization minimizes the weight norm on the zero-loss manifold. Our MLP lies outside this regime: late in training, AdamW acts as gradient descent with a large learning rate lr/ϵ=105\mathrm{lr}/\epsilon= 10^{5}, and the weight norm grows (§ 4).

Complexity measures of grokking. Network complexity falls around the accuracy jump, whether measured by the linear mapping number [21] or by the compressed description length of the weights [8]. We test whether this fall drives grokking or follows it, and show that a count of directions judged by accuracy can register compression that the network’s outputs do not show (§ 5).

Low-rank bias and factorized controls. Gradient descent is biased toward low-rank solutions [13] and moves within a small subspace of parameter space [12]. Factorizing a matrix strengthens this bias [3] and accelerates optimization [2], so a rank cap written as a product W=ABW = AB changes the optimization as well as the rank. We therefore compare each cap with a factorized full-rank control (§ 6.4).

Sparse circuits and universality. Merrill et al. [ [24] describe grokking as a competition between a sparse generalizing subnetwork and a dense memorizing one, consistent with the few directions per matrix that the transformer’s solution keeps. Networks trained on modular arithmetic can learn different algorithms [38] or share one across architectures [5]. Our MLP seeds use different Fourier coordinates but share their hidden representation up to a rotation (§ 5). Appendix § 12 discusses further work.

Setup

Architecture 1: mean-field MLP. A single-hidden-layer MLP with 128 hidden units and quadratic activations, f(x)=1128W2ϕ(W1x/194)f(x) = \frac{1}{128}W_2\phi(W_1x/\sqrt{194}) with ϕ(z)=z2\phi(z) = z^2 and input x=[ea;eb]∈R194x = [e_a;e_b] \in\mathbb{R}^{194}, the concatenation of two one-hot vectors (W1∈R128×194W_1 \in\mathbb{R}^{128 \times194}, W2∈R97×128W_2 \in\mathbb{R}^{97 \times128}, i.i.d. N(0,1)\mathcal{N}(0,1) initialization). The quadratic activation makes the Fourier computation explicit: for x=cos⁡θx = \cos\theta it doubles frequencies, x2=12(1+cos⁡2θ)x^2 = \frac{1}{2}(1+\cos2\theta), and applied to a sum of operand features it produces the products cos⁡θacos⁡θb\cos\theta_a\cos\theta_b from which cos⁡(θa+θb)\cos(\theta_a+\theta_b) is read out. We train it with mean-squared error to one-hot targets, as in Gromov [ [11], using full-batch AdamW (lr 10−310^{-3}, weight decay 10−210^{-2}, ϵ=10−8\epsilon= 10^{-8}) on a 35% train split for 10510^5 steps, with 15 seeds. Five MLPs trained on randomly permuted labels serve as negative controls, and for the replication the MLP is also trained on ab mod 97ab \bmod97 and (a+b) mod 113(a+b) \bmod113 (15 seeds each).

Architecture 2: one-layer transformer. Four attention heads, dmodel=128d_{\mathrm{model}} = 128, dhead=32d_{\mathrm{head}} = 32, dmlp=512d_{\mathrm{mlp}} = 512, ReLU MLP, no layer normalization and biases fixed at zero, following Nanda et al. [ [28]. The inputs are [a,b,=][a,b,=] and the prediction is read at the final position. We train it with cross-entropy, using full-batch AdamW (lr 10−310^{-3}, weight decay 1.0, β=(0.9,0.98)\beta= (0.9, 0.98)) on a 30% train split for 25,000 steps, with 15 seeds. Fourteen of these seeds reach 95% test accuracy within this budget. The remaining seed, and three seeds each trained with weight decay 0.1 and 0.3, memorize the training set without generalizing and serve as negative controls. Seeds 15–29, trained only after the timing measure had been defined on seeds 0–14, form the held-out set of the replication, and all of them grok. For the time-resolved analyses, every run was repeated with a checkpoint every 250 steps. We analyze the embedding WEW_E, the unembedding WUW_U, the MLP projections WinW_{\mathrm{in}} and WoutW_{\mathrm{out}}, and the attention projections WQW_Q, WKW_K, WVW_V, WOW_O (heads stacked).

Timing. The grokking onset tgt_g is the first logged step with test accuracy ≥95%\ge95\%, and the memorization step tfitt_{\mathrm{fit}} the first logged step with training accuracy ≥99%\ge99\%. A run counts as grokked if its final test accuracy is at least 95%. Runs described as never grokking did not reach this threshold within their training budget (10510^5 steps for the MLP, 25,000 for the main transformer runs). Throughout the paper, “before” and “after generalization” mean before and after tgt_g.

Effective rank. Our primary metric is the effective rank ER⁡(W)=exp⁡(H(σ^))\operatorname{ER}(W) = \exp(H(\hat{\sigma})) [32], the exponential of the entropy of the normalized singular values σ^i=σi/∑jσj\hat{\sigma}_i = \sigma_i / \sum_j \sigma_j. A matrix whose kk nonzero singular values are equal has ER⁡=k\operatorname{ER} = k. Appendix § 13 defines the other tracked metrics (stable rank, sparsity, spectral IPR, weight and gradient norms), and § 6.5 the Fourier IPR.

Code to reproduce all experiments is available at https://github.com/Lossfunk/Causal-geometric-grokking.

The Four-Stage Training Trajectory (MLP)

Figure 2 shows the four stages through the rates of change of effective rank and test accuracy. Numbers are means ±\pm s.d. over 15 seeds, and Appendix Figure 3 shows all training metrics.

Rate of rank evolution and rate of accuracy evolution across the four training stages

Figure 2. The four training stages of the MLP (seed 0): rate of change of the effective rank of W1W_1 (top) and of test accuracy (bottom), computed from the five-step moving average used for the steepest-decrease measure (Appendix § 16.§ 1). Stage 2 starts at the first step with test accuracy above 5%, Stage 3 at tgt_g and Stage 4 at tct_c. Effective rank grows during memorization and the grokking transition, turns negative at tgt_g and keeps falling through Stages 3 and 4.

Stage 1 (Memorization): training accuracy rises to 97.8±0.4%97.8 \pm0.4\% by step 8,000 while test accuracy stays below 5%. Test loss rises before it falls, a double-descent signature [7]. Effective rank rises slightly, from 114.6 for the random initial W1W_1 to about 116.

Full sweep in Appendix C.2. Gradient descent at 10610^6 diverges.

Stage 2 (Grokking transition): test accuracy rises from 37.0 ±\pm 8.0% at step 10,000 to 95% at tg=12,633±297t_g = 12,633 \pm297, and training accuracy reaches 100%. Effective rank rises only slightly (115.7 ±\pm 0.4 at step 10,000, 115.9 ±\pm 0.6 at step 12,500), while the hidden units become periodic in their inputs, as measured by the Fourier IPR (§ 6.5), and the gradient norm peaks just after tgt_g.

Stage 3 (Consolidation): test accuracy is 100% and ER stays near its maximum until the compression onset tc=19,000±3,279t_c = 19,000 \pm3,279, the first step at which it falls below 99% of its running maximum. Over the same interval the median margin grows from 0.105 ±\pm 0.017 at step 12,500 to 0.470 ±\pm 0.019 at step 20,000, and the directions of W1W_1 needed to keep 99% of test accuracy fall from 109.5 ±\pm 3.2 to 64.9 ±\pm 1.7, a consequence of the growing margin (§ 5). The stable rank of W1W_1 peaks around tgt_g and starts to fall.

Stage 4 (Late compression): ER falls to 104.0 ±\pm 2.1 by step 10510^5, and 99 ±\pm 2% of its total decrease happens after tgt_g. The stable rank keeps falling, the weight norms grow throughout and the margin barely changes (0.599 to 0.611 between steps 50,000 and 10510^5). Observing this stage requires training well past the point where test accuracy saturates.

Stage 4 is set by the effective learning rate. Stage 4 is growth of the leading singular directions of W1W_1 against weight decay: between steps 20,000 and 10510^5 the largest singular value doubles (112 to 218) while the remaining 63 directions keep their size (Appendix C.1). The loss gradient that drives this growth is tiny (3.4×10−63.4 \times10^{-6} at step 20,000), points increasingly outward along the weights (its cosine with −δ-\delta rises from 0.10 to 0.89) and concentrates in the top 65 directions of W1W_1 (from 43% to 87% of its squared norm). For 87–100% of the coordinates, the square root of Adam’s second-moment estimate lies below ϵ\epsilon, so the update m/(v+ϵ)m/(\sqrt{v}+\epsilon) is close to m/ϵm/\epsilon: AdamW acts as gradient descent with learning rate lr/ϵ=105/\epsilon= 10^5 (Appendix C.2). Continuing the main runs from step 20,000 with other optimizers confirms that this effective learning rate, not Adam itself, governs Stage 4 (Table 2). At effective learning rates of 10310^3 and 10410^4, AdamW and gradient descent reach the same weights. At 10510^5, gradient descent reproduces most of Stage 4 and SGD with momentum reproduces all of it (effective rank 108.3 and 103.8, against 104.8 under AdamW). At 10310^3, weight decay shrinks the norm and effective rank stays at 117.8, while ϵ≤10−9\epsilon\le10^{-9} strengthens Stage 4.

OptimizerEffective lr∥W1∥F\lVert W_1\rVert_Fσ1(W1)\sigma_1(W_1)ER⁡(W1)\operatorname{ER}(W_1)d0.99d_{0.99}
Start (step 20,000)–726111115.165
AdamW, ϵ=10−6\epsilon= 10^{-6}10310^365885117.865
Gradient descent10310^366285117.865
AdamW, ϵ=10−7\epsilon= 10^{-7}10410^4775120114.870
Gradient descent10410^4783126114.672
AdamW, ϵ=10−8\epsilon= 10^{-8} (main)10510^51,040203104.889
Gradient descent10510^5833148108.387
SGD with momentum 0.910510^51,093216103.891
AdamW, ϵ=10−9\epsilon= 10^{-9}10610^61,58231894.798
AdamW, ϵ=10−8\epsilon= 10^{-8}, no weight decay10510^51,25726197.894

Table 2. Stage 4 tracks the effective learning rate. Main seeds 0–2 are continued from step 20,000 to $10^5 with each optimizer, and entries are means. The effective learning rate is lr for gradient descent, lr/(1−0.91 - 0.9) for SGD with momentum 0.9, and lr/ϵ/\epsilon for AdamW (lr =10−3= 10^{-3}). For ϵ=10−9\epsilon= 10^{-9}, lr/ϵ/\epsilon is an upper bound, since v^\sqrt{\hat{v}} is comparable to ϵ\epsilon. Weight decay is set so that the per-step shrinkage matches AdamW’s. d0.99d_{0.99}: fewest directions that keep 99% of test accuracy.

Weight decay, loss and activation. The MLP (with MSE loss) groks without weight decay: from weight decay 0 to 0.1, tgt_g barely moves (12,700 ±\pm 47 to 13,400 ±\pm 418), but the Stage-4 decrease in effective rank shrinks from 14.9 ±\pm 1.9% to 0.5 ±\pm 0.4% (9.7 ±\pm 1.5% at the default 10−210^{-2}), because weight decay restrains the growth of the leading directions. Trained with cross-entropy at learning rates 3×10−33 \times10^{-3} and 10−210^{-2}, the MLP groks in every seed (tg=27,500±2,372t_g = 27,500 \pm2,372 and 10,100 ±\pm 962) and shows Stage-4 decreases of 10.9±0.5%10.9 \pm0.5\% and 37.9±1.9%37.9 \pm1.9\%. At lr 10−310^{-3} it groks in only one of five seeds within 10510^{5} steps. ReLU and GELU MLPs also grok, later than quadratic ones, with periodic first-layer weights and Stage-4 decreases of 14–17% (Appendix B.2). With the same hyperparameters, the quadratic MLP groks 2.6 to 3.5 times sooner than ReLU and GELU MLPs, so the quadratic activation speeds up grokking in our setting but is not required for the MLP to grok (Appendix B.4).

Subspace Crystallization: Locating the Sufficient Subspace

This section defines the sufficient subspace and the output count doutd_{\mathrm{out}}, and uses them to test whether the MLP crystallizes. The transformer’s crystallization is shown in § 7.

Definitions. We replace a weight matrix W=UΣV⊤W = U\Sigma V^{\top} by its top-kk truncation W[k]=U:kΣ:kV:k⊤W_{[k]} = U_{:k}\Sigma_{:k}V_{:k}^{\top} and leave the rest of the network unchanged. d0.99(W)d_{0.99}(W) is the smallest kk that keeps 99% of the test accuracy, and the span CC of the top-d0.99d_{0.99} left singular vectors is the sufficient subspace. Because accuracy only checks which output is largest, d0.99d_{0.99} can fall as margins grow. dout(W)d_{\mathrm{out}}(W) is the smallest kk with ∥f[k]−f∥F≤0.1∥f∥F\lVert f_{[k]} - f\rVert_F \le0.1\lVert f\rVert_F over the test inputs, where ff stacks the network’s outputs and, for cross-entropy models, each input’s mean logit is removed, since softmax ignores it. Subspace crystallization is a narrowing of doutd_{\mathrm{out}}. The leading directions carry the solution: truncation to the top d0.99d_{0.99} directions keeps at least 99.26% of test accuracy, while random subspaces of equal rank keep 22.7% in the MLP and at most 12.5% in the transformer (Table 15).

Matrixk=d0.99k = d_{0.99}Top-kkBottom-kkRandom subsetRandom subspace
MLP W1W_189.1±2.389.1 \pm2.3 / 12899.26±0.2299.26 \pm0.2228.26±6.1828.26 \pm6.18*31.26±4.3731.26 \pm4.3722.74±3.9322.74 \pm3.93
Transformer WinW_{\mathrm{in}}13.0±1.313.0 \pm1.3 / 12899.80±0.2899.80 \pm0.285.50±1.465.50 \pm1.46‡3.50±0.543.50 \pm0.5412.49±2.9912.49 \pm2.99
Transformer WoutW_{\mathrm{out}}8.7±1.58.7 \pm1.5 / 12899.95±0.0799.95 \pm0.075.50±1.465.50 \pm1.46‡4.42±0.954.42 \pm0.958.00±1.938.00 \pm1.93
Transformer WEW_E7.7±1.57.7 \pm1.5 / 9799.74±0.3599.74 \pm0.351.01±0.061.01 \pm0.061.33±0.231.33 \pm0.231.31±0.131.31 \pm0.13
Transformer WUW_U8.8±1.48.8 \pm1.4 / 9899.86±0.2799.86 \pm0.271.07±0.321.07 \pm0.321.80±0.651.80 \pm0.656.02±1.926.02 \pm1.92

Table 15. Top-kk, bottom-kk and random-kk truncations at equal rank k=d0.99k = d_{0.99} (per seed). Test accuracy in %, mean ±\pm s.d. over 15 MLP seeds at step 10510^5 and 14 grokked transformer seeds. Random controls average 10 draws. Chance is 1.03%.

In the MLP, crystallization is only apparent. With mean-squared error, crystallization is only apparent. The sufficient subspace of W1W_1 narrows right after the onset, from d0.99=109.5±3.2d_{0.99}=109.5 \pm3.2 at step 12,500 to 64.9±1.764.9 \pm1.7 at step 20,000, and widens again to 89.1±2.389.1 \pm2.3 by step 10510^{5} (Table 13). Over the narrowing, however, the median margin grows more than fourfold and doutd_{\mathrm{out}} does not fall: it is 122.4±0.5122.4 \pm0.5 before the onset, 122.3±0.9122.3 \pm0.9 at step 20,000 and 127.3±0.6127.3 \pm0.6 at the end (Table 3), above the 116.4±0.5116.4 \pm0.5 of an untrained network and the 123.0123.0 of a network trained on random labels. The same holds on both replication tasks (Appendix D.4). The narrowing of d0.99d_{0.99} therefore measured how far the predictions were from flipping, not how many directions the function uses. § 8 attributes the high doutd_{\mathrm{out}} to the loss: mean-squared error to one-hot targets requires reproducing every Fourier component of the outputs. The later widening of the sufficient subspace comes from the growth of the leading singular directions, which makes the trailing directions matter more for the outputs (Appendix C.1). The complement C⊥C^\perp is unused for the predictions but is not inert: Gaussian noise added inside C⊥C^\perp lowers accuracy more than the same noise inside CC (71% against 92%, Appendix D.3). With cross-entropy, which only requires the correct output to be largest, the MLP does crystallize, but late: dout≃120d_{\mathrm{out}} \simeq120 just before and just after the onset, and 81.0±1.681.0 \pm1.6 (learning rate 3×10−33 \times10^{-3}) and 69.6±2.269.6 \pm2.2 (10−210^{-2}) at the end of training (Table 3).

ModelCheckpointOutputs within 10%99% of accuracyMedian margin
MSE (15 seeds)step 0 (untrained)116.4±0.5116.4 \pm0.5–−0.004-0.004
step 11,000 (before onset)122.4±0.5122.4 \pm0.5119.3±3.2119.3 \pm3.20.0250.025
step 20,000122.3±0.9122.3 \pm0.964.9±1.764.9 \pm1.70.4700.470
end (10510^{5})127.3±0.6127.3 \pm0.689.1±2.389.1 \pm2.30.6110.611
MSE, random labels (5)end, training inputs123.0±0.0123.0 \pm0.0–0.1100.110
CE, lr 3×10−33 \times10^{-3} (5)last before onset121.4±0.9121.4 \pm0.9112.8±5.5112.8 \pm5.53.83.8
first after onset119.0±2.2119.0 \pm2.291.8±15.791.8 \pm15.75.95.9
end81.0±1.681.0 \pm1.650.6±2.350.6 \pm2.39.49.4
CE, lr 10−210^{-2} (5)last before onset120.2±0.8120.2 \pm0.8104.6±4.1104.6 \pm4.14.24.2
first after onset119.8±0.4119.8 \pm0.498.6±4.298.6 \pm4.24.94.9
end69.6±2.269.6 \pm2.248.4±2.548.4 \pm2.510.210.2

Table 3. doutd_{\mathrm{out}} and d0.99d_{0.99} in the MLP (directions of W1W_1 out of 128, on test inputs unless noted, mean ±\pm s.d.). doutd_{\mathrm{out}}: fewest directions that keep the outputs within 10%. d0.99d_{0.99}: fewest directions that keep 99% of test accuracy. Cross-entropy (CE) models use centered logits.

StepTest acc. (%)d0.9d_{0.9}d0.99d_{0.99}ER⁡(W1)\operatorname{ER}(W_1)Freq. for 90% power
10,00037.0 ±\pm 8.097.5 ±\pm 3.2120.5 ±\pm 3.5115.7 ±\pm 0.440.8 ±\pm 0.4
11,00067.3 ±\pm 8.995.2 ±\pm 2.1119.3 ±\pm 3.2115.8 ±\pm 0.440.3 ±\pm 0.7
12,50095.7 ±\pm 2.781.7 ±\pm 3.2109.5 ±\pm 3.2115.9 ±\pm 0.639.7 ±\pm 0.5
15,000100.0 ±\pm 0.059.6 ±\pm 1.877.0 ±\pm 3.6115.6 ±\pm 0.838.5 ±\pm 0.6
20,000100.0 ±\pm 0.050.8 ±\pm 2.564.9 ±\pm 1.7114.4 ±\pm 1.138.2 ±\pm 1.1
30,000100.0 ±\pm 0.056.4 ±\pm 2.469.3 ±\pm 1.7110.9 ±\pm 1.538.3 ±\pm 0.9
50,000100.0 ±\pm 0.068.3 ±\pm 2.681.5 ±\pm 2.4107.0 ±\pm 1.936.1 ±\pm 1.4
100,000100.0 ±\pm 0.080.5 ±\pm 3.789.1 ±\pm 2.3104.0 ±\pm 2.133.7 ±\pm 1.9

Table 13. d0.9d_{0.9}, d0.99d_{0.99}, effective rank and frequency usage of W1W_1 over training (15 seeds).

Equivalent solutions across random initializations. MLP seeds implement the same solution in different coordinates. Each seed spreads its first-layer Fourier power over most of the 48 frequencies (45.2 ±\pm 0.6 hold 99%), with different strongest frequencies (Jaccard overlap 0.05 over 105 seed pairs), and the top-60 weight subspaces of different seeds overlap no more than random subspaces (0.466 ±\pm 0.027 against 0.487 ±\pm 0.005 in mean cosine of the principal angles, Appendix D.5). Yet after an orthogonal Procrustes rotation fitted on training inputs [34], one seed’s readout decodes another seed’s post-activations with 95.8 ±\pm 2.4% accuracy, against 1.0% without the rotation (Table 17). The rotation does not rescue a random network, a network trained on random labels or a network grokked on abab mod 97 (0.6–1.4%). Each seed thus implements the same task-relevant representation in a different orientation, consistent with Schiffman [2026], who find invariant algorithmic cores in independently trained transformers.

Table 17: Cross-seed transplants and linear CKA (MLP, final checkpoints unless noted, mean ±\pm s.d.). Transplant: test accuracy of model BB’s readout applied to model AA’s post-activations after the map (chance 1.03%). CKA on all p2p^2 inputs.

Model A→A \to grokked model BBMapTest accuracy (%)
Grokked, other seedfitted orthogonal95.82 ±\pm 2.38
Grokked, other seednone1.03 ±\pm 0.30
Grokked, other seedrandom orthogonal0.94 ±\pm 0.27
Random initializationfitted orthogonal0.61 ±\pm 0.12
Random-label networkfitted orthogonal0.68 ±\pm 0.07
Grokked on abab mod 97 (other task)fitted orthogonal1.42 ±\pm 0.09
Same seed at step 10,000none36.18 ±\pm 6.40
Same seed at step 10,000fitted orthogonal25.09 ±\pm 5.77
Linear CKA between grokked seeds0.096 ±\pm 0.019
a grokked network and its initialization0.089 ±\pm 0.010
two initializations0.142 ±\pm 0.002

Table 17.

Timing and Cause of Compression

We test whether compression drives grokking with three kinds of evidence: its timing across seeds, how much the effective rank decreases in networks that memorize without grokking, and interventions that impose low rank from initialization.

Compression Follows the Onset, Not Memorization

The transformer separates memorization from the transition, and compression follows the transition. Every one of the 29 grokked seeds (seeds 0–14 and the held-out seeds 15–29) fits its training set within the first 250 steps, while their onsets range from 6,500 to 21,000 steps. With weight decay 1.0, AdamW multiplies the weights by 0.999 per step, so by step 4,000 the initial weights have decayed to 2% of their size. Because random weights spread over all directions, this decay alone lowers the effective rank of WinW_{\mathrm{in}}, to a plateau at about 60% of its initial value, independently of grokking (Figure 9). We therefore measure compression only after step 4,000. After this decay, a second, sharp drop follows. The step tst_s at which this second drop is steepest follows the onset almost exactly (Pearson correlation r=0.99r = 0.99, slope 1.02, 95% confidence interval 0.98–1.07), scattering by 506 steps around tgt_g against 4,234 around the memorization step (Figure 1a). If compression followed memorization, tst_s would cluster at a fixed step.

Effective rank of Win and test accuracy against steps relative to tg

Figure 9. Effective rank of WinW_{\mathrm{in}} (relative to step 0) and test accuracy of the 14 grokked transformer seeds against steps relative to tgt_g. The effective rank falls steeply while the random initialization decays, plateaus at about 60% of its initial value, and drops again around tgt_g.

Networks that memorize without grokking compress far less. From step 4,000 to the end of training, the ER of WinW_{\mathrm{in}} falls by 60 ±\pm 5% in grokked transformers but by only 15–23% in the seven that never grok, at a peak rate two to five times lower (Appendix E.2). In the MLP, whose onset and memorization time barely vary across seeds, the random-label networks reach 90% training accuracy without grokking, and their effective rank falls by 1.1 ±\pm 0.3%, against 10.5 ±\pm 1.8% in grokked MLPs. Comparing seeds at the same training step shows that low rank is acquired at the transition itself (Appendix Table 21): before their own onset, grokked seeds have as many directions as the seed that never groks, and after it far fewer.

Compression Does Not Start Before the Rise in Test Accuracy

In the MLP, the compression onset follows the grokking onset in every seed (Appendix Table 18 and Figure 11). All 15 seeds have tc>tgt_c > t_g, with mean lag 6,367 ±\pm 3,248 steps (one-sided t=7.59t = 7.59, p=1.3×10−6p = 1.3 \times10^{-6}), i.e. 50 ±\pm 25% of tgt_g. Granger tests agree: changes in test accuracy predict changes in effective rank in all 15 seeds, and the reverse holds in at most 6 (Appendix E.1).

Figure 11. (a) tct_c vs. tgt_g: all 15 seeds above the diagonal. (b) Mean cross-correlation (±1\pm1 s.d.) of ∂ER/∂t\partial\mathrm{ER}/\partial t and ∂Acc/∂t\partial\mathrm{Acc}/\partial t.

In the transformer, compression is part of the transition. We locate the start tont_{\mathrm{on}} of the second drop as the first step of the stretch leading up to tst_s in which the decrease is at least 20% of its peak rate, using a centered five-point moving average that adds no delay (Appendix E.1). The drop starts 1,888 ±\pm 992 steps before the onset, but after test accuracy has first reached 10% in 28 of 29 seeds (median 1,750 steps after), at 34 ±\pm 22% test accuracy. It is steepest 905 ±\pm 506 steps after the onset (27 of 29 seeds), and 63% of it happens after the onset. In both architectures, then, compression does not start before test accuracy begins to rise. In the MLP it starts after the transition, and in the transformer during it.

Replication on Held-Out Tasks

We tested the timing results on seeds and tasks not used to define the measures, and report every test (Table 22). On the 15 held-out transformer seeds (H1), the steepest decrease came 850 ±\pm 524 steps after the onset (14 of 15 seeds, the fifteenth at the onset, one-sided t=6.28t = 6.28, p=1.0×10−5p = 1.0 \times10^{-5}), close to the 964 ± 499 steps of seeds 0–14, on which the measure had been defined. On abab mod 97 and (a+b)(a+b) mod 113, the MLP’s compression onset (H2) and steepest decrease (H3) followed the grokking onset in all 30 runs. The narrowing and re-widening of d0.99d_{0.99} (H4, H5) and the effect of the factorization (H6) also replicated. With a Bonferroni correction over the nine tt-tests, every test except H4 on (a+b)(a+b) mod 113 (p=0.013p = 0.013) remains significant.

QuantityTransformer, held-outMLP, abab mod 97MLP, (a+b)(a+b) mod 113
H1: ts−tgt_s-t_g (Win)850±524850 \mathbin{\pm} 524 (14/15)*––
H2: tc−tgt_c-t_g–6,300±1,4616,300 \mathbin{\pm} 1,461 (15/15)*6,700±4,5196,700 \mathbin{\pm} 4,519 (15/15)*
H3: ts−tgt_s-t_g (W1W_1)–9,800±2,2749,800 \mathbin{\pm} 2,274 (15/15)*11,867±6,74111,867 \mathbin{\pm} 6,741 (15/15)*
H4: d0.99(sg)−d0.99(s+)d_{0.99}(s_g)-d_{0.99}(s_+)–32.9±13.732.9 \mathbin{\pm} 13.7 (15/15)*10.8±16.810.8 \mathbin{\pm} 16.8 (12/15)*
H5: d0.99(send)−d0.99(s+)d_{0.99}(s_{\mathrm{end}})-d_{0.99}(s_+)–25.1±2.925.1 \mathbin{\pm} 2.9 (15/15)*16.9±3.116.9 \mathbin{\pm} 3.1 (15/15)*
H6: tgt_g for ABAB at r=r = 128/64/32, and unfactorized–2,000/2,667/4,667 and 12,8332,000/3,000/4,500 and 15,333

Table 22. Replication tests (one-sided tests, mean ±\mathbin{\pm} s.d. in steps or directions, with the number of seeds showing a positive difference in parentheses).

Forcing Low Rank from Initialization

Forcing low rank before the transition does not bring grokking forward (Table 4, Table 25). We write a weight matrix as W=ABW = AB with inner dimension rr, initialized so that the entries of ABAB have the variance of the original initialization, and compare each rank cap with a factorized control whose inner dimension is at full rank. The control matters because the factorization alone changes the grokking time.

MatrixrrGrokkedtgt_gFinal test accuracy (%)
None (unfactorized)—5/510,500 ± 1,777100.0 ± 0.0
WinW_{\mathrm{in}}1285/514,100 ± 4,09599.6 ± 0.3
WinW_{\mathrm{in}}325/514,350 ± 5,73098.4 ± 1.6
WinW_{\mathrm{in}}244/516,312 ± 3,33295.5 ± 7.2
WinW_{\mathrm{in}}163/516,417 ± 6,68294.5 ± 7.7
WinW_{\mathrm{in}}81/512,50050.6 ± 39.7
WEW_E1285/518,050 ± 5,917100.0 ± 0.0
WEW_E321/515,75031.8 ± 39.1
WEW_E244/516,312 ± 2,63383.1 ± 37.4
WEW_E160/5—11.9 ± 9.5
WEW_E80/5—13.7 ± 11.8

Table 4. Rank caps in the transformer (W=ABW = AB with inner dimension rr, 5 seeds per arm, tgt_g averaged over the seeds that grok, mean ± s.d.). r=128r = 128 is the factorized control without a rank limit.

ModelGrokkedtgt_gFinal test acc. (%)Final ER(W1W_1)
Unfactorized W1W_1 (main)3/312,833 ±\pm 289100.0 ±\pm 0.0104.9 ±\pm 1.1
W1=ABW_1 = AB, r=128r = 128 (control)3/32,000 ±\pm 099.9 ±\pm 0.289.1 ±\pm 0.9
W1=ABW_1 = AB, r=96r = 963/32,167 ±\pm 289100.0 ±\pm 0.063.0 ±\pm 5.7
W1=ABW_1 = AB, r=80r = 803/32,500 ±\pm 0100.0 ±\pm 0.049.4 ±\pm 1.2
W1=ABW_1 = AB, r=64r = 643/32,667 ±\pm 289100.0 ±\pm 0.046.0 ±\pm 3.7
W1=ABW_1 = AB, r=48r = 483/33,167 ±\pm 289100.0 ±\pm 0.038.0 ±\pm 0.6
W1=ABW_1 = AB, r=32r = 323/34,500 ±\pm 099.5 ±\pm 0.329.5 ±\pm 0.1
W1=ABW_1 = AB, r=16r = 160/3–55.3 ±\pm 10.615.8 ±\pm 0.0
W1=ABW_1 = AB, r=8r = 80/3–27.8 ±\pm 6.18.0 ±\pm 0.0
No penalty5/512,700 ±\pm 447100.0 ±\pm 0.0104.9 ±\pm 1.6
λ=10−8\lambda= 10^{-8}5/512,800 ±\pm 274100.0 ±\pm 0.0103.5 ±\pm 2.2
λ=3×10−8\lambda= 3 \times10^{-8}5/512,800 ±\pm 274100.0 ±\pm 0.1106.3 ±\pm 1.3
λ=10−7\lambda= 10^{-7}5/516,200 ±\pm 447100.0 ±\pm 0.0100.7 ±\pm 3.4
λ=3×10−7\lambda= 3 \times10^{-7}0/5–0.8 ±\pm 0.11.2 ±\pm 0.3
λ=10−6\lambda= 10^{-6}0/5–1.1 ±\pm 0.1110.8 ±\pm 0.4

Table 25. Forcing low rank from initialization (MLP). Rank-constrained models use 3 seeds and the penalty 5 seeds.

Transformer. The transformer’s function needs only about 13 directions of WinW_{\mathrm{in}} and 8 of WEW_E, so caps above these numbers leave the solution’s capacity intact. Capping WinW_{\mathrm{in}} at 32 directions leaves the onset where the factorized control has it (14,350 ± 5,730 against 14,100 ± 4,095 steps), capping it at 24 or 16 delays it and makes it less reliable (four and three of five seeds grok), and capping it at 8, below the 13 directions the solution uses, prevents it in four of five seeds. Capping WEW_E is worse: five of twenty capped runs grok. The four that grok at rank 24 do so at 16,312 ± 2,633 steps, against 18,050 ± 5,917 for the control. Whatever the cap, the capped matrix ends at an effective rank of 8–12, like its factorized control.

MLP. In the MLP the factorization alone accelerates grokking seven- to eight-fold (tg=1,667±58t_g = 1,667 \pm58 for W1=ABW_1 = AB at full rank against 12,483 ± 340 for an unfactorized W1W_1, logged every 50 steps, and 7.2 and 8.4 times on the two replication tasks), whereas it slows the transformer (14,100 ± 4,095 against 10,500 ± 1,777 steps for WinW_{\mathrm{in}}, Table 4). The factorization’s own effect is consistent with two known mechanisms. For gradient descent on linear networks, Arora et al. [ [2] show that factorizing a matrix preconditions the updates of the product, combining an adaptive learning rate with a form of momentum, which can accelerate convergence. Weight decay on AA and BB penalizes the nuclear norm of WW, since ∥A∥F2+∥B∥F2≥2∥AB∥∗\lVert A\rVert_F^2 + \lVert B\rVert_F^2 \ge2\lVert AB\rVert_*. This penalty is negligible at the MLP’s weight decay of 10−210^{-2} but strong for the transformer’s 10−710^{-7}, consistent with the factorization speeding up the MLP and slowing the transformer. Against the factorized control, rank limits delay grokking (2,450 ± 100 steps at r=64r = 64, 4,133 ± 29 at r=32r = 32), and models with r≤16r \le16 do not grok within 10510^5 steps. Compared with the unfactorized W1W_1 alone, low rank would wrongly appear to accelerate grokking (Appendix § 16.§ 4). Because the MLP’s solution uses most of its directions, these delays say less about compression than the transformer caps do. A nuclear-norm penalty λ∥W1∥∗\lambda\lVert W_1\rVert_* with λ=10−7\lambda= 10^{-7} from step 0 compresses W1W_1 well before grokking (effective rank 78.5 ± 3.4 at step 11,500, against 115.9 ± 0.3) and delays grokking from 12,700 ± 447 to 16,200 ± 447 steps, and λ≥3×10−7\lambda\ge3 \times10^{-7} prevents learning (5 seeds per λ\lambda).

IPR Is Not a Specific Early-Warning Signal

A hidden unit of the generalizing solution reads its input as a single cosine wave over the residues. The Fourier IPR measures how close the units are to this. Following Doshi et al. [ [9], with w^k(f)\hat{w}_k(f) the magnitude of the discrete Fourier transform of unit kk’s weights, normalized to unit ℓ2\ell_2 norm,

IPR⁡F(W1)=1128∑k=1128∑f=0p−1w^k(f)4.(1)\operatorname{IPR}_{\mathcal{F}}(W_1) = \frac{1}{128} \sum_{k=1}^{128} \sum_{f=0}^{p-1} \hat{w}_k(f)^4. \tag*{(1)}

We use the weights on operand aa only, where Doshi et al. [ [9] average over each unit’s input and output weights. A unit tuned to a single frequency has IPR 1/2, and unstructured weights give about 0.02–0.03. For the transformer we compute it for the embedding, over the 97 tokens. Doshi et al. [ [9] use it to separate generalizing from memorizing neurons and show that it rises during grokking. We test whether this rise can serve as a label-free early-warning signal of the onset.

IPR rises before the grokking onset, but also in every network that never groks, so it tracks the progress of training rather than an impending onset (Table 29). In the MLP, the Fourier IPR crosses a 3σ3\sigma threshold at the end of whatever baseline window is chosen and fires in all five random-label networks. In the transformer, it fires before tgt_g in nearly every grokked seed, but also in all seven runs that do not grok (Appendix § 16.§ 5).

ModelMetricWWEarlyAt window endFalse alarmsLead
MLPFourier IPR (W1W_1)2,50015/1514/155/510,000
5,00015/1515/155/57,500
10,00015/1514/155/52,500
MLPGradient norm2,50015/150/155/59,000
5,00015/150/150/52,500
10,0003/150/153/50
TransformerFourier IPR (WEW_E)2,50014/140/147/77,625
5,00014/140/147/75,250
10,0009/96/147/71,000
TransformerSpectral IPR (WinW_{\mathrm{in}})2,50014/140/147/73,125
5,00014/140/147/71,625
10,0009/95/143/7750

Table 29. Label-free onset detection (threshold 3σ3\sigma above the mean of the baseline window [0,W)[0, W)). At window end: fires at the first logged step after the window. False alarms: fires in runs that never generalize (5 random-label MLP runs and 7 non-grokked transformer runs). Lead =tg−tonset= t_g - t_{\mathrm{onset}} (median, steps).

Subspace Crystallization in the Transformer

Time-resolved results are means ±\pm s.d. over the 29 grokked seeds, and final-checkpoint results over the 14 grokked seeds of 0–14.

The transformer crystallizes during the transition. With a checkpoint every 250 steps and each seed aligned at its own onset, doutd_{\mathrm{out}} narrows during the rise in test accuracy (Figure 1b, Table 5). Three thousand steps before the onset, at 16% test accuracy, doutd_{\mathrm{out}} is 27–53 per matrix. At the onset it is 11–17, and 3,000 steps later 9–14. For WinW_{in}, WoutW_{out} and WUW_U it is half-way down 740–960 steps before the onset, in 28 or 29 of 29 seeds, at about 60% test accuracy. WEW_E narrows at the onset and keeps narrowing afterwards. The narrowing coincides with the cleanup phase of Nanda et al. [ [28]. Their restricted loss, which keeps only the key-frequency components of the logits, is half-way down 1,966 ±\pm 647 steps before the onset, as the generalizing circuit forms. Their excluded loss, which removes these components, is half-way up 1,026 ±\pm 646 steps before the onset, as the memorizing components are removed, at the same time as doutd_{\mathrm{out}} narrows. doutd_{\mathrm{out}} adds that the cleanup reduces the directions the outputs depend on, not only those the predictions depend on, and the MLP trained with mean-squared error shows no equivalent (§5). Transformers that never grok narrow only slowly and stay two to nine times wider (Appendix § 17.§ 2).

Step −tg-t_gWEW_EWinW_{in}WoutW_{out}WUW_UTest acc. (%)RestrictedExcluded
−3,000-3{,}00027.3±2.827.3 \pm2.828.0±3.328.0 \pm3.346.9±7.646.9 \pm7.652.6±7.352.6 \pm7.315.72.094.8
−2,000-2{,}00026.0±2.726.0 \pm2.725.7±3.325.7 \pm3.340.2±8.140.2 \pm8.146.6±7.946.6 \pm7.926.21.378.1
−1,000-1{,}00023.0±3.123.0 \pm3.121.0±3.521.0 \pm3.526.6±7.426.6 \pm7.433.4±8.733.4 \pm8.757.70.6414.7
−500-50019.9±3.019.9 \pm3.018.3±2.918.3 \pm2.916.7±5.516.7 \pm5.524.2±8.024.2 \pm8.082.40.2616.6
017.2±2.617.2 \pm2.615.9±2.315.9 \pm2.311.0±2.611.0 \pm2.614.0±4.914.0 \pm4.996.90.1216.2
+1,000+1{,}00012.0±2.212.0 \pm2.213.9±1.813.9 \pm1.89.2±1.99.2 \pm1.99.1±1.99.1 \pm1.999.90.0314.0
+3,000+3{,}0008.6±2.08.6 \pm2.013.8±1.713.8 \pm1.79.0±1.89.0 \pm1.88.9±1.78.9 \pm1.7100.00.1218.4

Table 5. The transformer crystallizes during the transition (29 grokked seeds, each aligned at its own onset tgt_g, with checkpoints every 250 steps). doutd_{\mathrm{out}} of each matrix (test inputs, mean ±\pm s.d.), test accuracy, and the restricted and excluded training losses of Nanda et al. [ [28] (means).

The final solution uses few directions. At the final checkpoint, every analyzed matrix except WVW_V is far below full rank (Table 30). d0.99d_{0.99} is 7.7±1.57.7 \pm1.5 of 97 for WEW_E, 8.7±1.58.7 \pm1.5 of 128 for WoutW_{out} and 13.0±1.313.0 \pm1.3 of 128 for WinW_{in}, and the MLP post-activations need 17.2±3.317.2 \pm3.3 of 512 directions (3.4%, truncating the mean-centered activation matrix). These counts are not inflated by the margin: doutd_{\mathrm{out}} is 8.1–13.0 for WEW_E, WinW_{in}, WoutW_{out} and WUW_U.

Table 30: Transformer dimensionality (14 grokked seeds, final checkpoint). k95k_{95}, k99k_{99}: singular directions carrying 95% and 99% of ∑iσi2\sum_i \sigma_i^2. d0.99d_{0.99}: fewest directions that keep 99% of test accuracy. Attention projections are stacked across the four heads. Activations are truncated after mean-centering.

MatrixMax rankk95k_{95}k99k_{99}d0.99d_{0.99}
WEW_{\mathrm{E}} (embedding)978.8±1.58.8 \pm1.530.4±4.030.4 \pm4.07.7±1.57.7 \pm1.5
WQ/WKW_Q / W_K324.0±0.04.0 \pm0.04.0±0.04.0 \pm0.02.6±0.52.6 \pm0.5 / 2.4±0.72.4 \pm0.7
WVW_V3218.5±2.618.5 \pm2.624.3±2.624.3 \pm2.610.9±1.510.9 \pm1.5
WOW_O12813.2±1.413.2 \pm1.421.3±4.721.3 \pm4.712.8±1.312.8 \pm1.3
WinW_{\mathrm{in}}12813.1±1.413.1 \pm1.418.1±3.818.1 \pm3.813.0±1.313.0 \pm1.3
WoutW_{\mathrm{out}}1288.6±1.48.6 \pm1.411.8±2.511.8 \pm2.58.7±1.58.7 \pm1.5
WUW_U (unembedding)9810.3±1.310.3 \pm1.323.8±2.823.8 \pm2.88.8±1.48.8 \pm1.4
MLP post-activations51214.4±3.314.4 \pm3.323.6±7.223.6 \pm7.217.2±3.317.2 \pm3.3

Table 30.

Runs that never grok keep high-rank matrices. The seven runs that memorize without generalizing have far higher-rank MLP and unembedding matrices. Counting the singular directions that carry 99% of ∑iσi2\sum_i \sigma_i^2, they keep 68–84 for WinW_{\mathrm{in}} (grokked: 18.1 ±\pm 3.8), 61–79 for WoutW_{\mathrm{out}} (11.8 ±\pm 2.5) and 62–73 for WUW_U (23.8 ±\pm 2.8) (Table 33). With the comparison at matched steps in § 6.1 (Table 21), this shows that low rank in these matrices is acquired at the transition, not by training to zero loss under weight decay.

StepGroupWEW_EWinW_{\mathrm{in}}WoutW_{\mathrm{out}}WUW_U
10,000before own onset (17)47.8±2.447.8 \pm2.477.2±8.077.2 \pm8.064.1±4.564.1 \pm4.560.4±4.460.4 \pm4.4
after own onset (12)39.0±4.639.0 \pm4.642.8±12.342.8 \pm12.333.2±12.333.2 \pm12.334.8±7.134.8 \pm7.1
never groks (1)52847167
12,500before own onset (9)44.3±2.844.3 \pm2.872.2±7.472.2 \pm7.461.7±3.661.7 \pm3.660.2±3.760.2 \pm3.7
after own onset (20)36.0±4.136.0 \pm4.132.1±13.332.1 \pm13.324.2±15.124.2 \pm15.130.4±9.530.4 \pm9.5
never groks (1)50867066
15,000before own onset (8)43.5±2.643.5 \pm2.667.2±8.567.2 \pm8.559.1±3.259.1 \pm3.257.2±2.757.2 \pm2.7
after own onset (21)32.1±4.832.1 \pm4.822.4±3.422.4 \pm3.415.0±5.115.0 \pm5.124.7±5.324.7 \pm5.3
never groks (1)45816765

Table 21. Low rank is acquired at the transition (transformer, weight decay 1.0). Singular directions carrying 99% of ∑iσi2\sum_i \sigma_i^2 at the same training step, for grokked seeds before and after their own onset and for the seed that never groks. Mean ±\pm s.d., with the number of seeds in parentheses.

RunTrainTestWEW_EWQW_QWKW_KWVW_VWOW_OWinW_{\mathrm{in}}WoutW_{\mathrm{out}}WUW_U
wd 1.0, seed 12100.08.242443042686262
wd 0.1, seed 0100.04.3434193150827872
wd 0.1, seed 1100.01.8434183151817873
wd 0.1, seed 2100.03.0444183152847973
wd 0.3, seed 0100.013.234443143746162
wd 0.3, seed 1100.010.736443143736162
wd 0.3, seed 2100.09.137443043776565

Table 33. Non-grokked transformer runs: final accuracy (%) and k99k_{99} (singular directions carrying 99% of ∑iσi2\sum_i \sigma_i^2). Grokked seeds (mean): WEW_E 30.4, WQW_Q 4.0, WKW_K 4.0, WVW_V 24.3, WOW_O 21.3, WinW_{\mathrm{in}} 18.1, WoutW_{\mathrm{out}} 11.8, WUW_U 23.8.

Why the Transformer Crystallizes Further Than the MLP

We attribute this gap to the architecture. The transformer’s embedding uses about four frequencies: 4.2 ±\pm 0.7 of them hold 90% of its Fourier power. Each frequency requires two directions, a cosine and a sine, so this predicts about 8 directions, close to d0.99d_{0.99} of WEW_E, WoutW_{\mathrm{out}} and WUW_U (7.7–8.8, Table 31). The directions attention writes to nearly coincide with those WinW_{\mathrm{in}} reads from (mean cosine of the principal angles 0.923, against 0.248 for random subspaces), and equally so in runs that never grok (Appendix § 17). The MLP block therefore receives an input already confined to a few directions, and the directions its outputs do not need are removed during the transition, together with the memorizing components (§ 7). The MLP’s first layer instead reads both one-hot operands directly, so each frequency costs it four directions, and it spreads its weights over most of the 48 frequencies (§ 5). No MLP we trained crystallizes during the transition.

Table 31: Architecture comparison (final checkpoints, with 15 MLP seeds, 5 cross-entropy MLP seeds per learning rate and 14 grokked transformer seeds).

PropertyMLP (MSE)MLP (CE)Transformer
Loss, weight decay, training stepsMSE, 10−210^{-2}, 10510^5CE, 10−210^{-2}, 10510^5CE, 1.0, 2.5×1042.5 \times10^4
d0.99d_{0.99} of first-layer weights (of 128)89.1±2.389.1 \pm2.348–5113.0±1.313.0 \pm1.3
doutd_{\mathrm{out}} of first-layer weights (of 128)127.3±0.6127.3 \pm0.670–8113.0±1.913.0 \pm1.9
When doutd_{\mathrm{out}} fallsneverlate, after tgt_gduring the transition
Frequencies holding 90% of first-layer power33.7±1.933.7 \pm1.9 (W1W_1)–4.2±0.74.2 \pm0.7 (WEW_{\mathrm{E}})

Table 31.

Other differences between the models, i.e. loss and the weight decay do not account for the gap. The loss explains only why the cross-entropy MLP ends with fewer representative directions than the mean-squared-error MLP. A one-hot target has equal power at all 97 Fourier components, so for a network that matches its targets, omitting one frequency changes the outputs by 2/97≈14%\sqrt{2/97} \approx14\%, more than doutd_{\mathrm{out}} allows. CE constrains only the ordering of the logits, and the CE MLP ends at dout=70d_{\mathrm{out}} = 70–81, against 122–127 with MSE. Raising its weight decay to the transformer’s per-step shrinkage of 10−310^{-3} speeds up grokking, from step 10,100 to 2,300, but does not make it crystallize: doutd_{\mathrm{out}} is about 120 just after the onset and ends at 118.4 instead of 69.6, and stronger decay prevents learning (Table 7). Only the CE MLP’s doutd_{\mathrm{out}} falls late, and its Stage-4 fall in effective rank is four times as large (37.9% against 9.7%, Table 6), which suggested that the late fall is Stage 4 itself (§ 4). Consistently, at every weight decay doutd_{\mathrm{out}} ends close to the effective rank of WIW_I (69.6 against 71.1, 100.4 against 98.7, 118.4 against 115.7). The cross-entropy MLP’s late narrowing is thus a different process from the transformer’s crystallization.

VariantGrokkedtgt_gFinal ERStage-4 drop (%)Fourier IPR
Main5/512,700 ± 447104.9 ± 1.69.7 ± 1.50.457 ± 0.009
wd 05/512,700 ± 44798.7 ± 2.214.9 ± 1.90.452 ± 0.010
wd 10−310^{-3}5/512,700 ± 44799.3 ± 2.114.4 ± 1.90.453 ± 0.008
wd 0.055/512,800 ± 274113.7 ± 0.82.2 ± 0.40.466 ± 0.006
wd 0.15/513,400 ± 418116.7 ± 1.70.5 ± 0.40.476 ± 0.004
CE, lr 10−310^{-3}1/594,500 (n=1n = 1)114.1 ± 0.3–0.200 ± 0.008
CE, lr 3×10−33 \times10^{-3}5/527,500 ± 2,372102.4 ± 0.610.9 ± 0.50.292 ± 0.009
CE, lr 10−210^{-2}5/510,100 ± 96271.1 ± 2.237.9 ± 1.90.324 ± 0.011
ReLU5/544,900 ± 4,61580.8 ± 0.814.0 ± 1.30.332 ± 0.028
GELU5/533,400 ± 1,14079.2 ± 1.816.8 ± 1.30.474 ± 0.010

Table 6. MLP training variants (5 seeds each, mean ± s.d.). Main: mean-squared error, quadratic activation, weight decay (wd) 10−210^{-2}. CE: cross-entropy. Grokked: test accuracy ≥95%\ge95\% within 10510^5 steps. Stage-4 drop: relative decrease of effective rank from its peak after tgt_g to its final value. Fourier IPR: § 6.5.

λ\lambdalr·λ\lambdaGrokkedtgt_gdoutd_{\mathrm{out}} after tgt_gdoutd_{\mathrm{out}}, endd0.99d_{0.99}, endER(W1W_1), end
0.0110−410^{-4}5/510,100 ± 962119.8 ± 0.469.6 ± 2.248.4 ± 2.571.1 ± 2.2
0.033×10−43 \times10^{-4}5/54,500 ± 354120.2 ± 0.8100.4 ± 2.361.6 ± 3.298.7 ± 2.6
0.110−310^{-3}5/52,300 ± 274120.2 ± 0.8118.4 ± 1.769.6 ± 2.6115.7 ± 1.0
0.33×10−33 \times10^{-3}0/5––––1.0 ± 0.0
1.010−210^{-2}0/5––––1.0 ± 0.0

Table 7. Weight decay in the cross-entropy MLP (learning rate 10−210^{-2}, 5 seeds each, mean ± s.d.). doutd_{\mathrm{out}} and d0.99d_{0.99} of W1W_1 (of 128) on test inputs with centered logits, at the first checkpoint after tgt_g and at step 10510^5.

Discussion

What our measurements imply for rank analyses. Our results suggest four practices for measuring how many directions a network uses. First, count directions with a criterion that is independent of the margin, such as doutd_{\mathrm{out}}, and compare the count with that of untrained or memorizing networks: in our MLP, d0.99d_{0.99} reported a narrowing that the outputs did not undergo. Second, report the training step with every count: the MLP’s d0.99d_{0.99} grows from 65 to 89 after generalization, so it is not a fixed property of the trained model. Third, compare any intervention that imposes low rank with a control of the same parameterization: against the unfactorized MLP, rank caps would wrongly appear to accelerate grokking. Fourth, read weight-spectrum statistics such as IPR or effective rank as signals of grokking only next to negative controls, since they also move in networks that never grok. In the transformer, a few leading singular directions of each matrix carry the solution and truncating to them keeps the test accuracy, while random truncations of equal rank do not (Table 15, subject to the assumptions in Appendix § 15.§ 3). In the MLP, one seed’s hidden representation transfers to another after an orthogonal alignment fitted on its few thousand training inputs, although their weight subspaces overlap no more than random ones (§ 5).

Limitations. Our tasks are all modular arithmetic on cyclic groups, so a non-abelian group [5] would test the timing results more broadly. Whether language or vision models have a comparably clean sufficient subspace is a natural next question. Kaushik et al. [ [15] study low-dimensional weight subspaces in such models. Within our setting, the two architectures differ in more than their structure: they are also trained with different losses and for different lengths. We varied weight decay separately and found that it does not explain the difference in crystallization (Appendix § 13.§ 3), but the cross-entropy MLPs need larger learning rates than the mean-squared-error ones to grok within 10510^{5} steps (one of five seeds groks at 10−310^{-3}). Finally, the Granger tests capture only temporal order, so our causal conclusions rest on the rank interventions.

Conclusion

We asked whether rank compression causes grokking (Q1) and whether the learned solution comes to lie in a few directions of each weight matrix (Q2). For Q1, compression follows the grokking onset rather than memorization: it tracks the onset across a threefold range of onset times while the training set is memorized within 250 steps, it does not start before test accuracy rises, and forcing low rank from initialization does not bring grokking forward. Compression is therefore a signature of grokking rather than its cause. For Q2, the answer depends on how directions are counted. Judged by the outputs, the transformer crystallizes during the transition, to 8–13 directions per matrix, at the same time as its memorizing components are removed. The MLP trained with mean-squared error does not: its d0.99d_{0.99} narrows only because its margins grow, and its late compression tracks the optimizer’s effective learning rate. Counting directions by the outputs rather than by accuracy, and comparing any imposed low rank with a control of the same parameterization, is what makes these distinctions visible.

AI Use Statement

We used generative AI tools to retrieve and discover relevant literature and to draft and polish portions of the manuscript where appropriate. Any AI outputs were heavily edited by the authors. We did not use generative AI to formulate or refine the research hypotheses, develop the methodology, design the experiments, or interpret the results. The authors take full responsibility for the final content of this work, including its text, claims, code and data.

Further Related Work

Grokking beyond modular arithmetic. Grokking also occurs for adversarial robustness [14], in multi-hop reasoning [1] and in Recursive Feature Machines [23]. Walker et al. [2025] remove the delay with spherical constraints on the residual stream. Our factorized control shows a related effect: factorizing W1W_1 at full rank shortens the delay seven- to eight-fold in the MLP (§ 6.4).

Theories of the late phase. Lyu et al. [2024] prove that homogeneous networks with large initialization and small weight decay move from kernel-like dynamics early in training to a max-margin solution late in training, and Mohamadi et al. [2023] show that a margin-maximization bias explains grokking in two-layer quadratic networks on modular arithmetic, with sample complexity O~(p5/3)\widetilde{O}(p^{5/3}) against O(p2)O(p^2) for kernel methods. Their setting, an exponential-type loss with weight decay, differs from our mean-squared-error MLP, which groks at the same step without weight decay (Table 6). Morwani et al. [2024] show that Fourier features and irreducible representations emerge from implicit margin maximization, consistent with the Fourier structure our networks learn without any spectral penalty.

Weight geometry and representations. Li et al. [2018] train networks in low-dimensional random subspaces of parameter space, and Yunis et al. [2024] relate rank minimization, weight alignment and weight decay beyond grokking. Raghu et al. [2017] compare representations across networks with SVCCA, and our cross-seed results extend this comparison to grokking: the representations differ in raw coordinates and agree up to rotation. Sparse autoencoders [4, 6] decompose representations into features, a basis complementary to the singular directions used here.

Experimental Details and Training Variants

Data, Training and Metrics

Data and training. The MLP uses a 35% train split (3,293 of the 9,409 pairs) and logs metrics every 500 steps. The transformer uses a 30% split (2,822 pairs) and logs every 250 steps. Its vocabulary comprises p+1=98p + 1 = 98 tokens (the residues and the equals sign), so WE∈R97×128W_E \in\mathbb{R}^{97 \times128} (the residue rows), WU∈R128×98W_U \in\mathbb{R}^{128 \times98}, Win∈R128×512W_{\mathrm{in}} \in\mathbb{R}^{128 \times512}, Wout∈R512×128W_{\mathrm{out}} \in\mathbb{R}^{512 \times128}, WQh,WKh,WVh∈R128×32W_Q^h, W_K^h, W_V^h \in\mathbb{R}^{128 \times32} per head and WO∈R128×128W_O \in\mathbb{R}^{128 \times128} (heads stacked). The transformer’s higher weight decay (1.0 against 10−210^{-2}) follows Nanda et al. [2023]. MLP variants use seeds 0–4, rank-constrained MLPs seeds 0–2, and transformer rank caps seeds 0–4. All experiments were run on NVIDIA RTX A5000 GPUs.

Training objectives. The MLP minimizes the mean-squared error to one-hot targets, LMSE=1∣Dtrain∣∑(a,b)∥f(a,b)−ey∥22\mathcal{L}_{\mathrm{MSE}} = \frac{1}{|\mathcal{D}_{\mathrm{train}}|} \sum_{(a,b)} \lVert f(a,b) - e_y \rVert_2^2 with y=(a+b) mod py = (a+b) \bmod p, and the transformer the cross-entropy over its output logits z∈Rp+1z \in\mathbb{R}^{p+1}, LCE=−1∣Dtrain∣∑(a,b)log⁡(exp⁡(zy)/∑cexp⁡(zc))\mathcal{L}_{\mathrm{CE}} = -\frac{1}{|\mathcal{D}_{\mathrm{train}}|} \sum_{(a,b)} \log\left(\exp(z_y)/\sum_c \exp(z_c)\right).

Metrics. Stable rank is ∥W1∥F2/∥W1∥22\lVert W_1 \rVert_F^2/\lVert W_1 \rVert_2^2. Hoyer sparsity is (n−∥w∥1/∥w∥2)/(n−1)(\sqrt{n} - \lVert w \rVert_1/\lVert w \rVert_2)/(\sqrt{n} - 1) over the nn entries ww of W1W_1, and L0 sparsity the fraction of entries below 10−310^{-3} in magnitude. The spectral IPR ∑iσ^i4\sum_i \hat{\sigma}_i^4 rises as spectral mass concentrates in a few directions. The gradient norm is the ℓ2\ell_2 norm of the full gradient. For the transformer’s Fourier IPR, each of the 128 embedding dimensions is transformed over the 97 tokens.

Training dynamics of the MLP

Figure 3. Training dynamics of the MLP (seed 0): loss, weight norms, effective rank, accuracy, gradient norm, stable rank, L0L0 and Hoyer sparsity of W1W_1, and Fourier IPR, against training step.

Training Variants of the MLP

Table 6 and Figure 4 report the variants summarized in § 4.

Stage 4 across training variants

Figure 4. Stage 4 across training variants (MLP, 5 seeds each, mean curves of test accuracy, effective rank of W1W_1 and, in (b, c), Fourier IPR).

CE at lr 10−310^{-3} reaches 93.7±2.0%93.7 \pm2.0\% final test accuracy, and its single grokked seed has a Stage-4 drop of 0.1%.

Weight Decay in the Cross-Entropy MLP

Table 7 trains the cross-entropy MLP at learning rate 10−210^{-2} with five weight decays λ\lambda (5 seeds each, 10510^5 steps), including the runs of Table 6 at λ=10−2\lambda= 10^{-2}. With AdamW the weights shrink by lr · λ\lambda per step, so λ=0.1\lambda= 0.1 matches the transformer’s per-step decay of 10−310^{-3}. doutd_{\mathrm{out}} and d0.99d_{0.99} are computed for W1W_1 on test inputs with centered logits, at the first saved checkpoint after tgt_g and at the end of training. At λ≥0.3\lambda\ge0.3 the weights decay to near zero, W1W_1 collapses to effective rank 1, and test accuracy stays at chance (1.0 ± 0.1%).

Role of the Nonlinearity

In the MLP, the quadratic activation turns sums of operand features into the products from which cos⁡(θa+θb)\cos(\theta_a + \theta_b) is read out. ReLU and GELU do not do this exactly, yet MLPs with these activations also grok, at tg=44,900±4,615t_g = 44,900 \pm4,615 and 33,400±1,14033,400 \pm1,140 against 12,700±44712,700 \pm447, with periodic first-layer weights (Fourier IPR 0.33±0.030.33 \pm0.03 and 0.47±0.010.47 \pm0.01, against 0.46±0.010.46 \pm0.01) and larger Stage-4 decreases in effective rank (Table 6). In the transformer, the ReLU of the MLP sublayer acts on inputs that attention has written into the subspace the MLP reads (alignment 0.923, Table 34), and the embedding concentrates 95% of its Fourier power on five frequencies, so the MLP sublayer operates on an already low-dimensional, low-dimensional input.

Subspace pairGrokked wd 1.0 (n=14n = 14)Not grokked wd 0.1 (n=3n = 3)Not grokked wd 0.3 (n=3n = 3)Not grokked wd 1.0 (n=1n = 1)
Attention write (WOW_O) vs. MLP read (WinW_{\mathrm{in}})0.923±0.0350.923 \pm0.0350.839±0.0210.839 \pm0.0210.918±0.0480.918 \pm0.0480.9470.947
MLP read (WinW_{\mathrm{in}}) vs. MLP write (WoutW_{\mathrm{out}})0.330±0.0500.330 \pm0.0500.269±0.0240.269 \pm0.0240.271±0.0430.271 \pm0.0430.2180.218
MLP write (WoutW_{\mathrm{out}}) vs. unembedding read (WUW_U)0.885±0.0780.885 \pm0.078–––
MLP read vs. key frequencies of WEW_E0.252±0.0180.252 \pm0.018–––
MLP write vs. key frequencies of WEW_E0.254±0.0190.254 \pm0.019–––
Random baseline0.248±0.0170.248 \pm0.017

Table 34. Residual-stream alignment (mean cosine of principal angles between 11-dimensional subspaces). Not grokked: three seeds each at weight decay 0.1 and 0.3, and the one non-grokked seed at weight decay 1.0.

Stage 4: Weight Growth and the Optimizer

Why the Sufficient Subspace Widens

Table 8 and Figure 5 decompose the widening of the sufficient subspace for the main runs, and Table 9 repeats the measurement across weight decays. The top 65 directions of W1W_1 grow by half while the remaining 63 keep their size. The output change caused by removing the remaining directions, dominated by the cross term 2htophrest2h_{\mathrm{top}}h_{\mathrm{rest}}, roughly doubles while the margin grows by 30%, so truncation to the top 65 directions loses accuracy and d0.99d_{0.99} widens. Stronger weight decay limits the growth of the top directions and, with it, both the fall in effective rank and the widening.

Step20,00030,00050,000100,000
d0.99d_{0.99}64.9 ± 1.769.3 ± 1.781.5 ± 2.489.1 ± 2.3
ER⁡(W1)\operatorname{ER}(W_1)114.4 ± 1.1110.9 ± 1.5107.0 ± 1.9104.0 ± 2.1
∥W1∥F\lVert W_1\rVert_F731 ± 7813 ± 14937 ± 261059 ± 35
∥W2∥F\lVert W_2\rVert_F531 ± 5597 ± 11685 ± 21763 ± 27
σ1(W1)\sigma_1(W_1)111.9 ± 3.4132.2 ± 3.0171.1 ± 10.4217.8 ± 21.6
Size of top 65659 ± 10748 ± 18878 ± 291002 ± 37
Size of remaining 63316 ± 10318 ± 10327 ± 13344 ± 18
Test acc., top-65 truncation (%)99.1 ± 0.497.7 ± 0.984.5 ± 5.557.7 ± 9.5
Median correct-class output0.604 ± 0.0170.696 ± 0.0100.722 ± 0.0080.732 ± 0.007
Median margin0.470 ± 0.0190.570 ± 0.0120.599 ± 0.0090.611 ± 0.008
Output change, 2htophrest2h_{\mathrm{top}}h_{\mathrm{rest}}0.611 ± 0.0150.699 ± 0.0140.860 ± 0.0631.153 ± 0.128
Output change, hrest2h_{\mathrm{rest}}^20.254 ± 0.0190.336 ± 0.0220.445 ± 0.0290.533 ± 0.047

Table 8. Why the sufficient subspace widens in Stage 4 (MLP, 15 seeds). K=65K = 65 is the median d0.99d_{0.99} at step 20,000. Size: (∑iσi2)1/2(\sum_i \sigma_i^2)^{1/2} over the top 65 or the remaining 63 singular directions of W1W_1. Output change: median ℓ2\ell_2 change of the 97 outputs when the directions beyond the top 65 are removed, split into the two terms of (htop+hrest)2−htop2(h_{\mathrm{top}} + h_{\mathrm{rest}})^2 - h_{\mathrm{top}}^2.

Weight decayd0.99d_{0.99}ER⁡(W1)\operatorname{ER}(W_1)∥W1∥F\lVert W_1\rVert_Fσ1(W1)\sigma_1(W_1)Size of remaining 63
065.8 → 95.0114.6 → 98.7731 → 1,252114 → 251320 → 358
10−310^{-3}65.4 → 93.8114.7 → 99.3731 → 1,220113 → 249320 → 354
10−210^{-2} (main)65.2 → 88.6115.0 → 104.9727 → 1,043111 → 205320 → 347
5×10−25 \times10^{-2}64.0 → 73.0115.7 → 113.7710 → 825101 → 151321 → 342
10−110^{-1}62.4 → 63.0116.7 → 116.7678 → 74892 → 108311 → 346

Table 9. Weight decay controls the widening (5 seeds each, step 20,000 → step 10510^5, means). All runs reach 100% test accuracy.

Stage-4 widening: singular directions and $d_{0.99}$ by weight decay

Figure 5. Stage-4 widening. Left: size of the top 65 and the remaining 63 singular directions of W1W_1 over training (15 seeds). Right: d0.99d_{0.99} at step 20,000 and at the end of training for each weight decay (5 seeds).

Gradient and Adam State

We continue each main seed for 1,000 AdamW steps from the checkpoints at steps 20,000, 50,000 and 10510^5 to rebuild the optimizer state, and then measure the full-batch gradient gg and Adam’s bias-corrected moments m^,v^\hat{m}, \hat{v} (Table 10). The gradient is small and becomes increasingly radial: its cosine with θ\theta goes from −0.19-0.19 to −0.89-0.89, so −g-g points outward and the loss would decrease if the weights grew. This radial component equals the Euler expression ⟨g,θ⟩=3⋅2p∣D∣∑(f−y)f\langle g,\theta\rangle= 3 \cdot\frac{2}{p|D|} \sum(f-y)f for this 3-homogeneous model to all printed digits. Almost every coordinate has v^<ϵ=10−8\sqrt{\hat{v}} < \epsilon= 10^{-8}, so the update m^/(v^+ϵ)\hat{m}/(\sqrt{\hat{v}}+\epsilon) is close to m^/ϵ\hat{m}/\epsilon: AdamW acts as gradient descent with momentum and learning rate lr⁡/ϵ=105\operatorname{lr}/\epsilon= 10^5, not as sign descent (the mean of ∣m^∣/(v^+ϵ)|\hat{m}|/(\sqrt{\hat{v}}+\epsilon) is 0.07–0.21, against 1 for sign descent). The radial part of this update exceeds the decay pull at step 20,000 and approaches it by the end, as the norm approaches an equilibrium. The gradient also concentrates in the top 65 directions of W1W_1, the directions that grow.

Step 20,000Step 50,000Step 10510^5
∥g∥\lVert g\rVert3.4×10−63.4 \times10^{-6}3.2×10−73.2 \times10^{-7}1.9×10−71.9 \times10^{-7}
⟨g,θ⟩\langle g,\theta\rangle (= Euler expression)−6.0×10−4-6.0 \times10^{-4}−2.5×10−4-2.5 \times10^{-4}−2.2×10−4-2.2 \times10^{-4}
cos⁡(g,θ)\cos(g,\theta)−0.19±0.01-0.19 \pm0.01−0.67±0.07-0.67 \pm0.07−0.89±0.06-0.89 \pm0.06
Share of coordinates with v^<ϵ\sqrt{\hat{v}} < \epsilon0.870±0.0170.870 \pm0.0170.998±0.0010.998 \pm0.0010.9998±0.00020.9998 \pm0.0002
Median v^\sqrt{\hat{v}}2.1×10−92.1 \times10^{-9}7.3×10−107.3 \times10^{-10}6.1×10−106.1 \times10^{-10}
Mean ∣m^∣/(v^+ϵ)|\hat{m}|/(\sqrt{\hat{v}}+\epsilon) (1 = sign descent)0.21±0.010.21 \pm0.010.08±0.010.08 \pm0.010.07±0.000.07 \pm0.00
Radial push of the Adam update(2.0±0.1)×104(2.0 \pm0.1) \times10^4(2.0±0.2)×104(2.0 \pm0.2) \times10^4(1.9±0.1)×104(1.9 \pm0.1) \times10^4
Decay pull λ∥θ∥2\lambda\lVert\theta\rVert^2(0.84±0.02)×104(0.84 \pm0.02) \times10^4(1.36±0.08)×104(1.36 \pm0.08) \times10^4(1.71±0.12)×104(1.71 \pm0.12) \times10^4
Share of ∥gW1∥2\lVert g_{W_1}\rVert^2 in the top 65 directions0.43±0.030.43 \pm0.030.79±0.090.79 \pm0.090.87±0.030.87 \pm0.03

Table 10. Gradient and Adam state during Stage 4 (MLP, 15 seeds, mean ±\pm s.d.). Radial push of the update and decay pull λ∥θ∥2\lambda\lVert\theta\rVert^2 are per unit learning rate.

Optimizer Swap

Table 11 continues main seeds 0–2 from step 20,000 to 10510^5 with each optimizer. The weight decay is set so that the per-step shrinkage matches AdamW’s lr⁡⋅λ=10−5\operatorname{lr}\cdot\lambda= 10^{-5} (λ=10−5/lr⁡\lambda= 10^{-5}/\operatorname{lr} for gradient descent, 10−6/lr⁡10^{-6}/\operatorname{lr} for momentum 0.9, whose steady-state step is lr⁡/(1−0.9)\operatorname{lr}/(1-0.9)). Runs with the same effective learning rate agree closely: SGD with momentum at lr⁡\operatorname{lr} 10 reproduces gradient descent at lr⁡\operatorname{lr} 100 to the printed digits, and AdamW with ϵ=10−6\epsilon= 10^{-6} reproduces gradient descent at lr⁡\operatorname{lr} 10310^3. Stage 4, the fall of effective rank with the growth of σ1\sigma_1 and the widening of d0.99d_{0.99}, appears at effective learning rates of 10510^5 and above and strengthens as ϵ\epsilon decreases. Test accuracy stays at 100% in every run.

Table 11: Continuations from step 20,00020{,}000 to 10510^{5} (main seeds 0–2, means). The effective learning rate is lrlr for gradient descent, lr/ϵlr/\epsilon for AdamW and lr/(1−0.9)lr/(1-0.9) for SGD with momentum.

OptimizerEffective lr∥W1∥F\lVert W_1\rVert_F∥W2∥F\lVert W_2\rVert_Fσ1(W1)\sigma_1(W_1)ER(W1)(W_1)d0.99d_{0.99}
At step 20,000–726529111115.165
AdamW, ϵ=10−10\epsilon=10^{-10}10710^71,79371834695.799
AdamW, ϵ=10−9\epsilon=10^{-9}10610^61,58287431894.798
AdamW, ϵ=10−8\epsilon=10^{-8} (main)10510^51,040748203104.889
AdamW, ϵ=10−7\epsilon=10^{-7}10410^4775551120114.870
AdamW, ϵ=10−6\epsilon=10^{-6}10310^365846985117.865
AdamW, ϵ=10−4\epsilon=10^{-4}101033124151115.365
AdamW, ϵ=10−8\epsilon=10^{-8}, no weight decay10510^51,25791726197.894
SGD, lr 10−3lr\ 10^{-3} (same decay)10−310^{-3}32623850115.165
Gradient descent10210^238427756116.765
Gradient descent10310^366247285117.865
Gradient descent10410^4783557126114.672
Gradient descent10510^5833913148108.387
Gradient descent10610^6diverges
SGD + momentum, lr 10lr\ 1010210^238427756116.765
SGD + momentum, lr 102lr\ 10^210310^366247285117.865
SGD + momentum, lr 103lr\ 10^310410^4783557126114.672
SGD + momentum, lr 104lr\ 10^410510^51,093775216103.891
SGD + momentum, lr 105lr\ 10^510610^68811,577174101.193

Table 11.

The Sufficient Subspace, Output Counts and Cross-Seed Equivalence

The Sufficient Subspace over Training

Table 12 reports dτd_\tau of W1W_1 at four thresholds at the end of training, which ranges from 80 to 93 directions for thresholds from 90% to 99.9%. Table 13 and Figure 6 show its evolution over training. Before step 15,000, dτd_\tau is relative to each checkpoint’s own test accuracy, which is below 100%. The number of frequencies holding 90% of the Fourier power of W1W_1 falls from 38.2 to 33.7 during Stage 4.

Test accuracy of $W_1$ truncated to its top $k$ directions

(a) (a) Test accuracy of W1W_1 truncated to its top kk directions (step 10510^5).

Sufficient-subspace dimensions and effective rank over training

(b) (b) d0.9d_{0.9} and d0.99d_{0.99} (left axis) and effective rank (right axis) over training.

Figure 6. The sufficient subspace of the MLP (15 seeds). (a) Seed 0 and mean ± s.d. (b) d0.9d_{0.9} and d0.99d_{0.99} narrow sharply after the onset and widen again during Stage 4, while effective rank falls. doutd_{\mathrm{out}} does not narrow (Table 3).

Threshold τ\tau (fraction of clean accuracy)dτd_{\tau} (mean ±\pm s.d.)
90%80.5 ±\pm 3.7
95%84.5 ±\pm 3.2
99%89.1 ±\pm 2.3
99.9%93.1 ±\pm 2.7

Table 12. dτd_{\tau} of W1W_1 at four thresholds (step 10510^5, 15 seeds).

Temporal Stability

We compute the mean cosine of the principal angles between the top-89 left and right singular subspaces of W1W_1 at step ss and at the final checkpoint (k=89k = 89, the median d0.99d_{0.99}), across all 15 seeds (Table 14). At initialization the overlap is at the random level. At tgt_g it is only modestly above it (0.837 against 0.773 in the hidden space), and it keeps rising for tens of thousands of steps. The final sufficient subspace is therefore assembled mostly during Stages 3 and 4, not at the accuracy transition.

Step ssHidden space (CC)Input space
00.775 ±\pm 0.0030.608 ±\pm 0.003
5,0000.782 ±\pm 0.0030.623 ±\pm 0.003
10,0000.807 ±\pm 0.0050.677 ±\pm 0.007
12,5000.837 ±\pm 0.0070.723 ±\pm 0.010
15,0000.875 ±\pm 0.0100.773 ±\pm 0.012
20,0000.925 ±\pm 0.0130.843 ±\pm 0.013
30,0000.961 ±\pm 0.0130.910 ±\pm 0.011
50,0000.983 ±\pm 0.0120.967 ±\pm 0.013
Random0.773 ±\pm 0.0030.606 ±\pm 0.003

Table 14. Overlap of the top-89 singular subspaces of W1W_1 at step ss with those at step 10510^5 (15 seeds). Hidden space: left singular vectors (the sufficient subspace CC). Input space: right singular vectors.

Truncation Controls and Complement Interventions

*Top-kk and bottom-kk share about 50 directions when k>64k > 64. ‡Keeping only the bottom directions of WinW_{\mathrm{in}} or of WoutW_{\mathrm{out}} effectively removes the MLP’s contribution, hence the identical values.

Complement interventions. We intervene on the MLP’s pre-activations h=W1x/194h = W_1x/\sqrt{194}, with CC the sufficient subspace of each seed at step 10510^5. Keeping only the CC-component gives 99.26 ±\pm 0.22% test accuracy and keeping only the C⊥C^\perp-component 0.15 ±\pm 0.14%. Adding Gaussian noise of norm s∥h∥s\lVert h\rVert (per input) inside CC or inside C⊥C^\perp gives 99.97 ±\pm 0.05% and 99.95 ±\pm 0.07% for s=0.1s = 0.1, 92.42 ±\pm 4.22% and 70.97 ±\pm 9.69% for s=0.3s = 0.3, 10.11 ±\pm 2.06% and 7.43 ±\pm 1.32% for s=1s = 1, and 1.54 ±\pm 0.10% and 1.61 ±\pm 0.09% for s=3s = 3. As a check of the pipeline, patching the clean hidden representation into a run on noise-corrupted inputs restores the clean output (100.00% in the MLP at corruption level 0.3, against 1.59% unpatched, and 99.92% in the transformer, against 18.52%), as it must in a network with one hidden layer.

Assumptions of the SVD probe. Equating high-variance singular directions with functional relevance assumes that those directions carry the computation rather than optimizer noise, representation drift or dense isotropic features. It also assumes linear, orthogonal structure, which can obscure sparse features stored in non-orthogonal superposition or on nonlinear manifolds. The controls of Table 15 test the first assumption in our setting: the high-variance singular directions carry the computation, while random subspaces of equal rank do not. In the MLP the distinction is weaker, because the sufficient subspace spans most of the directions.

Output Counts under Other Criteria

Table 16 gives the directions of W1W_1 needed under four output-based criteria: outputs within 10% (doutd_{\mathrm{out}}) and 5%, per-input centered outputs within 10%, and per-input margins within 10%. Centering changes nothing for the MSE models. The margin criterion lies between accuracy and the full outputs: it narrows from 124 to 113 directions between steps 11,000 and 20,000 and widens again to 121, much less than d0.99d_{0.99} (119 to 65 to 89). For the cross-entropy MLPs, every output-based criterion narrows only after the onset.

Table 16: Output counts in the MLP (directions of W1W_1 out of 128, mean over seeds, test inputs unless noted). doutd_{\mathrm{out}} and Out05: outputs within 10% and 5% (centered for CE). Cen10: per-input centered outputs within 10%. Marg10: per-input margins within 10%.

ModelCheckpointd0.99d_{0.99}doutd_{\mathrm{out}}Out05Cen10Marg10Median margin
MSE, mainstep 0–116.4123.8116.3102.2−0.004
step 11,000119.3122.4126.6122.7123.80.025
step 20,00064.9122.3125.7122.4113.10.470
end89.1127.3127.9127.3121.40.611
end, training inputs88.0127.3127.9127.5121.10.649
MSE, random labelsend, training inputs–123.0127.0123.2116.60.110
end, test inputs–121.4126.0121.6108.0−0.229
MSE, abab mod 97last before tgt_g115.9122.1126.3122.3117.50.052
first after tgt_g97.5122.5126.3122.5112.70.155
step 20,00064.7121.7125.1121.7112.40.481
end89.8126.2126.9126.2120.70.653
MSE, (a+b)(a+b) mod 113last before tgt_g117.7123.9127.1124.2123.10.048
first after tgt_g79.4124.3127.1124.4115.30.232
step 20,00070.9124.3126.9124.3114.10.275
end85.5127.4127.9127.4121.50.501
CE, lr 3×10−33 \times10^{-3}last before tgt_g112.8121.4125.8121.4120.83.78
first after tgt_g91.8119.0125.4119.0112.65.86
end50.681.099.881.068.09.43
CE, lr 10−210^{-2}last before tgt_g104.6120.2125.8120.2117.84.22
first after tgt_g98.6119.8125.8119.8115.64.86
end48.469.671.869.665.810.20

Table 16.

Cross-Seed Equivalence

For a source model AA and a receiving model BB, we compute AA’s post-activations ZAZ_A on AA’s test inputs and decode them with BB’s readout WB2W_B^2, either directly or after the orthogonal map R⋆=arg min⁡R⊤R=I∥ZAR−ZB∥FR^\star= \operatorname*{arg\,min}_{R^\top R=I} \lVert Z_A R-Z_B\rVert_F fitted on AA’s training inputs [34], and measure accuracy against the true labels (a+b)(a+b) mod 97 (Table 17). Rows with random-label models test specificity in one direction only: a readout trained on random labels cannot decode the true labels from any representation, so only transplants into a grokked readout are informative. The step-10,000 checkpoint of each seed (at least 99% training and 37.0±8.0%37.0 \pm8.0\% test accuracy) already partly generalizes, so its rows do not isolate a memorizing representation.

Subspace overlap. Figure 7 shows the Fourier power spectrum of W1W_1 for six seeds. Overlaps are mean cosines of the principal angles between the top-60 weight subspaces of W1W_1 (in the 194-dimensional input space), and between 10-dimensional Fourier subspaces built from each seed’s five strongest frequencies (a cosine and a sine for each, with ff and p−fp-f treated as one frequency), over all 105 seed pairs, with random baselines simulated for the same dimensions. A few individual directions are shared: per seed pair, 5.78±1.975.78 \pm1.97 of the top-60 directions have a counterpart with cosine above 0.9, against 1.38 expected for random subspaces.

Fourier power spectra of $W_1$ for six seeds

Figure 7. Fourier power spectra of W1W_1 for six seeds (share of power per frequency, ff and p−fp-f combined).

Phase structure and robustness. For each of the 128 hidden units, the phases of its dominant frequency on operands aa and bb are spread over the whole circle, and their differences are close to uniform (Figure 8a). There are no discrete phase families, consistent with the analytical solutions of Gromov [ [11], in which each unit’s phases are free parameters. Adding Gaussian noise with standard deviation σ\sigma times the standard deviation of each weight matrix to W1W_1 and W2W_2 lowers test accuracy to 71% at σ=0.3\sigma= 0.3, 14% at σ=0.6\sigma= 0.6 and 5% at σ=0.9\sigma= 0.9 (Figure 8b, seed 0, step 10510^5).

Phase alignment

(a) Phase alignment.

Weight perturbation robustness

(b) Weight perturbation robustness.

Figure 8. Phase structure and robustness of the MLP solution (seed 0).

Timing, Replication and Rank Interventions

Timing of Compression

Table 18 summarizes the timing of compression in both architectures.

Steepest-decrease measure. The steepest decrease used in § 6 is the step of the most negative central-difference derivative of the effective rank after a centered moving average over five logged steps (np.convolve in same mode, then np.gradient). Each smoothed value belongs to the logged step at its center, so the smoothing adds no delay. The zero-padded average distorts the last two logged steps and the central difference a third, so we exclude the last four. On synthetic signals the measure places a ramp exactly and a sharp step two logging intervals early (Figure 10), so any bias shortens the measured lag. It falls after tgt_g in 13 of 14 transformer seeds of 0–14 (the exception: 250 steps before tgt_g) and in 14 of 15 held-out seeds (the fifteenth at tgt_g). Figure 9 shows the effective rank of WinW_{\mathrm{in}} and the test accuracy of the 14 grokked transformer seeds aligned at tgt_g. Counting the decay of the initialization, 31±4%31 \pm4\% of the decrease of WinW_{\mathrm{in}} happens after tgt_g (WEW_E: 22%, WOW_O: 27%, WUW_U: 37%, WoutW_{\mathrm{out}}: 38%, WVW_V: 62%).

Synthetic check of the steepest-drop measure

Figure 10. Synthetic check of the steepest-drop measure (logging every 250 steps). Left: a sharp step at step 12,000 is located two logging intervals early, because the derivative of the centered average is tied over several steps and the earliest is taken. Right: a 1,000-step ramp centered on step 12,000 is located exactly.

MLP (15 seeds)Transformer (29 grokked)
Memorization step tfitt_{\mathrm{fit}}9,133 ±\pm 297250 in all seeds
Grokking onset tgt_g12,633 ±\pm 29711,914 ±\pm 4,116
Start of compression −tg-t_gtct_c: 6,367 ±\pm 3,248 (15/15 >0> 0)tont_{\mathrm{on}}: −1,888±992-1,888 \pm992 (28/29 after t10t_{10})
Steepest ER decrease −tg-t_g9,667 ±\pm 3,320 (15/15 >0> 0)905 ±\pm 506 (27/29 >0> 0)
Share of ER decrease after tgt_g0.99 ±\pm 0.020.63 ±\pm 0.09a^a

Table 18. Timing of compression (mean ±\pm s.d., in steps). tct_c is the first step at which ER falls below 99% of its running maximum. tont_{\mathrm{on}} and tst_s are the start and the steepest point of the effective-rank drop of WinW_{\mathrm{in}} after the initialization decay. t10t_{10} is the first step with test accuracy ≥10%\ge10\%. a^aFrom the plateau after the initialization decay. Including the decay, 0.32 ±\pm 0.05.

Lead and lag in the MLP. Figure 11 shows that the compression onset follows the grokking onset in every MLP seed, and that the cross-correlation of the derivatives of effective rank and test accuracy has its trough at +12,500 steps.

Figure 11: Compression lags grokking in every MLP seed.

Granger tests. Granger causality [10] tests whether the past of one time series improves the prediction of another beyond that series’ own past. It measures temporal predictive asymmetry, not interventional causation. We use the first differences of effective rank and test accuracy, logged every 500 steps, with lag order L≤4L \le4 chosen by the Akaike information criterion. Augmented Dickey–Fuller tests find these differences stationary in only 8 and 13 of 15 seeds, so we repeat the test after differencing further until the series are stationary in every seed. Changes in test accuracy predict changes in effective rank in every seed in both versions, and the reverse holds in at most 6 of 15 (Table 19). Since test accuracy is flat at 100% for most of training, these tests largely restate the order of the two pulses.

SeriesNull hypothesisFˉ\bar{F}pˉ\bar{p}Med. ppRejected (p<0.05p < 0.05)
First differencesCompression ↛\nrightarrow Grokking2.840.1330.0596/15
Grokking ↛\nrightarrow Compression24.770.003<0.001< 0.00115/15
Stationary (ADF)Compression ↛\nrightarrow Grokking2.440.2570.1264/15
Grokking ↛\nrightarrow Compression19.770.003<0.001< 0.00115/15

Table 19. Granger tests (temporal predictive asymmetry) across 15 MLP seeds.

Networks That Memorize Without Grokking

Transformers. Table 20 compares the second effective-rank drop of WinW_{\mathrm{in}} in the 29 grokked transformer seeds with the seven runs that memorize the training set without generalizing. All runs memorize the training set by step 250. In grokked seeds, the effective rank of WinW_{\mathrm{in}} falls by 60±5%60 \pm5\% between step 4,000 and the end of training, with a peak rate of 10.4±2.010.4 \pm2.0 units per 1,000 steps. In non-grokked runs it falls by 15–23%, at 2.1–4.6 units per 1,000 steps.

RunFinal test acc. (%)Peak rate (per 1,000 steps)Relative change, step 4,000 →\to end
Grokked (29 seeds)≥95\ge95−10.4±2.0-10.4 \pm2.0−0.60±0.05-0.60 \pm0.05
wd 1.0, seed 128.2−4.0-4.0−0.15-0.15
wd 0.1, seeds 0–21.8–4.3−2.1-2.1 to −2.3-2.3−0.22-0.22 to −0.23-0.23
wd 0.3, seeds 0–29.1–13.2−4.3-4.3 to −4.6-4.6−0.17-0.17 to −0.19-0.19

Table 20. Effective rank of WinW_{\mathrm{in}} after the initialization decay (transformer). Peak rate: steepest smoothed decrease after step 4,000.

Start of the drop. The start tont_{\mathrm{on}} of the drop is the first logged step of the contiguous stretch before tst_s in which the smoothed decrease is at least 20% of its peak rate. It falls between the steps at which test accuracy first exceeds 10% and 50% in most seeds: ton−t10=3,095±3,778t_{\mathrm{on}} - t_{10} = 3{,}095 \pm3{,}778 steps (28 of 29 non-negative, median 1,750) and ton−t50=−828±964t_{\mathrm{on}} - t_{50} = -828 \pm964 (4 of 29 non-negative). Three seeds have t10=500t_{10} = 500 from an early fluctuation of test accuracy, which inflates the mean of the first difference. Test accuracy at tont_{\mathrm{on}} is 34±22%34 \pm22\%, and 37% of the post-plateau decrease happens before tgt_g.

Matched steps. Table 21 gives the variance counts at steps 10,000–15,000. At step 5,000, before any seed has generalized, the 29 grokked seeds and the non-grokked seed at the same weight decay have nearly the same counts (73.5±3.973.5 \pm3.9 against 75 for WinW_{\mathrm{in}}, 65.2±2.165.2 \pm2.1 against 70 for WUW_U), while the runs at weight decay 0.1 and 0.3 have higher counts (113 and 92 for WinW_{\mathrm{in}}), a weight-decay effect. At step 20,000, 28 seeds have generalized and their counts are 32.3±4.732.3 \pm4.7, 21.4±7.021.4 \pm7.0, 15.2±7.015.2 \pm7.0 and 24.5±5.324.5 \pm5.3 for WEW_E, WinW_{\mathrm{in}}, WoutW_{\mathrm{out}} and WUW_U, against 48, 78, 68 and 64 for the non-grokked seed.

MLPs trained on random labels. Figure 12 shows the effective rank and training accuracy of the five random-label MLPs next to the grokked ones. The random-label networks reach 90% training accuracy at step 7,300±2747,300 \pm274, end at 84±2%84 \pm2\%, and their effective rank falls from 115.0±0.1115.0 \pm0.1 to 113.7±0.4113.7 \pm0.4 (1.1±0.3%1.1 \pm0.3\%), against 116.1±0.4116.1 \pm0.4 to 104.0±2.1104.0 \pm2.1 (10.5±1.8%10.5 \pm1.8\%) in grokked networks.

Effective rank and training accuracy of grokked and random-label MLPs

Figure 12. MLPs that memorize without generalizing barely compress. Effective rank of W1W_1 (left) and training accuracy (right) for 15 grokked MLPs (blue) and 5 random-label MLPs (red).

Replication on Held-Out Seeds and Tasks

Data. H1 uses the transformer exactly as in the main experiments (weight decay 1.0, 25,000 steps) with seeds 15–29, which were trained only after the timing measure had been defined on seeds 0–14. H2–H5 use the MLP exactly as in the main runs, on ab mod 97ab \bmod97 and (a+b) mod 113(a+b) \bmod113, with seeds 0–14 per task. H6 uses the same MLP with W1=ABW_1 = AB, r∈{128,64,32}r \in\{128, 64, 32\}, seeds 0–2 per task and rank. The analysis scripts are in the code repository.

Definitions. tgt_g is the first logged step with test accuracy ≥95%\ge95\%. A run counts as grokked if its final test accuracy is ≥95%\ge95\%, and only grokked runs enter the tests. tst_s is the logged step with the most negative derivative of the five-point moving average of the effective rank, over logged steps from step 4,000 (transformer, WinW_{\mathrm{in}}) or 1,000 (MLP, W1W_1) up to four logging intervals before the end. tct_c is the first logged step ≥1,000\ge1,000 at which the effective rank of W1W_1 falls below 99% of its running maximum. d0.99(s)d_{0.99}(s) is the smallest kk whose top-kk truncation of W1W_1 keeps ≥99%\ge99\% of the test accuracy of checkpoint ss. sgs_g is the first saved checkpoint ≥tg\ge t_g, s+s_+ the first saved checkpoint ≥tg+5,000\ge t_g + 5{,}000 that is not the final one, and sends_{\mathrm{end}} the final checkpoint.

Tests. All tests are one-sided at α=0.05\alpha= 0.05 and run separately per task, and every result is reported. H1: ts−tg>0t_s - t_g > 0 (one-sample tt-test, with the number of seeds with ts>tgt_s > t_g and an exact sign test). H2: tc−tg>0t_c - t_g > 0 and H3: ts−tg>0t_s - t_g > 0 (one-sample tt-tests). H4: d0.99(sg)>d0.99(s+)d_{0.99}(s_g) > d_{0.99}(s_+) and H5: d0.99(send)>d0.99(s+)d_{0.99}(s_{\mathrm{end}}) > d_{0.99}(s_+) (paired tt-tests). H6 (descriptive): the factorized full-rank model groks earlier than the unfactorized one, and tgt_g increases as rr decreases from 128 to 64 to 32.

Results. Every test is significant at α=0.05\alpha= 0.05 (Table 22, Table 24 and Table 23, and Table 27 for H6). With a Bonferroni correction over the nine tt-tests, H4 on (a+b)(a+b) mod 113 is not. For H1, the 95% confidence interval of ts−tgt_s - t_g is [560, 1,140] steps (median 750), and the exact sign test gives p=4.9×10−4p = 4.9 \times10^{-4}. Twice the number of frequencies holding 99% of the Fourier power of W1W_1 is 90.0±2.490.0 \mathbin{\pm} 2.4 for abab mod 97 (Fourier transform over the nonzero residues ordered by the discrete logarithm base 5) against d0.99=89.8±2.0d_{0.99} = 89.8 \mathbin{\pm} 2.0, but 105.5±2.1105.5 \mathbin{\pm} 2.1 for (a+b)(a+b) mod 113 against d0.99=85.5±3.2d_{0.99} = 85.5 \mathbin{\pm} 3.2, so the frequency count does not predict d0.99d_{0.99} in general (§ 8). Multiplication loses a little test accuracy late in training, from 100.0% at step 30,000 to 99.7±0.3%99.7 \mathbin{\pm} 0.3\% at the end. doutd_{\mathrm{out}}, which H4 and H5 do not use, does not narrow on either task: it is 121.7–127.4 at every checkpoint (Table 16).

abab mod 97(a+b)(a+b) mod 113
Grokked15/1515/15
tgt_g12,633 ±\mathbin{\pm} 29715,567 ±\mathbin{\pm} 417
tct_c18,933 ±\mathbin{\pm} 1,49822,267 ±\mathbin{\pm} 4,629
H2: tc−tgt_c-t_g6,300 ±\mathbin{\pm} 1,4616,700 ±\mathbin{\pm} 4,519
15/15, t=16.70t=16.70, p=6.1×10−11p=6.1 \times10^{-11}15/15, t=5.74t=5.74, p=2.6×10−5p=2.6 \times10^{-5}
H3: ts−tgt_s-t_g9,800 ±\mathbin{\pm} 2,27411,867 ±\mathbin{\pm} 6,741
15/15, t=16.69t=16.69, p=6.2×10−11p=6.2 \times10^{-11}15/15, t=6.82t=6.82, p=4.2×10−6p=4.2 \times10^{-6}
H4: d0.99(sg)−d0.99(s+)d_{0.99}(s_g)-d_{0.99}(s_+)32.9 ±\mathbin{\pm} 13.710.8 ±\mathbin{\pm} 16.8
15/15, t=9.31t=9.31, p=1.1×10−7p=1.1 \times10^{-7}12/15, t=2.49t=2.49, p=0.013p=0.013
H5: d0.99(send)−d0.99(s+)d_{0.99}(s_{\mathrm{end}})-d_{0.99}(s_+)25.1 ±\mathbin{\pm} 2.916.9 ±\mathbin{\pm} 3.1
15/15, t=33.01t=33.01, p=5.6×10−15p=5.6 \times10^{-15}15/15, t=20.98t=20.98, p=2.8×10−12p=2.8 \times10^{-12}
Share of the ER(W1W_1) decrease after tgt_g1.00±0.011.00 \mathbin{\pm} 0.010.98±0.020.98 \mathbin{\pm} 0.02
d0.99d_{0.99} at the end89.8±2.089.8 \mathbin{\pm} 2.085.5±3.285.5 \mathbin{\pm} 3.2
Top / bottom / random-subspace truncation (%)99.10 / 36.84 / 20.6899.08 / 27.93 / 33.03

Table 23. H2–H5 on the two further MLP tasks (15 seeds each, mean ±\mathbin{\pm} s.d.). Below each test, the number of seeds with a positive difference, the tt statistic and the one-sided pp.

Seedtgt_gts−tgt_s-t_gSeedtgt_gts−tgt_s-t_gSeedtgt_gts−tgt_s-t_g
157,000+5002017,500+5002517,750+250
1612,500+1,000218,0000268,750+500
177,500+7502213,000+1,0002715,750+750
1817,000+1,0002316,500+1,750288,500+750
197,500+7502410,250+2,000298,250+1,250

Table 24. H1 per seed: held-out transformer seeds, tgt_g and ts−tgt_s-t_g (steps).

Table 27: Factorization runs on the two further tasks (H6) (3 seeds per arm, unfactorized: main seeds 0–2).

TaskModelGrokkedtgt_gFinal test acc. (%)Final ER(W1W_1)
abab mod 97Unfactorized W1W_13/312,833 ±\pm 28999.7 ±\pm 0.4102.3 ±\pm 0.7
W1=ABW_1 = AB, r=128r = 1283/32,000 ±\pm 0$ | 99.3 ±\pm 0.7 | 85.6 ±\pm 1.4
W1=ABW_1 = AB, r=64r = 643/32,667 ±\pm 289100.0 ±\pm 0.047.9 ±\pm 0.2
W1=ABW_1 = AB, r=32r = 323/34,667 ±\pm 28999.0 ±\pm 0.530.1 ±\pm 0.2
(a+b)(a+b) mod 113Unfactorized W1W_13/315,333 ±\pm 289100.0 ±\pm 0.0109.5 ±\pm 1.8
W1=ABW_1 = AB, r=128r = 1283/32,000 ±\pm 0$ | 100.0 ±\pm 0.0 | 89.9 ±\pm 2.1
W1=ABW_1 = AB, r=64r = 643/33,000 ±\pm 0100.0 ±\pm 0.047.0 ±\pm 5.1
W1=ABW_1 = AB, r=32r = 323/34,500 ±\pm 099.2 ±\pm 0.929.6 ±\pm 0.5

Table 27.

  • p<0.05p < 0.05. The largest pp is 0.013 (H4, (a+b)(a+b) mod 113). H1–H3 use one-sample tt-tests, H4 and H5 paired tt-tests, and H6 is descriptive, with 3 seeds per arm. sgs_g is the first checkpoint at or after tgt_g, s+s_+ the first checkpoint at least 5,000 steps later, and sends_{\mathrm{end}} the final checkpoint.

Truncations keep k=d0.99k=d_{0.99} directions. Chance accuracy: 1.03% (p=97p=97) and 0.88% (p=113p=113). For (a+b)(a+b) mod 113, sgs_g is step 20,000 in 12 seeds. The three seeds with sgs_g at step 15,000 narrow from 106, 111 and 115 directions to 66, 71 and 67.

Forcing Low Rank

Table 25 and Figure 13 report the MLP rank interventions summarized in § 6.4. Table 26 shows that the factorization alone biases W1W_1 toward low rank, and Table 27 repeats the factorization on the two further tasks. Table 28 and Figure 14 repeat the factorized control and two rank caps with logging every 50 steps, on the same seeds as above. The full-rank factorization groks 7.5±0.17.5 \pm0.1, 7.2±0.17.2 \pm0.1 and 8.4±0.28.4 \pm0.2 times sooner than the unfactorized model on the three tasks. Its effective rank dips early, rises to its maximum at the onset and falls afterwards.

Forcing low rank from initialization

Figure 13. (a) Rank-constrained parameterization W1=ABW_1 = AB. (b) Nuclear-norm penalty from step 0. Figure 13: Forcing low rank from initialization (mean test accuracy and effective rank of W1W_1 against training step).

Table 26: The factorization biases W1W_1 toward low rank. Effective rank of W1=ABW_1 = AB with r=128r = 128 and of the unfactorized W1W_1 (seeds 0–2, (a+b)(a+b) mod 97). The factorized model groks at step 2,000, the unfactorized one at 12,833 ±\pm 289.

StepW1=ABW_1 = AB, r=128r = 128Unfactorized W1W_1
092.7 ±\pm 0.3114.6 ±\pm 0.1
50079.7 ±\pm 1.0114.5 ±\pm 0.1
1,00097.4 ±\pm 0.6114.5 ±\pm 0.1
1,500105.5 ±\pm 0.3114.6 ±\pm 0.2
2,000105.9 ±\pm 0.3114.7 ±\pm 0.2
3,000102.4 ±\pm 2.0114.9 ±\pm 0.2
5,00094.8 ±\pm 3.3115.1 ±\pm 0.1
10,00089.8 ±\pm 2.7115.9 ±\pm 0.1
20,00088.5 ±\pm 2.1115.1 ±\pm 0.4

Table 26.

Table 28: Factorized MLPs logged every 50 steps (3 seeds each, mean ±\pm s.d.). ER: effective rank of W1=ABW_1 = AB.

TaskModeltgt_gER minimum before tgt_g (step)ER at tgt_gER at step 8,000
(a+b)(a+b) mod 97unfactorized12,483 ±\pm 340–116.2 ±\pm 0.2–
r=128r = 1281,667 ±\pm 5876.9 ±\pm 0.7 (333)106.3 ±\pm 0.590.7 ±\pm 3.1
r=64r = 642,450 ±\pm 10049.3 ±\pm 0.2 (267)60.5 ±\pm 0.152.5 ±\pm 6.1
r=32r = 324,133 ±\pm 2928.2 ±\pm 0.2 (300)31.5 ±\pm 0.131.0 ±\pm 0.2
abab mod 97unfactorized12,567 ±\pm 189–115.6 ±\pm 0.6–
r=128r = 1281,750 ±\pm 073.8 ±\pm 0.6 (300)106.0 ±\pm 1.387.3 ±\pm 1.5
(a+b)(a+b) mod 113unfactorized15,233 ±\pm 293–117.6 ±\pm 0.2–
r=128r = 1281,817 ±\pm 2978.6 ±\pm 0.0 (333)108.5 ±\pm 0.593.4 ±\pm 2.3

Table 28.

Effective rank of factorized MLPs

Figure 14. Effective rank of factorized MLPs (W1=ABW_1 = AB with r=128r = 128, 64 and 32, logged every 50 steps, 3 seeds each).

Label-Free Onset Detection

Table 29 reports the onset detectors summarized in Section 6.5, and Figure 16 the Fourier IPR of one MLP seed. In the MLP, the Fourier IPR fires at or just after the end of the baseline window, so its lead is set by the window, tg−Wt_g - W. Spectral IPR, effective rank and stable rank of W1W_1 change after tgt_g (early in at most 2 of 15 seeds, with median leads from −8,000-8{,}000 to −23,500-23{,}500 steps). For the transformer, “early” is counted out of the seeds with tg>Wt_g > W, the only ones that can be early. Of 63 metric, window and threshold combinations tested on the MLP, only the gradient norm (window 5,000, threshold 3σ3\sigma) detected grokking early in all seeds without false alarms. Given the number of combinations, we regard this as exploratory.

Fourier IPR of $W_1$ and test accuracy

Figure 16. Fourier IPR of W1W_1 (blue) and test accuracy (red), MLP seed 0.

Transformer: Additional Results

Dimensionality at the End of Training

Table 30 gives the variance counts and d0.99d_{0.99} of every analyzed matrix, and Figure 15 the singular value spectra for one seed. Averaged over seeds at fixed steps, d0.99d_{0.99} mixes seeds before and after their onsets: d0.99(Win)d_{0.99}(W_{\mathrm{in}}) falls from 18.2±7.218.2 \pm7.2 at step 10,000 (mean test accuracy 57±40%57 \pm40\%) to 12.4±1.512.4 \pm1.5 at step 20,000, and d0.99(WE)d_{0.99}(W_{\mathrm{E}}) from 19.4±9.919.4 \pm9.9 to 7.7±1.57.7 \pm1.5. Aligned at each seed’s own onset (Table 5), doutd_{\mathrm{out}} narrows during the rise in test accuracy. Table 31 compares the final counts with those of the MLP.

Transformer singular value spectra

Figure 15. Transformer singular value spectra (seed 0) for WEW_E, WQW_Q, WKW_K, WVW_V, WOW_O, WinW_{\mathrm{in}}, WoutW_{\mathrm{out}}, WUW_U and the MLP post-activations, with the 95% and 99% variance thresholds.

Dense Time Course

All transformer runs were repeated with a checkpoint every 250 steps. For each grokked seed we compute doutd_{\mathrm{out}} of WEW_{\mathrm{E}}, WinW_{\mathrm{in}}, WoutW_{\mathrm{out}} and WUW_U at every checkpoint within 3,000 steps of its tgt_g, testing every kk from 1 upward. The restricted and excluded losses follow Nanda et al. [ [28] in output space: for each input, we keep (restricted) or remove (excluded) the components of the centered residue logits along cos⁡(2πwc/p)\cos(2\pi wc/p) and sin⁡(2πwc/p)\sin(2\pi wc/p) for the five key frequencies ww of WEW_{\mathrm{E}}, and evaluate the cross-entropy on the training set. For each curve, the midpoint is the first checkpoint at which the count falls below the midpoint between its value at the start of the window and its final value. The restricted loss uses the same rule, and the excluded loss the first checkpoint above the midpoint of its rise. The midpoints relative to tgt_g are: WEW_E +26 ±\pm 488 steps (11 of 29 seeds before tgt_g), WinW_{\mathrm{in}} −862 ±\pm 503 (29 of 29), WoutW_{\mathrm{out}} −957 ±\pm 328 (29 of 29), WUW_U −741 ±\pm 375 (28 of 29), restricted loss −1,966 ±\pm 647 and excluded loss −1,026 ±\pm 646.

Table 32 gives doutd_{\mathrm{out}} for the runs that never generalize. They narrow slowly, most at weight decay 0.3, where test accuracy also creeps up to 9–13%, but at the end of training they remain two to nine times wider than the grokked seeds.

RunStepWEW_EWinW_{\mathrm{in}}WoutW_{\mathrm{out}}WUW_UTest acc. (%)
wd 1.0, seed 125,000313364702.8
end232649558.2
wd 0.1, seeds 0–25,00045–4742–4374–7781–841.0–2.8
end35–3835–3767–6978–831.8–4.3
wd 0.3, seeds 0–25,00040–4238–4071–7379–821.2–2.9
end29–3030–3148–5253–599.1–13.2
Grokked (29), tgt_g + 3,000–8.6 ±\pm 2.013.8 ±\pm 1.79.0 ±\pm 1.88.9 ±\pm 1.7100.0

Table 32. Runs that never generalize: doutd_{\mathrm{out}} (centered logits within 10%, test inputs) at step 5,000 and at the end of training, with grokked seeds 3,000 steps after their onset for comparison.

Runs That Never Grok and Attention Projections

Table 33 lists the seven transformer runs that did not reach 95% test accuracy within 25,000 steps. WQW_Q has rank 4 in all of them, and WKW_K in those trained with weight decay of at least 0.3. At weight decay 0.1, where the random initialization has not yet decayed, WKW_K keeps 18–19 directions. The rank-4 structure of WQW_Q and WKW_K, one direction per head, is architectural rather than a signature of grokking: only the attention pattern of the final position, which always holds the “=” token, affects the output, so each head’s query is a single vector and the gradients of its query and key projections have rank one.

Residual-Stream Alignment

Consecutive components communicate through shared subspaces of the 128-dimensional residual stream, but this is not specific to grokking (Table 34). What attention writes is almost exactly what the MLP reads (0.923 ±\pm 0.035), and what the MLP writes is what the unembedding reads (0.885 ±\pm 0.078), whereas the MLP’s own read and write subspaces are only weakly aligned (0.330 ±\pm 0.050). The attention-to-MLP alignment is equally high in the non-grokked runs (0.839–0.947). For a matrix that reads from the residual stream (Win,WUW_{\mathrm{in}}, W_U), its read subspace is spanned by its top-kk left singular vectors. For a matrix that writes to it (WO,WoutW_O, W_{\mathrm{out}}), its write subspace is spanned by its top-kk right singular vectors. For two subspaces with orthonormal bases U,V∈R128×kU,V \in\mathbb{R}^{128 \times k}, the principal angles are the arccosines of the singular values of UTVU^\mathsf{T}V, and we report the mean of their cosines, with k=11=2×5k=11=2\times5 key frequencies +1. The key-frequency subspace of WEW_E is spanned by the images under WE⊤W_E^{\top} of the cosine and sine of each of its five strongest frequencies and of the constant vector. Random baselines average 300 pairs of independent random subspaces.

Representational Geometry

Transformer logits are dominated by a few frequencies, while the MLP’s representations are not (Figure 17). Five frequencies carry 87.9% of the logit power (seed 0, after removing each input’s mean logit). The first two principal components of the transformer’s logits carry 54.9% and 31.4% of their variance and show clusters of nearby classes, and projected on the strongest frequency (f⋆=41f^{\star} = 41) the logits lie on a ring ordered by 41(a+b) mod 9741(a+b)\bmod97. The first two principal components of the MLP’s pre- and post-activations carry only 4.0%/3.5% and 6.5%/5.7% of the variance and show no ring, consistent with the dozens of frequencies the MLP uses (§ 8).

Representational geometry plots

Figure 17. (a) Transformer logits: first two principal components (left) and projection on the dominant logit frequency (right), colored by 41(a+b) mod 9741(a+b)\bmod97.

(b) MLP pre-activations (left) and post-activations (right): first two principal components, colored by (a+b) mod 97(a+b)\bmod97.

Representational geometry (seed 0).

References

  1. [1]Roman Abramov, Felix Steinbauer, and Gjergji Kasneci. Grokking in the wild: Data augmentation for real-world multi-hop reasoning with transformers. In Proceedings of the 42nd International Conference on Machine Learning, Proceedings of Machine Learning Research, 2025. URL https://proceedings.mlr.press/v267/abramov25a.html.arxiv.org/abs/2504.20752
  2. [2]Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the Optimization of Deep Networks: Implicit Acceleration by Overparameterization. In International Conference on Machine Learning, 2018. URL https://mlanthology.org/icml/2018/arora2018icml-optimization/.
  3. [3]Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. In Advances in Neural Information Processing Systems, 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/c0c783b5fc0d7d808f1d14a6e9c8280d-Paper.pdf.arxiv.org/abs/1905.13655
  4. [4]Trenton Bricken, Adly Templeton, Joshua Batson, Brian Chen, Adam Jermyn, Tom Conerly, Nick Turner, Cem Anil, Carson Denison, Amanda Askell, Robert Lasenby, Yifan Wu, Shauna Kravec, Nicholas Schiefer, Tim Maxwell, Nicholas Joseph, Zac Hatfield-Dodds, Alex Tamkin, Karina Nguyen, Brayden McLean, Josiah E. Burke, Tristan Hume, Shan Carter, Tom Henighan, and Christopher Olah. Towards monosemanticity: Decomposing language models with dictionary learning. Transformer Circuits Thread, 2023. URL https://transformer-circuits.pub/2023/monosemantic-features/index.html.
  5. [5]Bilal Chughtai, Lawrence Chan, and Neel Nanda. A toy model of universality: Reverse engineering how networks learn group operations. In Proceedings of the 40th International Conference on Machine Learning, 2023. URL https://proceedings.mlr.press/v202/chughtai23a.html.arxiv.org/abs/2302.03025
  6. [6]Hoagy Cunningham, Aidan Ewart, Logan Riggs, Robert Huben, and Lee Sharkey. Sparse autoencoders find highly interpretable features in language models. In International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=F76bwRSLeK.arxiv.org/abs/2309.08600
  7. [7]Xander Davies, Lauro Langosco, and David Krueger. Unifying grokking and double descent, 2023. URL https://arxiv.org/abs/2303.06173.
  8. [8]Branton DeMoss, Silvia Sapora, Jakob Foerster, Nick Hawes, and Ingmar Posner. The complexity dynamics of grokking. Physica D: Nonlinear Phenomena, 2025. URL https://www.sciencedirect.com/science/article/pii/S0167278925003367.DOI
  9. [9]Darshil Doshi, Aritra Das, Tianyu He, and Andrey Gromov. To grok or not to grok: Disentangling generalization and memorization on corrupted algorithmic datasets. In International Conference on Learning Representations, 2024. URL https://arxiv.org/abs/2310.13061.
  10. [10]C. W. J. Granger. Investigating causal relations by econometric models and cross-spectral methods. Econometrica, 1969.
  11. [11]Andrey Gromov. Grokking modular arithmetic. arXiv:2301.02679, 2023. URL https://arxiv.org/abs/2301.02679.
  12. [12]Guy Gur-Ari, Daniel A. Roberts, and Ethan Dyer. Gradient descent happens in a tiny subspace. arXiv preprint arXiv:1812.04754, 2018. URL https://arxiv.org/abs/1812.04754.
  13. [13]Minyoung Huh, Hossein Mobahi, Richard Zhang, Brian Cheung, Pulkit Agrawal, and Phillip Isola. The low-rank simplicity bias in deep networks. Transactions on Machine Learning Research, 2023. URL https://arxiv.org/abs/2103.10427.
  14. [14]Ahmed Imtiaz Humayun, Randall Balestiero, and Richard Baraniuk. Deep networks always grok and here is why. In Proceedings of the 41st International Conference on Machine Learning, 2024. URL https://proceedings.mlr.press/v235/humayun24a.html.
  15. [15]Prakhar Kaushik, Shravan Chaudhari, Ankit Vaidya, Rama Chellappa, and Alan Yuille. The universal weight subspace hypothesis, 2025a. URL https://arxiv.org/abs/2512.05117.
  16. [17]Tanishq Kumar, Blake Bordelon, Samuel J. Gershman, and Cengiz Pehlevan. Grokking as the transition from lazy to rich training dynamics. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=vt5mnLVIvo.
  17. [18]Ruian Lei and Zenglin Xu. Geometric compression in grokking: The three-stage modular dynamics of transformers, 2026. URL https://openreview.net/forum?id=27fc8hXB5N.
  18. [19]Chunyuan Li, Heerad Farkhoor, Rosanne Liu, and Jason Yosinski. Measuring the intrinsic dimension of objective landscapes. In International Conference on Learning Representations, 2018. URL https://arxiv.org/abs/1804.08838.
  19. [20]Ziming Liu, Eric J. Michaud, and Max Tegmark. Omnigrok: Grokking beyond algorithmic data. In International Conference on Learning Representations, 2023a. URL https://arxiv.org/abs/2210.01117.
  20. [21]Ziming Liu, Ziqian Zhong, and Max Tegmark. Grokking as simplification: A nonlinear complexity perspective. In UniReps: the First Workshop on Unifying Representations in Neural Models, 2023b.
  21. [23]Neil Mallinar, Daniel Beaglehole, Libin Zhu, Adityanarayanan Radhakrishnan, Parthe Pandit, and Mikhail Belkin. Emergence in non-neural models: Grokking modular arithmetic via average gradient outer product. In Proceedings of the 42nd International Conference on Machine Learning, 2025. URL https://arxiv.org/abs/2407.20199.
  22. [24]William Merrill, Nikolaos Tsilivis, and Aman Shukla. A tale of two circuits: Grokking as competition of sparse and dense subnetworks. arXiv preprint arXiv:2303.11873, 2023. URL https://arxiv.org/abs/2303.11873.
  23. [27]Tiberiu Musat. The geometry of grokking: Norm minimization on the zero-loss manifold. arXiv:2511.01938, 2025. URL https://arxiv.org/abs/2511.01938.
  24. [28]Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. Progress measures for grokking via mechanistic interpretability. In International Conference on Learning Representations, 2023. URL https://arxiv.org/abs/2301.05217.
  25. [29]Alethea Power, Yuri Burda, Harri Edwards, Igor Babuschkin, and Vedant Misra. Grokking: Generalization beyond overfitting on small algorithmic datasets. arXiv:2201.02177, 2022. URL https://arxiv.org/abs/2201.02177.
  26. [30]Lucas Prieto, Melih Barsbey, Pedro A. M. Mediano, and Tolga Birdal. Grokking at the edge of numerical stability. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=TvfkSyHZRA.arxiv.org/abs/2501.04697
  27. [32]Olivier Roy and Martin Vetterli. The effective rank: A measure of effective dimensionality. In 15th European Signal Processing Conference (EUSIPCO), 2007.
  28. [34]Peter H. Schönemann. A generalized solution of the orthogonal Procrustes problem. Psychometrika, 1966.DOI
  29. [35]Vikrant Varma, Rohin Shah, Zachary Kenton, János Kramár, and Ramana Kumar. Explaining grokking through circuit efficiency, 2023. URL https://arxiv.org/abs/2309.02390.
  30. [38]Ziqian Zhong, Ziming Liu, Max Tegmark, and Jacob Andreas. The clock and the pizza: Two stories in mechanistic explanation of neural networks. In Advances in Neural Information Processing Systems, 2023. URL https://arxiv.org/abs/2306.17844.

Paper details

vlnc:W_btp8ye5j
Version
v2 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 1

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents