Causality $\neq$ Invariance: Function and Concept Vectors in LLMs

Gustaw Opiełka, Hannes Rosenbusch, Claire E. Stevenson

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.

Introduction

In-Context Learning (ICL) allows Large Language Models (LLMs) to perform complex relational tasks by observing a few examples. Previous research identified Function Vectors (FVs)—aggregated outputs from specific attention heads—as the primary causal mechanisms driving this behavior. It was hypothesized that FVs represent abstract concepts (e.g., "antonymy") independently of the input format. This study investigates the invariance of these representations, demonstrating a fundamental dissociation: the components that represent concepts abstractly are distinct from those that causally drive model performance.

Methodology

We compare two distinct methodologies for identifying task-relevant attention heads in models such as Llama 3.1 and Qwen 2.5:

  1. Activation Patching (AP): A causal interpretability technique that identifies "Causal Heads" by measuring the impact of patching specific head outputs on task performance. These heads constitute the Function Vectors (FVs).
  2. Representational Similarity Analysis (RSA): A technique that identifies "Invariant Heads" whose activity patterns remain consistent across different input formats (e.g., English vs. French, or open-ended vs. multiple-choice). These heads form the Concept Vectors (CVs).

We evaluated these vectors across 21 datasets covering seven relational concepts (e.g., Antonym, Synonym, Tense) and three input formats.

The Dissociation of Function and Concept

The core finding of this research is a striking dissociation between causality and invariance. As illustrated in Figure 1, the sets of heads identified by AP and RSA are largely disjoint, despite appearing in similar layers of the network.

Overview of the dissociation between causal Function Vectors and invariant Concept Vectors across multiple formats.

While FVs are powerful causal drivers, they are highly sensitive to the surface form of the prompt. FVs extracted for the same concept from different formats are nearly orthogonal (mean cosine similarity $\approx 0$). In contrast, CVs exhibit high similarity across formats, representing a more "pure" or abstract version of the underlying relation.

Key Results

Our steering experiments, where vectors are injected into the model's residual stream during ambiguous ICL tasks, reveal a performance trade-off:

  • In-Distribution Performance: FVs are significantly more effective when the extraction format matches the application format. They provide a strong causal push but are "brittle," often introducing format-specific artifacts (e.g., forcing a French response to an English prompt).
  • Out-of-Distribution Generalization: CVs, while "weaker" in terms of raw probability shift, are far more robust. They generalize effectively across languages and question types without the format-leakage issues seen with FVs.

Conclusion

The existence of distinct "Causal" and "Invariant" heads suggests that LLMs do not necessarily use their most abstract internal representations to execute tasks. This gap implies a multi-stage process where abstract concept detection (CVs) and task execution (FVs) may be decoupled. Ultimately, this research highlights that in the internal world of LLMs, "understanding" a concept and "using" it are two different mechanical processes.

Summary updated

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.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Cross-format activation patching, Llama 3.1 70B; OE-ENG → OE-FRCross-format activation patching; FV-head overlapOverlap w/ FV (top-5)4 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-ENG · target-format=OE-FR
Source quote
L505: OE-ENG │ OE-FR │ 0.22 │ 4 │ 0
Cross-format activation patching, Llama 3.1 70B; OE-ENG → OE-FRCross-format activation patching; CV-head overlapOverlap w/ CV (top-5)0 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-ENG · target-format=OE-FR
Source quote
L505: OE-ENG │ OE-FR │ 0.22 │ 4 │ 0
Cross-format activation patching, Llama 3.1 70B; OE-ENG → MCCross-format activation patching; FV-head overlapOverlap w/ FV (top-5)2 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-ENG · target-format=MC
Source quote
L506: OE-ENG │ MC │ 0.02 │ 2 │ 0
Cross-format activation patching, Llama 3.1 70B; OE-ENG → MCCross-format activation patching; CV-head overlapOverlap w/ CV (top-5)0 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-ENG · target-format=MC
Source quote
L506: OE-ENG │ MC │ 0.02 │ 2 │ 0
Cross-format activation patching, Llama 3.1 70B; OE-FR → MCCross-format activation patching; FV-head overlapOverlap w/ FV (top-5)1 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-FR · target-format=MC
Source quote
L507: OE-FR │ MC │ 0.01 │ 1 │ 0
Cross-format activation patching, Llama 3.1 70B; OE-FR → MCCross-format activation patching; CV-head overlapOverlap w/ CV (top-5)0 headsActivation Patching · params=70B · backbone=Llama 3.1 70B · source-format=OE-FR · target-format=MC
Source quote
L507: OE-FR │ MC │ 0.01 │ 1 │ 0
BibTeX
@inproceedings{opieka2026causality,
  author = {Gustaw Opiełka and Hannes Rosenbusch and Claire E. Stevenson},
  title = {{Causality $\textbackslash\{\}neq$ Invariance: Function and Concept Vectors in LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=LmLmhb6GEL},
}
Figure