Training Large Language Models (LLMs) is a notoriously expensive endeavor that relies heavily on adaptive gradient optimizers like AdamW. For the past decade, the optimization community has developed numerous "variance reduction" (VR) algorithms—such as SVRG or SAG—aimed at accelerating training. Yet, these methods have largely failed to gain traction in deep learning.
Historically, VR was ineffective because deep learning relied heavily on "noise-inducing" techniques like batch normalization, dropout, and aggressive data augmentation. These techniques break the mathematical structures that VR depends on to function. However, modern LLM training has largely moved away from these architectural choices. Recognizing this shift, researchers identified a golden opportunity to revisit variance reduction to tackle the high stochastic gradient variance inherent in training massive models.
To capitalize on this cleaner architectural landscape, the authors introduce MARS (Make vAriance Reduction Shine), a new optimization framework that successfully integrates variance reduction techniques into large-scale model training. By combining adaptive preconditioning with a scaled recursive momentum technique, MARS achieves significantly faster convergence rates and superior performance on GPT-2 models compared to standard AdamW.
How MARS Works
MARS is a unified framework designed to reconcile preconditioned gradient methods with variance reduction. It operates as a "plug-and-play" system that can enhance almost any existing adaptive optimizer. The core components of the framework include:
- Scaled Stochastic Recursive Momentum (STORM): MARS utilizes a modified version of the STORM algorithm. Unlike standard momentum, which simply averages past gradients, recursive momentum uses the difference between gradients at successive steps to actively cancel out common noise.
- The Scaling Parameter ($\gamma_t$): Described as the framework's "secret sauce," this parameter controls the strength of the variance reduction correction. It allows the optimizer to adaptively balance between a standard stochastic gradient and a variance-reduced estimate.
- Unified Preconditioning: The authors demonstrate three specific instances of the framework—MARS-AdamW, MARS-Lion, and MARS-Shampoo—proving its versatility across different preconditioning strategies.
To address the computational cost of calculating two gradients per step (a traditional bottleneck for VR methods), the authors also propose MARS-approx. This approximation uses the gradient from the previous iteration's data batch, making it nearly as efficient per iteration as standard AdamW.
Key Insights and Results
The researchers evaluated MARS across several scales and domains, including pre-training GPT-2 models (ranging from 125M to 1.5B parameters) on OpenWebText and FineWeb-Edu 100B, as well as computer vision tasks (ResNet-18 on CIFAR datasets).
The results highlight several major breakthroughs:
- Massive Token Efficiency: The most striking insight is the framework's token efficiency. On a GPT-2 Large model, MARS reached a validation loss of 2.58 in just 28 billion tokens. In contrast, standard AdamW required 50 billion tokens to reach the exact same mark—representing nearly a 2x improvement in training efficiency.
- Superior Final Performance: MARS doesn't just train faster; it reaches a better final state. MARS-AdamW achieved a final validation loss of 2.51, significantly lower than AdamW’s 2.58.
- Downstream Gains: The pre-training improvements translate directly to downstream tasks. After 50 billion tokens of training, MARS improved HellaSwag accuracy to 44.64%, outperforming AdamW’s 41.70%.
- Theoretical Superiority: The authors mathematically prove that MARS achieves a convergence rate of $O(T^{-1/3})$, which is theoretically superior to the $O(T^{-1/4})$ rate typically associated with AdamW.
- Wall-clock Speed: Despite a slightly higher per-iteration cost due to the VR mechanics, the drastically faster convergence meant that MARS-AdamW and MARS-Lion consistently outperformed baselines in total wall-clock training time.
Limitations and Future Directions
While MARS presents a compelling step forward for LLM optimization, the authors note a few limitations. First, while a default scaling parameter ($\gamma = 0.025$) worked well across their tests, optimal hyperparameters might vary for different model architectures. Second, the framework requires maintaining additional momentum buffers, which could introduce memory overhead in highly constrained training setups.
Finally, while experiments successfully scaled up to 1.5 billion parameters, the behavior of MARS on "frontier" models (70B+ parameters) remains an open question. Future work will likely focus on testing MARS at these extreme scales and developing automatic scheduling for the $\gamma_t$ parameter to unlock even greater performance.
Summary updated