面向实用且可扩展SOAP的因子化单边Adam矩
研究论文 · 2026/11/13
本文提出FOAM(Factored One-sided Adam-Moment),一种轻量级SOAP变体,旨在以接近AdamW的效率保留SOAP的优势。FOAM采用仅输入侧预条件,丢弃输出侧Kronecker因子,从而减少内存并移除一次特征分解;同时用基于行-列统计的因子化Adam矩估计器替代SOAP的稠密旋转二阶矩。在K-FAC Fisher假设(输出曲率为对角)下,该估计器能精确恢复SOAP的稠密二阶矩,实测K-FAC违反仅15-20%,对更新影响可忽略。实验表明,在124M至760M参数的大语言模型预训练中,FOAM的验证损失与强SOAP和Muon基线相当,优化器状态减半,运行时间与Muon同级,并在三倍学习率范围内保持鲁棒性。
FOAM在保持SOAP优化效果的同时显著降低内存和计算开销,为大规模语言模型预训练提供了一种更实用的二阶优化方案,具有重要的工程应用价值。
Second-order optimizers (e.g., Shampoo, SOAP) have emerged as compelling alternatives to Adam/AdamW and promise faster per-step convergence than AdamW in transformer training. However, they still remain costly in practice, and even SOAP still pays substantial optimizer-state memory and eigendecomposition overhead. We ask whether the benefits of SOAP can be retained at nearly the efficiency of AdamW. In this paper, we answer yes with a lightweight SOAP variant, Factored One-sided Adam-Moment (FOAM). The path to practical impact is twofold: first, FOAM employs input-only preconditioning, dropping the output-side Kronecker factor to reduce memory and remove one eigendecomposition. The Kronecker structure of the Hessian shows that this is exact for a diagonal output-side curvature and nearly lossless for a near-diagonal one, as we observe empirically. Second, FOAM replaces SOAP's dense rotated second moment with a factored Adam-moment estimator based on row-by-column statistics. Under the K-FAC Fisher assumption with a diagonal output curvature, this estimator exactly recovers SOAP's dense second moment, and we measure only a 15-20% K-FAC violation, with negligible effect on the update. Our empirical results support the claim that FOAM matches strong SOAP and Muon baselines in validation loss across scales of large language model (LLM) pre-training, uses half of SOAP's optimizer state, runs at Muon-class wall-clock time, and retains robustness across a three-fold learning-rate range. The results hold from 124M to 760M parameters, demonstrating that SOAP's gains need not require SOAP's cost. Code: https://github.com/naver-ai/foam