IC-745Function vectors for simple list-oriented tasks can be algebraically combined via addition and subtraction to produce new vectors that trigger composed tasks, sometimes outperforming 10-shot ICL.

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

SourceFunction Vectors in Large Language Models

The authors extract FVs for three decomposable tasks (first-copy, first-capital, last-copy) and form a composed vector v*_bd = v_ad + v_bc - v_ac, hypothesizing it triggers the 'last-capital' task. Testing on GPT-J, Llama 2 (13B), and Llama 2 (70B), the composed vector outperforms both the directly extracted FV and 10-shot ICL on some tasks (e.g., last-country-capital: 0.60 vs 0.15 vs 0.32 on GPT-J; last-capitalize-first-letter: 0.95 vs 0.76 vs 0.75). Other tasks resist composition, suggesting the algebraic structure holds for certain task decompositions but not universally.

Evidence
interventional
Key metric
GPT-J last-country-capital: ICL 0.32 ± 0.02, FV 0.15 ± 0.03, composed 0.60 ± 0.02; GPT-J last-capitalize-first-letter: ICL 0.75 ± 0.01, FV 0.76 ± 0.02, composed 0.95 ± 0.00; Llama 2 (70B) last-country-capital: ICL 0.81 ± 0.03, FV 0.91 ± 0.02, composed 0.94 ± 0.02
Caveat
Composition works for some tasks but not others; the authors note it may hinge on 'word-selection' and 'word-transformation' being separable components. Results are on a small set of list-oriented tasks.
Model
GPT-J, Llama 2 / Llama 2 base
Concepts
Linear representation
Methods
Causal mediation analysis / Vig et al. 2020 (causal mediation analysis) [primary], Activation patching / Activation replacement / Cross-model activation patching (CMap) [primary]
Related findings
IC-744
Extraction
automatic-extraction