TL;DR
MARS (Make vAriance Reduction Shine) is a new optimization framework that successfully integrates variance reduction techniques into large-scale model training. By combining adaptive preconditioning (like AdamW) with a scaled version of stochastic recursive momentum, MARS achieves nearly double the token efficiency of AdamW and superior final performance on models like GPT-2.
What Problem Does This Paper Address?
In the world of deep learning, AdamW is the undisputed king of optimizers. While researchers have spent the last decade developing "variance reduction" (VR) algorithms that offer better theoretical convergence rates, these methods have historically failed to gain traction in training large models.
Previous studies suggested that VR was ineffective in deep learning because common techniques like dropout, batch normalization, and heavy data augmentation disrupted the mathematical structure these algorithms rely on. However, modern Large Language Model (LLM) training has largely moved away from these techniques. The authors of MARS recognized this shift as a golden opportunity to revisit variance reduction. The challenge they tackle is creating a VR framework that is stable, scalable, and compatible with the adaptive preconditioning that makes AdamW so effective.
Methods
The authors introduce MARS, a unified framework that reconciles preconditioned gradient methods with variance reduction.
Key Components:
- Scaled Stochastic Recursive Momentum (STORM): MARS uses a modified version of the STORM algorithm. The "secret sauce" is a new scaling parameter, $\gamma_t$, which allows practitioners to tune the strength of the variance reduction. When $\gamma_t=1$, it behaves like vanilla STORM; when $\gamma_t=0$, it reduces to standard stochastic gradients.
- Preconditioned Updates: MARS isn't just one optimizer; it's a framework. The authors demonstrate three specific instantiations:
- MARS-AdamW: Adds VR to the standard diagonal Hessian approximation.
- MARS-Lion: Integrates VR with the sign-based updates of the Lion optimizer.
- MARS-Shampoo: Combines VR with tensor-space preconditioning for second-order-like updates.
- MARS-approx: To avoid the computational overhead of calculating two gradients per step (a common requirement for VR), the authors propose a practical approximation that uses gradients from the previous data batch, making it nearly as fast as AdamW per iteration.
- Gradient Clipping: Unlike some second-order methods that clip the final update, MARS applies standard clipping-by-norm to the intermediate variance-reduced gradient estimate, ensuring training stability.
Datasets
The researchers evaluated MARS across a variety of scales and tasks:
- Pre-training: Used the OpenWebText dataset (9 billion tokens) to train GPT-2 models of various sizes (Small, Medium, and Large).
- Large-scale Pre-training: Used FineWeb-Edu 100B to test GPT-2 Small and XL (1.5B parameters) models.
- Downstream Benchmarks: Evaluated models on a suite of standard LLM tasks including ARC (Easy/Challenge), BoolQ, HellaSwag, OBQA, PIQA, WinoGrande, MMLU, and SCIQ.
- Computer Vision: Tested on CIFAR-10 and CIFAR-100 using ResNet-18 to demonstrate generalizability.
Key Insights and Ideas
- The "Aha!" Moment for VR: The realization that the removal of dropout and batch norm in modern LLM pipelines "opens the door" for variance reduction is a significant shift in perspective for the field.
- Theoretical Superiority: The authors prove that MARS achieves a convergence rate of $O(T^{-1/3})$, which is theoretically faster than the $O(T^{-1/4})$ rate typically associated with AdamW.
- A Unified View of Optimizers: The paper draws fascinating connections between MARS and other recent "hot" optimizers. For example, they show that the Lion optimizer and the recently proposed Muon algorithm can be viewed as specific approximations or special cases within the MARS framework.
- Stability through Scaling: By introducing the $\gamma_t$ parameter, the authors found they could balance the benefits of variance reduction with the inherent noise of LLM training, preventing the instability that plagued earlier VR attempts in deep learning.
Key Results
- Massive Token Efficiency: On GPT-2 Large (770M parameters), MARS reached a validation loss of 2.58 in just 28 billion tokens. AdamW required 50 billion tokens to reach that same level—nearly a 2x improvement in efficiency.
- Better Final Performance: MARS achieved a final validation loss of 2.51, significantly lower than AdamW’s best of 2.57.
- Downstream Gains: After training on 50 billion tokens, the MARS-trained model achieved 44.64% accuracy on HellaSwag, outperforming AdamW’s 41.70%.
- Wall-Clock Speed: While MARS has a slightly higher per-iteration cost than AdamW, it is much faster than second-order methods like Muon and reaches target loss levels much faster in total time than AdamW.
Limitations and Future Work
- Hyperparameter Tuning: While the authors found a constant $\gamma = 0.025$ worked well across many tasks, they acknowledge that the optimal "strength" of variance reduction might vary for different architectures.
- Memory Overhead: Like many momentum-based methods, MARS requires storing additional states (like the previous gradient), which could be a constraint for extremely large models on limited hardware.
- Extreme Scale: While the results on 1.5B parameter models are promising, the authors haven't yet tested MARS on "frontier" scales (e.g., 70B+ parameters), where optimization dynamics can shift.
- Future Directions: The authors suggest exploring dynamic schedules for $\gamma_t$ and further refining the "approximate" versions of the algorithm to minimize computational overhead.
Summary updated