Causality Invariance: Function and Concept Vectors in LLMs
Organizations: University of Amsterdam
Abstract
Do large language models (LLMs) represent concepts abstractly, i.e., independent of input format? We revisit Function Vectors (FVs), compact representations of in-context learning (ICL) tasks that causally drive task performance. Across multiple LLMs, we show that FVs are not fully invariant: FVs are nearly orthogonal when extracted from different input formats (e.g., open-ended vs. multiple-choice), even if both target the same concept. We identify Concept Vectors (CVs), which carry more stable concept representations. Like FVs, CVs are composed of attention head outputs; however, unlike FVs, the constituent heads are selected using Representational Similarity Analysis (RSA) based on whether they encode concepts consistently across input formats. While these heads emerge in similar layers to FV-related heads, the two sets are largely distinct, suggesting different underlying mechanisms. Steering experiments reveal that FVs excel in-distribution, when extraction and application formats match (e.g., both open-ended in English), while CVs generalize better out-of-distribution across both question types (open-ended vs. multiple-choice) and languages. Our results show that LLMs do contain abstract concept representations, but these differ from those that drive ICL performance.
Figures & tables
| Model | K=3 | K=5 | K=10 | K=20 | K=50 | K=100 |
|---|---|---|---|---|---|---|
| Llama-3.1 8B | 0 | 0 | 1 | 1 | ||
| Llama-3.1 70B | 0 | 0 | 0 | 0 | 1 | |
| Qwen2.5 7B | 0 | 0 | 0 | |||
| Qwen2.5 72B | 0 | 0 | 0 | 1 |
| + Antonym | Top Tokens | |
|---|---|---|
| OE-ENG | _sweet (+56%), _fresh (+16%), _bland (+6%), _taste (+3%), _uns (+2%) | |
| OE-FR | _su (+31%), _dou (+27%), _frais (+5%), _fade (+5%), _ins (+3%) | |
| MC | _( (+53%), _A (+1%), _\n (+1%), _space (+0%), _) (+0%) | |
| OE-ENG | _sweet (+49%), _fresh (+8%), _bland (+3%), _taste (+3%), _uns (+3%) | |
| OE-FR | _sweet (+54%), _fresh (+9%), _bland (+3%), _uns (+3%), _taste (+2%) | |
| MC | _sweet (+35%), _fresh (+12%), _bland (+4%), _uns (+3%), _taste (+3%) |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Best | Best |
|---|---|---|
| Llama 3.1 8B | 1 | 10 |
| Llama 3.1 70B | 5 | 10 |
| Qwen 2.5 7B | 3 | 10 |
| Qwen 2.5 72B | 5 | 15 |
| Source Format | Target Format | Max AIE | Overlap w/ FV (top-5) | Overlap w/ CV (top-5) |
| OE-ENG | OE-FR | 0.22 | 4 | 0 |
| OE-ENG | MC | 0.02 | 2 | 0 |
| OE-FR | MC | 0.01 | 1 | 0 |
| MC | OE-ENG | 0.23 | 3 | 0 |
| OE-FR | OE-ENG | 0.41 | 4 | 0 |
| MC | OE-FR | 0.12 | 4 | 0 |
Representation Geometry in Language Models
Representation geometry in language models studies how embeddings and hidden states organize concepts, computation, and behavior.
See all 417 papers