Lune

ICLR2025顶会

On the Optimization and Generalization of Two-layer Transformers with Sign Gradient Descent

Bingrui Li, Wei Huang, Andi Han, Zhanpeng Zhou, Taiji Suzuki, Jun Zhu, Jianfei Chen

摘要

The Adam optimizer is widely used for transformer optimization in practice, which makes understanding the underlying optimization mechanisms an important problem. However, due to the Adam's complexity, theoretical analysis of how it optimizes transformers remains a challenging task. Fortunately, Sign Gradient Descent (SignGD) serves as an effective surrogate for Adam. Despite its simplicity, theoretical understanding of how SignGD optimizes transformers still lags behind. In this work, we study how SignGD optimizes a two-layer transformer -consisting of a softmax attention layer with trainable query-key parameterization followed by a linear layer -on a linearly separable noisy dataset. We identify four stages in the training dynamics, each exhibiting intriguing behaviors. Based on the training dynamics, we prove the fast convergence but poor generalization of the learned transformer on the noisy dataset. We also show that Adam behaves similarly to SignGD in terms of both optimization and generalization in this setting. Additionally, we find that the poor generalization of SignGD is not solely due to data noise, suggesting that both SignGD and Adam requires high-quality data for real-world tasks. Finally, experiments on synthetic and real-world datasets empirically support our theoretical results.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Asymptotics of SGD in Sequence-Single Index Models and Single-Layer Attention Networks 引用了 Language Models are Few-Shot Learners
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
  • Scalable Diffusion Models with Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Scalable Diffusion Models with Transformers 引用了 Decision Transformer: Reinforcement Learning via Sequence Modeling
  • Scalable Diffusion Models with Transformers 引用了 Language Models are Few-Shot Learners
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Decision Transformer: Reinforcement Learning via Sequence Modeling 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Decision Transformer: Reinforcement Learning via Sequence Modeling 引用了 Language Models are Few-Shot Learners
  • How Does Label Noise Gradient Descent Improve Generalization in the Low SNR Regime? 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Provably Transformers Harness Multi-Concept Word Semantics for Efficient In-Context LearningDake Bu, Wei Huang, Andi Han, Atsushi Nitanda 等NeurIPS 2024 · 11 次引用
  2. Asymptotics of SGD in Sequence-Single Index Models and Single-Layer Attention NetworksLuca Arnaboldi, Bruno Loureiro, Ludovic Stephan, Florent Krzakala 等NeurIPS 2025 · 10 次引用
  3. LoTA-QAF: Lossless Ternary Adaptation for Quantization-Aware Fine-TuningJunyu Chen, Junzhuo Li, Zhen Peng, Wenjie Wang 等NeurIPS 2025 · 6 次引用
  4. How Does Label Noise Gradient Descent Improve Generalization in the Low SNR Regime?Wei Huang, Andi Han, Yujin Song, Yilan Chen 等NeurIPS 2025 · 4 次引用
  5. Never Saddle for Reparameterized Steepest Descent as Mirror FlowTom Jacobs, Chao Zhou, Rebekka BurkholzICLR 2026 · 3 次引用

它引用的 Paper46

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 次引用
  4. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  5. Decision Transformer: Reinforcement Learning via Sequence ModelingLili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee 等NeurIPS 2021 · 2,557 次引用

相关 Paper

  1. Adaptive Methods through the Lens of SDEs: Theoretical Insights on the Role of NoiseEnea Monzio Compagnoni, Tianlin Liu, Rustem Islamov, Frank Norbert Proske 等ICLR 2025
  2. Exact risk curves of signSGD in High-Dimensions: quantifying preconditioning and noise-compression effectsKe Liang Xiao, Noah Marshall, Atish Agarwala, Elliot PaquetteICML 2025
  3. Unraveling the Gradient Descent Dynamics of TransformersBingqing Song, Boran Han, Shuai Zhang, Jie Ding 等NeurIPS 2024 · 13 次引用
  4. Understanding Adam Requires Better Rotation Dependent AssumptionsTianyue H. Zhang, Lucas Maes, Alan Milligan, Alexia Jolicoeur-Martineau 等NeurIPS 2025 · 11 次引用
  5. Noise Is Not the Main Factor Behind the Gap Between Sgd and Adam on Transformers, But Sign Descent Might BeFrederik Kunstner, Jacques Chen, Jonathan Wilder Lavington, Mark SchmidtICLR 2023 · 5 次引用
黄昏的海面,两侧是细线勾勒的悬崖