TL;DR
Training Large Language Models (LLMs) across distributed data centers is often bottlenecked by "replica scaling"—where adding more workers degrades performance for a fixed token budget. This paper identifies whitening-based preconditioning (found in optimizers like SOAP and SPlus) as the key to fixing this, allowing distributed training to scale efficiently to 96+ replicas with minimal loss in quality.
What Problem Does This Paper Address?
As LLMs grow, training them often requires pooling resources from geographically separated clusters. However, the slow connections between these sites create a massive communication bottleneck. "Local optimization" methods like DiLoco solve this by letting each model replica train independently for several steps before averaging their updates.
The catch? It’s a well-documented phenomenon that as you increase the number of replicas ($R$) while keeping the total number of training tokens constant, the final model performance tends to drop compared to standard, non-local training. This paper seeks to understand why this happens and how the choice of the "inner optimizer" (the algorithm running on each individual replica) can mitigate this degradation.
Methods
The authors analyze the DiLoCo framework, where $R$ replicas perform $H$ local steps before a global average. They decompose the error of these local updates into two parts:
- Mean Mismatch: The difference between the average of transformed local gradients and the transformation of the average gradient.
- Stochastic Error: The noise introduced by local sampling.
They compare several popular optimizers:
- AdamW: The standard for LLMs, which uses coordinate-wise adaptive learning rates.
- Muon: An optimizer that orthogonalizes updates.
- Shampoo / SOAP / SPlus: A family of optimizers that use "preconditioning" to account for correlations between parameters. SOAP applies Adam-style normalization in an eigenbasis, while SPlus is a simplified version that uses a sign-based transformation in that same basis.
The researchers theoretically show that whitening—transforming updates so their noise is equal in all directions (isotropic)—is a powerful "desideratum" for inner optimizers because it minimizes the worst-case stochastic error during averaging.
Datasets
The authors evaluated their findings by training LLaMA models (178M and 512M parameters) on the DCLM (DataComp-LM) dataset. They used a sequence length of 2048 and evaluated performance on a held-out 100M-token validation split.
Key Insights and Ideas
- Whitening is the Secret Sauce: Optimizers that whiten the "pseudo-gradient" covariance (like SOAP and SPlus) achieve much better scaling. By making the noise isotropic, they ensure that uniform averaging across replicas is mathematically optimal and prevents noise from exploding in high-curvature directions.
- The $\beta_2$ Scaling Rule: For adaptive optimizers like Adam, the second-moment decay factor ($\beta_2$) must be adjusted as the number of replicas increases. Because more replicas mean smaller local batch sizes, $\beta_2$ should be increased to keep the "token half-life" of the optimizer's memory constant.
- Noise Dominates Mismatch: Empirical tests showed that the "stochastic error" (noise) is significantly larger (7.5–19x) than the "mean mismatch" in high-variance directions. This explains why controlling the shape of the noise via whitening is more important than perfectly matching the mean update.
- Curvature Matters: Standard optimizers like AdamW have very high noise in directions with high curvature. Whitening redistributes this noise more uniformly, preventing small errors from causing large damage to the loss function.
Key Results
The study demonstrates that whitening-based optimizers significantly outperform AdamW and Muon as the number of replicas grows.
- Superior Scaling: At 96 replicas, SPlus showed the strongest worker scaling, with only 2.1% degradation relative to its own data-parallel baseline, compared to 12% for AdamW.
- Absolute Performance: While SPlus scales best, SOAP often achieves the lowest absolute validation loss due to its superior baseline performance, though its scaling curve is slightly steeper than SPlus.
- Efficiency Gains: The authors showed that by simply tuning $\beta_2$ correctly, the relatively simple IsoLoCo method (using AdamW) can outperform the more computationally expensive MuLoCo (using Muon) at high replica counts.
Limitations and Future Work
- Memory Overhead: Preconditioning optimizers like SOAP and SPlus require storing and computing Gram matrices ($L$ and $R$), which increases memory usage compared to AdamW or Muon. While "scalable recipes" for SOAP exist, this remains a factor for hardware-constrained setups.
- Model Scale: While the study covers up to 512M parameters, the behavior at the multi-billion parameter scale (where Muon and SOAP are often used) needs further empirical validation, though the trends suggest the benefits of whitening will persist or even grow.
- Asynchronous Training: The current work focuses on synchronous DiLoCo. Exploring how these inner optimizers impact asynchronous local SGD is a promising next step.
Summary updated