Training dynamics during grokking concentrate along a small number of dominant update directions -- the spectral edge -- which reliably distinguishes grokking from non-grokking regimes. We show that standard mechanistic interpretability tools (head attribution, activation probing, sparse autoencoders) fail to capture these directions: their structure is not localized in parameter or feature space. Instead, each direction induces a structured function over the input domain, revealing low-dimensional functional modes invisible to representation-level analysis. For modular addition, all leading directions collapse to a single Fourier mode. For multiplication, the same collapse appears only in the discrete-log basis, yielding a 5.9x improvement in concentration. For subtraction, the edge spans a small multi-mode family. For x2+y2, no single harmonic basis suffices, but cross-terms of additive and multiplicative features provide a 4x variance boost, consistent with the decomposition (a+b)^2 - 2ab. Multitask training amplifies this compositional structure, with the x2+y2 spectral edge inheriting the addition circuit's characteristic frequency (2.3x concentration increase). These results suggest that training discovers low-dimensional functional modes over the input domain, whose structure depends on the algebraic symmetry of the task. These results suggest that spectral edge dynamics identify low-dimensional functional subspaces governing learning, whose representation depends on the algebraic structure of the task. Simple harmonic structure emerges only when the task admits a symmetry-adapted basis; more complex tasks require richer functional descriptions.
Figures & tables
Condition
Runs
g23 decline detected
Mean magnitude
Grokking ( wd=1.0 , 4 ops)
12
12/12 (100%)
40×
Control ( wd=0 , 4 ops)
12
0/12 (0%)
1.2×
Non-grokking ops ( wd=1.0 )
6
1/6 (17%)
1.5×
Non-grokking ops ( wd=0 )
6
0/6 (0%)
1.1×
Table 1: Spectral edge discrimination: g23 decline magnitude (ratio of early-training to post-grok values) across 36 single-task conditions. Grokking runs show 15 – 110× decline; non-grokking conditions show <2× .
Direction
Peak ω
Concentration F
Top-3 ω
v1 (edge)
26
0.33
{26,12,25}
v2 (edge)
26
0.16
{26,8,14}
v3 (edge)
25
0.40
{25,26,3}
v4 (bulk)
8
0.18
{8,26,11}
v5 (bulk)
26
0.12
{26,8,15}
uniform baseline
—
0.021
—
Table 2: Fourier profiles of spectral edge directions for modular addition. All three top directions concentrate on ω≈25 – 26 . Bulk directions (below the spectral edge) show lower and less consistent concentration.
Figure 1: The spectral edge consistently identifies low-dimensional functional structure, but its simplicity depends on the basis. (a) Addition collapses to a single Fourier mode ( ω≈25 – 26 ) under the additive basis. (b) Multiplication shows no structure in the additive basis. (c) The same multiplication data collapses to ω=29 under the discrete-log basis ( 5.9× concentration improvement for v1 ). (d) Subtraction spans a small set of modes ( ω∈{6,16,32} ). (e) x2+y2 exhibits distributed structure not captured by any single one-dimensional harmonic basis. Dashed line: uniform baseline. All spectra computed on post-grok checkpoints, seed 42.
Task
Add features
Mul features
Combined
+Cross-terms
Addition
0.17–0.29
0.02
0.18–0.31
0.29–0.40
Multiplication
0.02
0.11–0.26
0.12–0.27
0.23–0.37
x2+y2
0.01
0.02
0.03–0.04
0.15–0.16
Table 3: Multivariate probe R2 (predicting the full displacement Δhk from Fourier features). For addition and multiplication, the corresponding single-basis features explain substantial variance. For x2+y2 , neither alone suffices, but cross-terms provide a 4× boost.
Metric
Single-task
Tritask
Ratio
Additive concentration at ω=26
F=0.09
F=0.20
2.3×
Composition synergy ( v1 )
+0.024
+0.043
1.7×
Peak additive frequency
ω=17 (scattered)
ω=26 (= addition mode)
—
Table 4: Single-task vs. tritask comparison for x2+y2 . The tritask model shows stronger alignment with additive modes and larger composition synergy.
Task
Basis
Structure
Peak F
(a+b)modp
Additive characters
Single mode ( ω≈25 – 26 )
0.40
(a⋅b)modp
Discrete-log characters
Single mode ( ω=29 )
0.32
(a−b)modp
Additive characters
Multi-mode ( ω∈{6,16,32} )
0.19
(a2+b2)modp
Cross (add × mul)
Compositional
0.16†
Table 5: Hierarchy of functional structure at the spectral edge. The correct basis and the nature of the functional subspace depend on the algebraic structure of the task.
Neural network training dynamics studies how parameters and representations change during optimization and how those changes shape learning, stability, and generalization.
We decompose the spectral edge -- the dominant direction of the Gram matrix of parameter updates -- into its gradient and weight-decay components during grokking in two sequence tasks (Dyck-1 and SCAN). We find a sharp two-phase lifecycle: before grokking the edge is gradient-driven and functionally active; at grokking, gradient and weight decay align, and the edge becomes a compression axis that is perturbation-flat yet ablation-critical (>4000x more impactful than random directions). Three universality classes emerge (functional, mixed, compression), predicted by the gap flow equation. Nonlinear probes show information is re-encoded, not lost (MLP R2=0.99 where linear R2=0.86), and removing weight decay post-grok reverses compression while preserving the algorithm.
Tian (2025) proves a repulsion theorem (Theorem 6) for the matrix B=(F⊤F+ηI)−1 during the interactive feature-learning stage of grokking: similar features have negative off-diagonal entries Bjℓ, producing an effective repulsive force that drives them apart. However, the theorem does not specify when this mechanism becomes empirically observable, nor whether it leaves a measurable spectral signature in the parameter updates. We test this directly on Tian's modular addition setup (M=71, K=2048, MSE loss) and observe a clear structure-mechanism dissociation. The predicted sign rule holds robustly on the top-200 most-similar feature pairs across activations (empirical sign-match rising from 0.865 to 0.985 on σ=x2 across 5 seeds, and saturating at 1.000 on σ=ReLU). However, the spectral signature in the parameter updates is strongly activation-dependent. With σ=x2, a simple slope detector on the rolling eigengap σ2/σ3 of ΔW fires in 15/15 grokking seeds at epoch 174 (IQR [173,174]) and in 0/15 non-grokking controls, with 229× late-stage magnitude separation; the spectrum is rank-2. In contrast, with σ=ReLU, the detector never fires and the spectrum remains effectively rank-1. This dissociation aligns with Tian's Theorem 5 distinction between focused (power-law) and spreading (ReLU) memorization: while the sign structure of B depends only on F⊤F, how feature repulsion translates into weight updates critically depends on the activation derivative σ′.
Grokking -- the abrupt transition from memorization to generalization long after near-zero training loss -- has been studied mainly in single-task settings. We extend geometric analysis to multi-task modular arithmetic, training shared-trunk Transformers on dual-task (mod-add + mod-mul) and tri-task (mod-add + mod-mul + mod-sq) objectives across a systematic weight decay sweep. Five consistent phenomena emerge. (1) Staggered grokking order: multiplication generalizes first, followed by squaring, then addition, with consistent delays across seeds. (2) Universal integrability: optimization trajectories remain confined to an empirically invariant low-dimensional execution manifold; commutator defects orthogonal to this manifold reliably precede generalization. (3) Weight decay phase structure: grokking timescale, curvature depth, reconstruction threshold, and defect lead covary systematically with weight decay, revealing distinct dynamical regimes and a sharp no-decay failure mode. (4) Holographic incompressibility: final solutions occupy only 4--8 principal trajectory directions yet are distributed across full-rank weights and destroyed by minimal perturbations; SVD truncation, magnitude pruning, and uniform scaling all fail to preserve performance. (5) Transverse fragility and redundancy: removing less than 10% of orthogonal gradient components eliminates grokking, yet dual-task models exhibit partial recovery under extreme deletion, suggesting redundant center manifolds enabled by overparameterization. Together, these results support a dynamical picture in which multi-task grokking constructs a compact superposition subspace in parameter space, with weight decay acting as compression pressure and excess parameters supplying geometric redundancy in optimization pathways.