Influence functions are a promising way to identify which training examples are responsible for a model's output. However, so far empirical evaluations on LLM pretraining level only assumed that they work as intended. This is the first work to systematically evaluate whether the 'influential' examples actually have properties relevant to a language model output, based on re-training with controlled data splits. We investigate three prominent Hessian approximation methods (GradSim, TrackStar, K-FAC) in two settings (linguistic phenomena and factual knowledge) in GPT-2 type models (68M-5.6B training tokens). We find that on average, the `influential' examples are indeed relevant, but they do not always bear the target properties directly, and the ratio and kind of relevance varies by setting.
Figures & tables
Figure 1: Overview of our evaluation framework , illustrated on a factual example.
Bind. Refl. N=1,000
NPI N=100
Exist. there N=1,000
Wh- Island N=1,000
68M
58.1
+3.6
34.0
-16.0
91.7
-23.2
21.8
-9.2
130M
59.6
-2.7
41.0
-15.0
97.1
-9.6
22.0
-2.5
1.3B
74.7
-44.2
73.0
-27.0
98.1
-4.7
39.3
-11.5
5.6B
75.0
-25.1
86.0
-32.0
98.1
-6.8
58.7
-14.2
GPT-2-small
67.3
87.8
97.0
57.7
GPT-2-medium
68.6
87.0
98.5
50.4
Table 1: Model performance on linguistic phenomena across token budgets. Accuracy (%) on minimal pairs; the main number is the model trained on the full corpus, the subscript is the change from filtering X . Green (-) marks the drop, red (+) the one case here where filtering increased accuracy. N is the number of minimal pairs. Full results are available in app. Table 12 .
Table 2: Model performance on factual knowledge (BEAR). Accuracy (%) per fact, where a fact counts as learned only if the correct object ranks highest under all three of its templates. All facts: the full benchmark. CC- / Wiki-supported: facts whose entity co-occurrence is ≥10 in the respective corpus. Subscripts give Δ=No-X−Full ( green (-) : the drop), reported only where a filtered counterpart exists, i.e., each model on its own corpus’s subset. Full results available in app. Table 11 .
Figure 2: Do IFs surface the training data with property X ? In aggregate, yes. Each point compares a method’s mean influence contrast on X -instances (y-axis) against base instances (x-axis), for one phenomenon × method × token budget. The large majority sit in the shaded region above the y=x line, satisfying Equation 4 (see footnote 13 for details). Bars are 95% CIs (negligible on the y-axis).
Figure 3: Precision@10 of the influence contrast ΔI for the 5.6B token Common Corpus model on the four linguistic phenomena and the two factual models. Full results across multiple k and token budgets are available in app. Figure 11 and Figure 12 .
Figure 4: Share of samples with full target phenomenon X and partial cues among top-10 retrievals across token budgets. These results are for K-FAC method ( Section 6.1 ). The plot is cumulative, i.e. partial cue retrievals are stacked on top of target retrievals. The unexplained retrievals are omitted, so the two lines do not sum to 100%.
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Agreement of GradSim, TrackStar, and K-FAC. Per-query-pair Spearman ρ (left) and Pearson r (right) on all queries between the ΔI that two methods assign to the candidate sentences in DX , computed independently for each query pair and averaged over pairs within a panel. K-FAC is the fused scheme (iii) variant used in the main results.
Figure 6: Agreement between the three (E)K-FAC application schemes described in Appendix A.3 . Per-query Spearman ρ (left) and Pearson r (right) between the ΔI scores that two schemes assign to the candidate sentences in DX , averaged over queries. Changing the curvature (EK-FAC vs. K-FAC) or moving from the sketched to the fused scheme leaves the ranking largely intact. Query batching, however, shows notable gaps. To limit compute, we scored 16 query pairs at λ=0.1 on the 5.6B model, with 500,000 candidate sentences per phenomenon.
Method
λ
Bind.
Ex.-Th.
Wh-Isl.
NPI
Mean
EK-FAC (sketched)
0.01
35.3
88.8
48.5
48.8
55.4
0.1
37.3
90.0
48.1
48.8
56.1
K-FAC (sketched)
0.01
35.7
86.8
47.6
50.0
55.0
0.1
37.6
88.8
48.1
49.1
55.9
K-FAC (fused)
0.01
32.2
82.9
47.2
48.5
52.7
0.1
33.6
86.5
46.8
49.4
54.1
Appendix
Table 3: Retrieval quality of the sketched (ii) and fused (iii) (E)K-FAC application schemes described in Appendix A.3 . EK-FAC is marginally better than the uncorrected versions, but gaps are small and do not repay its extra Hessian cost. Precision@10 (%) of the influence contrast ΔI across the four linguistic phenomena, per scheme and damping λ , on the 5.6B Common Corpus subset model. As in most parts of this paper, Precision@10 is computed on the Full correct, No- X wrong query pairs only, those ‘attributable’ to X . We fit and score on a reduced sample of 500,000 sentences per phenomenon, rather than the 5,000,000 used in the main experiments, keeping the DX -to- Dbase proportions of that setup; this yields results close to the main experiments (max. 4 pp of disagreement for the default λ=0.1 , fused K-FAC). Scheme (iii) is K-FAC-only by construction. Query batching (i) is omitted here: it does not scale well for multi-query setting, and is compared separately in Figure 6 .
Full
No- X (filtered)
Phenomenon
Tokens
N
FS-LL
LN-LL
Δ
FS-LL
LN-LL
Δ
Linguistic phenomena
Binding Reflexives
68M
1000
58.1
54.1
+4.0
61.7
44.6
+17.1
130M
1000
59.6
56.7
+2.9
56.9
44.8
+12.1
1.3B
1000
74.7
62.5
+12.2
30.5
30.1
+0.4
5.6B
1000
75.0
62.1
+12.9
49.9
49.6
+0.3
Appendix
Table 4: Full-sentence log-likelihood (FS-LL) vs. length-normalised log-likelihood (LN-LL) accuracy (%) , for full models and their No- X (data-filtered) counterparts across training budgets. N is the number of scored items per row: minimal pairs for the linguistic phenomena, corpus-supported facts for BEAR. Δ = FS-LL − LN-LL (positive = FS-LL higher, negative = LN-LL higher). The final block reports the gpt2 and gpt2-medium baselines, which have no data-filtered counterpart; there the two column groups are the two model sizes. For facts, we report both the N=601 corpus-supported facts in the Common Corpus set and the N=3221 in the Wikipedia set.
N
GradSim
TrackStar
K-FAC
Phenomenon
FS-LL
LN-LL
FS-LL
LN-LL
FS-LL
LN-LL
FS-LL
LN-LL
Binding Reflexives
354
222
11.9
15.9
20.1
23.9
30.3
46.2
NPI Licensing (own)
33
8
34.5
16.2
45.2
22.5
50.9
27.5
Exist.-there Quant.
69
69
76.7
76.7
77.8
77.8
85.5
85.5
Island Effects
191
191
37.1
37.1
15.4
15.4
50.4
50.4
Appendix
Table 5: Precision@10 of the influence contrast ΔI under full-sentence (FS-LL) vs. length-normalised (LN-LL) likelihood scoring , for the 5.6B Common Corpus model. N is the number of queries, which are ’attributable’ to X , i.e. learned by the full model but not by the No- X model.
Figure 7: Linguistic phenomena: Precision@10 of the influence contrast ΔI on Learned vs. not learned queries for the 5.6B model on K-FAC approximation, across different verdicts of ’learning’ vs ’not learned’. We define thresholds τ∈{0,0.5,1,2,3,5} for both the full model ( (τfull ) and the No- X(τno-x) and ask how attribution results change for different margins for (τfull and τno-x) . We require that (τfull≥(τno-x) . (τfull=τno-x=0 represents the choice throughout the main parts of the paper. Top row: Precision@10 on learned queries, which are ’attributable’ to X , and below the number of remaining items for each of the threshold. Bottom row: the gap Precision@10(Learned) − Precision@10(Not learned), i.e, how much higher Precision@10-attribution to X is on learned queries compared to not learned queries.
Figure 8: Facts: Precision@10 of the influence contrast ΔI on learned vs. not learned queries, across the full verdict grid. Same layout as Figure 7 , for the two factual corpora (CC 5.6B and Wikipedia).
Figure 9: Provenance of the full parsed corpus and of the corpus the models are trained on , by source collection (top 10 of 47; the remaining 37 pooled as Other ), license, and open type.
Count
%
Documents
Parsed corpus (released)
2,565,931
Training corpus
1,379,825
53.8
Sentences
Parsed corpus (released)
340,886,709
Training corpus
162,691,844
47.7
Appendix
Table 6: Corpus sizes. Percentages are shares of the released parsed corpus. Training corpus is what remains after deduplication; smaller budgets are random samples of it.
Small (ours)
Medium (ours)
Layers L
12
24
Attention heads H
12
16
Hidden size dmodel
768
1,024
FFN size dff
3,072
4,096
Context length nctx
512
1,024
Vocabulary
51,200
51,200
Appendix
Table 7: Model architectures. Both are standard GPT-2 configurations ( Radford et al., 2019 ) with the vocabulary set by the Goldfish tokenizer ( Chang et al., 2026 ) , a SentencePiece unigram model with 51,200 types trained on 130MB of English. Sequences are tokenized to at most 512 tokens in both cases.
Shared (except BM25)
Max. sequence length
512
Random projection (per module)
64×64
Projection type
Rademacher
Two-sided (block-diagonal)
yes
Unit normalization (cosine)
yes
Modules scored
all linear
Appendix
Table 8: Attribution hyperparameters , shared across both settings and all token budgets. ‘Fused’ refers to scheme (iii) of Appendix A.3 , in which whitening is folded into the projection matrices.
Corpus
Filtered out
Sentences
Δ
Full
No- X
CC 5.6B
891,011
146,422,036
145,531,025
−0.61%
Wikipedia
2,349,171
195,620,725
193,271,554
−1.20%
Appendix
Table 9: Training-set size in the factual setting. Number of sentences filtered out and number of sentences remaining in the training corpus for each full model and its No- X counterpart. Δ is computed within a corpus, so the two rows are directly comparable as filter costs but not as corpus sizes: the Common Corpus figure is the 90% training split ( subsection C.1 ) and its sentences are roughly 1.6× longer than Wikipedia’s, so the same sentence percentage corresponds to a larger share of tokens there.
Phenomenon
Budget
n
Exact
Parad.
None
Exist.-there Quantifiers
68M
6,666
91.7
8.1
0.2
130M
7,560
94.7
5.3
0.0
1.3B
7,575
95.3
4.6
0.1
5.6B
7,722
88.5
11.3
0.2
Binding Reflexives
68M
7,279
99.0
0.8
0.2
130M
7,361
99.2
0.7
0.1
Appendix
Table 10: Diversity of target hits (K-FAC, retrievals in DX ). Exact : the retrieval reuses the probe’s own item; Parad. : a different member of the same paradigm; None : no item found. All values in %; rows do not sum to 100 where the probe’s own item was not matched by the extractor (NPIs, 3–9%). n is the number of retrieved training points scored.
Corpus
Tokens
Full BEAR
Corpus-supported
N
Acc
Rand
N
Full
No- X
Δ
Rand
both models wrong
Full correct, No- X wrong
both models correct
Full wrong, No- X correct
Common Corpus
1.3B
7731
3.6%
0.04%
309
23.6%
14.6%
−9.1%
0.15%
224
40
33
12
5.6B
7731
3.6%
0.04%
601
18.8%
15.1%
−3.7%
0.10%
458
52
61
30
Wikipedia
4.8B
7731
13.4%
0.04%
3221
20.5%
17.3%
−3.2%
0.04%
2404
261
398
158
Appendix
Table 11: Effect of data filtering on factual knowledge (BEAR). A fact is a relation between two entities, e.g. The capital of X is Y. The model answers by ranking the candidate options for one entity (Y) by per-template log-likelihood. We count a fact as learned if the correct object ranks first under all three of the relation’s templates. Each row reports one training corpus and token budget under two evaluation sets. Full BEAR is the entire benchmark ( N=7,731 facts). Corpus-supported restricts to the learnable subset: facts whose two entities co-occur ≥10 times in the training corpus and do not share a Wikidata alias or substring; N is that subset’s size. For the corpus-supported set, Full and No- X are each model’s fraction of learned facts, and \Delta=\text{No-\mathcal{X}}-\text{Full} ( green (-) : Δ<0 , Full exceeds No- X ; red (+) : Δ>0 , No- X exceeds full). Rand is the chance level, averaging (1/A)3 over the facts, where A is the number of candidate objects in a fact’s relation and the cube reflects independent uniform guesses being correct on all three templates. The final four columns partition the corpus-supported facts by the joint outcome of the full model and the No- X model (trained with the BEAR-supporting sentences removed).
Phenomenon
Tokens
N
Rand.
Full
No- X
Δ
Item counts
both models
Full correct,
both models
Full wrong,
wrong
No- X wrong
correct
No- X correct
Binding Reflexives
68M
1000
50.0%
58.1%
61.7%
+3.6%
107
276
305
312
130M
1000
50.0%
59.6%
56.9%
−2.7%
179
252
344
225
1.3B
1000
50.0%
74.7%
30.5%
−44.2%
196
499
248
57
5.6B
1000
50.0%
75.0%
49.9%
−25.1%
147
354
396
103
Appendix
Table 12: Effect of data filtering on linguistic phenomena. Full is the accuracy of the model trained on the complete corpus; No- X is the accuracy of the model trained on the same corpus with the sentences supporting that phenomenon removed; both are full-sentence log-likelihood accuracy. Rand. is the chance level of a two-alternative forced choice ( 50% ). \Delta=\text{No-\mathcal{X}}-\text{Full} ( green (-) : Δ<0 , Full exceeds No- X ; red (+) : Δ>0 , No- X exceeds full. N is the number of minimal pairs. We additionally break down results by the joint correctness of the two models. Counter-intuitively, for binding reflexives and wh-island effects, the full model sometimes fails where the filtered model succeeds. For wh-islands this could be explained by the overall low performance. For binding reflexives it is unclear why this happens.
Figure 10: Standard BEAR evaluation under the per-template perspective. BEAR ( Wiland et al., 2024 ) is built around templates, aggregating over each fact (a relation between two entities) and its templates. We instead adopt a relation-level perspective, reporting results at the level of facts. This limits comparability with standard benchmark results, so for reference this figure reports the per-template perspective, as used by Warstadt et al. (2020) and the LM-Pub-Quiz leaderboard ( https://lm-pub-quiz.github.io/ ).
Figure 11: Precision@k of the influence contrast ΔI across token budgets (68M–5.6B) , for each linguistic phenomenon (rows) and attribution method.
Figure 12: Precision@k of the influence contrast ΔI for facts , across attribution methods and both training corpora (Common Corpus 5.6B and Wikipedia).
Figure 13: Precision@k of correct only ranking I(z,sj+) for facts , across attribution methods and both training corpora (Common Corpus 5.6B and Wikipedia).
Figure 14: Precision@k for the K-FAC approximation under three rankings: the influence contrast ΔI (black, solid), ranking on the correct member alone, I(s+) (blue, dashed), and ranking on the negated incorrect member alone, −I(s−) (red, dotted), where ΔI=I(s+)−I(s−) . For existential there quantifiers and wh-island effects , the contrast tracks the I(s+) ranking fairly closely, indicating that the score is driven mostly by the correct member. For binding reflexives and NPIs , the contrast yields substantially higher Precision@k than either member alone, indicating that only the contrast carries enough signal to separate DX from the base corpus: ranking on I(s+) or −I(s−) alone would in these cases be insufficient, so a non-contrastive view would lead to a biased interpretation of IFs. In both regimes, however, −I(s−) contributes less than I(s+) : the correct member is the single well-defined target, whereas the incorrect member is only one representative of many possible wrong forms (e.g., himself vs. herself , themselves ), so on its own it is a weaker attribution signal.
Figure 15: Precision@k for the K-FAC and TrackStar approximations on facts, under three rankings: the influence contrast ΔI (black, solid), ranking on the correct member alone, I(s+) (blue, dashed), and ranking on the negated incorrect member alone, −I(s−) (red, dotted), where ΔI=I(s+)−I(s−) , shown for the Common Corpus 5.6B and Wikipedia models. For both methods the contrast tracks the I(s+) ranking closely, indicating that the score is driven mostly by the correct member. This is expected: the correct object is the single target, supported by the co-occurrence sentences in DX , whereas each incorrect object is only one of many candidate distractors with no dedicated supporting evidence, so on its own −I(s−) is a weaker attribution signal.
Measuring training data influence consistently across language model pretraining is challenging. It is difficult to select downstream tasks or validation sets representative of a model's general capabilities, and reliance on task performance at intermediate checkpoints complicates comparisons across training. We propose a measure of training data influence that does not require selecting a downstream task or validation set as the attribution target. Specifically, we define an example's influence by how much its gradient update reduces the squared distance to the final parameters of a given pretraining run, and estimate this quantity from intermediate checkpoints without retraining. Applying the method to 18 configurations from the Pythia and PolyPythia suites, we find systematic temporal changes in influential data. Early in training, literature-related data are more strongly aligned with the trajectory toward the final parameters, whereas STEM data become more strongly aligned in later stages. This qualitative crossover is broadly consistent across model configurations. Our results provide a tractable trajectory-level view of how influential data change throughout pretraining, complementing influence analyses defined with respect to specific downstream tasks or validation sets.
Yuto Nishida, Hirokazu Kiyomaru, Yusuke Oda +6
Nara Institute of Science and Technology · NII LLMC · Waseda University +3
Influence functions approximate how removing a training example changes a quantity of interest, called the target function, such as a held-out loss. To estimate the influence of a group of examples, the standard practice is to sum the individual influences of its members. However, this sum does not capture how examples jointly affect the target: a pair of examples may be redundant or complementary, but the sum cannot distinguish these cases. We propose an interaction-aware influence function that characterizes how interactions between examples influence the target. By expanding the target to second order around the trained parameters, we obtain an estimator that augments the standard sum with a pairwise interaction term that captures the alignment between two examples' effects on the target. We empirically evaluate our estimator in two settings. First, on six dataset-model pairs spanning logistic regression, MLPs, and ResNet-9, our estimator tracks leave-group-out retraining substantially better than first-order influence across all settings. Second, when used as a greedy selection rule for instruction-tuning data on Llama-3.1-8B, it beats prior influence-based and representation-similarity baselines on five of seven downstream tasks, in a regime where standard influence-based selection underperforms random selection.
One way to understand LLM behavior is to trace its output back to the training data. Two types of measures are commonly used for output tracing: data-similarity and data-influence. The former is cheaper while the latter is believed to be more accurate. Even though many works have compared them for ground-truth tasks, no such comparisons exist for output tracing. Here, we fill this gap and precisely quantify the commonalities and differences between the two measures. We do this by first ranking the training documents according to each measure and then computing the overlap between the two rankings. Our main finding is that the two rankings agree significantly, but there is an asymmetry between them: The top documents of data-similarity are assigned more consistent ranks by data-influence than the other way around. This result is valid across a range of experiments involving OLMo2-1B, Qwen3-1.7B, LlaMa3.2-1B, Gemma3-1B, and GPT2. We exploit the asymmetry to obtain a favorable cost-accuracy trade-off by using the costly data-influence to refine the results of data-similarity.
Christopher J. Anders, Henrique Da Silva Gameiro, Nico Daheim +1
RIKEN Center for Advanced Intelligence Project, Tokyo, Japan · Section of Computer Science, EPFL Lausanne, Switzerland · Ubiquitous Knowledge Processing Lab (UKP Lab),2026 Department of Computer Science, Technical University of Darmstadt +2