The Spectral Lifecycle of Transformer Training: Transient Compression Waves, Persistent Spectral Gradients, and the Q/K--V Asymmetry
Abstract
We present the first systematic study of weight matrix singular value spectra during transformer pretraining, tracking full SVD decompositions of every weight matrix at 25-step intervals across three model scales (30M--285M parameters). We discover three phenomena: (1)~Transient Compression Waves: stable rank compression propagates as a traveling wave from early to late layers, creating a dramatic gradient that peaks early then reverses -- late layers eventually over-compress past early layers. (2)~Persistent Spectral Gradients: the power-law exponent~ develops a permanent depth gradient forming a non-monotonic inverted-U in deeper models, with peaks shifting toward earlier layers as depth increases. (3)~Q/K--V Functional Asymmetry: value/output projections compress uniformly while query/key projections carry the full depth-dependent dynamics. The dissociation between transient compression and persistent spectral shape reveals that rank and spectral shape encode fundamentally different information about training. We formalize this as a two-timescale dynamical model and derive scaling laws (, ). We validate on nine models across three families (custom, GPT-2, Pythia; 30M--1B parameters; 8--36 layers), demonstrate that predicts layer importance (--, ), and show that spectral-guided pruning outperforms Last-N heuristics by -- across seven models in two families (GPT-2 124M--774M, Pythia 160M--1B), with worst-vs-best gaps up to confirming the causal role of spectral structure.
Figures & tables
| Model | Layers | Heads | Params | SVD Snapshots | |
|---|---|---|---|---|---|
| D8 | 512 | 8 | 8 | 30.4M | 20,050 |
| D12 | 768 | 12 | 12 | 92.8M | 29,674 |
| D16 | 1024 | 16 | 16 | 285.2M | 35,142 |
| Step 250 | Step 500 | Step 1K | Step 2K | Step 5K | Final | |
|---|---|---|---|---|---|---|
| D8 | 23.1 | 15.0 | +2.9 | +14.4 | +19.7 | +22.1 |
| D12 | 42.2 | 25.9 | 2.6 | +8.1 | +17.0 | +17.2 |
| D16 | 41.7 | 59.6 | 19.5 | 2.6 | +17.8 | +18.8 |
| D8 | D12 | D16 | |
| 0.461 | 0.516 | 0.567 | |
| 0.259 | 0.284 | 0.310 | |
| Peak | 0.43 | 0.36 | 0.13 |
| 102 | 131 | 142 |
| Model | Spectral | Last-N | Magnitude | Random | Worst | |
|---|---|---|---|---|---|---|
| D12 | 1 | +0.010 | +0.010 | +0.010 | +0.049 | +0.052 |
| 2 | +0.036 | +0.046 | +0.046 | +0.128 | +0.166 | |
| 3 | +0.102 | +0.102 | +0.102 | +0.221 | +0.330 | |
| 4 | +0.220 | +0.220 | +0.220 | +0.356 | +0.460 | |
| D16 | 1 | +0.009 | +0.009 | +0.009 | +0.023 | +0.082 |
| 2 | +0.038 | +0.038 | +0.038 | +0.060 | +0.088 |
| Model | Spectral | Last-N | Random | Worst | L-N/S | |
|---|---|---|---|---|---|---|
| Medium (24L) | 1 | +0.84 | +1.98 | +1.06 | +0.73 | 2.4 |
| 2 | +2.67 | +6.04 | +2.36 | +2.66 | 2.3 | |
| 3 | +4.89 | +13.49 | +3.79 | +19.49 | 2.8 | |
| 4 | +9.65 | +25.06 | +5.62 | +229.15 | 2.6 | |
| Large (36L) | 1 | +0.50 | +0.75 | +0.44 | +0.62 | 1.5 |
| 2 | +1.04 | +1.92 | +1.06 | +21.20 | 1.9 |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Value |
|---|---|
| Optimizer | AdamW |
| 0.9, 0.95 | |
| Weight decay | 0.1 |
| Gradient clipping | 1.0 |
| Learning rate | |
| Schedule | Cosine with 200-step warmup |
| Mean Compression | Range | Std | ||||
|---|---|---|---|---|---|---|
| Model | Q | V | Q | V | Q | V |
| D8 | 91.2% | 95.1% | 0.26 | 0.08 | 0.095 | 0.025 |
| D12 | 89.7% | 94.8% | 0.28 | 0.10 | 0.098 | 0.031 |
| D16 | 85.4% | 93.2% | 0.31 | 0.09 | 0.102 | 0.028 |
| Method | Val Loss @5K | Initial SR | Initial | Final SR |
|---|---|---|---|---|
| Standard | 3.720 | 130 | 0.10 | 15 |
| Warmup | 5.307 | 15 | 0.45 | 22 |
| D8 | D12 | D16 | ||||
| Layer | Loss | Loss | Loss | |||
| L0 | 0.453 | +3.42 | 0.418 | +2.82 | 0.417 | +3.56 |
| L1 | 0.374 | +1.72 | 0.361 | +3.08 | 0.401 | +6.91 |
| L2 | 0.415 | +5.10 | 0.506 | +0.163 | 0.567 | +0.083 |
| L3 | 0.461 | +0.096 | 0.514 | +0.058 | 0.506 | +0.024 |
| L4 | 0.450 | +0.091 | 0.516 | +0.054 | 0.502 | +0.022 |
| Family | Model | Params | Peak | Training | |||
|---|---|---|---|---|---|---|---|
| Custom | D8 | 8 | 30M | 0.259 | L3 | 0.38 | 10K steps |
| D12 | 12 | 93M | 0.284 | L4 | 0.33 | 10K steps | |
| D16 | 16 | 285M | 0.310 | L2 | 0.13 | 10K steps | |
| GPT-2 | Small | 12 | 124M | 0.092 | L11 | 0.92 | 40B tok |
| Medium | 24 | 355M | 0.285 | L0 | 0.00 | 40B tok | |
| Large | 36 | 774M | 0.107 | L1 | 0.03 | 40B tok |
| Model | Spectral | Last-N | Random | Worst | W/S Ratio | |
|---|---|---|---|---|---|---|
| Small (12L) | 1 | +4.48 | +9.33 | +4.62 | +1.37 | 0.3 |
| 2 | +38.72 | +38.72 | +14.43 | +10.18 | 0.3 | |
| 3 | +93.72 | +93.72 | +34.69 | +106.42 | 1.1 | |
| 4 | +259.53 | +259.53 | +97.34 | +3318.96 | 12.8 | |
| Medium (24L) | 1 | +0.84 | +1.98 | +1.06 | +0.73 | 0.9 |
| 2 | +2.67 | +6.04 | +2.36 | +2.66 | 1.0 |
| Zone-Aware | Last-N | Random | Worst | L-N/ZA | |
|---|---|---|---|---|---|
| 1 | +35.21 | +43.14 | +14.50 | +14.47 | 1.2 |
| 2 | +101.03 | +111.94 | +123.59 | +34,875 | 1.1 |
| 3 | +195.23 | +389.77 | +591.06 | +156,415 | 2.0 |
| 4 | +501.59 | +633.19 | +1,224 | +5,959,385 | 1.3 |
| Model | Zone-Aware | Last-N | Random | Worst | L-N/ZA | |
|---|---|---|---|---|---|---|
| 1B (16L) | 1 | +5.60 | +6.10 | +4.87 | +40.40 | 1.1 |
| 2 | +11.83 | +15.23 | +11.61 | +86.58 | 1.3 | |
| 3 | +20.90 | +53.36 | +27.95 | +11,703 | 2.6 | |
| 4 | +55.32 | +199.12 | +117.92 | +15,146 | 3.6 | |
| 410M (24L) | 1 | +7.34 | +4.40 | +4.43 | +4.40 | 0.6 |
| 2 | +23.77 | +10.12 | +11.11 | +7.00 | 0.4 |