Papers
Topics
Authors
Recent
Search
2000 character limit reached

AdamW-Style Shampoo Optimizer

Updated 19 January 2026
  • The optimizer combines matrix-based second moment tracking with decoupled weight decay to achieve rigorous convergence under nonconvex objectives.
  • It adapts between one-sided and two-sided preconditioning via tunable exponents, unifying elements of classical Shampoo and AdamW methods.
  • Empirical and theoretical results demonstrate improved optimization speed and stability for large-scale neural networks despite higher computational costs.

The AdamW-style Shampoo optimizer is an adaptive stochastic optimization algorithm that extends the original Shampoo method by combining matrix-based second-moment preconditioning with an AdamW-style decoupled weight decay. This approach leverages both one-sided and two-sided preconditioning schemes for tensor and matrix-valued parameters, and establishes rigorous convergence rates under nonconvex objectives. The optimizer has achieved empirical success in large-scale neural network training, securing first place in the external tuning track of the AlgoPerf neural network training algorithm competition (Li et al., 12 Jan 2026).

1. Mathematical Formulation and Algorithmic Structure

The AdamW-style Shampoo algorithm targets problems of the form

minXRm×nf(X)=EξP[f(X;ξ)]\min_{X \in \mathbb{R}^{m \times n}} f(X) = \mathbb{E}_{\xi \sim P}[f(X;\xi)]

where XkRm×nX_k \in \mathbb{R}^{m \times n} denotes the parameter matrix at iteration kk.

The core update for each iteration kk incorporates:

  • An exponential moving average of first moments MkM_k.
  • Two matrix-valued second-moment accumulators LkRm×mL_k \in \mathbb{R}^{m \times m} and RkRn×nR_k \in \mathbb{R}^{n \times n}.
  • Tunable preconditioning exponents p,q>0p, q > 0 such that $1/p + 1/q = 1$, generalizing between fully two-sided (p=q=2p = q = 2) and one-sided (XkRm×nX_k \in \mathbb{R}^{m \times n}0 or XkRm×nX_k \in \mathbb{R}^{m \times n}1) schemes.
  • Decoupled weight decay, following the AdamW paradigm.

Update equations:

  1. XkRm×nX_k \in \mathbb{R}^{m \times n}2 (stochastic gradient).
  2. XkRm×nX_k \in \mathbb{R}^{m \times n}3 (first moment, momentum).
  3. XkRm×nX_k \in \mathbb{R}^{m \times n}4, XkRm×nX_k \in \mathbb{R}^{m \times n}5 (second moments).
  4. XkRm×nX_k \in \mathbb{R}^{m \times n}6, XkRm×nX_k \in \mathbb{R}^{m \times n}7 (damping for invertibility).
  5. XkRm×nX_k \in \mathbb{R}^{m \times n}8.

Parameters include stepsize XkRm×nX_k \in \mathbb{R}^{m \times n}9, momentum kk0, second-moment decay kk1, weight decay kk2, damping kk3, and exponents kk4.

The algorithm reduces to classical Shampoo when kk5 and to one-sided preconditioning in the respective limiting cases. The decoupled weight decay term kk6 is independent of the adaptive preconditioning steps (Li et al., 12 Jan 2026, Gupta et al., 2018).

2. Matrix Norms and Their Relationships

AdamW-style Shampoo measures convergence using various matrix norms:

  • Frobenius norm: kk7.
  • Nuclear norm: kk8 (sum of singular values).
  • Spectral norm: kk9.

A standard relationship holds:

kk0

for kk1, kk2.

This implies that nuclear-norm convergence rates translate to analogous rates in Frobenius norm up to a factor of kk3 (Li et al., 12 Jan 2026).

3. Convergence Guarantees

AdamW-style Shampoo achieves the following convergence guarantee for the average nuclear norm of the gradient:

kk4

where kk5 is the number of iterations, kk6 with kk7 the infimum of kk8.

Under the conditions:

  • kk9 is MkM_k0-smooth in Frobenius norm,
  • Unbiased stochastic gradients with variance bounded by MkM_k1,
  • All preconditioners satisfy MkM_k2 and MkM_k3 for all MkM_k4,

the optimizer matches the optimal rate MkM_k5 (in Frobenius norm) of stochastic gradient descent, up to the explicit MkM_k6 factor in the nuclear-norm bound (Li et al., 12 Jan 2026).

The analysis crucially exploits:

  • MkM_k7-smoothness to control function descent,
  • Hölder’s (Schatten-MkM_k8) inequality for bounding inner products in terms of the nuclear norm,
  • Matrix Cauchy–Schwarz inequalities for update stability,
  • Careful control over the accumulation of preconditioners.

In the ideal case where MkM_k9, this factor is tight, so the practical convergence rate parallels SGD.

4. One-Sided vs. Two-Sided Preconditioning

AdamW-style Shampoo unifies one-sided and two-sided preconditioning under a common algebraic formulation parameterized by the choice of exponents LkRm×mL_k \in \mathbb{R}^{m \times m}0 and LkRm×mL_k \in \mathbb{R}^{m \times m}1:

  • Two-sided: Standard Shampoo (LkRm×mL_k \in \mathbb{R}^{m \times m}2): LkRm×mL_k \in \mathbb{R}^{m \times m}3.
  • One-sided: For LkRm×mL_k \in \mathbb{R}^{m \times m}4, LkRm×mL_k \in \mathbb{R}^{m \times m}5 (or vice versa), one of the preconditioners reduces to the identity, yielding a “row-wise” or “column-wise” form.

This parameterization enables flexible adaptation to the structure of the problem and, in particular, enables targeted preconditioning based on tensor modes for higher-order tensors. Such flexibility allows the optimizer to interpolate between full-matrix and separate-mode updates (Li et al., 12 Jan 2026, Gupta et al., 2018).

5. Implementation and Complexity

For an LkRm×mL_k \in \mathbb{R}^{m \times m}6 parameter matrix:

  • Memory requirements: Storage of two dense LkRm×mL_k \in \mathbb{R}^{m \times m}7 and LkRm×mL_k \in \mathbb{R}^{m \times m}8 accumulators for LkRm×mL_k \in \mathbb{R}^{m \times m}9 and RkRn×nR_k \in \mathbb{R}^{n \times n}0, additional memory for momentum RkRn×nR_k \in \mathbb{R}^{n \times n}1, and original parameters RkRn×nR_k \in \mathbb{R}^{n \times n}2.
  • Computation per step: Updating each accumulator in RkRn×nR_k \in \mathbb{R}^{n \times n}3 flops, matrix roots/inverse roots in RkRn×nR_k \in \mathbb{R}^{n \times n}4 (typically amortized), and the core update via matrix multiplications.
  • Decoupled weight decay: Implemented by RkRn×nR_k \in \mathbb{R}^{n \times n}5 scaling before the preconditioned gradient step, with no interaction between decay and the adaptive accumulators (Li et al., 12 Jan 2026, Gupta et al., 2018).

Relative to AdamW, Shampoo and its AdamW-style variant have increased complexity due to full-matrix second-moment tracking, but their per-step overhead remains comparable for typical (sub-1000 dimension) deep learning layers.

6. Extensions and Empirical Performance

Recent work has explored the interaction of Shampoo-style preconditioning with first-moment adaptation, most notably through connections to Adafactor and variants like SOAP, which runs Adam in the eigenbasis of Shampoo’s preconditioners. SOAP achieves further empirical improvements in large-batch LLM pretraining but also highlights the importance of fresh eigendecomposition for high-frequency preconditioner updates (Vyas et al., 2024).

The AdamW-style Shampoo optimizer won the external tuning track of AlgoPerf, evidencing its effectiveness in practical neural network training (Li et al., 12 Jan 2026). The addition of decoupled weight decay is particularly important as it preserves the separation between regularization and adaptivity, unlike classical (coupled) RkRn×nR_k \in \mathbb{R}^{n \times n}6 regularization.

  • Classical Shampoo: Employs only second-moment modes for preconditioning without built-in weight decay; regularization can be appended either in a coupled or decoupled fashion (Gupta et al., 2018).
  • SGD and AdamW: Track only diagonal or element-wise moments, which limits invariance to parameter scaling and reduces sharpness adaptation compared to the full-matrix approach.
  • SOAP (Vyas et al., 2024): Provides a formal bridge between Shampoo and Adafactor/Adam, demonstrating that adaptive diagonal moment tracking in a rotated basis yields improved robustness for eigendecomposition frequency—suggesting further directions for adaptive preconditioned optimizers.

Empirical results consistently show that second-order geometry and sophisticated preconditioning (as in Shampoo and AdamW-style Shampoo) can substantially improve optimization speed and stability for large-scale, ill-conditioned modern neural networks, provided the additional memory and computational requirements are managed appropriately.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to AdamW-Style Shampoo Optimizer.