Cost-free Spectral Estimation for Adaptive Newton--Schulz in Matrix Optimizers
Organizations: New York University
Abstract
Matrix optimizers such as Muon transform each momentum matrix through an approximate orthogonalization, typically implemented by a small number of Newton-Schulz matrix multiplications. The quality and cost of this approximation depend strongly on the singular-value spectrum of its input, yet existing implementations use the same fixed polynomial routine for every layer and throughout training. We show that this uniform treatment is unnecessary: the computations in the Newton-Schulz method already reveal enough information to make the method adaptive. The Gram matrices formed inside Newton-Schulz iterations yield spectral moments through inexpensive scalar reductions, requiring no additional matrix multiplications. From these moments, we recover an estimate of the empirical singular-value distribution and use it to select a polynomial routine specialized to the current matrix. This turns Newton--Schulz orthogonalization into a spectrum-adaptive procedure that responds to differences across both layers and training time. On saved momentum matrices, spectral estimation substantially reduces orthogonalization error at a fixed iteration budget or reaches the same accuracy with fewer iterations, and in GPT pretraining up to 1B parameters it lowers the validation loss of two matrix optimizers. Our results suggest that matrix-function operations inside optimizers need not be designed for a conservative worst-case spectrum: they can cheaply measure the spectrum they are already processing and specialize computations accordingly.
Figures & tables
| RMS error | Worst-case error | ||||||
|---|---|---|---|---|---|---|---|
| Fixed PE | Ours | Oracle | Fixed PE | Ours | Oracle | ||
| Attention | |||||||
| MLP | |||||||
Appendix figures & tables29 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Setting |
|---|---|
| Scale | , rounded up to the grid , |
| Scoring cutoff | in Frobenius-normalized coordinates |
| Spectral grid | zero, points below the cutoff, in the scoring interval |
| Measurements | four moments per iteration ( – ) and the final second moment |
| Entropy tolerance | |
| Row-scale floor |
| Primary run | Held-out run | |
| Dataset | FineWeb | Nemotron-CC v2 High-Quality |
| Model | layers, width | layers, width ( M Muon baseline) |
| Checkpoints | every steps, k– k | step , then every steps to |
| Matrices | attention, MLP | |
| Matrix types | Q, K, V, O, MLP up, MLP gate, MLP down | |
| Muon momentum | ||
| Regret | MLP misses (%) | ||||||
| Attention | MLP | ||||||
| Rule on the fit | |||||||
| Minimax | |||||||
| RMS (ours) | |||||||
| RMS error | Worst-case error | ||||||
| Fixed PE | Ours | Oracle | RMS oracle | Fixed PE | Ours | Oracle | |
| Attention | |||||||
| RMS error | Worst-case error | ||||||
| Fixed PE | Ours | Oracle | RMS oracle | Fixed PE | Ours | Oracle | |
| Attention | |||||||
| MLP | |||||||
| Setting | Value | Attn | Attn | MLP | MLP |
|---|---|---|---|---|---|
| Default | Table 5 | 0.472 | 0.0431 | 0.00694 | 0.00101 |
| Entropy tolerance | (best fit only) | 0.472 | 0.0437 | 0.00729 | 0.000622 |
| 0.472 | 0.0430 | 0.00684 | 0.000777 | ||
| 0.472 | 0.0434 | 0.00862 | 0.00140 | ||
| 0.472 | 0.0439 | 0.0131 | 0.00216 | ||
| Grid, scoring interval | 60 | 0.472 | 0.0435 | 0.0199 | 0.00223 |
| Mean depth | Misses (%) | |||||
|---|---|---|---|---|---|---|
| Attn | MLP | Attn | MLP | Max error | ||
| 1 | 7.91 | 4.23 | 1.9 | 0.0 | ||
| 1.5 | 8.19 | 4.44 | 0.0 | 0.0 | ||
| 10 | 9.00 | 6.09 | 0.0 | 0.0 | ||
| RMS oracle | 7.83 | 4.02 | 0.0 | 0.0 | ||
| 1 | 9.00 | 6.09 | 0.0 | 5.7 | ||
| Current | Previous | First | Every fourth | RMS oracle | Oracle | Fixed PE | |
|---|---|---|---|---|---|---|---|
| 5 | |||||||
| 8 |
| Per type | Ours | RMS oracle | Oracle | |
|---|---|---|---|---|
| 5 | ||||
| 8 |
| Method | Extra products | Work that grows with | Fixed work |
|---|---|---|---|
| Ours | none | per iteration | fit, scoring |
| SVD (singular values) | – | – | |
| Gram eigenvalues | – |
| Model | Matrix | Shape | NS pass | Ours | Gram eig. | SVD |
|---|---|---|---|---|---|---|
| DeepSeek-V4 | routed expert | |||||
| attention output | ||||||
| GLM-5 | attention output | |||||
| dense FFN | ||||||
| Kimi K3 | attention output | |||||
| dense FFN |
| Reduction | Function |
|---|---|
| , | , |
| , | , |
| , | , |
| , | , |
| , | , |
| Component | Setting |
|---|---|
| Test matrices | , |
| Endpoints | , log-spaced in |
| Candidate depths | |
| Grid | one low point, log-spaced |
| Entropy tolerance | |
| Measurement depth | ( ) or ( ) |
| Setting | M | M | B |
|---|---|---|---|
| Layers / width | / | / | / |
| Query heads / KV heads | / | / | / |
| Head dimension / MLP width | / | / | / |
| Non-embedding / total params | M / M | M / M | M / M |
| Attention / MLP | grouped-query attention with a per-head sigmoid gate / SwiGLU | ||
| Normalization / positions | pre-RMSNorm and final RMSNorm ( ) / RoPE ( ) | ||
| Setting | Muon | OKLS |
|---|---|---|
| Peak learning rate | ||
| Momentum or | ||
| Factor decay | – | |
| Factor diagonal shift | – | |
| Weight decay | ||
| Initialization scale |
| Muon | OKLS | |
|---|---|---|
| Scoring cutoff | (relative) | |
| Candidates | PE endpoints in at the run’s depth | cubic, endpoints per decade in , at the run’s depth |
| Measurement pass | iterations, measurements | iterations, measurements |
| Measurement period | ( also at M and M) | ( also at M and M) |
| Fixed baseline | cubic routine for eigenvalues above | |
| Oracle | minimax choice from the exact spectrum every steps | |
| Optimizer | Size | Fixed | |||
|---|---|---|---|---|---|
| Muon | 160M | ||||
| Muon | 300M | ||||
| OKLS | 160M | ||||
| OKLS | 300M |
| Size | Ours | ||
|---|---|---|---|
| (baseline) | (default) | ||
| 160M | |||
| 300M |
| Endpoint | RMS error | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Optimizer | Agreement (%) | Distance | Fixed | RMS oracle | Ours | Regret | |||
| Muon | 4 | 200 | 3,864 | 58.6 | 0.00 | 0.6681 | 0.2226 | 0.2254 | 0.0028 |
| Muon | 4 | 500 | 1,512 | 61.1 | 0.00 | 0.6603 | 0.2194 | 0.2219 | 0.0025 |
| Muon | 5 | 200 | 3,864 | 27.3 | 0.25 | 0.6359 | 0.0967 | 0.1066 | 0.0099 |
| Muon | 5 | 500 | 1,512 | 28.2 | 0.25 | 0.6322 | 0.0724 | 0.0828 | 0.0104 |
| OKLS | 5 | 200 | 4,704 | 77.8 | 0.00 | 0.6267 | 0.2390 | 0.2394 | 0.0004 |
| Optimizer | Reductions | Count | Exact | Measured |
|---|---|---|---|---|
| Muon | all | |||
| OKLS | all | |||
| OKLS | only |
Matrix Optimization
Matrix optimization develops methods for optimizing matrix-valued variables with structure such as low rank, sparsity, positivity, or orthogonality.
See all 58 papers