TL;DR
Influence functions promise to tell us which exact training documents taught a language model a specific fact or grammar rule—without having to retrain the model from scratch. For the first time at pretraining scale, researchers put this promise to a strict controlled test by physically removing target properties from training corpora and verifying what influence functions actually retrieve. It turns out they do find relevant data, but often by latching onto partial cues and indirect patterns rather than the exact rule or fact you are looking for.
What Problem Does This Paper Address?
When an LLM outputs a fact ("Paris is in France") or follows a grammatical rule ("The boy hurt himself"), how do we trace that behavior back to the training data? Knowing this is vital for debugging models, curating datasets, and compensating creators.
The go-to mathematical tool for this is the Influence Function (IF), which estimates how much a model’s loss would change if a single training example had been left out. Because calculating exact IFs requires inverting a massive matrix of second derivatives (the Hessian)—which is computationally impossible at LLM scale—researchers rely on mathematical shortcuts. However, neural networks violate the core mathematical assumptions behind IFs, and previous LLM-scale evaluations mostly assumed that high-scoring training examples were genuinely responsible for the output. Nobody had verified whether IFs actually recover the exact training data that caused a behavior to be learned, or if they just pick up superficial coincidences.
Methods
To establish ground truth for data attribution, the authors designed a clean, three-step controlled framework across GPT-2 style models (trained on 68M to 5.6B tokens):
- Isolate Property $X$: Pick a specific grammatical rule (like reflexive pronouns) or a world fact, and filter the training corpus into two halves: $D_X$ (sentences containing $X$) and $D_{\text{base}}$ (everything else).
- Verify Learning: Train a "Full" model on all the data and a "No-$X$" model on $D_{\text{base}}$ alone. They only evaluate test queries where the Full model succeeds and the No-$X$ model fails—proving causally that the behavior came from $D_X$.
- Recover with Influence: Use IFs to rank training examples. Instead of just looking at what influences the right answer, they rank by influence contrast: the difference in influence between a minimal pair (e.g., Paris is in France minus Paris is in Germany).
They test three popular Hessian approximations—GradSim (ignores curvature, just compares gradient similarity), TrackStar (block-diagonal pseudo-Hessian), and K-FAC (Kronecker-factored curvature)—against a simple BM25 lexical search baseline.
Datasets
- Training: An English subset of Common Corpus (up to 5.6B tokens of public-domain/permissively licensed text) and an English Wikipedia dump (4.8B tokens) for richer factual coverage.
- New Resource: To filter grammatical structures at multi-billion-token scale, the authors dependency-parsed and publicly released 10 billion tokens of Common Corpus—making this the largest controlled data-ablation study on linguistic phenomena to date.
- Evaluation: BLiMP and BLiMPPI minimal pairs for four grammatical phenomena (binding reflexives, existential there quantifiers, wh-island effects, and negative polarity items), plus the BEAR benchmark for template-based factual relations.
Key Insights and Ideas
- Indirect evidence does heavy lifting: When IFs miss the exact target property $X$ in their top-10 results, they aren't necessarily outputting garbage. For grammar, they frequently surface partial cues—for instance, supporting "the boy hurt himself" with "the boy hurt his knee", or supporting negative polarity items with standalone negations.
- Facts vs. entity priors: In factual queries, full entity co-occurrences (sentences mentioning both Paris and France) make up only 19% of the top-10 retrieved examples on Wikipedia. Instead, 66% mention only a single target entity. Rather than tracing a "fact," IFs largely expose how models rely on entity frequency priors and relation templates (like "the capital of..."), echoing how LLMs hallucinate.
- Contrast is crucial for subtle syntax: Standard top-$k$ attribution (scoring only the correct sentence) works fine for facts and existential quantifiers, where one keyword drives the signal. For binding reflexives and negative polarity items, however, subtracting the incorrect minimal pair's influence is essential to isolate the grammatical rule.
Key Results
Aggregate influence contrast across methods and phenomena
- Aggregate success, mixed top-10 precision: On average, IFs assign higher contrast scores to $D_X$ than to base data across almost all setups. However, Precision@10 varies wildly by phenomenon on the 5.6B model: existential there quantifiers reach up to 86%, wh-islands and NPIs hit 51%, binding reflexives drop to 30% (down from near-100% on smaller 68M/130M budgets), and facts peak at just 35% on Common Corpus and 26% on Wikipedia.
- Approximation showdown: K-FAC is the most reliable method overall, winning on all four linguistic tasks and closely trailing TrackStar, which edges it out on factual retrieval. GradSim consistently comes in last, showing that curvature correction genuinely matters.
- Factual resilience: Removing all co-occurrences of a fact barely dents overall factual accuracy (dropping just 3.7 percentage points on Common Corpus and 3.2 points on Wikipedia), underscoring how much LLMs lean on indirect associations rather than explicit fact statements.
Limitations and Future Work
The experiments are bounded by scale—using a single architecture (GPT-2) up to 5.6B tokens on a single random seed, alongside subsampled 5M-sentence pools during attribution. Furthermore, automated syntactic parsers and entity-alias filters inevitably miss edge cases in natural text. Future work could explore how attribution behaves on phenomena learned purely through complex cross-example interactions, test larger model families, and evaluate newer concept-based influence formulations beyond standard per-sample loss.
Summary updated