A Geometric Notion of Causal Probing

Clément Guerner, Anej Svete, Tianyu Liu, Alexander Warstadt, Ryan Cotterell · OpenReview

Abstract

Large language models rely on real-valued representations of text to make their predictions. These representations contain information learned from the data that the model has trained on, including knowledge of linguistic properties and forms of demographic bias, e.g., based on gender. A growing body of work has considered removing information about concepts such as these using orthogonal projections onto subspaces of the representation space. We contribute to this body of work by proposing a formal definition of $\textit{intrinsic}$ information in a subspace of a language model's representation space. We propose a counterfactual approach that avoids the failure mode of spurious correlations (Kumar et al., 2022) by treating components in the subspace and its orthogonal complement independently. We show that our counterfactual notion of information in a subspace is optimized by a $\textit{causal}$ concept subspace. Furthermore, this intervention allows us to attempt concept controlled generation by manipulating the value of the conceptual component of a representation. Empirically, we find that R-LACE (Ravfogel et al., 2022) returns a one-dimensional subspace containing roughly half of total concept information under our framework. Our causal controlled intervention shows that, for at least one model, the subspace returned by R-LACE can be used to manipulate the concept value of the generated word with precision.

Introduction

Researchers have long suspected the Linear Subspace Hypothesis: the idea that a language model (LM) encodes specific concepts, such as grammatical number, within specific linear subspaces of its internal representation space. However, traditional "extrinsic probing"—training external classifiers to identify these concepts—suffers from spurious correlations. A probe might identify a concept simply because it correlates with other features (like a specific verb lemma) rather than finding the actual causal direction the model uses for generation.

Geometric representation of concepts like verbal number and lemma.

This paper moves beyond traditional probing by proposing an intrinsic, information-theoretic framework. By treating concepts as causal latent variables and using a counterfactual approach, we can precisely isolate and even manipulate linguistic features without relying on external tools.

Theoretical Framework: Counterfactual Mutual Information

The core of our approach is defining what makes an ideal concept subspace through four geometric pillars:

  1. Erasure: Removing the subspace should eliminate all concept information.
  2. Encapsulation: The subspace should contain all the concept information.
  3. Containment: The subspace should contain only concept information (minimalism).
  4. Stability: Removing the concept shouldn't disrupt unrelated information.

To achieve this, we introduce a "counterfactual" distribution that mathematically decouples the "concept" component of a representation from its orthogonal complement. This allows for a "do-intervention" (borrowed from causal inference) to manually set the value in a concept subspace and observe the effect on the model's output.

Causal graphs illustrating the relationship between representations, concepts, and outputs.

Experimental Setup

We evaluated several models, including GPT-2 and Llama 2, across three domains:

  • Verbal Number (English): Using the Linzen et al. (2016) number agreement dataset (e.g., "The kids walk" vs "The kid walks").
  • Grammatical Gender (French): Analyzing adjective-noun agreement in Universal Dependencies treebanks.
  • CEBaB Benchmark: Testing aspect-level sentiment in restaurant reviews (e.g., isolating service quality from food quality).

Key Results and Discussion

Our findings suggest that many linguistic concepts are remarkably well-captured by simple one-dimensional subspaces. For English verbal number, we could manipulate the model's output with high precision by acting only on the identified subspace. We also found that LEACE (Linear Erasure) is highly effective at identifying these causal directions, outperforming older methods like INLP.

On the CEBaB benchmark, our causal "do-intervention" approach improved the performance of existing interpretability tools when used as causal effect estimators. However, limitations remain: the intrinsic math involves computationally intensive approximations, and the framework currently focuses on linear subspaces, which may not capture more complex, non-linear concept encodings. Future work will focus on scaling these methods to larger models and more complex conceptual structures.

Summary updated

Abstract

Large language models rely on real-valued representations of text to make their predictions. These representations contain information learned from the data that the model has trained on, including knowledge of linguistic properties and forms of demographic bias, e.g., based on gender. A growing body of work has considered removing information about concepts such as these using orthogonal projections onto subspaces of the representation space. We contribute to this body of work by proposing a formal definition of $\textit{intrinsic}$ information in a subspace of a language model's representation space. We propose a counterfactual approach that avoids the failure mode of spurious correlations (Kumar et al., 2022) by treating components in the subspace and its orthogonal complement independently. We show that our counterfactual notion of information in a subspace is optimized by a $\textit{causal}$ concept subspace. Furthermore, this intervention allows us to attempt concept controlled generation by manipulating the value of the conceptual component of a representation. Empirically, we find that R-LACE (Ravfogel et al., 2022) returns a one-dimensional subspace containing roughly half of total concept information under our framework. Our causal controlled intervention shows that, for at least one model, the subspace returned by R-LACE can be used to manipulate the concept value of the generated word with precision.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Partitioning of Concept Information; aggregate across all datasets and modelsLEACE (linear concept erasure)Erasure ratio0.64 ratioConcept Erasure
Source quote
L476: The mean erasure ratio across all datasets and models is 0.64 and the encapsulation ratio is 0.50.
Partitioning of Concept Information; aggregate across all datasets and modelsLEACE (linear concept erasure)Encapsulation ratio0.50 ratioConcept Erasure
Source quote
L476: The mean erasure ratio across all datasets and models is 0.64 and the encapsulation ratio is 0.50.
Partitioning of Concept Information; study meanLEACE (linear concept erasure)Containment ratio0.77 ratioConcept Erasure
Source quote
L482: A containment ratio less than 1 indicates that \rvHconcept generally contains some non-concept information, with a mean value of 0.77.
Partitioning of Concept Information; study meanLEACE (linear concept erasure)Stability ratio0.83 ratioConcept Erasure
Source quote
L485: The stability ratio has a mean of 0.83, confirming that LEACE does some damage to non-concept information in \rvHerase. We note, however, that for our simple linguistic concepts, this damage is minimal. \looseness=-1
BibTeX
@misc{guerner2023geometric,
  author = {Clément Guerner and Anej Svete and Tianyu Liu and Alexander Warstadt and Ryan Cotterell},
  title = {{A Geometric Notion of Causal Probing}},
  year = {2023},
  eprint = {2307.15054},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.15054},
}
Figure