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 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- 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
- Implicit In-context LearningZhuowei Li, Zihao Xu, Ligong Han, Yunhe Gao 等ICLR 2025 · 1,989 次引用
- 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 次引用
- Function Vectors in Large Language ModelsEric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller 等ICLR 2024 · 229 次引用
- Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language ModelsAsma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon 等ICML 2024 · 197 次引用
- A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and ToxicityAndrew Lee, Xiaoyan Bai, Itamar Pres, Martin Wattenberg 等ICML 2024 · 177 次引用
它引用的 Paper12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 次引用
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley 等ICML 2023 · 1,822 次引用
- An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 次引用
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
相关 Paper
- Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic InsightsHaolin Yang, Hakaze Cho, Kaize Ding, Naoya InoueICLR 2026
- Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias 等ACL Findings 2025 · 1 次引用
- 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 次引用
- In-Context Learning through the Bayesian PrismMadhur Panwar, Kabir Ahuja, Navin GoyalICLR 2024 · 79 次引用
- What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 次引用
