paper-with-me

홈 › Papers

How Few-Shot Examples Add Up: A Causal Decomposition of Function Vectors in In-Context Learning

2026-05-15 · Entang Wang, Yiwei Wang, Aleksandra Bakalova, Michael Hahn arxiv

In-context learning (ICL) excels at new tasks from minimal examples, yet we still lack a mechanistic explanation of how few-shot prompts shape a model's function vector (FV)--a causal activation direction that drives task behavior on the ICL query. Across tasks and models, an $n$-shot FV is well-approximated by a linear combination of example-level sub-FVs, suggesting additive and composable contributions from individual demonstrations. Beyond additivity, we show that models contextualize individual examples' representations based on prior examples to adaptively reweight which demonstrations dominate the FV: attention shifts toward examples that are more informative and less ambiguous under the context. Finally, a causal decomposition separates Query-Key routing from Value updates, finding that contextualization's most consistent contributions to FV quality arise from Query-Key alignment--particularly in ambiguous settings--while Value-mediated effects are more heterogeneous. Together, these results unify additive superposition with context-dependent attention reweighting into a mechanistic, testable account of how few-shot prompts implement tasks.

📄 PDF Abstract BibTeX arXiv:2605.16591

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Bilinear Convolution Decomposition for Causal RL Interpretability

2024-12-01 · Narmeen Oozeer, Sinem Erisken, Alice Rigg

Efforts to interpret reinforcement learning (RL) models often rely on high-level techniques such as attribution or probing, which provide only correlational insights and coarse causal control. This work proposes replacin…

reinforcement-learningReinforcement LearningReinforcement Learning (RL)

A generalization of the randomized singular value decomposition

2021-05-27 · ICLR 2022 4 · Nicolas Boullé, Alex Townsend

The randomized singular value decomposition (SVD) is a popular and effective algorithm for computing a near-best rank $k$ approximation of a matrix $A$ using matrix-vector products with standard Gaussian vectors. Here, w…

Relational Knowledge Distillation Using Fine-tuned Function Vectors

2026-01-13 · Andrea Kang, Yingnian Wu, Hongjing Lu arxiv

Representing relations between concepts is a core prerequisite for intelligent systems to make sense of the world. Recent work using causal mediation analysis has shown that a small set of attention heads encodes task re…

Knowledge Distillation

Differentiability and Approximation of Probability Functions under Gaussian Mixture Models: A Bayesian Approach

2024-11-05 · Gonzalo Contador, Pedro Pérez-Aros, Emilio Vilches

In this work, we study probability functions associated with Gaussian mixture models. Our primary focus is on extending the use of spherical radial decomposition for multivariate Gaussian random vectors to the context of…

Function Vectors in Large Language Models

2023-10-23 · Eric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller 외

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-c…

In-Context Learning