paper-with-me

Papers

SOAP: Improving and Stabilizing Shampoo using Adam

2024-09-17 · Nikhil Vyas, Depen Morwani, Rosie Zhao, Mujin Kwun, Itai Shapira, David Brandfonbrener, Lucas Janson, Sham Kakade

There is growing evidence of the effectiveness of Shampoo, a higher-order preconditioning method, over Adam in deep learning optimization tasks. However, Shampoo's drawbacks include additional hyperparameters and computational overhead when compared to Adam, which only updates running averages of first- and second-moment quantities. This work establishes a formal connection between Shampoo (implemented with the 1/2 power) and Adafactor -- a memory-efficient approximation of Adam -- showing that Shampoo is equivalent to running Adafactor in the eigenbasis of Shampoo's preconditioner. This insight leads to the design of a simpler and computationally efficient algorithm: $\textbf{S}$hampo$\textbf{O}$ with $\textbf{A}$dam in the $\textbf{P}$reconditioner's eigenbasis (SOAP). With regards to improving Shampoo's computational efficiency, the most straightforward approach would be to simply compute Shampoo's eigendecomposition less frequently. Unfortunately, as our empirical results show, this leads to performance degradation that worsens with this frequency. SOAP mitigates this degradation by continually updating the running average of the second moment, just as Adam does, but in the current (slowly changing) coordinate basis. Furthermore, since SOAP is equivalent to running Adam in a rotated space, it introduces only one additional hyperparameter (the preconditioning frequency) compared to Adam. We empirically evaluate SOAP on language model pre-training with 360m and 660m sized models. In the large batch regime, SOAP reduces the number of iterations by over 40% and wall clock time by over 35% compared to AdamW, with approximately 20% improvements in both metrics compared to Shampoo. An implementation of SOAP is available at https://github.com/nikhilvyas/SOAP.

📄 PDF Abstract BibTeX arXiv:2409.11321

Code (1)

nikhilvyas/soap 공식 구현 pytorch

Tasks

Computational Efficiency

Methods 이 논문이 사용한 방법론

AdamW AdamW is a stochastic optimization method that modifies the typical implementation of weight decay in Adam, by decoupling [weight…
Adafactor Adafactor is a stochastic optimization method based on Adam that reduces memory usage while retaining the empirical benefits of…
Adam 설명 없음

Similar Papers 제목 키워드 기반

Understanding and Improving Shampoo and SOAP via Kullback-Leibler Minimization

2025-09-03 · Wu Lin, Scott C. Lowe, Felix Dangel, Runa Eschenhagen 외 arxiv

Shampoo and its efficient variant, SOAP, employ structured second-moment estimations and have shown strong performance for training neural networks (NNs). In practice, however, Shampoo typically requires step-size grafti…

Understanding SOAP from the Perspective of Gradient Whitening

2025-09-26 · Yanqing Lu, Letao Wang, Jinbo Liu arxiv

Shampoo with Adam in the Preconditioner's eigenbasis (SOAP) has recently emerged as a promising optimization algorithm for neural network training, achieving superior training efficiency over both Adam and Shampoo in lan…

Image Colorization

Reparametrizing Shampoo and SOAP for Subspace Basis Updates and BFloat16 Storage

2026-05-25 · Alan Milligan, Zikun Xu, Simon Lacoste-Julien, Felix Dangel 외 arxiv

Shampoo-based methods, such as KL-Shampoo and SOAP, have demonstrated strong performance in training neural networks and rely on QR decomposition. Because existing QR implementations require single-precision (FP32) arith…

Hyperparameter Transfer Enables Consistent Gains of Matrix-Preconditioned Optimizers Across Scales

2025-12-05 · Shikai Qiu, Zixi Chen, Hoang Phan, Qi Lei 외 arxiv

Several recently introduced deep learning optimizers utilizing matrix-level preconditioning have shown promising speedups relative to the current dominant optimizer AdamW, particularly in relatively small-scale experimen…

Clarifying Shampoo: Adapting Spectral Descent to Stochasticity and the Parameter Trajectory

2026-02-10 · Runa Eschenhagen, Anna Cai, Tsung-Hsien Lee, Hao-Jun Michael Shi arxiv

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 s…