Lune

EMNLP Findings2023

In-Context Learning Creates Task Vectors

Roee Hendel, Mor Geva, Amir Globerson

摘要

In-context learning (ICL) in Large Language Models (LLMs) has emerged as a powerful new learning paradigm. However, its underlying mechanism is still not well understood. In particular, it is challenging to map it to the "standard" machine learning framework, where one uses a training set S to find a best-fitting function f (x) in some hypothesis class. Here we make progress on this problem by showing that the functions learned by ICL often have a very simple structure: they correspond to the transformer LLM whose only inputs are the query x and a single "task vector" calculated from the training set. Thus, ICL can be seen as compressing S into a single task vector θ(S) and then using this task vector to modulate the transformer to produce the output. We support the above claim via comprehensive experiments across a range of models and tasks. 1

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Function Vectors in Large Language Models 引用了 Locating and Editing Factual Associations in GPT
  • Function Vectors in Large Language Models 引用了 In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering
  • Function Vectors in Large Language Models 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Function Vectors in Large Language Models 引用了 Language Models are Few-Shot Learners
  • Function Vectors in Large Language Models 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Implicit In-context Learning 引用了 In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering
  • Implicit In-context Learning 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Implicit In-context Learning 引用了 Language Models are Few-Shot Learners
  • Locating and Editing Factual Associations in GPT 引用了 Language Models are Few-Shot Learners
  • Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling 引用了 Language Models are Few-Shot Learners
  • In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering 引用了 Language Models are Few-Shot Learners
  • An Explanation of In-context Learning as Implicit Bayesian Inference 引用了 Language Models are Few-Shot Learners
  • Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models 引用了 Locating and Editing Factual Associations in GPT
  • Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models 引用了 Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
  • A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity 引用了 Function Vectors in Large Language Models
  • A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity 引用了 Locating and Editing Factual Associations in GPT
  • A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity 引用了 Language Models are Few-Shot Learners
  • 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
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper97

  1. Implicit In-context LearningZhuowei Li, Zihao Xu, Ligong Han, Yunhe Gao 等ICLR 2025 · 1,989 次引用
  2. In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space SteeringSheng Liu, Haotian Ye, Lei Xing, James Y. ZouICML 2024 · 244 次引用
  3. Function Vectors in Large Language ModelsEric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller 等ICLR 2024 · 229 次引用
  4. Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language ModelsAsma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon 等ICML 2024 · 197 次引用
  5. A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and ToxicityAndrew Lee, Xiaoyan Bai, Itamar Pres, Martin Wattenberg 等ICML 2024 · 177 次引用

它引用的 Paper12

  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. Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley 等ICML 2023 · 1,822 次引用
  4. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 次引用
  5. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用

相关 Paper

  1. Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic InsightsHaolin Yang, Hakaze Cho, Kaize Ding, Naoya InoueICLR 2026
  2. Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias 等ACL Findings 2025 · 1 次引用
  3. How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with RepresentationsTianyu Guo, Wei Hu, Song Mei, Huan Wang 等ICLR 2024 · 80 次引用
  4. In-Context Learning through the Bayesian PrismMadhur Panwar, Kabir Ahuja, Navin GoyalICLR 2024 · 79 次引用
  5. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 次引用
黄昏的海面,两侧是细线勾勒的悬崖