Lune

NeurIPS2023顶会

Transformers learn to implement preconditioned gradient descent for in-context learning

Kwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit Sra

摘要

Several recent works demonstrate that transformers can implement algorithms like gradient descent. By a careful construction of weights, these works show that multiple layers of transformers are expressive enough to simulate iterations of gradient descent. Going beyond the question of expressivity, we ask: Can transformers learn to implement such algorithms by training over random problem instances? To our knowledge, we make the first theoretical progress on this question via an analysis of the loss landscape for linear transformers trained over random instances of linear regression. For a single attention layer, we prove the global minimum of the training objective implements a single iteration of preconditioned gradient descent. Notably, the preconditioning matrix not only adapts to the input distribution but also to the variance induced by data inadequacy. For a transformer with LL attention layers, we prove certain critical points of the training objective implement LL iterations of preconditioned gradient descent. Our results call for future theoretical studies on learning algorithms by training transformers.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • A Survey on In-context Learning 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • A Survey on In-context Learning 引用了 One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention
  • A Survey on In-context Learning 引用了 Language Models are Few-Shot Learners
  • A Survey on In-context Learning 引用了 Transformers Learn In-Context by Gradient Descent
  • A Survey on In-context Learning 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • How Transformers Learn Causal Structure with Gradient Descent 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • How Transformers Learn Causal Structure with Gradient Descent 引用了 One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention
  • How Transformers Learn Causal Structure with Gradient Descent 引用了 Language Models are Few-Shot Learners
  • How Transformers Learn Causal Structure with Gradient Descent 引用了 Transformers Learn In-Context by Gradient Descent
  • How Transformers Learn Causal Structure with Gradient Descent 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • An Explanation of In-context Learning as Implicit Bayesian Inference 引用了 Language Models are Few-Shot Learners
  • One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention 引用了 Language Models are Few-Shot Learners
  • One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention 引用了 Transformers Learn In-Context by Gradient Descent
  • One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • The Expressive Power of Low-Rank Adaptation 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • The Expressive Power of Low-Rank Adaptation 引用了 Language Models are Few-Shot Learners
  • The Expressive Power of Low-Rank Adaptation 引用了 Transformers Learn In-Context by Gradient Descent
  • Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks 引用了 One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention
  • Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks 引用了 Language Models are Few-Shot Learners
  • Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks 引用了 Transformers Learn In-Context by Gradient Descent
  • Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning Tasks 引用了 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
  • 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 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper180

  1. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng 等EMNLP 2024 · 479 次引用
  2. 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 次引用
  3. Can Mamba Learn How To Learn? A Comparative Study on In-Context Learning TasksJongho Park, Jaeseung Park, Zheyang Xiong, Nayoung Lee 等ICML 2024 · 124 次引用
  4. How Transformers Learn Causal Structure with Gradient DescentEshaan Nichani, Alex Damian, Jason D. LeeICML 2024 · 117 次引用
  5. The Expressive Power of Low-Rank AdaptationYuchen Zeng, Kangwook LeeICLR 2024 · 116 次引用

它引用的 Paper11

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 次引用
  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. Linear Transformers Are Secretly Fast Weight ProgrammersImanol Schlag, Kazuki Irie, Jürgen SchmidhuberICML 2021 · 394 次引用

相关 Paper

  1. 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 次引用
  2. Linear Transformers are Versatile In-Context LearnersMax Vladymyrov, Johannes von Oswald, Mark Sandler, Rong GeNeurIPS 2024 · 37 次引用
  3. How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear RegressionXingwu Chen, Lei Zhao, Difan ZouNeurIPS 2024 · 19 次引用
  4. Trained Transformer Classifiers Generalize and Exhibit Benign Overfitting In-ContextSpencer Frei, Gal VardiICLR 2025
  5. Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In ContextXiang Cheng, Yuxin Chen, Suvrit SraICML 2024 · 64 次引用
黄昏的海面,两侧是细线勾勒的悬崖