Rust in Everything
← Papers

Factored One-sided Adam-Moment for Practical and Scalable SOAP

Jaemyung Yu, Byeongho Heo, Sangdoo Yun, Dongyoon Han

2026-11-13▲ 12arXiv 2611.16905v1Hugging FaceCode

AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.

TL;DR

FOAM is a lightweight SOAP variant using input-only preconditioning and a factored Adam-moment estimator, matching SOAP and Muon validation loss at half of SOAP's optimizer state and Muon-class wall-clock time from 124M to 760M parameters.

Problem

SOAP and related second-order optimizers improve per-step convergence over AdamW, but SOAP needs substantially more optimizer state and a slower per-step wall-clock time. Its memory is dominated by the first moment, the dense rotated second moment, and two Kronecker factors L and R, while its runtime includes periodic eigendecompositions of both factors. The paper asks whether SOAP's benefits can be retained at nearly AdamW efficiency, rather than accepting SOAP's cost or defaulting to AdamW or Muon.

Method

FOAM makes two structural simplifications to SOAP. First, it uses input-only preconditioning: it drops the output-side factor L, maintains R_t with eigenbasis Q_R=eigh(R_t), and rotates only the input axis as G_rot=G Q_R. This is justified by the Kronecker structure of the Hessian and by the near-diagonal output-side curvature observed for transformer layers. Second, it replaces SOAP's dense rotated second moment with a row-column factored estimator tau rhat chatT, where rhat and chat are bias-corrected EMAs of the row and column means of the squared rotated gradient and tau=tr(R)/(||rhat||_1||chat||_1) matches the trace. The estimator is exact under K-FAC with diagonal output curvature; the eigenbasis uses Purifying Shampoo's adaptive skip rule.

Results

  • At 760M, FOAM reaches 2.796 validation loss versus SOAP 2.791, Muon 2.806, and AdamW 2.847, with 11.87 GiB matrix optimizer state versus SOAP 23.73 GiB; FOAM reaches AdamW's final loss in 10.53 h versus AdamW 10.55 h and SOAP 22.66 h. §5.2
  • Measured peak training memory at small size is +7.4% over AdamW for FOAM against +12.9% for SOAP. §5.2
  • Starting from SOAP, input-only preconditioning plus factored v yields 3.304 validation loss at 1.46 GiB state and 0.46 h wall-clock, versus SOAP 3.295 at 2.92 GiB and 0.48 h. §5.4
  • Input-only preconditioning keeps 75% of SOAP-full Gauss-Newton alignment at 0.38, while output-only is 0.10; dropping the output-side rotation costs a quarter of alignment, whereas dropping the input-side rotation costs 80%. §5.4
  • The rotated second moment's rank-1 share stays near 0.90 for bilateral rotation and 0.84 for input-only rotation, versus 0.54–0.63 in Adam's raw g^2 basis; cosine is about 0.97, 0.96, and 0.94, and factoring SOAP-rotated V costs less than 0.005 nats. §5.4

Limitations

  • Experiments stop at GPT-2 scale, up to 1.56B parameters, so whether FOAM's advantages hold for frontier-scale pre-training remains open, as stated in §6.
  • The implementation does not yet shard R and Q_R across devices, which the paper says matters at the ≥7B scale, as stated in §6.
  • The factored update is least accurate at the key projection, whose gradients pass through RoPE and softmax, as stated in §6 and Appendix C.
  • Embeddings and the lm-head remain on AdamW because their vocabulary dimension rules out a dense factor on that side; extending FOAM to these layers is left as future work in §6.

Key points

  • FOAM drops the output-side Kronecker factor L and keeps only input-side R_t with eigenbasis Q_R=eigh(R_t), reducing factor-state memory to O(n^2) and eigendecompositions from two to one. §4.1
  • For an affine layer with softmax cross-entropy, the Hessian decomposes as xxT ⊗ (diag(p)-ppT); off-diagonal output entries are smaller by p_k/(1-p_i), so with a large vocabulary the expected output-side curvature is dominated by its diagonal. §4.1
  • Lemma 1 shows that under K-FAC, E[ggT]=R⊗L, input rotation by Q_R gives Λ_R⊗L; when L is diagonal the rotated covariance is diagonal and its entries factor as λ_R[j] L[i,i], so m+n row/column statistics capture the m×n surface. §4.2
  • The factored estimator is tau rhat chatT with tau=tr(R)/(||rhat||_1||chat||_1), exactly recovering SOAP's dense rotated second moment under K-FAC with diagonal output curvature and SOAP's two-sided one when L is also diagonal. §4.2
  • FOAM reduces optimizer state from 2mn+2m^2+2n^2 to mn+2n^2+(m+n), per-step cost to O(mn^2) matching Muon, and amortized eigendecomposition from O(m^3+n^3) to O(n^3). §4.2
  • The eigenbasis is refreshed every pf steps with Purifying Shampoo's adaptive skip rule, skipping eigendecomposition when off(B)<=tol. §4.2
  • FOAM is within 0.004, 0.008, and 0.005 nats of SOAP at small, medium, and large and ahead of Muon, AdaMuon, and AdamW at every scale, each gap within about one seed std. §5.2
  • Hyperparameter sweeps show FOAM's bowl tracks AdamW and SOAP within 0.05 nats; at β1=0.99 AdamW collapses to 3.86 while SOAP and FOAM degrade by only 0.02 nats. §5.3

Mind map

FOAM
Motivation
SOAP memory cost
Two eigendecompositions
Dense rotated second moment
Need near-AdamW cost
Method
Input-only preconditioning
Factored Adam-moment
Trace normalization
Adaptive eigenbasis refresh
Adam in eigenbasis
Theory
Hessian Kronecker structure
Near-diagonal output curvature
K-FAC exactness
Lemma 1 factorization
Rank-one separability
Experiments
GPT-2 124M to 760M
GPT-2 XL 1.56B
ViT-Tiny
Batch-size scaling
Post-training Qwen3
Hyperparameter robustness
Results
Matches SOAP and Muon
Half SOAP optimizer state
Muon-class wall-clock
Within nats of SOAP
Robust learning rates
Limitations
Stops at GPT-2 scale
No R and Q_R sharding
Key-projection error
Embeddings and lm-head on AdamW