The Geometry of Multi-Task Grokking: Transverse Instability, Superposition, and Weight Decay Phase Structure
Abstract
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.
Figures & tables
| Grok (Add) | Grok (Mul) | Gap | Timescale | |
|---|---|---|---|---|
| 1.0 | fast | |||
| 0.5 | fast | |||
| 0.3 | intermediate | |||
| 0.2 | intermediate | |||
| 0.1 | slow | |||
| 0.0 | — | — | — | (never) |
| Seed | Grok (Add) | Grok (Mul) | Grok (Sq) | |
|---|---|---|---|---|
| 1.0 | 42 | 30,500 | 17,900 | 24,800 |
| 137 | 19,000 | 15,700 | 17,500 | |
| 2024 | 13,900 | 12,300 | 13,000 | |
| 0.5 | 42 | 27,000 | 24,800 | 26,200 |
| 137 | 26,800 | 25,900 | 26,800 | |
| 2024 | 25,000 | 24,300 | 24,300 |
| Seed | Ratio | First to grok | ||
|---|---|---|---|---|
| 42 | 1.54 | mul | ||
| 137 | 0.76 | mul | ||
| 2024 | 1.64 | mul |
| Grok (Add) | Grok (Mul) | (total) | (add) | (mul) | |
|---|---|---|---|---|---|
| 1.0 | |||||
| 0.5 | |||||
| 0.1 | |||||
| 0.0 | — | — |
| Mean Grok Step | Mean Onset Step | Mean Lead (steps) | Lead % | |
|---|---|---|---|---|
| 1.0 | 13,133 | 6,600 | 6,533 | 52.9% |
| 0.5 | 16,200 | 15,400 | 800 | 4.9% |
| 0.3 | 28,200 | 19,133 | 9,067 | 32.0% |
| 0.2 | 45,067 | 17,667 | 27,400 | 60.8% |
| 0.1 | 97,933 | 29,467 | 68,467 | 69.9% |
| Mean Grok Step | Mean Onset Step | Mean Lead (steps) | Lead % | |
|---|---|---|---|---|
| 1.0 | 12,089 | 1,833 | 8,900 | 82.2% |
| 0.5 | 25,333 | 5,767 | 18,800 | 76.5% |
| 0.1 | 152,356 | 5,000 | 147,144 | 96.7% |
| Final Defect Range | Integrability ( ) | Grad Cosine (same-task) | |
|---|---|---|---|
| 1.0 | 82–144 | 1.000 | 0.77–0.84 |
| 0.5 | 837–1,288 | 1.000 | 0.47–0.76 |
| 0.1 | 1.000 | 0.14–0.49 | |
| 0.0 | 0–52 | varies | 0.04–0.42 |
| Seed 42 | Seed 137 | Seed 2024 | Mean | Var. at | |
|---|---|---|---|---|---|
| 1.0 | 7 | 6 | 6 | 6.3 | 99.7–99.9% |
| 0.5 | 5 | 5 | 5 | 5.0 | 99.6–99.7% |
| 0.3 | 5 | 6 | 6 | 5.7 | 99.4–99.7% |
| 0.2 | 6 | 10 | 7 | 7.7 | 99.5–99.7% |
| 0.1 | 9 | 7 | 9 | 8.3 | 99.2–99.6% |
| Seed 42 | Seed 137 | Seed 2024 | Mean | |
|---|---|---|---|---|
| 1.0 | 5 | 5 | 3 | 4.3 |
| 0.5 | 4 | 4 | 5 | 4.3 |
| 0.3 | 7 | 5 | 7 | 6.3 |
| 0.2 | 5 | 5 | 6 | 5.3 |
| 0.1 | 5 | 5 | 8 | 6.0 |
| Delete % | Add Grok | Mul Grok | Delay |
|---|---|---|---|
| 0% | 14,100 | 14,000 | (baseline) |
| 1% | 18,100 | 18,100 | |
| 2% | 21,200 | 20,900 | |
| 3% | 23,500 | 23,300 | |
| 5% | 37,000 | 36,800 | |
| 7% | 42,600 | 42,400 |
| Delete % | Add Grok | Mul Grok | Sq Grok | Mean | Delay |
|---|---|---|---|---|---|
| 0% | 25,600 | 18,200 | 23,400 | 22,400 | (baseline) |
| 1% | 35,200 | 21,200 | 28,800 | 28,400 | |
| 2% | 42,400 | 30,200 | 36,000 | 36,200 | |
| 3% | 35,000 | 29,000 | 33,600 | 32,500 | |
| 5% | 35,400 | 26,800 | 33,800 | 32,000 | |
| 7% | 56,000 | 44,600 | 49,600 | 50,100 |
| Dataset | Seed | L0 peak | L1 peak | Ratio |
|---|---|---|---|---|
| Dual-task (add+mul) | 42 | 23.7 | 14.3 | 1.7 |
| 137 | 20.5 | 12.2 | 1.7 | |
| 2024 | 21.3 | 13.1 | 1.6 | |
| Tri-task (add+mul+sq) | 42 | 24.7 | 11.3 | 2.2 |
| 137 | 27.3 | 11.6 | 2.4 | |
| 2024 | 24.6 | 12.8 | 1.9 |
| Setting | Grok step | Decline | Decl. | |||||
| Single-task (mean std over 3 seeds) | ||||||||
| add | 1.0 | 2500–3100 | 1 | ✓ | ||||
| 0.0 | — | — | — | — | — | |||
| mul | 1.0 | 2600–3000 | 1 | ✓ | ||||
| 0.0 | — | — | — | — | — | |||
| sub | 1.0 | 3300–3700 | 1 | ✓ | ||||
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| ( ) | ( ) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| CumVar | Add | Mul | Sq | CumVar | Add | Mul | Sq | ||
| 1 | 91.7% | 20.4 | 36.7 | 47.5 | 1 | 93.9% | 9.9 | 18.0 | 57.4 |
| 2 | 95.9% | 5.6 | 8.2 | 7.5 | 2 | 97.1% | 25.0 | 49.3 | 48.1 |
| 3 | 98.0% | 74.4 | 89.2 | 94.8 | 3 | 98.8% | 87.5 | 98.5 | 96.1 |
| 4 | 98.8% | 72.5 | 76.2 | 87.7 | 4 | 99.3% | 91.8 | 96.0 | 93.0 |
| 5 | 99.3% | 96.5 | 99.9 | 99.3 | 5 | 99.5% | 96.3 | 99.5 | 98.9 |
| ( ) | ( ) | ||||||
|---|---|---|---|---|---|---|---|
| CumVar | Add | Mul | CumVar | Add | Mul | ||
| 1 | 94.9% | 3.5 | 7.4 | 1 | 96.8% | 4.5 | 5.3 |
| 2 | 97.0% | 2.4 | 5.4 | 2 | 98.2% | 4.5 | 8.9 |
| 3 | 98.5% | 36.1 | 35.3 | 3 | 98.8% | 39.1 | 57.7 |
| 4 | 99.0% | 21.9 | 19.7 | 4 | 99.5% | 69.6 | 79.5 |
| 5 | 99.4% | 68.0 | 83.5 | 5 | 99.6% | 92.5 | 95.5 |
| (%) | Add Grok | Mul Grok | Mean | (steps) | Delay |
|---|---|---|---|---|---|
| 0 (baseline) | 14,100 | 14,000 | 14,050 | — | — |
| 1 | 18,100 | 18,100 | 18,100 | ||
| 2 | 21,200 | 20,900 | 21,050 | ||
| 3 | 23,500 | 23,300 | 23,400 | ||
| 5 | 37,000 | 36,800 | 36,900 | ||
| 7 | 42,600 | 42,400 | 42,500 |
| (%) | Add Grok | Mul Grok | Sq Grok | Mean | (steps) | Delay |
|---|---|---|---|---|---|---|
| 0 (baseline) | 25,600 | 18,200 | 23,400 | 22,400 | — | — |
| 1 | 35,200 | 21,200 | 28,800 | 28,400 | ||
| 2 | 42,400 | 30,200 | 36,000 | 36,200 | ||
| 3 | 35,000 | 29,000 | 33,600 | 32,500 | ||
| 5 | 35,400 | 26,800 | 33,800 | 32,000 | ||
| 7 | 56,000 | 44,600 | 49,600 | 50,100 |