Lune

ICLR2024顶会

Function Vectors in Large Language Models

Eric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller, Byron C. Wallace, David Bau

摘要

We report the presence of a simple neural mechanism that represents an input-output function as a vector within autoregressive transformer language models (LMs). Using causal mediation analysis on a diverse range of in-context-learning (ICL) tasks, we find that a small number attention heads transport a compact representation of the demonstrated task, which we call a function vector (FV). FVs are robust to changes in context, i.e., they trigger execution of the task on inputs such as zero-shot and natural text settings that do not resemble the ICL contexts from which they are collected. We test FVs across a range of tasks, models, and layers and find strong causal effects across settings in middle layers. We investigate the internal structure of FVs and find while that they often contain information that encodes the output space of the function, this information alone is not sufficient to reconstruct an FV. Finally, we test semantic vector composition in FVs, and find that to some extent they can be summed to create vectors that trigger new complex tasks. Our findings show that compact, causal internal vector representations of function abstractions can be explicitly extracted from LLMs. Our code and data are available at https://functions.baulab.info.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Locating and Editing Factual Associations in GPT 引用了 Language Models are Few-Shot Learners
  • LoFiT: Localized Fine-tuning on LLM Representations 引用了 Locating and Editing Factual Associations in GPT
  • LoFiT: Localized Fine-tuning on LLM Representations 引用了 Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
  • LoFiT: Localized Fine-tuning on LLM Representations 引用了 Language Models are Few-Shot Learners
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications 引用了 Locating and Editing Factual Associations in GPT
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications 引用了 Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications 引用了 Language Models are Few-Shot Learners
  • Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications 引用了 A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity
  • The Linear Representation Hypothesis and the Geometry of Large Language Models 引用了 Locating and Editing Factual Associations in GPT
  • An Explanation of In-context Learning as Implicit Bayesian Inference 引用了 Language Models are Few-Shot Learners
  • Inference-Time Intervention: Eliciting Truthful Answers from a Language Model 引用了 Locating and Editing Factual Associations in GPT
  • Inference-Time Intervention: Eliciting Truthful Answers from a Language Model 引用了 Language Models are Few-Shot Learners
  • 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 引用了 The Linear Representation Hypothesis and the Geometry of Large Language Models
  • A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity 引用了 Language Models are Few-Shot Learners
  • Knowledge Circuits in Pretrained Transformers 引用了 Locating and Editing Factual Associations in GPT
  • Knowledge Circuits in Pretrained Transformers 引用了 Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
  • 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
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper155

  1. The Linear Representation Hypothesis and the Geometry of Large Language ModelsKiho Park, Yo Joong Choe, Victor VeitchICML 2024 · 461 次引用
  2. Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank ModificationsBoyi Wei, Kaixuan Huang, Yangsibo Huang, Tinghao Xie 等ICML 2024 · 215 次引用
  3. A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and ToxicityAndrew Lee, Xiaoyan Bai, Itamar Pres, Martin Wattenberg 等ICML 2024 · 177 次引用
  4. LoFiT: Localized Fine-tuning on LLM RepresentationsFangcong Yin, Xi Ye, Greg DurrettNeurIPS 2024 · 74 次引用
  5. Knowledge Circuits in Pretrained TransformersYunzhi Yao, Ningyu Zhang, Zekun Xi, Mengru Wang 等NeurIPS 2024 · 71 次引用

它引用的 Paper34

  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. Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister 等NeurIPS 2023 · 1,549 次引用
  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. Do different prompting methods yield a common task representation in language models?Guy Davidson, Todd M. Gureckis, Brenden M. Lake, Adina WilliamsNeurIPS 2025 · 11 次引用
  2. Causality ≠ Invariance: Function and Concept Vectors in LLMsGustaw Opielka, Hannes Rosenbusch, Claire E. StevensonICLR 2026 · 7 次引用
  3. Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic InsightsHaolin Yang, Hakaze Cho, Kaize Ding, Naoya InoueICLR 2026
  4. Which Attention Heads Matter for In-Context Learning?Kayo Yin, Jacob SteinhardtICML 2025
  5. Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias 等ACL Findings 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖