CausalGym: Benchmarking causal interpretability methods on linguistic tasks

Aryaman Arora, Dan Jurafsky, Christopher Potts

Abstract

Large Language Models (LLMs) demonstrate sophisticated linguistic capabilities, yet the internal mechanisms driving these behaviors remain poorly understood. We introduce CausalGym, a benchmark designed to bridge the gap between psycholinguistics and mechanistic interpretability by evaluating whether internal model representations are causally linked to specific linguistic outputs. By applying methods such as Distributed Alignment Search (DAS) and linear probing across the Pythia model family, we demonstrate that causal features for complex grammar are often learned in discrete stages and that supervised methods like DAS are superior at identifying functional subspaces. Our results highlight the importance of selectivity in interpretability research and provide a rigorous framework for evaluating how models process linguistic structure.

Introduction

In the study of Large Language Models, two distinct research communities often observe the same phenomena from different perspectives. Psycholinguists evaluate model behavior through metrics like surprisal in ungrammatical sentences, while interpretability researchers seek to identify internal "features" or "neurons" that represent linguistic concepts such as gender or number.

However, a critical gap remains: causality. The ability to "probe" a model and find a vector representing "plurality" does not guarantee that the model utilizes that vector to determine its output (e.g., choosing "are" over "is"). Existing interpretability benchmarks are often fragmented, preventing rigorous, cross-task comparisons of whether internal features are truly functional. CausalGym addresses this by providing a unified pipeline to turn linguistic tasks into causal experiments.

Methods

CausalGym utilizes a systematic intervention pipeline to evaluate the causal efficacy of internal representations:

  1. Minimal Pairs: The benchmark uses sentence pairs that differ by only one linguistic feature (e.g., "The man... is" vs. "The men... are").
  2. Intervention: Researchers run the model on a "base" sentence (e.g., singular) but replace a specific internal representation with the corresponding representation from a "source" sentence (e.g., plural).
  3. Evaluation: The primary metric is the log odds-ratio, which measures how much this internal intervention changes the model's probability of predicting the correct next word.

To ensure that interpretability methods are not merely "hallucinating" causal links, the authors include control tasks with arbitrary labels (e.g., mapping grammar features to the word "dog"). This allows for the measurement of selectivity—the ability of a method to find features that are specifically relevant to the task at hand rather than just capturing general model noise.

Datasets and Experimental Setup

CausalGym consists of 29 tasks adapted from the SyntaxGym suite, covering a broad range of linguistic phenomena:

  • Agreement: Subject-verb number and gender agreement.
  • Licensing: Negative Polarity Items (NPIs) like "any," which require a preceding negative trigger.
  • Garden Path Effects: Sentences that induce initial parsing errors.
  • Long-distance Dependencies: Complex structures such as filler-gap dependencies.

These tasks were benchmarked across the Pythia model family, ranging from 14M to 6.9B parameters, including various training checkpoints to observe the evolution of these features over time.

Key Insights

The Efficacy of Distributed Alignment Search (DAS)

Distributed Alignment Search (DAS) consistently emerged as the most effective method for finding causally efficacious directions in models, significantly outperforming traditional linear probing. However, the authors note that DAS is highly expressive; without selectivity metrics and control tasks, it can appear to find "causal" directions even for random mappings.

Failure of Unsupervised Methods

Unsupervised methods like PCA and k-means, which do not incorporate the model's output during training, performed significantly worse at identifying causal features. This suggests that the features a model actually uses for computation are not necessarily those that explain the most variance in its internal activations.

Discrete Learning Stages and Phase Transitions

Analysis of training checkpoints revealed that models do not learn grammar through gradual improvement. Instead, they undergo "phase transitions." For instance, in NPI licensing, a model initially learns to move information directly from a negation token to the output. Only later does it develop a multi-layer circuit involving intermediate tokens to process the dependency.

Information Crossover

Causal features are not static. As a sentence is processed, the "causal power" of a feature (such as plurality) migrates across different token positions and layers. This demonstrates how the model "shuttles" information through its internal workspace during inference.

Results and Discussion

CausalGym confirms that task accuracy and the strength of causal features generally scale with model size. Even the smallest 14M parameter models show evidence of causal linguistic representations, though they are less robust than those in larger models. When adjusted for selectivity, the performance gap between DAS and simpler methods narrows, yet DAS remains the superior tool for identifying functional subspaces.

Limitations and Future Work

While CausalGym provides a robust framework, it is currently limited to English. Future research is required to explore morphologically rich languages where linguistic structures may be represented differently. Additionally, the current study focuses on 1D linear subspaces (the Linear Representation Hypothesis); future iterations may need to account for multi-dimensional or non-linear representations. Finally, expanding the task scope to include reasoning and factual knowledge will be essential for a holistic understanding of model internals.

Summary updated

BibTeX
@inproceedings{arora2024causalgym,
  author = {Aryaman Arora and Dan Jurafsky and Christopher Potts},
  title = {{CausalGym: Benchmarking causal interpretability methods on linguistic tasks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.785},
}
Figure