揭示Adam收敛的理论条件,解释其在Transformer中表现优异的原因
On the Principles Behind Neural Network Optimizers

- 发现Adam收敛与发散的相变边界,需按批量大小调整超参数
- 证明Adam在Transformer中高效源于海森矩阵的近块对角结构
- 提出内存减半的Adam-mini,适合资源受限场景
可靠的优化是神经网络训练的核心,但现代大模型默认使用的Adam优化器基础薄弱。本文从原理上重建Adam的收敛性:首次揭示存在依赖任务的相变现象——合理选择与批量大小相关的超参数时,Adam可收敛;而在小β₂设置下可能发散。进一步研究发现,Adam在Transformer中显著优于SGD,根源在于海森矩阵沿训练过程演化为近块对角结构,且块间差异显著。理论证明该结构使Adam的对角预条件器有效。我们还指出这一特殊结构源于连续的大矩阵变量乘积,并基于随机矩阵理论给出严格分析。这些洞见催生了Adam-mini新优化器,内存减少50%却保持性能。研究成果不仅深化对Adam的理解,也为其他优化器(如Muon)的设计提供通用框架。
原文摘要 · Abstract (English)
Reliable optimization is central to neural network (NN) training, yet Adam, the default optimizer for modern LLMs, rests on a fragile foundation. This thesis develops a principled grounding for Adam and motivates new designs. First, we revisit Adam's divergence--convergence debate and show the existence of a problem-dependent phase transition: with properly chosen, batch-size-dependent hyperparameters, Adam converges, whereas under small-$β_2$ regimes it can diverge. Second, we investigate why Adam substantially outperforms SGD on Transformers through Hessian structure. We find that the Hessian evolves toward a near-block-diagonal form along training, accompanied by strong block heterogeneity. We prove that this structure makes Adam's diagonal preconditioner effective. We further show that this special Hessian structure originates from consecutive multiplications of large matrix variables, and we provide a rigorous analysis based on random matrix theory. Finally, these insights motivate Adam-mini, a new optimizer that reduces Adam's memory footprint by 50\% while preserving its performance. Our results also have broader implications beyond Adam: they reveal new local structures in matrix-based nonconvex problems, and also help understand and improve recent NN optimizers, such as Muon.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。