Lune

NeurIPS2024顶会

Non-asymptotic Convergence of Training Transformers for Next-token Prediction

Ruiquan Huang, Yingbin Liang, Jing Yang

摘要

Transformers have achieved extraordinary success in modern machine learning due to their excellent ability to handle sequential data, especially in next-token prediction (NTP) tasks. However, the theoretical understanding of their performance in NTP is limited, with existing studies focusing mainly on asymptotic performance. This paper provides a fine-grained non-asymptotic analysis of the training dynamics of a one-layer transformer consisting of a self-attention module followed by a feed-forward layer. We first characterize the essential structural properties of training datasets for NTP using a mathematical framework based on partial orders. Then, we design a two-stage training algorithm, where the pre-processing stage for training the feed-forward layer and the main stage for training the attention layer exhibit fast convergence performance. Specifically, both layers converge sub-linearly to the direction of their corresponding max-margin solutions. We also show that the cross-entropy loss enjoys a linear convergence rate. Furthermore, we show that the trained transformer presents non-trivial prediction ability with dataset shift, which sheds light on the remarkable generalization performance of transformers. Our analysis technique involves the development of novel properties on the attention gradient and further in-depth analysis of how these properties contribute to the convergence of the training process. Our experiments further validate our theoretical findings.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Transformers learn to implement preconditioned gradient descent for in-context learning 引用了 Language Models are Few-Shot Learners
  • Transformers learn to implement preconditioned gradient descent for in-context learning 引用了 Transformers Learn In-Context by Gradient Descent
  • In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separation 引用了 Transformers learn to implement preconditioned gradient descent for in-context learning
  • In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separation 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separation 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 Language Models are Few-Shot Learners
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 Transformers Learn In-Context by Gradient Descent
  • Unlabeled Data Can Provably Enhance In-Context Learning of Transformers 引用了 Transformers learn to implement preconditioned gradient descent for in-context learning
  • Unlabeled Data Can Provably Enhance In-Context Learning of Transformers 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Unlabeled Data Can Provably Enhance In-Context Learning of Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Unlabeled Data Can Provably Enhance In-Context Learning of Transformers 引用了 Language Models are Few-Shot Learners
  • Unlabeled Data Can Provably Enhance In-Context Learning of Transformers 引用了 Transformers Learn In-Context by Gradient Descent
  • The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training 引用了 Language Models are Few-Shot Learners
  • The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training 引用了 Transformers Learn In-Context by Gradient Descent
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Transformers Learn In-Context by Gradient Descent 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Transformers Learn In-Context by Gradient Descent 引用了 Language Models are Few-Shot Learners
  • How Do Transformers Learn to Associate Tokens: Gradient Leading Terms Bring Mechanistic Interpretability 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. How Do Transformers Learn to Associate Tokens: Gradient Leading Terms Bring Mechanistic InterpretabilityShawn Im, Changdae Oh, Zhen Fang, Sharon LiICLR 2026 · 4 次引用
  2. Unlabeled Data Can Provably Enhance In-Context Learning of TransformersRenpu Liu, Jing YangNeurIPS 2025 · 3 次引用
  3. Decoupling Positional and Symbolic Attention in TransformersFelipe Urrutia, Jorge Salas, Alexander Kozachinskiy, Cristian Buc Calderon 等ICLR 2026 · 3 次引用
  4. In-context Learning of Linear Dynamical Systems with Transformers: Approximation Bounds and Depth-separationFrank Cole, Yuxuan Zhao, Yulong Lu, Tianhao ZhangNeurIPS 2025 · 1 次引用
  5. The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-trainingHongtao Zhang, WenJie Zhou, Chenxi Jia, Wei Chen 等ICML 2026

它引用的 Paper22

  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. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento 等ICML 2023 · 729 次引用
  4. Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong 等NeurIPS 2023 · 356 次引用
  5. Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 次引用

相关 Paper

  1. In-context Convergence of TransformersYu Huang, Yuan Cheng, Yingbin LiangICML 2024 · 114 次引用
  2. On the Generalization Ability of Next-Token-Prediction PretrainingZhihao Li, Xue Jiang, Liyuan Liu, Xuelin Zhang 等ICML 2025
  3. Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer TransformerYuandong Tian, Yiping Wang, Beidi Chen, Simon S. DuNeurIPS 2023 · 125 次引用
  4. Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow AnalysisHongru Yang, Bhavya Kailkhura, Zhangyang Wang, Yingbin LiangNeurIPS 2024 · 14 次引用
  5. Implicit Optimization Bias of Next-token Prediction in Linear ModelsChristos ThrampoulidisNeurIPS 2024 · 19 次引用
黄昏的海面,两侧是细线勾勒的悬崖