TL;DR
This paper challenges the common practice of benchmarking optimizers at a single batch size, revealing that the "best" optimizer often changes as training scales up. Through extensive tuning and theoretical analysis, the authors show that standard hyperparameter scaling rules fail because different directions in the loss landscape require different scaling exponents based on their curvature and noise levels.
What Problem Does This Paper Address?
In deep learning, increasing the batch size is the primary way to improve training throughput. However, larger batches often degrade optimization performance unless hyperparameters are carefully adjusted. Practitioners typically rely on "scaling rules" (like linear or square-root scaling of the learning rate) to adapt a tuned configuration from a small batch to a large one.
The authors identify two major gaps in this approach:
- Unreliable Scaling Rules: Existing theoretical frameworks for scaling (based on Stochastic Differential Equations or convergence bounds) often provide conflicting advice and fail to generalize across different tasks (e.g., LLMs vs. image classification).
- Optimizer Crossover: Benchmarks usually rank optimizers at a fixed batch size. This paper asks if those rankings actually hold steady as the batch size increases, or if an optimizer that wins at a small scale becomes a loser at a large scale.
Methods
The researchers employed a three-pronged approach:
- Empirical Benchmarking: They performed independent, extensive hyperparameter tuning for five state-of-the-art optimizers (Adam, Lion, Muon, SOAP, and Shampoo) across a range of batch sizes (128K to 2M tokens) using coordinate descent.
- Theoretical Analysis (NQM): They used a Noisy Quadratic Model (NQM) to isolate how curvature and gradient noise interact with batch size. This allowed them to prove that the optimal learning rate scaling shifts from square-root to linear as a direction's Curvature-to-Noise Ratio (CNR) increases.
- Directional Branching: To validate their theory in a real-world setting, they developed a "branching" experiment. They increased the batch size partway through LLM training but maintained small-batch updates for only a tiny subset of the "sharpest" directions in the loss landscape.
Datasets
- FineWeb-10B: Used for language model pretraining (1.7B token budget).
- CIFAR-5M: A large-scale version of CIFAR used for one-pass image classification to focus on optimization rather than generalization effects.
- Modded-NanoGPT: The primary optimization benchmark setting for comparing LLM optimizers.
Key Insights and Ideas
-
The Crossover Phenomenon: Optimizer rankings are not stable. For instance, SOAP is the top performer for batches up to 1M tokens, but it falls to third place at 2M tokens, where Shampoo takes the lead. Optimizer rankings reverse as batch size increases. SOAP wins at small scales, but Shampoo wins at large scales.
-
Scaling is Direction-Dependent: A single global scaling rule (like "always use square-root scaling") is fundamentally flawed. Directions with high curvature and low noise (high CNR) benefit from linear scaling, while noise-dominated directions prefer square-root scaling. Optimal learning rate scaling depends on the Curvature-to-Noise Ratio (CNR). High CNR directions approach linear scaling, while low CNR directions follow square-root scaling.
-
Sharp Directions are the Bottleneck: The "penalty" incurred when moving to larger batches is not spread evenly. In their LLM experiments, keeping small-batch updates for just the sharpest 0.001% of directions recovered nearly 60% of the loss gap caused by scaling up the batch size.
- Bias-Variance Tradeoff in Preconditioning: Adaptive optimizers (like Shampoo or SOAP) use gradient statistics to "precondition" updates. The authors prove that gradient noise creates a tradeoff: preconditioning can reduce initialization bias faster but at the cost of amplifying variance from noise. This balance shifts as batch size changes, causing the "crossover" in rankings.
Key Results
-
Scaling Rule Failure: No single scaling rule worked for Muon across both LLM and CIFAR tasks. In LLMs, the best rule was "no scaling" for learning rates, while in CIFAR, square-root scaling was optimal. Theoretical scaling rules fail to consistently outperform simple baselines across different tasks.
-
Quantitative Crossover: At a 2M token batch size, Shampoo outperformed SOAP by 0.021 nats (a measure of loss), despite SOAP being significantly better at the 128K scale.
- Subspace Recovery: In the directional branching test, retaining small-batch updates in only the top 768 sharpest directions (out of 85M total) removed 35–59.5% of the loss gap to a small-batch control. A random subspace of the same size had almost no effect (<3%).
Limitations and Future Work
The authors acknowledge that their NQM analysis is a local approximation; while it captures the dynamics shortly after a batch size switch, it may not fully account for long-term global trajectory changes. Furthermore, their directional branching experiment ignored the anisotropy (directionality) of gradient noise, focusing only on curvature.
Future work should focus on batch-size-aware optimizer design. Instead of trying to find a universal scaling rule, the next generation of optimizers might need to internally estimate CNR and apply different scaling exponents to different directions in real-time.
Summary updated