Clarifying Shampoo: Adapting Spectral Descent to Stochasticity and the Parameter Trajectory
Runa Eschenhagen, Anna Cai, Tsung-Hsien Lee, Hao-Jun Michael Shi
TL;DR
This work investigates Shampoo and Muon as data-efficient matrix-based optimizers, revealing that Shampoo structurally equals a Muon update with left and right adaptations, analogous to Adam and Signum. Through language-model experiments, Shampoo variants deliver superior token efficiency over Muon and often over AdamW, with KL-Shampoo and Shampoo$^{1/2}$ frequently performing best; Shampoo benefits largely arise when applied to weight matrices, not to 1D or embedding parameters. The authors introduce time-averaged orthogonality in expectation to unify adaptation to stochasticity and the parameter trajectory with spectral descent, and show instantaneous KL-Shampoo converges to spectral descent, strengthening the link between matrix preconditioning and strict orthogonality constraints. Localizing Shampoo’s advantages, the paper demonstrates the critical role of two-sided preconditioning, the dependence on reshaping for matrix parameters, and the nontrivial influence of hyperparameters such as $eta_1$, $eta_2$, and $oldsymbol{b eps}$. Overall, the results offer mechanistic insight into adaptive matrix optimizers, guiding practical usage and pointing to future work on scalable, stable deployment and broader applicability.
Abstract
Optimizers leveraging the matrix structure in neural networks, such as Shampoo and Muon, are more data-efficient than element-wise algorithms like Adam and Signum. While in specific settings, Shampoo and Muon reduce to spectral descent analogous to how Adam and Signum reduce to sign descent, their general relationship and relative data efficiency under controlled settings remain unclear. Through extensive experiments on language models, we demonstrate that Shampoo achieves higher token efficiency than Muon, mirroring Adam's advantage over Signum. We show that Shampoo's update applied to weight matrices can be decomposed into an adapted Muon update. Consistent with this, Shampoo's benefits can be exclusively attributed to its application to weight matrices, challenging interpretations agnostic to parameter shapes. This admits a new perspective that also avoids shortcomings of related interpretations based on variance adaptation and whitening: rather than enforcing semi-orthogonality as in spectral descent, Shampoo's updates are time-averaged semi-orthogonal in expectation.
