Linear Transformers are Versatile In-Context Learners
Max Vladymyrov, Johannes von Oswald, Mark Sandler, Rong Ge
摘要
Recent research has demonstrated that transformers, particularly linear attention models, implicitly execute gradient-descent-like algorithms on data provided in-context during their forward inference step. However, their capability in handling more complex problems remains unexplored. In this paper, we prove that each layer of a linear transformer maintains a weight vector for an implicit linear regression problem and can be interpreted as performing a variant of preconditioned gradient descent. We also investigate the use of linear transformers in a challenging scenario where the training data is corrupted with different levels of noise. Remarkably, we demonstrate that for this problem linear transformers discover an intricate and highly effective optimization algorithm, surpassing or matching in performance many reasonable baselines. We analyze this algorithm and show that it is a novel approach incorporating momentum and adaptive rescaling based on noise levels. Our findings show that even linear transformers possess the surprising ability to discover sophisticated optimization strategies.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capability 引用了 Data Distributional Properties Drive Emergent In-Context Learning in Transformers
- On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capability 引用了 Language Models are Few-Shot Learners
- On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capability 引用了 Transformers Learn In-Context by Gradient Descent
- On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and Capability 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When 引用了 Data Distributional Properties Drive Emergent In-Context Learning in Transformers
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When 引用了 Language Models are Few-Shot Learners
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When 引用了 Transformers Learn In-Context by Gradient Descent
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When 引用了 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 to Achieve Second-Order Convergence Rates for In-Context Linear Regression 引用了 Language Models are Few-Shot Learners
- Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression 引用了 Transformers Learn In-Context by Gradient Descent
- 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
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes 引用了 Language Models are Few-Shot Learners
- In-Context Algorithm Emulation in Fixed-Weight Transformers 引用了 Language Models are Few-Shot Learners
- In-Context Algorithm Emulation in Fixed-Weight Transformers 引用了 Transformers Learn In-Context by Gradient Descent
- In-Context Algorithm Emulation in Fixed-Weight Transformers 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
引用它的顶会 Paper13
- Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear RegressionDeqing Fu, Tianqi Chen, Robin Jia, Vatsal SharanNeurIPS 2024 · 54 次引用
- Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and TimeBlake Bordelon, Mary I. Letey, Cengiz PehlevanICLR 2026 · 14 次引用
- On Mesa-Optimization in Autoregressively Trained Transformers: Emergence and CapabilityChenyu Zheng, Wei Huang, Rongzhen Wang, Guoqiang Wu 等NeurIPS 2024 · 10 次引用
- In-Context Algorithm Emulation in Fixed-Weight TransformersJerry Yao-Chieh Hu, Hude Liu, Jennifer Yuntong Zhang, Han LiuICLR 2026 · 7 次引用
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and WhenKevin Christian Wibisono, Yixin WangNeurIPS 2024 · 5 次引用
它引用的 Paper20
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- 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 次引用
相关 Paper
- Trained Transformer Classifiers Generalize and Exhibit Benign Overfitting In-ContextSpencer Frei, Gal VardiICLR 2025
- Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 次引用
- How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear RegressionXingwu Chen, Lei Zhao, Difan ZouNeurIPS 2024 · 19 次引用
- Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?Khashayar Gatmiry, Nikunj Saunshi, Sashank J. Reddi, Stefanie Jegelka 等ICML 2024 · 43 次引用
- One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-AttentionArvind V. Mahankali, Tatsunori Hashimoto, Tengyu MaICLR 2024 · 160 次引用
