TL;DR
This paper introduces CALM (Competence-based Analysis of Language Models), an interpretability framework that borrows linguistics' classic distinction between competence (underlying linguistic knowledge) and performance (observed output behavior) to measure whether language models actually rely on task-causal concepts. By pairing causal task graphs with Gradient-Based Interventions (GBIs)—adversarial perturbations targeting probe representations—the authors provide the first quantitative metric of LLM competence and demonstrate that models with similar benchmark accuracy can have starkly different causal reliance on underlying concepts.
What Problem Does This Paper Address?
Large language models (LLMs) frequently display brittle behavior, failing under superficial prompt rephrasing or subtle distribution shifts. Standard evaluations treat LLMs as black boxes, measuring only downstream task performance. However, high accuracy on a benchmark does not guarantee that a model understands the underlying task; it may simply be exploiting spurious correlations or heuristic shortcuts.
Drawing on theoretical linguistics, the authors formulate task competence through the lens of causality: a competent model’s predictions should causally depend only on task-necessary properties (causal variables) and remain invariant to irrelevant or contextual properties (environmental variables). Until now, there has been no formal, general framework to quantitatively measure this internal alignment.
Methods
CALM formalizes linguistic tasks as Structural Causal Models (SCMs) and evaluates whether an LLM's internal representations match the task's causal structure:
- Competence Graph ($G_T$) & Competence Metric ($C_T$): The task is modeled as an SCM partitioning latent properties into causal ($Z_c$) and non-causal/environmental ($Z_e$). Competence is quantified by measuring whether model predictions change when causal properties are intervened upon ($do(Z_c = 0)$), and stay invariant when environmental properties are perturbed ($do(Z_e = 0)$). This adapts Interchange Intervention Accuracy (IIA) from sample-swapping to concept-level interventions.
- Gradient-Based Interventions (GBIs): Existing causal probing methods (e.g., INLP, LEACE) rely on linear erasure and often suffer from models "recovering" nonlinearly encoded information in deeper layers. Instead, the authors train differentiable neural probes $g_Z$ on internal representations and use gradient-based adversarial attack techniques (specifically FGSM and PGD constrained by an $L_\infty$-bound $\epsilon$) to minimally perturb hidden embeddings toward counterfactual states.
- Targeted Mask Interventions: For masked language models, GBIs are applied directly to the final-layer
[MASK]token representation, bypassing layer-to-layer feature recovery.
Datasets
The authors evaluated their framework on 14 lexical inference relations from the ConceptNet subset of the LAMA benchmark (e.g., IsA, PartOf, HasProperty, CapableOf, MotivatedByGoal), framed as cloze / fill-in-the-blank prompts.
- Models studied:
BERT-base-uncasedandRoBERTa-base. - Each task dataset was split 80/10/10 into train (to train probes), validation (hyperparameter selection), and test sets (competence evaluation).
Key Insights and Ideas
- Performance $\neq$ Competence: Models can attain nearly identical aggregate benchmark accuracy while relying on fundamentally different internal mechanisms.
- Concept-Level Counterfactuals: Instead of merely nullifying linear subspaces, treating intermediate layers as encoders and decoders subjected to gradient attacks enables flexible, targeted, concept-level counterfactual shifts ($do(Z = z')$) over nonlinear representations.
- Explaining Prompt Brittleness: Both BERT and RoBERTa exhibit intermediate levels of competence across lexical inference tasks, showing that they only partially rely on true relational semantics and remain susceptible to spurious lexical cues—explaining why slight prompt paraphrasing often leads to failure.
Key Results
- Aggregate Performance vs. Competence: While BERT and RoBERTa achieve virtually identical aggregate accuracy across the 14 ConceptNet tasks (0.3099 vs. 0.3094), BERT displays higher competence on average (0.381 vs. 0.334) and outperforms RoBERTa in competence on 12 out of 14 tasks.
- Above Chance: Both models score well above the unaligned random baseline threshold ($1/14 \approx 0.0714$), confirming that their internal predictions lean more on causal relations than spurious associations.
- Predictive Power: Task-level differences in competence correlate moderately strongly with differences in accuracy between the two models (Spearman’s $\rho = 0.508, p = 0.064$). In the two tasks where RoBERTa proved more competent than BERT (
HasSubEventandMotivatedByGoal), it also achieved substantially higher accuracy.
Limitations and Future Work
- Collateral Damage: Unlike linear projection methods (like INLP), gradient-based adversarial attacks provide no theoretical guarantee against unintentional damage to non-targeted properties; perturbations must be strictly bounded ($\epsilon = 0.1$).
- Independence Assumption: The experimental setup treats all 14 ConceptNet relations as mutually independent non-causal distractors, whereas some semantic overlap exists in natural language.
- Model Scale: Experiments were restricted to encoder-only masked language models (BERT and RoBERTa) on single-token cloze tasks. Scaling CALM to modern decoder-only generative models (e.g., Llama-3) and multi-step reasoning tasks remains future work.
Summary updated