TL;DR
This paper introduces the Spectral Sphere Optimizer (SSO), a novel optimization technique that enforces strict spectral constraints on both model weights and their updates. By aligning with the theoretical principles of Maximal Update Parametrization ($\mu$P), SSO achieves more stable and efficient training of large language models (LLMs) compared to existing methods like AdamW and Muon, leading to improved performance and reduced outlier activations.
What Problem Does This Paper Address?
Training large language models (LLMs) is a complex endeavor that demands both rapid convergence and fundamental stability. While optimizers like AdamW are widely used, they can lead to unstable training dynamics and activation explosions. Emerging optimizers like Muon offer improvements by controlling weight updates, but they don't fully address the stability issue as they allow weights to drift. This "half-aligned" approach can still result in unstable activations. The core problem is the lack of an optimizer that simultaneously guarantees rapid convergence (like steepest descent) and strict adherence to theoretical stability principles ($\mu$P), which are crucial for preventing activation blow-ups and ensuring reliable training over long horizons.
Methods
The paper introduces the Spectral Sphere Optimizer (SSO). The core idea is to constrain the optimization process to a "spectral sphere," which enforces strict module-wise spectral norms on both the weights and their updates. This is achieved by:
- Deriving Steepest Descent on the Spectral Sphere: SSO finds the steepest descent direction not in the standard parameter space, but on the manifold defined by the spectral norm constraint. This involves solving a constrained optimization problem using Lagrange multipliers and a retraction step to project weights back onto the spectral sphere.
- $\mu$P Alignment: By enforcing spectral constraints on both weights and updates, SSO fully aligns with the Maximal Update Parametrization ($\mu$P) principles, which theoretically safeguard against activation explosions.
- Efficient Implementation: SSO is implemented as a parallel algorithm within the Megatron framework, incorporating techniques like atomic module sharding, ping-pong load balancing, and adaptive kernel dispatching for efficient large-scale training.
- Dynamic Spectral Weight Decay: A novel "dynamic retraction" mechanism is introduced to counteract accumulated errors and keep weights on the spectral sphere, acting as a spectrally aligned alternative to conventional weight decay.
Datasets
The paper uses the OLMo-Mix-1124 dataset for training and validation. For evaluation on downstream tasks, they utilize standard benchmarks: ARC, BoolQ, CSQA, HellaSwag, PIQA, WinoGrande, and LAMBADA.
Key Insights and Ideas
- The Spectral Sphere as a Natural Geometry: The paper argues that the spectral sphere is the ideal geometric space for stable feature learning, providing a theoretical foundation for their optimizer.
- "Half-Aligned" Optimizers are Insufficient: The analysis of Muon highlights that controlling only weight updates isn't enough; constraining weights themselves is crucial for true $\mu$P alignment and stability.
- SSO Achieves $\mu$P Alignment: By enforcing spectral constraints on both weights and updates, SSO directly addresses the limitations of previous methods and achieves full $\mu$P alignment.
- Practical Stability Benefits: Beyond theoretical guarantees, SSO demonstrates significant practical advantages like improved MoE router load balancing, suppressed outlier activations, and strictly bounded activations.
- Weight Decay Redundancy: For hidden 2D weights, the spectral sphere constraint makes traditional weight decay redundant, simplifying the optimization process.
Key Results
- Consistent Outperformance: SSO consistently outperforms AdamW and Muon across various architectures (Dense 1.7B, MoE 8B-A1B, 200-layer DeepNet) in terms of validation loss and training efficiency.
- Speedup: For the Dense 1.7B model, Spectral Sphere shows a 1.24x speedup compared to AdamW.
- Improved MoE Load Balancing: SSO significantly improves MoE router load balancing, leading to better utilization of model capacity and lower validation loss, as evidenced by reduced MaxVio metric.
- Stability: SSO demonstrates superior stability, especially in deep networks (200-layer DeepNet), with fewer loss spikes and a more consistent training trajectory compared to AdamW.
- $\mu$P LR Transfer: SSO uniquely preserves stable $\mu$P learning rate transfer, meaning optimal learning rates found under $\mu$P principles are more reliably transferable.
Limitations and Future Work
- Solver Overhead: The current implementation of SSO relies on a bracket-and-bisect root solver, which introduces non-trivial computational overhead and synchronization latency between the CPU and GPU.
- GPU-Native Solver: The authors plan to develop a pure GPU-native solver to eliminate device-host synchronization and improve efficiency.
- Kernel Optimization: Further optimization of matrix operations, particularly for the msign function and Power Iterations, is suggested to exploit hardware features more effectively.
- Low-Precision Training: Given SSO's demonstrated stability, the paper suggests exploring low-precision training (e.g., FP8/NVFP4) to leverage higher throughput.
- "Fully Manifold Constrained" Architectures: The authors aim to explore architectures that are "fully manifold constrained" to further address outlier sources.
Summary updated