Competence-Based Analysis of Language Models

Adam Davies, Jize Jiang, ChengXiang Zhai · DOI

Abstract

Large Language Models (LLMs) often demonstrate high performance on benchmarks while remaining brittle to minor prompt variations. This paper introduces CALM (Competence-based Analysis of Language Models), a framework designed to measure whether a model's internal logic aligns with the actual causal structure of a task. By employing a novel Gradient-Based Intervention (GBI) technique, the authors demonstrate that models with similar accuracy can possess vastly different levels of underlying "competence," impacting their reliability and robustness.

Introduction

While LLMs exhibit impressive capabilities, their reliance on surface-level patterns rather than structural understanding is a major concern. Current evaluation methods typically focus on "black box" behavioral analysis—observing outputs without understanding the internal reasoning. Existing causal probing methods often rely on the "Linear Subspace Hypothesis," which assumes linguistic features are stored linearly. CALM addresses these limitations by providing a framework to measure competence without restrictive linearity assumptions.

The CALM Framework

CALM defines competence as the degree of alignment between a task's ground-truth causal model and the model's latent representations. In this framework, a competent model should be sensitive to changes in "causal" properties (factors that determine the correct answer) while remaining invariant to "environmental" or spurious properties.

Causal structure of the data-generating process and its mapping to model representations.

As shown in the causal graph above, the data-generating process involves latent variables $Z_c$ (causal) and $Z_e$ (environmental) that produce the observed input $\mathbf{x}$ and target $y$. Competence is measured by how well the model's internal states $\hat{z}$ mirror this structure.

Gradient-Based Interventions (GBIs)

The technical core of CALM is the Gradient-Based Intervention (GBI). Instead of searching for a linear direction for a concept, the authors train a small probe to identify a feature and then use white-box adversarial attacks (such as FGSM and PGD) to minimally perturb the model's internal embeddings. This allows for counterfactual simulations—asking "what if the model perceived this feature differently?"—even if the information is stored non-linearly.

Intervention framework comparing ground-truth causal properties ($z_H$) and non-causal properties ($z_{NS}$).

By applying interventions to the final layer's [MASK] token representation, the authors avoid the "recovery problem," where models re-derive erased information in subsequent layers. This ensures the intervention directly affects the final prediction $\hat{y}$.

Experimental Setup and Results

The framework was evaluated using 14 lexical inference tasks from the ConceptNet subset of the LAMA benchmark (e.g., IsA, PartOf, MadeOf). The researchers compared BERT-base-uncased and RoBERTa-base, both of which achieved approximately 31% aggregate accuracy.

Key findings include:

  • Competence vs. Performance: Despite identical accuracy, BERT was found to be more competent than RoBERTa on 12 of the 14 tasks. This suggests BERT's internal representations are better aligned with the logical requirements of lexical inference.
  • Correlation: A moderately strong positive correlation ($\rho = 0.508$) exists between competence and performance, indicating that models with better task understanding generally achieve higher accuracy.
  • Robustness: The lower competence scores of models like RoBERTa help explain their sensitivity to prompt variations; they likely rely on spurious lexical associations that fail when context changes.

Conclusion and Future Work

CALM provides a more nuanced view of model reliability than behavioral benchmarks alone. While the current study faces challenges like "collateral damage" (where intervening on one property affects others), it opens doors for scaling competence analysis to larger models like GPT-4 and discovering causal graphs automatically. Future work will focus on more complex, interconnected linguistic properties and larger-scale reasoning tasks.

Summary updated

BibTeX
@inproceedings{davies2024competence,
  author = {Adam Davies and Jize Jiang and ChengXiang Zhai},
  title = {{Competence-Based Analysis of Language Models}},
  booktitle = {CALM @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=gDXAde7AC7},
}
Figure