Lune

NeurIPS2024顶会

In-Context Learning of a Linear Transformer Block: Benefits of the MLP Component and One-Step GD Initialization

Ruiqi Zhang, Jingfeng Wu, Peter L. Bartlett

摘要

We study the in-context learning (ICL) ability of a Linear Transformer Block (LTB) that combines a linear attention component and a linear multi-layer perceptron (MLP) component. For ICL of linear regression with a Gaussian prior and a non-zero mean, we show that LTB can achieve nearly Bayes optimal ICL risk. In contrast, using only linear attention must incur an irreducible additive approximation error. Furthermore, we establish a correspondence between LTB and one-step gradient descent estimators with learnable initialization (GD-β\mathsf{GD}\text{-}\mathbf{\beta}), in the sense that every GD-β\mathsf{GD}\text{-}\mathbf{\beta} estimator can be implemented by an LTB estimator and every optimal LTB estimator that minimizes the in-class ICL risk is effectively a GD-β\mathsf{GD}\text{-}\mathbf{\beta} estimator. Finally, we show that GD-β\mathsf{GD}\text{-}\mathbf{\beta} estimators can be efficiently optimized with gradient flow, despite a non-convex training objective. Our results reveal that LTB achieves ICL by implementing GD-β\mathsf{GD}\text{-}\mathbf{\beta}, and they highlight the role of MLP layers in reducing approximation error.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Looped Transformers are Better at Learning Learning Algorithms 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Looped Transformers are Better at Learning Learning Algorithms 引用了 Language Models are Few-Shot Learners
  • Looped Transformers are Better at Learning Learning Algorithms 引用了 Transformers Learn In-Context by Gradient Descent
  • Looped Transformers are Better at Learning Learning Algorithms 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Locating and Editing Factual Associations in GPT 引用了 Language Models are Few-Shot Learners
  • 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
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Pretrained Transformer Efficiently Learns Low-Dimensional Target Functions In-Context 引用了 Language Models are Few-Shot Learners
  • Pretrained Transformer Efficiently Learns Low-Dimensional Target Functions In-Context 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers are Minimax Optimal Nonparametric In-Context Learners 引用了 Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape
  • Transformers are Minimax Optimal Nonparametric In-Context Learners 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Transformers are Minimax Optimal Nonparametric In-Context Learners 引用了 Language Models are Few-Shot Learners
  • Transformers are Minimax Optimal Nonparametric In-Context Learners 引用了 Transformers Learn In-Context by Gradient Descent
  • Transformers are Minimax Optimal Nonparametric In-Context Learners 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regression 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regression 引用了 Transformers Learn In-Context by Gradient Descent
  • How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regression 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • 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
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper18

  1. Looped Transformers are Better at Learning Learning AlgorithmsLiu Yang, Kangwook Lee, Robert D. Nowak, Dimitris PapailiopoulosICLR 2024 · 82 次引用
  2. Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention LandscapeJuno Kim, Taiji SuzukiICML 2024 · 42 次引用
  3. Transformers are Minimax Optimal Nonparametric In-Context LearnersJuno Kim, Tai Nakamaki, Taiji SuzukiNeurIPS 2024 · 42 次引用
  4. Pretrained Transformer Efficiently Learns Low-Dimensional Target Functions In-ContextKazusato Oko, Yujin Song, Taiji Suzuki, Denny WuNeurIPS 2024 · 34 次引用
  5. How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear RegressionXingwu Chen, Lei Zhao, Difan ZouNeurIPS 2024 · 19 次引用

它引用的 Paper21

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 次引用
  3. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
  4. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento 等ICML 2023 · 729 次引用
  5. Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong 等NeurIPS 2023 · 356 次引用

相关 Paper

  1. How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?Jingfeng Wu, Difan Zou, Zixiang Chen, Vladimir Braverman 等ICLR 2024 · 94 次引用
  2. On learning linear dynamical systems in context with attention layersMaria-Luiza Vladarean, Xuhui Zhang, Suvrit SraICLR 2026
  3. Transformers Efficiently Perform In-Context Logistic Regression via Normalized Gradient DescentChenyang Zhang, Yuan CaoICML 2026 · 1 次引用
  4. Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear RegressionDeqing Fu, Tianqi Chen, Robin Jia, Vatsal SharanNeurIPS 2024 · 54 次引用
  5. 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 次引用
黄昏的海面,两侧是细线勾勒的悬崖