TL;DR
Training modern neural networks feels like navigating a zoo of exotic optimizers—Adam, Lion, Muon—each demanding its own finicky hyperparameter tuning, especially for weight decay. This paper reveals that these seemingly unrelated algorithms are actually variations of a single mathematical framework called SODA (Schedule-Free Optimistic Dual Averaging). Better yet, this unified theory yields a drop-in "wrapper" for any existing optimizer that completely eliminates the need to tune weight decay, boosting model performance for free.
What Problem Does This Paper Address?
Over the last decade, deep learning optimization has evolved along two parallel tracks: geometry (how we shape updates, like Adam’s elementwise scaling or Muon’s matrix orthogonalization) and ingredient composition (how we blend momentum, iterate averaging, and learning rate schedules). Because these tracks developed somewhat separately, we’ve ended up with a fragmented landscape of optimizers that seem entirely distinct.
Furthermore, scaling up models makes hyperparameter tuning prohibitively expensive. Weight decay is a notorious headache here. Traditionally viewed as a regularizer to prevent overfitting in multi-epoch training, weight decay mysteriously still helps in single-epoch LLM pre-training. However, its optimal value shifts depending on the optimizer, model size, and training duration (horizon). Researchers have struggled to find a universal rule for setting it without expensive grid searches.
Methods
The authors introduce SODA, a generalization of classical Optimistic Dual Averaging that explicitly couples how we process gradients (dual space) with how we process model weights (primal space):
- Gradient Averaging & Optimism: Standard momentum averages past gradients. "Optimism" peeks ahead by giving extra weight to the most recent gradient—a trick that turns out to be the secret sauce in Nesterov momentum, Lion, and Muon.
- Geometry Mapping: A mathematical mirror map (Fenchel conjugate) translates gradients into weight updates using specific geometries—like the $\ell_\infty$ norm (signs) for Lion or spectral norms (matrix signs) for Muon.
- Primal Averaging & Extrapolation: Blending the model weights themselves over time.
From this theory, the authors derive the SODA Wrapper—a dead-simple, parameter-free outer loop you can wrap around any base optimizer (stripped of its native weight decay). At step $k$, the update looks like this: $$x^{k+1} = \frac{1}{k+2}z^0 + \left(1 - \frac{1}{k+2}\right)x^k + \text{BaseUpdate}(g^k)$$ Instead of decaying weights toward zero using a tuned constant, SODA gently pulls weights toward their initial random values ($z^0$) on a strict $\frac{1}{k+2}$ schedule. (To save memory, $z^0$ doesn't even need to be stored—it can be regenerated on the fly from the random seed!)
Datasets
No new benchmarks are introduced; the authors evaluate their framework on standard language modeling and reasoning datasets:
- FineWeb100: Used for pre-training NanoGPT models ranging from 64M to 1B parameters across different token budgets (1× and 4× Chinchilla-optimal horizons).
- MetaMathQA & GSM8K: Used for full fine-tuning of Llama-2-7B and evaluating its mathematical reasoning.
Key Insights and Ideas
- The Grand Unification: State-of-the-art optimizers aren't as different as they look. NAdam (and Simplified-AdEMAMix), Lion, and Muon are all just instances of SODA with "optimism" turned on, differing only in their geometric mirror maps (smoothed $\ell_\infty$, $\ell_\infty$, and spectral, respectively).
- Weight Decay is Primal Averaging in Disguise: In single-epoch training, weight decay isn't acting as an anti-overfitting regularizer—it is mathematically equivalent to averaging model iterates over time, which accelerates convergence.
- Anchor to Initialization, Not Zero: Standard weight decay pulls weights toward the origin ($0$), which can be a terrible anchor—especially during fine-tuning! SODA naturally anchors updates to the starting weights ($z^0$).
- Horizon Matters More Than Width: Recent scaling laws suggested scaling weight decay as $1/\text{model\_size}$. By holding model size fixed and extending training steps, the authors show optimal weight decay actually shrinks with training time, validating SODA's automatic $1/(k+2)$ time-decaying schedule.
Key Results
- Beats Tuned Baselines Without Tuning: On 124M NanoGPT models, wrapping Adam, Muon, and Scion in SODA consistently lowers validation loss at both 1× and 4× Chinchilla horizons. Notably,
SODA(Muon)—with zero weight decay tuning—achieves a validation loss of 3.2665 (1× Chinchilla) and 3.1262 (4× Chinchilla), beating standard Muon even after sweeping Muon's weight decay to find its best setting (~3.269 and ~3.133). - Simplifying Muon (
SODA†): Standard Muon is a hybrid that uses matrix updates for hidden layers but falls back to Adam for the first and last layers. Using SODA's insights, the authors buildSODA†, replacing Adam with Lion-style $\ell_\infty$ updates and sharing a single momentum parameter everywhere. It beatsSODA(Muon)with a 3.1238 validation loss at 4× Chinchilla. - Gains Grow with Scale: Scaling NanoGPT from 64M up to 1B parameters shows that
SODA†consistently outperforms Scion baselines, with the performance gap widening at larger compute budgets. It also improves Llama-2-7B fine-tuning on GSM8K.
Limitations and Future Work
- Single-Epoch Focus: This work targets single-epoch pre-training. In multi-epoch regimes where data is repeated and overfitting becomes a genuine threat, an explicit hyperparameter to control regularization strength might still be necessary.
- Convex Theory Assumptions: Like much of optimization theory, the convergence proofs assume convexity and strongly convex regularizers—though the derived schedules transfer remarkably well to non-convex deep learning, and nicely approximate practical tricks like finite-step Newton-Schulz iterations.
- Future Directions: Because SODA anchors to $z^0$ (preserving pretrained knowledge rather than erasing it toward zero), applying it broadly to LLM fine-tuning is a prime next step, alongside developing practical "accelerated" variants of SODA using increasing step weights.
Summary updated