Skip to main content
QUICK REVIEW

[Paper Review] Measuring Causal Effects of Data Statistics on Language Model's `Factual' Predictions

Yanai Elazar, Nora Kassner|arXiv (Cornell University)|Jul 28, 2022
Topic ModelingComputer Science16 citations
TL;DR

This paper proposes a causal inference framework to measure how training data statistics—such as co-occurrence counts—directly influence factual predictions in pretrained language models (PLMs), without retraining. Using observational data and do-calculus, it demonstrates that heuristics like subject-object co-occurrence causally affect model predictions, with effect sizes up to 57.73 CATE, revealing that PLMs rely on shallow statistics rather than deep understanding.

ABSTRACT

Large amounts of training data are one of the major reasons for the high performance of state-of-the-art NLP models. But what exactly in the training data causes a model to make a certain prediction? We seek to answer this question by providing a language for describing how training data influences predictions, through a causal framework. Importantly, our framework bypasses the need to retrain expensive models and allows us to estimate causal effects based on observational data alone. Addressing the problem of extracting factual knowledge from pretrained language models (PLMs), we focus on simple data statistics such as co-occurrence counts and show that these statistics do influence the predictions of PLMs, suggesting that such models rely on shallow heuristics. Our causal framework and our results demonstrate the importance of studying datasets and the benefits of causality for understanding NLP models.

Motivation & Objective

  • To understand whether and how simple data statistics in training corpora causally influence factual predictions of PLMs.
  • To develop a causal inference framework that bypasses expensive retraining and enables causal estimation from observational data alone.
  • To investigate whether PLMs use shallow heuristics—such as co-occurrence patterns—instead of deeper factual reasoning when generating answers.
  • To quantify the causal impact of three specific heuristics: Exact-Match, Pattern-Object Co-occurrence, and Subject-Object Co-occurrence on model predictions.
  • To provide a methodological foundation for causal analysis of model behavior, with implications for interpretability and model generalization.

Proposed method

  • Construct a causal graph encoding assumed relationships between training data statistics, model weights, and predictions.
  • Apply do-calculus and the backdoor criterion to identify and estimate causal effects from observational data, avoiding the need for intervention via retraining.
  • Define three hypotheses: Exact-Match (memorization of training utterances), Pattern-Object Co-occurrence (most frequent object with a relation pattern), and Subject-Object Co-occurrence (most frequent object with a subject).
  • Estimate Average Treatment Effects (ATE) and Conditional Average Treatment Effects (CATE) per relation to assess causal influence across different factual relations.
  • Use baselines including Heuristic (always predicts based on the heuristic) and Perfect (oracle) to validate causal effect estimates.
  • Train a new RoBERTa-base model with 84 checkpoints to analyze training dynamics and release them for community use.

Experimental results

Research questions

  • RQ1To what extent do co-occurrence statistics in training data causally affect factual predictions in PLMs?
  • RQ2Do PLMs rely on shallow heuristics such as subject-object co-occurrence rather than deeper semantic understanding?
  • RQ3How do causal effects vary across different factual relations, and what explains the variation in effect strength?
  • RQ4Can causal inference from observational data reliably estimate the influence of training data statistics on model behavior?
  • RQ5Are the observed effects due to model learning or merely statistical artifacts, and how can this be controlled?

Key findings

  • The causal effect of subject-object co-occurrence on model predictions reaches a CATE of 57.73, indicating strong influence on factual predictions.
  • The pattern-object co-occurrence hypothesis shows a CATE of 50.34, demonstrating significant causal impact across relations.
  • The exact-match hypothesis has a CATE of 42.00 for the religion relation, showing that memorization of training utterances contributes substantially to predictions.
  • The lowest CATE values across all hypotheses are close to zero, indicating that for some relations, heuristics have minimal causal influence.
  • The Heuristic baseline achieves 100% ATE by design, confirming that the framework correctly identifies heuristic-driven behavior.
  • Randomly initialized models show near-zero causal effects (e.g., -2.88 for BERT-base), confirming that observed effects are due to learning, not initialization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.