TL;DR
Weight averaging (WA) is often viewed as a post-processing trick for better generalization, but it is actually a powerful tool for slashing training time. By benchmarking across the massive AlgoPerf suite, researchers found that techniques like Exponential Moving Average (EMA) and Latest Weight Averaging (LAWA) act as a proxy for learning rate decay. Implementing these techniques reduces total training compute by roughly 12% while consistently improving model performance.
The Challenge of Training Efficiency
Training state-of-the-art deep learning models is a massive drain on time and computational resources. While researchers have long used "Weight Averaging"—the practice of averaging a model's weights across different points in its training trajectory—it has historically been treated as a "cherry on top" to boost final accuracy rather than a core optimization strategy.
The authors of this paper set out to answer three fundamental questions:
- Can weight averaging actually make training faster (i.e., reach a target accuracy in fewer steps)?
- Does it consistently improve generalization across diverse tasks, or is it hit-or-miss?
- Is weight averaging just a "hacky" version of learning rate (LR) decay, and could it eventually replace it?
Methods and Benchmarks
The researchers focused on two primary flavors of weight averaging:
- LAWA (Latest Weight Averaging): Maintains a "rolling window" of the $L$ most recent checkpoints and averages them.
- EMA (Exponential Moving Averaging): Maintains a running average of weights where older checkpoints' influence decays exponentially based on a coefficient $\beta$.
Crucially, they integrated these techniques into AlgoPerf, a rigorous benchmark designed to evaluate optimization algorithms under fair, heavily-tuned conditions. They tested these on top of standard optimizers like NadamW and high-end second-order optimizers like Distributed Shampoo.
The study utilized seven diverse, industrial-scale workloads from AlgoPerf:
- Criteo1TB: Click-through rate prediction (DLRM model).
- FastMRI: Medical image reconstruction (U-Net).
- ImageNet-1k: Image classification (Vision Transformer/ViT).
- OGBG: Graph-based prediction (GNN).
- WMT: Machine translation (Transformer-Big).
- LibriSpeech: Speech recognition (Conformer and DeepSpeech models).
Key Insights and Results
The "Proxy" Effect and Synergy
The most striking insight is that weight averaging acts as a proxy for a "cooled down" learning rate. Essentially, averaging weights from a high-LR trajectory mimics the stability and noise-reduction you would get from a lower LR, allowing the model to "materialize" a better version of itself much earlier in the training process.
However, while WA mimics LR decay, it cannot fully replace it. The best performance comes from combining both: using a learning rate schedule to navigate the loss landscape and using WA to smooth out the noise and accelerate convergence. The benefits are also optimizer-agnostic; even when using Distributed Shampoo, adding WA provided a significant additional speed boost.
12% Compute Reduction
On average, adding weight averaging reduced the total GPU-hours required to reach benchmark target scores by 12% across the entire AlgoPerf suite.
Faster Convergence and Generalization Gains
Averaged models (LAWA/EMA) consistently hit validation targets thousands of iterations earlier than the baseline NadamW. Beyond speed, WA consistently improved final validation metrics—such as higher BLEU scores for translation and lower Word Error Rates for speech—compared to non-averaged baselines.
Across various tasks, the researchers also found a "generalizable optimal averaging horizon." Averaging over a window of approximately 1% of the total training budget consistently yielded the best results, proving stable across a wide range of hyperparameters.
Limitations and Future Work
The authors note that while WA is powerful, it is sensitive to the averaging horizon. If the window is too small, the noise-reduction benefits are lost; if it's too large, outdated weights from early in training pull the average away from the optimum.
Furthermore, while this paper shows WA is a great proxy for short LR decay schedules, it doesn't yet eliminate the need for manual LR tuning. Future work could involve "schedule-free" algorithms that use weight averaging to automatically adapt the training process without requiring a predefined decay schedule. Finally, more sophisticated asynchronous implementations (like offloading the averaging to the CPU) may be necessary to ensure WA doesn't introduce its own computational bottlenecks in highly optimized environments.
Summary updated