Factored One-sided Adam-Moment for Practical and Scalable SOAP
本文提出了一种名为FOAM的优化器,通过仅使用输入侧预条件化和基于行列统计的Adam矩估计,在保持SOAP级质量的同时,将SOAP的成本降低到接近AdamW的水平。
更新于 2026-11-19。作者:Jaemyung Yu、Byeongho Heo、Sangdoo Yun、Dongyoon Han。
中文摘要
二阶优化器(例如,Shampoo、SOAP)已成为Adam/AdamW的引人注目的替代品,在Transformer训练中承诺比AdamW更快每步收敛。然而,在实际应用中,它们仍然成本高昂,甚至SOAP仍然需要大量的优化器状态内存和特征分解开销。我们询问是否可以在几乎与AdamW相同的效率下保留SOAP的优点。在这篇论文中,我们通过一个轻量级的SOAP变体,即分解单侧Adam矩(Factored One-sided Adam-Moment,FOAM)给出了肯定的答案。达到实际影响的方法有两个方面:首先,FOAM采用仅输入的预条件,取消输出侧的克罗内克因子以减少内存并移除一个特征分解。Hessian的克罗内克结构表明,这对于对角输出侧曲率是精确的,对于接近对角线的曲率几乎是无损的,正如我们通过经验观察到的。其次,FOAM用基于行和列统计的分解Adam矩估计器替换了SOAP的密集旋转二阶矩。在K-FAC Fisher假设和具有对角输出曲率的情况下,这个估计器精确地恢复了SOAP的密集二阶矩,我们测量的K-FAC违规只有15-20%,对更新的影响可以忽略不计。我们的经验结果支持以下说法:FOAM在大型语言模型(LLM)预训练的各个规模上的验证损失中与强SOAP和Muon基线相匹配,使用SOAP一半的优化器状态,在Muon级的墙上运行时间,并在三倍学习率范围内保持鲁棒性。结果从1.24亿到7600万个参数不等,这表明SOAP的收益不必需要SOAP的成本。代码:https://github.com/naver-ai/foam
英文摘要
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
解读
一句话总结
本文提出了一种名为FOAM的优化器,通过仅使用输入侧预条件化和基于行列统计的Adam矩估计,在保持SOAP级质量的同时,将SOAP的成本降低到接近AdamW的水平。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:现有第二阶优化器(如SOAP)在性能上优于Adam/AdamW,但在实践中成本较高,特别是SOAP在内存和特征分解方面开销较大。
- 现有方案不足:SOAP虽然性能优异,但其计算效率低下,需要比AdamW多4.5倍的优化器状态和更长的每步墙钟时间。
- 研究目标:在保持SOAP级质量的同时,降低SOAP的成本,使其接近AdamW的水平。
问题2:论文的核心创新点是什么?
- 技术创新:FOAM采用仅输入侧的预条件化和基于行列统计的Adam矩估计。
- 方法改进:FOAM通过仅保留输入侧因子和替换SOAP的密集旋转二阶矩,减少了优化器状态和计算开销。
- 优势:FOAM在验证损失方面与SOAP和Muon基线相当,同时优化器状态和使用时间减半。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在大型语言模型预训练中进行的实验,包括验证损失、优化器状态和使用时间。
- 性能提升:FOAM在验证损失方面与SOAP和Muon基线相当,同时优化器状态和使用时间减半。
- 对比结果:FOAM在验证损失方面与SOAP和Muon基线相当,同时优化器状态和使用时间减半。
问题4:这个研究的实际应用价值是什么?
- 应用场景:适用于大型语言模型和其他需要高性能优化器的深度学习任务。
- 实施建议:FOAM可以用于大型语言模型的预训练,以提高训练效率和性能。
- 局限与展望:FOAM在更大规模的预训练任务中的表现需要进一步研究,并且可以扩展到其他层和注意力投影。
来源
机器可读索引:llms.txt