Why Transformers Need Adam: A Hessian Perspective
Yushun Zhang, Congliang Chen, Tian Ding, Ziniu Li, Ruoyu Sun, Zhi-Quan Luo
摘要
SGD performs worse than Adam by a significant margin on Transformers, but the reason remains unclear. In this work, we provide an explanation through the lens of Hessian: (i) Transformers are"heterogeneous": the Hessian spectrum across parameter blocks vary dramatically, a phenomenon we call"block heterogeneity"; (ii) Heterogeneity hampers SGD: SGD performs worse than Adam on problems with block heterogeneity. To validate (i) and (ii), we check various Transformers, CNNs, MLPs, and quadratic problems, and find that SGD can perform on par with Adam on problems without block heterogeneity, but performs worse than Adam when the heterogeneity exists. Our initial theoretical analysis indicates that SGD performs worse because it applies one single learning rate to all blocks, which cannot handle the heterogeneity among blocks. This limitation could be ameliorated if we use coordinate-wise learning rates, as designed in Adam.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper59
- ASGO: Adaptive Structured Gradient OptimizationKang An, Yuxing Liu, Rui Pan, Yi Ren 等NeurIPS 2025 · 被引用 58 次
- Small Batch Size Training for Language Models: When Vanilla SGD Works, and Why Gradient Accumulation is WastefulMartin Marek, Sanae Lotfi, Aditya Somasundaram, Andrew Gordon Wilson 等NeurIPS 2025 · 被引用 46 次
- In Search of Adam's Secret SauceAntonio Orvieto, Robert GowerNeurIPS 2025 · 被引用 43 次
- Muon Outperforms Adam in Tail-End Associative Memory LearningShuche Wang, Fengzhuo Zhang, Jiaxiang Li, Cunxiao Du 等ICLR 2026 · 被引用 40 次
- Adam with model exponential moving average is effective for nonconvex optimizationKwangjun Ahn, Ashok CutkoskyNeurIPS 2024 · 被引用 36 次
它引用的顶会 Paper30
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 被引用 21,477 次
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 被引用 5,493 次
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer 等NeurIPS 2021 · 被引用 3,862 次
- On the Variance of the Adaptive Learning Rate and BeyondLiyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen 等ICLR 2020 · 被引用 2,210 次
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng 等ICML 2020 · 被引用 1,388 次
相关 Paper
- What Does It Mean to Be a Transformer? Insights from a Theoretical Hessian AnalysisWeronika Ormaniec, Felix Dangel, Sidak Pal SinghICLR 2025
- Understanding Adam Requires Better Rotation Dependent AssumptionsTianyue H. Zhang, Lucas Maes, Alan Milligan, Alexia Jolicoeur-Martineau 等NeurIPS 2025 · 被引用 11 次
- Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language ModelsFrederik Kunstner, Alan Milligan, Robin Yadav, Mark Schmidt 等NeurIPS 2024 · 被引用 100 次
- Adam Exploits ℓ∞-geometry of Loss Landscape via Coordinate-wise AdaptivityShuo Xie, Mohamad Amin Mohamadi, Zhiyuan LiICLR 2025
- On the Optimization and Generalization of Two-layer Transformers with Sign Gradient DescentBingrui Li, Wei Huang, Andi Han, Zhanpeng Zhou 等ICLR 2025
