Training Dynamics of In-Context Learning in Linear Attention
Yedi Zhang, Aaditya K. Singh, Peter E. Latham, Andrew M. Saxe
摘要
While attention-based models have demonstrated the remarkable ability of in-context learning (ICL), the theoretical understanding of how these models acquired this ability through gradient descent training is still preliminary. Towards answering this question, we study the gradient descent dynamics of multi-head linear self-attention trained for in-context linear regression. We examine two parametrizations of linear self-attention: one with the key and query weights merged as a single matrix (common in theoretical studies), and one with separate key and query matrices (closer to practical settings). For the merged parametrization, we show that the training dynamics has two fixed points and the loss trajectory exhibits a single, abrupt drop. We derive an analytical time-course solution for a certain class of datasets and initialization. For the separate parametrization, we show that the training dynamics has exponentially many fixed points and the loss exhibits saddle-to-saddle dynamics, which we reduce to scalar ordinary differential equations. During training, the model implements principal component regression in context with the number of principal components increasing over training time. Overall, we provide a theoretical description of how ICL abilities evolve during gradient descent training of linear attention, revealing abrupt acquisition or progressive improvements depending on how the key and query are parametrized.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Weight-Space Linear Recurrent Neural Networks 引用了 Transformers Learn In-Context by Gradient Descent
- Weight-Space Linear Recurrent Neural Networks 引用了 Linear Transformers Are Secretly Fast Weight Programmers
- Statistical Advantage of Softmax Attention: Insights from Single-Location Regression 引用了 Transformers Learn In-Context by Gradient Descent
- Saddle-to-Saddle Dynamics Explains A Simplicity Bias Across Neural Network Architectures 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Data Distributional Properties Drive Emergent In-Context Learning in Transformers
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Language Models are Few-Shot Learners
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 Transformers Learn In-Context by Gradient Descent
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Transformers Learn In-Context by Gradient Descent 引用了 Data Distributional Properties Drive Emergent In-Context Learning in Transformers
- Transformers Learn In-Context by Gradient Descent 引用了 Language Models are Few-Shot Learners
- Transformers Learn In-Context by Gradient Descent 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Transformers Learn In-Context by Gradient Descent 引用了 Linear Transformers Are Secretly Fast Weight Programmers
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes 引用了 Language Models are Few-Shot Learners
- From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper16
- Saddle-to-Saddle Dynamics Explains A Simplicity Bias Across Neural Network ArchitecturesYedi Zhang, Andrew M. Saxe, Peter E. LathamICLR 2026 · 15 次引用
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and TimeBlake Bordelon, Mary I. Letey, Cengiz PehlevanICLR 2026 · 14 次引用
- From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training DynamicsZheng-An Chen, Tao LuoNeurIPS 2025 · 13 次引用
- Statistical Advantage of Softmax Attention: Insights from Single-Location RegressionO. Duranthon, Pierre Marion, Claire Boyer, Bruno Loureiro 等ICLR 2026 · 7 次引用
- Weight-Space Linear Recurrent Neural NetworksRoussel Desmond Nzoyem, Nawid Keshtmand, Enrique Crespo-Fernandez, Idriss Tsayem 等ICLR 2026 · 6 次引用
它引用的 Paper56
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
- Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento 等ICML 2023 · 729 次引用
- Data Distributional Properties Drive Emergent In-Context Learning in TransformersStephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang 等NeurIPS 2022 · 407 次引用
- Linear Transformers Are Secretly Fast Weight ProgrammersImanol Schlag, Kazuki Irie, Jürgen SchmidhuberICML 2021 · 394 次引用
相关 Paper
- In-Context Linear Regression Demystified: Training Dynamics and Mechanistic Interpretability of Multi-Head Softmax AttentionJianliang He, Xintian Pan, Siyu Chen, Zhuoran YangICML 2025
- How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear RegressionXingwu Chen, Lei Zhao, Difan ZouNeurIPS 2024 · 19 次引用
- In-Context Learning with Representations: Contextual Generalization of Trained TransformersTong Yang, Yu Huang, Yingbin Liang, Yuejie ChiNeurIPS 2024 · 45 次引用
- Prior Forgetting and In-Context OverfittingSungyoon LeeNeurIPS 2025 · 1 次引用
- Transformers Efficiently Perform In-Context Logistic Regression via Normalized Gradient DescentChenyang Zhang, Yuan CaoICML 2026 · 1 次引用
