betaFeedback

WorksComputer Science

Under the Influence – of What? A Controlled Evaluation of Influence Functions

Abstract

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.

{jgsi, argy, robv, arog}@itu.dk

nlpnorth/under-the-influence NLPnorth/under-the-influence

Introduction

Understanding which training examples are responsible for a model’s behaviour is important for various applications of data attribution, including model debugging, data curation, credit and compensation for the data rights’ holders (Wührl et al., 2026). Among the most widely studied approaches are influence functions (IF), which estimate how a model’s predictions would change if a model was retrained without a given training example (Koh and Liang, 2017). Recent work has developed IF approximations scaling to Large Language Models (LLMs) [5] (Grosse et al. 2023).

Despite the principled theoretical grounding, there are also theoretical concerns about what IFs actually reflect [4] (Mlodozeniec et al. 2025). This is compounded by the fact that the empirical evaluations on LLM pretraining data (e.g. [5] (Ruis et al. 2025)) do not explicitly verify that the examples with high influence scores actually have the properties relevant to the model behavior. This matters, because a high score

for a query with a property X\mathcal{X} may stem from a training data point sharing some other feature with the query, which merely co-occurs with X\mathcal{X}.

This study is the first to systematically evaluate IFs as an attribution method for LLM pretraining, as shown in Figure 1. First, we isolate a property X\mathcal{X} by splitting the training corpus into a subset DX\mathcal{D}_{\mathcal{X}} containing the property and a base corpus Dbase\mathcal{D}_{\mathrm{base}} without it. Then we train a model on D\mathcal{D} and a second model only on Dbase\mathcal{D}_{\mathrm{base}} to verify that X\mathcal{X} was learned from DX\mathcal{D}_{\mathcal{X}}. Finally, we test whether IFs recover DX\mathcal{D}_{\mathcal{X}} for queries that depend on X\mathcal{X}.

Figure 1. Overview of our evaluation framework, illustrated on a factual example.

We pose three research questions: RQ1 Do IFs surface the training data with the target property X\mathcal{X}?

RQ2 Which types of non-X\mathcal{X} samples are identified as influential?

RQ3 Which IF approximation most reliably identifies relevant training data?

We investigate IFs in two settings: a linguistic setting, where X\mathcal{X} is a distinctive grammatical phenomenon, and a factual setting, where X\mathcal{X} is a world-knowledge fact. This selection is motivated by prior work, which suggests that influence signals are driven largely by surface-level structure (Grosse et al., 2023) and struggle to recover factual content [5, 2].

We find that on average, the examples identified as influential are relevant, but they do not always bear the target properties directly, and the ratio and kind of relevance varies by setting (the kind of target phenomenon, model scale, and IF method). All code to reproduce our experiments and pre-trained models are publicly available.1 We also release a corpus with 10B dependency-parsed tokens of Common Corpus, which we hope would facilitate further work on linguistic phenomena with controlled data splits.2

Background

Data Attribution

Given a model fθf_\theta trained on a dataset Dtrain\mathcal{D}_{\mathrm{train}}, let L(z,θ)\mathcal{L}(z,\theta) denote the per-example loss and ϕ(θ)∈R\phi(\theta) \in\mathbb{R} a differentiable observable capturing the model behaviour of interest. Data attribution methods aim to assign a scalar score to each training point z∈Dtrainz \in\mathcal{D}_{\mathrm{train}}, reflecting its contribution to ϕ\phi at the trained parameters θ∗\theta^*. In most of the previous data attribution work, ϕ\phi is chosen as the per-sample loss with respect to a query z′z', i.e., L(θ∗,z′)\mathcal{L}(\theta^*, z'), which we follow also in this work.

Influence Functions. Among data attribution methods, IFs are particularly prominent, as they offer a principled approach to data attribution grounded in a clear theoretical objective. Originating in robust statistics (Hampel, 1974) and adapted to deep learning by Koh and Liang (2017), they target the counterfactual leave-one-out (LOO) effect:

how a model’s behaviour changes when a training point zz is removed and the model retrained without it. However, realising this in practice proves non-trivial. To compute this directly requires one retraining per training point, which is infeasible at LLM scale. IFs approximate this counterfactual by estimating how an infinitesimal downweighting of zz shifts the converged parameters θ∗\theta^*, and how that shift propagates to L(θ∗,z′)\mathcal{L}(\theta^*, z'):3

I(z,z′)=∇θL(θ∗,z′)THθ∗−1∇θL(θ∗,z)(1)\mathcal{I}(z,z') = \nabla_\theta\mathcal{L}(\theta^*,z')^{\mathsf{T}} H_{\theta^*}^{-1} \nabla_\theta\mathcal{L}(\theta^*,z) \tag*{(1)}

where Hθ∗=1n∑i=1n∇θ2L(θ∗,zi)H_{\theta^*} = \frac{1}{n}\sum_{i=1}^{n} \nabla_\theta^2 \mathcal{L}(\theta^*,z_i) is the Hessian of the average training loss evaluated at the final parameters θ∗\theta^*.⁴ See app. § 10.§ 1 for a full derivation of Equation (1).

Theoretical Limitations. Equation (1) is well-defined only under assumptions that neural networks usually violate. It assumes a positive-definite Hessian at a true loss minimum. But loss landscapes are often singular or negatively curved (Sagun et al., 2018), and neural models are rarely trained to convergence [4]. The standard fixes that restore definiteness have been shown to shift the target away from the LOO effect it is assumed to capture [4]. And even computed exactly, the LOO objective itself is increasingly questioned. It is highly sensitive to retraining stochasticity (Mlodozeniec et al., 2025) and prone to missing group-level effects (Patel et al., 2026; Hu et al., 2024). Hence, there are theoretical reasons why IFs may not work well for deep learning-based LMs. Our work contributes an empirical evaluation of whether they do, based on isolation of target properties they should recover.

Approximations

Independent of any theoretical concerns, computing Equation (1) is intractable at LLM scale: inverting Hθ∗H_{\theta^*} is prohibitive in both memory and compute (George et al., 2018; Gupta et al., 2018). Recent work has therefore developed methods to approximate it. We test three approaches that differ in how they approximate the curvature Hθ∗H_{\theta^*}. We outline the key idea of each below, with full explanations and formulas in app. A.3.4

  • Gradient Similarity (GradSim), following Pruthi et al. (2020), applies no curvature correction. It simply sets H^θ∗=I\hat{H}_{\theta_*}=I, and scores a training point by the similarity of its compressed gradient to the query’s.

  • TrackStar Chang et al., [5] approximates the curvature with a block-diagonal pseudo-Hessian, i.e., the autocorrelation matrix of the compressed gradients of both training points and queries. Fitting the autocorrelation matrices requires one pass over the training gradients.

  • (E)K-FAC (Martens and Grosse, 2015; George et al., 2018) theoretically offers the most faithful approximation of the true curvature. It approximates the Hessian with a Kronecker factorisation of the model’s linear layers. K-FAC was originally formulated on full gradients; we adapt it to compressed gradients (see app. A.3). As for TrackStar, fitting the ‘Hessian’ requires one pass over training data. Optionally, the factored eigenvalues can be corrected in the Kronecker eigenbasis (George et al., 2018; Grosse et al., 2023), yielding EK-FAC at the cost of another training data pass. Since in our experience this correction does not clearly improve attribution (see supplementary results in Table 3), we use K-FAC only.

Methodλ\lambdaBind.Ex.-Th.Wh-Isl.NPIMean
EK-FAC (sketched)0.0135.388.848.548.855.4
0.137.390.048.148.856.1
K-FAC (sketched)0.0135.786.847.650.055.0
0.137.688.848.149.155.9
K-FAC (fused)0.0132.282.947.248.552.7
0.133.686.546.849.454.1

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\Delta I across the four linguistic phenomena, per scheme and damping λ\lambda, on the 5.6B Common Corpus subset model. As in most parts of this paper, Precision@10 is computed on the Full correct, No-χ\chi wrong query pairs only, those ‘attributable’ to χ\chi. 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 DχD_{\chi}-to-DbaseD_{\mathrm{base}} proportions of that setup; this yields results close to the main experiments (max. 4 pp of disagreement for the default λ=0.1\lambda= 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.

Related Work

What do IFs capture at LLM scale? Grosse et al. (2023) first applied IFs approximation at LLM scale using EK-FAC and observed through qualitative analysis that the signal is driven by surface-level features rather than semantic content. Kowal et al. (2026) show that the standard loss-based influence definition, i.e., selecting the loss on test examples as observable of interest ϕ\phi (see § 2), surfaces examples tied to generic concepts in the query rather than the specific target trait, while a concept-based observable recovers it more directly.

IFs for fact retrieval. A separate line of work focuses on whether IFs recover the examples supporting factual queries. Chang et al. [5] find that TrackStar underperforms a BM25 baseline at

retrieving fact-entailing examples, and Ruis et al. (2025) report that fact-supporting documents fall within the top-500 in only 30–55% of cases, using EK-FAC approximation on 7B and 35B models. Akyurek et al. [2] fine-tune an mT5 model (Xue et al., 2021) on template-based facts it did not already ‘know’, and find that BM25 outperforms both TracIn and embedding-based retrieval.

How do LLMs learn facts? Beyond attribution, work on how LLMs acquire facts links factual behaviour to entity co-occurrence in the training data. Elazar et al. (2023) establish this connection causally, and Kandpal et al. (2023) show that QA accuracy correlates strongly with entity co-occurrence counts in the pretraining corpus. Nadkarni et al. (2026) and Cohen et al. (2026) provide further evidence through interventional retraining, showing that removing or anonymizing entity occurrences suppresses fact learning. However, Nadkarni et al. (2026) also find that neither removing co-occurrences nor retrieving relevant documents fully explains fact learning. Christoph et al. (2025) still observe recall for facts with no matched co-occurrence, which they attribute to answer priors and to transfer from related facts. Zhang et al. (2024) show that models are biased to learn co-occurrence statistics rather than factual associations, so co-occurrence in the data does not mean the fact was learned as a fact.

How do LLMs learn linguistic phenomena? The closest work to data attribution in the linguistic domain is filtered-corpus studies, where a phenomenon is removed and the model is then tested for generalization to it. Misra and Mahowald (2024) remove article–adjective–numeral–noun (AANN) constructions (e.g. a beautiful five days) and find that transformers still generalize to them due to presence of other related phenomena. Patil et al. (2024) filter a small (83M-word) Wikipedia corpus for a range of BLiMP phenomena and likewise conclude that models generalize from indirect evidence. However, Oba et al. (2024) reports a negative result. Instead of filtering, they insert nonce words into training as either direct evidence (e.g. <w> loves herself) or indirect evidence (e.g. <w> helping the child loves herself) for targeted minimal pairs. Models learn from direct evidence but fail to generalize from the indirect cases. This raises the question of whether the filtered-corpus results reflect genuine generalization or residual local co-occurrences that hold accuracy modestly above chance.

Novelty and contributions. To the best of our knowledge, this is the first work to systematically evaluate whether IFs reflect the relevant training data points with specific target properties, as detailed in §4. Prior work on modern generative models does not clearly isolate the target property [5] (Ruis et al. 2025; Jaburi et al. 2025). Our factual setting shares its design logic with Nadkarni et al. (2026) and Cohen et al. (2026), but they investigated fact acquisition from the perspective of targeted (re-)training, rather than IFs. In the linguistic setting, we are the first to investigate the attribution of grammatical phenomena with IFs. To the best of our knowledge, this is also the largest study on neural language models with controlled data ablations for linguistic phenomena to date: we filter up to 5.6B tokens, whereas Misra and Mahowald (2024), Patil et al. (2024), Oba et al. (2024) worked on or below 100M scale.

Methodology

We ask whether IFs recover a target property X\mathcal{X} embedded in the training data. Our proposed framework requires X\mathcal{X} to be isolable by filtering (distinguishable) and carried by specific training examples rather than emergent from interactions across them (independent).6

Let D=Dbase∪DX\mathcal{D}=\mathcal{D}_{\mathrm{base}}\cup\mathcal{D}_{\mathcal{X}} denote the full training corpus, where DX={z1,…,zk}\mathcal{D}_{\mathcal{X}}=\{z_1,\ldots,z_k\} is the set of training examples containing X\mathcal{X}, and Dbase\mathcal{D}_{\mathrm{base}} contains no instance of X\mathcal{X}. In addition, we require a held-out test set Dtest={(sj+,sj−)}j=1m\mathcal{D}_{\mathrm{test}}=\{(s_j^+,s_j^-)\}_{j=1}^{m} of minimal contrastive examples, where each sj+s_j^+ exhibits X\mathcal{X} and every element s−s^- of Sj−\mathcal{S}_j^- is a contrastive counterpart that does not.

Step 1: Isolate X\mathcal{X}. We first localize X\mathcal{X} in the training data and filter it out to obtain the split Dbase∪DX\mathcal{D}_{\mathrm{base}}\cup\mathcal{D}_{\mathcal{X}}. See §5.2 and §5.3 for how we operationalize X\mathcal{X} in the linguistic and factual settings.

Step 2: Verify that X\mathcal{X} is learned. We then train a full model fθf_\theta on Dtrain=Dbase∪DX\mathcal{D}_{\mathrm{train}}=\mathcal{D}_{\mathrm{base}}\cup\mathcal{D}_{\mathcal{X}}, and a No-X\mathcal{X} model fθ−f_{\theta^-} on Dbase\mathcal{D}_{\mathrm{base}} alone.7 Scoring a sequence ss by its summed log-probability log⁡pf(s)\log p_f(s) under a model ff, we require that

log⁡pfθ(sj+)>log⁡pfθ(s−),∀s−∈Sj−log⁡pfθ−(sj+)≤log⁡pfθ−(s−),∃s−∈Sj−(2)\begin{aligned} \log p_{f_\theta}(s_j^+) &> \log p_{f_\theta}(s^-), \quad\forall s^- \in\mathcal{S}_j^- \\ \log p_{f_{\theta^-}}(s_j^+) &\le\log p_{f_{\theta^-}}(s^-), \quad\exists s^- \in\mathcal{S}_j^- \tag*{(2)} \end{aligned}

That is, fθf_\theta should score the positive member above all of its contrastive counterparts, whereas fθ−f_{\theta^-} should not: at least one s−∈Sj−s^- \in\mathcal{S}_j^- scores at least as high as sj+s_j^+. This would confirm that the learned signal originates from DX\mathcal{D}_{\mathcal{X}}. We note that this is a loose criterion for learning X\mathcal{X}: in app. B we discuss different scoring metric choices, as well as different definitions of ‘learning’ vs. ‘not learning’, finding no substantive change in our takeaways.

Step 3: Verify that IFs recover X\mathcal{X}. For a query ss and a training point z∈Dtrainz\in\mathcal{D}_{\mathrm{train}}, let I(z,s)\mathcal{I}(z,s) be the influence of zz on ss. We consider two rankings of training points:

Correct-only. Ranking by I(z,sj+)\mathcal{I}(z,s_j^+) alone is the standard top-kk retrieval task: it returns the training points scored as most influential for the correct sequence.

Influence contrast. This setting identifies training samples zz with higher influence on the correct than the incorrect test sample (Ladhak et al. (2023)):

ΔI(z)=I(z,sj+)−I(z,s−),s−∈Sj−(3)\Delta\mathcal{I}(z)=\mathcal{I}(z,s_j^+)-\mathcal{I}(z,s^-), \quad s^- \in\mathcal{S}_j^- \tag*{(3)}

Since sj+s_j^+ and s−s^- differ only in X\mathcal{X}, the contrast should align most closely with attribution to X\mathcal{X} itself rather than to any other effect. We rank the top-kk retrieved training points for each query by the influence contrast.

In addition to contrastive per-query ranking, we also verify the aggregate condition: whether the contrast is positive for training points exposing X\mathcal{X}, and shows no systematic preference for those from the base corpus:

ΔI(z)≫0for z∈DX,ΔI(z)≲0for z∈Dbase(4)\begin{aligned} \Delta\mathcal{I}(z) &\gg0 \quad\text{for } z\in\mathcal{D}_{\mathcal{X}},\\ \Delta\mathcal{I}(z) &\lesssim0 \quad\text{for } z\in\mathcal{D}_{\mathrm{base}} \tag*{(4)} \end{aligned}

Experimental Setup

Implementation

Model and training. We train models on a range of token budgets, from 68M to 5.6B. For token budgets up to 1.3B we use a GPT-2 small architecture, and GPT-2 medium (Radford et al. (2019)) for larger budgets following the Chinchilla-optimal parameter-to-token ratio (Hoffmann et al., 2022). Across all budgets we follow Goldfish (Chang et al., 2026) in tokenizer and hyperparameter setup; Chang et al. (2026) study language models on small corpora and provide choices calibrated for small data budgets, addressing shortcomings of the default GPT-2 configuration. Full model details and hyperparameters are provided in app. § 12.§ 2.

As baselines, we use the original GPT-2 small and medium models8, which were trained on approx. 10B tokens of web data sourced from links shared on Reddit (Radford et al., 2019).

Attribution methods. We evaluate three IF methods introduced in § 2: GradSim, TrackStar, and K-FAC, applied with the BERGSON library (Quirke et al., 2026). The baseline is BM25 (Robertson et al., 1994), as implemented by Lù (2024).9

Scoring the full corpus is computationally expensive, so we subsample before attribution, following the approach of Ruis et al. (2025).10 In the linguistic setting we draw N=5,000,000N = 5{,}000{,}000 sentences while preserving the full-corpus ratio ∣DX∣/∣Dbase∣|\mathcal{D}_{\mathcal{X}}|/|\mathcal{D}_{\mathrm{base}}|. In the factual setting attribution operates at the level of an individual fact, so preserving the ratio would require a separately sampled index per fact. We therefore fix one base sample of 5,000,000 sentences and add DX\mathcal{D}_{\mathcal{X}} for each fact on top.

Linguistic Setting

In this setting, X\mathcal{X} is a grammatical phenomenon, and DX\mathcal{D}_{\mathcal{X}} consists of training sentences exhibiting it. We study four phenomena:

Existential there quantifiers E.g.: There are few cars. vs. *There are all cars.

Binding reflexives E.g.: The boy hurt himself. vs. *The boy hurt herself.

Wh-island effects E.g.: Which girls ran? vs. *Which ran girls?

Licensed negative polarity items (NPIs) E.g.: I’m not playing anymore. vs. *I’m playing anymore.

We choose these four phenomena as we hypothesize that they meet our independent and distinguishable requirements on X\mathcal{X} (§4): they represent unique functions within the language, that generally depend on closed sets or rare sentence types. Binding reflexives and NPIs each depend on specific closed-class forms (e.g., himself, any). Wh-island effects are restricted to interrogative constructions, which are rather infrequent in text corpora. Existential there constructions are frequent in general, but restricting to quantifier probes yields a closed, well-defined set of function words.

The main evaluation dataset is BLiMP (Warstadt et al., 2020), except for NPIs, where we observed issues with the BLiMP data. For this phenomenon, we use a subset of BLiMPPI dataset (Güven et al., 2026) (see app. § 12.3.2 for details).

Our models are trained on a sample (up to 5.6B tokens) from the English part of Common Corpus (Langlais et al., 2026): a collection of public domain and permissively licensed texts. For the linguistic filtering, we annotate the data by training a MaChAmp parser (van der Goot et al., 2021) on the multi-domain GUM corpus (Zeldes, 2017) with deberta-v3-large (He et al., 2023) as backbone (more details about the corpus and parsing are available in app. § 12.§ 1). For each phenomenon, we apply a corresponding syntactic filter over the parsed corpus, detailed in app. § 12.§ 3.

Factual Setting

We define X\mathcal{X} as a world-knowledge fact expressed as a relation between two entities (e.g., Warsaw–capital–Poland). We use the BEAR probing benchmark (Wiland et al., 2024), which consists of 7,731 such relations implemented as template-based multiple-choice problems, with slots filled by candidate entities. Each relation is expressed via three templates (e.g., X was born in Y; X’s place of birth is Y; The birthplace of X is Y.). Only one of the entities (Y) is considered as a target, with 5-60 pre-defined candidates (avg. 31.7), ranked by completion likelihood.

Preliminary experiments showed that our subset of Common Corpus provides limited support for factual information in our target benchmark.11 We therefore train an additional model on an English Wikipedia dump (Wikimedia Foundation, 2023), following Christoph et al. (2025). We use the Goldfish tokenizer, trained on the Common Corpus subset, for both corpora. The Wikipedia corpus was tokenized to 4.8B tokens.

All factsCC-supportedWiki-supported
CC 5.6B3.618.8{−3.7}–
Wikipedia 4.8B13.4–20.5{−3.2}
GPT-2-small7.128.111.6
GPT-2-medium10.139.618.3
Random Guessing0.040.10.04

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\ge10 in the respective corpus. Subscripts give Δ=No-X−Full\Delta= \text{No-}\mathcal{X} - \text{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.

Even when training on Wikipedia, our goal is not to test the model for overall factual knowledge, but only to see whether it learned those facts that it had a fair chance to learn. Hence we restrict the analysis to corpus-supported facts with at least 10 entity co-occurrences in the training corpus: below this, we expect the model to have too little evidence to plausibly learn the fact. For each corpus-supported fact, which the full model fθf_\theta has learned, we filter the training corpora by collecting every sentence where the two entities of a fact co-occur (aliases and demonyms resolved). Following Christoph et al. (2025), we additionally filter out sentences that mention only one of the two entities, provided that this entity has fewer than 30,000 mentions in the corpus. We do not apply this to more frequent entities (e.g., France), since removing all their mentions would delete a large share of the corpus and shift its overall distribution.

Results

Verifying that the models learned X\mathcal{X}

Linguistic phenomena. Despite smaller token budgets, our models are competitive with the GPT-2 baselines across all four phenomena (Table 1). Accuracy rises with budget, and so does the drop in accuracy under filtering: at 1.3B and 5.6B, ablating X\mathcal{X} pushes accuracy down to (or below) chance for every phenomenon except existential there quantifiers. We hypothesize that this is due to filters not

Bind. Refl.NPIExist. thereWh-Island
68M58.1{+3.6}34.0{−16.0}91.7{−23.2}21.8{−9.2}
130M59.6{−2.7}41.0{−15.0}97.1{−9.6}22.0{−2.5}
1.3B74.7{−44.2}73.0{−27.0}98.1{−4.7}39.3{−11.5}
5.6B75.0{−25.1}86.0{−32.0}98.1{−6.8}58.7{−14.2}
GPT-2-small67.387.897.057.7
GPT-2-medium68.687.098.550.4
Random Guessing50.050.050.050.0

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\mathcal{X}. Green (-) marks the drop, red (+) the one case here where filtering increased accuracy. NN is the number of minimal pairs. Full results are available in app. Table 12.

catching some noisy data points. This phenomenon also proves to be overall “easy” to learn, which would explain that the impact of filtering is high only for the small token budgets.

Facts. Both baselines and our models score poorly on the full 7,731 BEAR relations (Table 2).12 For our models, the likely explanation is that most relations are not corpus-supported (which we define as ≥10\ge10 entity co-occurrences): only 601 relations qualify in the Common Corpus subset, and 3,221 in the Wikipedia corpus. Our model trained on Wikipedia reaches 13.4%, exceeding the GPT-2 baselines despite far fewer training tokens. As discussed in § 5.3, since our goal is to establish whether the models learn the facts that were available to them, we focus only on the part of BEAR that is supported by the training data.

In that setting, we find that filtering the fact-supporting data has a much smaller effect compared to the linguistic setting: the full-corpus-supported accuracy is reduced only by 3.7 points (CC 5.6B) and 3.2 (Wikipedia). Only 52 (CC 5.6B) and 261 (Wikipedia) facts are not learned by the filtered-data model, and learned by the full model. Filtering even helps the filtered-data model with some relations where the full model is wrong, which we attribute to cross-relational interference in the multi-choice evaluation. For example, removing ‘Warsaw’ eliminates it as a distractor in other country-capital queries, shifting mass to the correct object (e.g., letting ‘Prague’ win for ‘Czech Republic’ where the full model failed).

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/).

In the subsequent sections, we focus on queries that satisfy Equation (2): those the full model fθf_\theta has learned while the No-X\mathcal{X} model fθ−f_{\theta-} has not, i.e., those ‘attributable’ to X\mathcal{X}.

RQ1: Do IFs surface the training data with the target property ?

Yes in aggregate, but effectiveness varies by phenomenon.

Aggregated contrast. Figure 2 shows that at the aggregate level, IFs concentrate on the target-property data more than on the base corpus: the normalized contrast ΔI/σ\Delta\mathcal{I}/\sigma is positive and larger over DX\mathcal{D}_{\mathcal{X}} than over Dbase\mathcal{D}_{\mathrm{base}}13 for the large majority of phenomenon-method-budget combinations. Hence Equation (4) holds in most cases (with the exception of NPIs with GradSim method, and binding reflexives with GradSim and K-FAC).

Figure 2. Do IFs surface the training data with property X\mathcal{X}? In aggregate, yes. Each point compares a method’s mean influence contrast on X\mathcal{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=xy=x line, satisfying Equation (4) (see footnote 13 for details). Bars are 95% CIs (negligible on the y-axis).

Top-kk recovery. Per-query top-kk recovery on the influence contrast is strongly phenomenon-dependent (Figure 3). Existential there quantifiers are recovered strongly across all approximations up to

Figure 3. Precision@10 of the influence contrast ΔI\Delta I for the 5.6B token Common Corpus model on the four linguistic phenomena and the two factual models. Full results across multiple kk and token budgets are available in app. Figure 11 and Figure 12.

Figure 11. Precision@k of the influence contrast ΔI\Delta I across token budgets (68M–5.6B), for each linguistic phenomenon (rows) and attribution method.

Figure 12. Precision@k of the influence contrast ΔI\Delta I for facts, across attribution methods and both training corpora (Common Corpus 5.6B and Wikipedia).

51%, wh-island effects and NPIs reach up to 51%, and binding reflexives only 30%. For binding reflexives, however, we observe significantly higher precision for lower token budgets, whereas for the other phenomena the differences among token budgets are modest (Figure 4). Facts are rather weakly recovered: Prec@10 reaches at most 35% on the Common Corpus subset and 26% on Wikipedia.14

Figure 4. Share of samples with full target phenomenon X\mathcal{X} and partial cues among top-10 retrievals across token budgets. These results are for K-FAC method (§ 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%.

Comparison to baseline. BM25 recovers binding reflexives perfectly (100%), is on par with the best attribution method for wh-island effects, and falls below it in every other case. Most notably, for facts, BM25 contrast reduces to the answer (YY) entity (e.g. Paris is in France vs. Paris is in Germany → France vs. Germany), so single-entity mentions of YY are scored similarly to co-occurrence hits.15

Figure 13. Precision@k of correct only ranking I(z,sj+)\mathcal{I}(z,s_j^+) for facts, across attribution methods and both training corpora (Common Corpus 5.6B and Wikipedia).

From contrast to a realistic attribution setting. Computing the influence contrast (Equation (3)) requires the minimal pair with the negative example s−s^{-}, and knowledge of which example is correct. Since this is unavailable outside of minimal pair setup, we additionally investigate the Correct-only ranking on I(z,s+)\mathcal{I}(z,s^{+}). We find that for existential there quantifiers, wh-island effects, and facts, the two rankings align fairly closely: the positive member alone drives the score, so plain top-kk already surfaces X\mathcal{X}. But for NPIs and binding reflexives the positive example alone is insufficient, so the contrast is essential. Full results are provided in app. Figure 14 and Figure 15.

Figure 14. Precision@k for the K-FAC approximation under three rankings: the influence contrast ΔI\Delta\mathcal{I} (black, solid), ranking on the correct member alone, I(s+)\mathcal{I}(s^+) (blue, dashed), and ranking on the negated incorrect member alone, −I(s−)-\mathcal{I}(s^-) (red, dotted), where ΔI=I(s+)−I(s−)\Delta\mathcal{I}=\mathcal{I}(s^+)-\mathcal{I}(s^-). For existential there quantifiers and wh-island effects, the contrast tracks the I(s+)\mathcal{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 DXD_X from the base corpus: ranking on I(s+)\mathcal{I}(s^+) or −I(s−)-\mathcal{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−)-\mathcal{I}(s^-) contributes less than I(s+)\mathcal{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\Delta I (black, solid), ranking on the correct member alone, I(s+)\mathcal{I}(s^+) (blue, dashed), and ranking on the negated incorrect member alone, −I(s−)-\mathcal{I}(s^-) (red, dotted), where ΔI=I(s+)−I(s−)\Delta I = \mathcal{I}(s^+) - \mathcal{I}(s^-), shown for the Common Corpus 5.6B and Wikipedia models. For both methods the contrast tracks the I(s+)\mathcal{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 DXD_X, whereas each incorrect object is only one of many candidate distractors with no dedicated supporting evidence, so on its own −I(s−)-\mathcal{I}(s^-) is a weaker attribution signal.

RQ2: Which types of non-X\mathcal{X} samples are identified as influential?

Most non-X\mathcal{X} examples are indirectly relevant to X\mathcal{X}, and their type and ratio varies by phenomenon and training budget.

We analyze top-10 examples identified by K-FAC (the most consistent IF method, as will be shown in §6.4) as influential for each linguistic phenomenon. For each we conducted a manual analysis of the likely similarities to samples, which did not directly have the target property X\mathcal{X}, and could be identified automatically with our corpus annotation: e.g. the NPIs could be supported by only negation or only polarity items.

Figure 4 shows that most of the IF-identified samples that don’t explicitly have X\mathcal{X} are still linguistically relevant: for example, ‘the boy hurt himself’ could be supported by an example like ‘the boy hurt his knee’. The specific supporting constructions and ratios of samples with X\mathcal{X} varies by linguistic phenomena and model size.

We further consider, within retrievals from X\mathcal{X}, whether the specific instances of linguistic phenomena are supported only by themselves or other instances within the same category (e.g. at all as a NPI could be supported only by other examples with at all or other NPIs such as anymore, ever etc.). We find the highest ratio of non-identical supporting instances within NPIs (∼30%\sim30\%), followed

by 11.3% for existential-there, and less than 3% on average for wh-island effect and binding. Full results are available in app. Table 10.

PhenomenonBudgetnnExactParad.None
Exist.-there Quantifiers68M6,66691.78.10.2
130M7,56094.75.30.0
1.3B7,57595.34.60.1
5.6B7,72288.511.30.2
Binding Reflexives68M7,27999.00.80.2
130M7,36199.20.70.1
1.3B5,01998.91.10.0
5.6B4,44896.33.50.2
NPIs68M23369.524.00.4
130M21671.823.60.0
1.3B32676.114.70.3
5.6B31079.017.40.6
Wh-island effects68M3,18792.16.11.8
130M4,08685.02.112.9
1.3B4,30298.61.40.0
5.6B4,19798.71.20.1

Table 10. Diversity of target hits (K-FAC, retrievals in DX\mathcal{D}_X). 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%). nn is the number of retrieved training points scored.

Facts. For facts we manually identify 3 types of possible relations between a training sample and the model output conditioned on a query: co-occurrence of target entities (e.g. a sentence with both France and Paris), only a single entity (e.g. only Paris), and sentences with the target BEAR templates with at most one target entity (e.g. ‘the capital of [France]’). Using regular expressions, we automatically identify these categories in the top-10 influential training examples for BEAR queries.

For the models trained on Wikipedia and K-FAC method, in the top-10 influential sentences we find that 66% contain only single entities relevant to the target fact (e.g. only Paris for <Paris, capital, France> fact). Intuitively, we would expect co-occurrences to be the primary driver of the factual knowledge, but they account for only 19% of top-10 supporting examples. To some extent this is reasonable: single-entity mentions are far more frequent than co-occurrences, supporting the prior-bias learning argument of Christoph et al. (2025).

The same confound takes a second form: 22% are nominal sentences without a finite verb, but mostly (-5pp) mentioning a correct entity (e.g., ‘Buenos Aires, October 23.’). We attribute this to the unit-normalisation we apply to IFs, which raises the weight of a single mention in very short sequences.

Finally, some influential examples map onto the expression of the relation between entities (e.g., died in, capital of): either asserting the relation of a different answer entity (‘Germany’ + ‘capital of’, 4–9%) or carrying no entity at all (‘capital of’, 2–13%). Both indicate the model reliance on texts not directly expressing the target fact, which would be in line with the well-established ‘hallucination’ phenomenon (Zhang et al., 2025).

RQ3: Which IF approximation most reliably identifies relevant training data?

K-FAC is the most consistent overall, but tracks TrackStar in the factual setting.

Figure 3 summarizes the differences between the approximations. K-FAC performs best on all four linguistic phenomena, TrackStar performs best on facts, and GradSim is consistently the weakest. K-FAC is the most consistent overall: strongest on the linguistic phenomena and close to TrackStar on facts. This aligns with prior work: (E)K-FAC has lower approximation error than the identity (GradSim) (Hong et al., 2025). In fine-tuning setups, it also aligns more closely with the LOO objective than TrackStar (Quirke et al., 2026), though identity and EK-FAC often match (Jaburi et al., 2025). None of these works, however, compares all three methods in pretraining.16

Conclusion

This study is the first to systematically evaluate whether IFs identify the training examples with properties relevant to the output, based on controlled experiments with filtered training data. Our results suggest that overall IFs do identify the relevant training samples. However, it is a mix of samples with theoretically defined properties and various phenomenon-specific kinds of supporting evidence, and the ratio of that varies by phenomenon and model size. Of the three IF implementations we tested, K-FAC is overall the most consistent in identifying the training data with the target properties, but there is room for improvement in future work on developing better approximations for IFs.

Figure 6. Agreement between the three (E)K-FAC application schemes described in Appendix § 10.§ 3. Per-query Spearman ρ\rho (left) and Pearson rr (right) between the ΔI\Delta I scores that two schemes assign to the candidate sentences in DX\mathcal{D}_{\mathcal{X}}, 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\lambda= 0.1 on the 5.6B model, with 500,000 candidate sentences per phenomenon.

Limitations

Scale and generalizability. We train on small models and limited data (68M–5.6B tokens) using a single (GPT-2) architecture, so it is unclear whether the same patterns hold at larger scale or across architectures. However, prior work suggests that IFs surface more abstract structures at larger scale (Grosse et al., 2023; Ruis et al., 2025), aligning with our findings: e.g. structures like binding reflexives surface more related structures with scale (§ 6.3), while pattern-reducible ones like existential there quantifiers should stay more consistent. We use GPT-2 because it is common in the literature on learning acquisition (Warstadt et al., 2020; Christoph et al., 2025).

Generalizability across data is likewise not guaranteed, and it would be worth investigating how well the results transfer to other datasets. More fundamentally, we deliberately select phenomena that plausibly depend on specific training examples, yet even for these, interactions across examples play a considerable role. For facts in particular, prior work and ours show that isolating the property is hard. Future work should investigate the nature of influential examples for phenomena more prone to being learned through such interactions, than the ones in focus of this study.

Coverage. At several steps we cannot guarantee full coverage of the relevant data space. Linguistic filtering misses items due to the nature of syntactic filters (app. § 12.3.1), and in the factual setting entity occurrences take diverse surface forms that our alias- and demonym-based matching may not fully capture (app. § 12.3.3). Attribution also runs over a subsample of the base corpus, so we may miss base data that would change the results.

Scope of attribution methods. This study focuses on three of the most prominent Hessian approximations for IFs, GradSim, TrackStar, and K-FAC. We do not consider other methods, particularly those discussed in footnote 5. We also use the standard influence formula. Future work could investigate whether extensions to it, such as those proposed by Kowal et al. (2026) or Heo et al. (2026), would yield different results. Finally, we do not sweep hyperparameters for the methods investigated, except for the (E)K-FAC ablation (details available in the supplementary materials: Table 3 and Figure 6). Training stochasticity. Due to computational constraints, we train and attribute on a single seed, but IFs are known to be sensitive to training stochasticity (Mlodozeniec et al., 2025). We partly account for this by retraining from scratch for each token budget rather than branching from shared checkpoints, but this does not fully cover what a complete picture would require.

Ethical Considerations

Data sourcing. Our models are trained on an English subset of Common Corpus (Langlais et al., 2026)17 and an English Wikipedia dump (Wikimedia Foundation, 2023})18. The Wikipedia dump is licensed under CC-BY-SA. Common Corpus consists exclusively of public domain and permissively licensed text, for which our sample will retain the original licenses. We refer to the original Common Corpus work by Langlais et al. (2026) for efforts to remove personally identifiable information and toxic content (sec. 4.4, 4.5).

Potential risks. The main ethical risk arising from this work concerns the interpretation and downstream use of influence estimates. Influence functions may support beneficial applications such as model debugging, data curation, unlearning, and the attribution of model outputs for creator compensation. However, identifying data associated with particular model behaviours could also facilitate targeted data manipulation or strategically harmful removal requests.

Moreover, given the limited faithfulness of influence functions indicated by our results and prior work, even well-intentioned applications carry risks. In particular, influence functions may misidentify the data responsible for a model’s behaviour, potentially resulting in unfair compensation, unwarranted blame, or the removal of data incorrectly classified as irrelevant or harmful.

Environmental costs. We used CODECARBON (Courty et al., 2024) to estimate the environmental cost of our experiments, run on NVIDIA H100 NVL and L40S GPUs. Across measured runs, consumption averaged 0.62 kWh and 95 g CO₂eq per GPU-hour. Our experiments required 1,730 GPU-hours in total, including failed runs and resubmissions, amounting to approximately 1,080 kWh and 160 kg CO₂eq. Reproducing all reported experiments would take approximately 730 GPU-hours, or roughly 460 kWh and 70 kg CO₂eq.

Acknowledgments We thank Louis Jaburi for general advice and helpful comments throughout the project, Bertram Højer for title inspiration, and Max Müller-Eberstein for help with filtering the Common Corpus. The research was supported by a research grant (VIL60860) from Villum Fonden.

AI Assistance. We used Anthropic’s Claude models as assistive tools during this project. Claude Opus 4.8 was used to refine the grammar and style of early drafts, which were subsequently fully revised by the authors. The research questions, experimental design, analysis, and interpretation of results are entirely their own. Claude Sonnet 5 and partly Claude Opus 4.8 assisted with implementation, primarily boilerplate around external libraries such as BERGSON (Quirke et al., 2026), plotting, and refactoring. All experimental logic was specified by the authors, and all AI-assisted output was reviewed and validated by them. The authors take full responsibility for the content of this work.

IFs and Hessian Approximations: Derivations

This section gives a comprehensive derivation of the influence function from its underlying leave-one-out (LOO) objective, and then provides a detailed overview of the three curvature approximations utilized in this work.

From Leave-One-Out to IFs

A natural way to approach data attribution is the leave-one-out (LOO) principle: how does a differentiable observable of the model’s parameters ϕ(θ)\phi(\theta) from § 2 change when a single training point zz is removed from Dtrain\mathcal{D}_{\mathrm{train}} and the model is retrained from scratch? In most of the recent influence work, the observable ϕ(θ)=L(θ,z′)\phi(\theta)=\mathcal{L}(\theta,z^{\prime}) is the query loss.

Writing the trained parameters as the empirical risk minimiser

θ∗=arg min⁡θ 1n∑i=1nL(θ,zi),(5)\theta^{*}=\underset{\theta}{\operatorname{arg\,min}}\ \frac{1}{n}\sum_{i=1}^{n}\mathcal{L}(\theta,z_i), \tag*{(5)}

and the LOO-retrained parameters as

θ−z∗=arg min⁡θ 1n∑zi≠zL(θ,zi),(6)\theta^{*}_{-z}=\underset{\theta}{\operatorname{arg\,min}}\ \frac{1}{n}\sum_{z_i\ne z}\mathcal{L}(\theta,z_i), \tag*{(6)}

the LOO objective is the resulting change in the observable,

ILOO(z,z′)=ϕ(θ−z∗)−ϕ(θ∗).(7)\mathcal{I}_{\mathrm{LOO}}(z,z^{\prime})=\phi(\theta^{*}_{-z})-\phi(\theta^{*}). \tag*{(7)}

With ϕ=L(⋅,z′)\phi=\mathcal{L}(\cdot,z^{\prime}) this is the increase in query loss upon removal: a positive value means that removing zz raises the query loss, i.e., zz supported the model’s behaviour on z′z^{\prime}.

Evaluating Equation (7) for every zz requires nn separate retrainings, which is intractable at LLM scale. IFs (Koh and Liang, 2017) approximate ILOO\mathcal{I}_{\mathrm{LOO}} without retraining, instead studying a continuous up- / downweighting of zz through the response function

θϵ∗=arg min⁡θ 1n∑i=1nL(θ,zi)+ϵL(θ,z),(8)\theta_{\epsilon}^{*}=\underset{\theta}{\operatorname{arg\,min}}\ \frac{1}{n}\sum_{i=1}^{n}\mathcal{L}(\theta,z_i)+\epsilon\mathcal{L}(\theta,z), \tag*{(8)}

where ϵ=0\epsilon=0 recovers θ∗\theta^{*} and ϵ=−1n\epsilon=-\frac{1}{n} corresponds to removing zz entirely, matching the LOO setup. The minimiser of Equation (8) satisfies the first-order optimality condition

1n∑i=1n∇θL(θϵ∗,zi)+ϵ∇θL(θϵ∗,z)=0.(9)\frac{1}{n}\sum_{i=1}^{n}\nabla_{\theta}\mathcal{L}(\theta_{\epsilon}^{*},z_i)+\epsilon\nabla_{\theta}\mathcal{L}(\theta_{\epsilon}^{*},z)=0. \tag*{(9)}

Differentiating this condition with respect to ϵ\epsilon at ϵ=0\epsilon=0, applying the implicit function theorem to θϵ∗\theta_{\epsilon}^{*}, and assuming θ∗\theta^{*} is a true (global) minimum of the training loss, gives

Hθ∗dθϵ∗dϵ∣ϵ=0+∇θL(θ∗,z)=0,(10)H_{\theta^{*}}\left.\frac{d\theta_{\epsilon}^{*}}{d\epsilon}\right|_{\epsilon=0}+\nabla_{\theta}\mathcal{L}(\theta^{*},z)=0, \tag*{(10)}

with Hθ∗=1n∑i∇θ2L(θ∗,zi)H_{\theta^{*}}=\frac{1}{n}\sum_i\nabla_{\theta}^{2}\mathcal{L}(\theta^{*},z_i) the training-loss Hessian. Solving for the parameter sensitivity yields

dθϵ∗dϵ∣ϵ=0=−Hθ∗−1∇θL(θ∗,z).(11)\left.\frac{d\theta_{\epsilon}^{*}}{d\epsilon}\right|_{\epsilon=0}=-H_{\theta^{*}}^{-1}\nabla_{\theta}\mathcal{L}(\theta^{*},z). \tag*{(11)}

The chain rule then propagates this shift to the observable,

dϕ(θϵ∗)dϵ∣ϵ=0=−∇θϕ(θ∗)THθ∗−1∇θL(θ∗,z).(12)\left.\frac{d\phi(\theta_{\epsilon}^{*})}{d\epsilon}\right|_{\epsilon=0}=-\nabla_{\theta}\phi(\theta^{*})^{\mathsf{T}}H_{\theta^{*}}^{-1}\nabla_{\theta}\mathcal{L}(\theta^{*},z). \tag*{(12)}

In the standard setting ϕ(θ)=L(θ,z′)\phi(\theta)=\mathcal{L}(\theta,z^{\prime}), so ∇θϕ(θ∗)=∇θL(θ∗,z′)\nabla_{\theta}\phi(\theta^{*})=\nabla_{\theta}\mathcal{L}(\theta^{*},z^{\prime}) is the query gradient. Since θ−z∗=θ∗\theta_{-z}^{*}=\theta^{*} at ϵ=−1n\epsilon=-\frac{1}{n}, a first-order expansion of Equation (7) around ϵ=0\epsilon=0 then gives

ILOO(z,z′)≈−1ndϕ(θϵ∗)dϵ∣ϵ=0=1n∇θϕ(θ∗)THθ∗−1∇θL(θ∗,z)\mathcal{I}_{\mathrm{LOO}}(z,z^{\prime})\approx-\frac{1}{n}\left.\frac{d\phi(\theta_{\epsilon}^{*})}{d\epsilon}\right|_{\epsilon=0} =\frac{1}{n}\nabla_{\theta}\phi(\theta^{*})^{\mathsf{T}}H_{\theta^{*}}^{-1}\nabla_{\theta}\mathcal{L}(\theta^{*},z)

The standard setting ϕ(θ)=L(θ,z′)\phi(\theta)=\mathcal{L}(\theta,z^{\prime}) yields then

ILOO(z,z′)=1n∇θL(θ∗,z′)THθ∗−1∇θL(θ∗,z).(13)\mathcal{I}_{\mathrm{LOO}}(z,z^{\prime})=\frac{1}{n}\nabla_{\theta}\mathcal{L}(\theta^{*},z^{\prime})^{\mathsf{T}}H_{\theta^{*}}^{-1}\nabla_{\theta}\mathcal{L}(\theta^{*},z). \tag*{(13)}

Removing the constant factor 1n\frac{1}{n} yields the influence score in Equation (1).

Cosine Similarity & Random Projections

Writing the parameter gradient as gz=∇θL(θ∗,z)∈Rpg_z=\nabla_{\theta}\mathcal{L}(\theta^{*},z)\in\mathbb{R}^{p}, the influence score of Equation (1) reads I(z,z′)=gz′THθ∗−1gz\mathcal{I}(z,z^{\prime})=g_{z^{\prime}}^{\mathsf{T}}H_{\theta^{*}}^{-1}g_z. Whenever Hθ∗H_{\theta^{*}} is symmetric positive definite it has a unique symmetric square root, so the score is a plain inner product of whitened gradients g~z=Hθ∗−1/2gz\widetilde{g}_z=H_{\theta^{*}}^{-1/2}g_z,

I(z,z′)=g~z′Tg~z.(14)\mathcal{I}(z,z^{\prime})=\widetilde{g}_{z^{\prime}}^{\mathsf{T}}\widetilde{g}_z. \tag*{(14)}

Following Chang et al. [5], we additionally unit-normalise these gradients, which gives the quantity we report throughout,

I(z,z′)≈cos⁡(g~z′,g~z).(15)\mathcal{I}(z,z^{\prime})\approx\cos(\widetilde{g}_{z^{\prime}},\widetilde{g}_z). \tag*{(15)}

Equation (14) and Equation (15) are defined over the full parameter space, with pp on the order of 10810^{8}: storing one gradient per training point does not scale, and forming or inverting the p×pp\times p Hessian is infeasible. Following Park et al. (2023), we therefore compress gradients by random projections Φ∈Rk×p\Phi\in\mathbb{R}^{k\times p}, k≪pk\ll p. By the Johnson-Lindenstrauss lemma (Johnson and Lindenstrauss, 1984), inner products are approximately preserved in expectation, so it suffices to store the sketch Φgz∈Rk\Phi g_z\in\mathbb{R}^{k} once per training point and reuse it for every query. A dense Φ\Phi would itself be too large to store. Following Chang et al. [5], we apply Φ\Phi as a block-diagonal structure with one block per weight module, and factor each block into two per-side matrices ΦL\Phi_L, ΦR\Phi_R, so that projecting a block gradient GWG_W costs only two small matrix products,

GˉW=ΦLGWΦRT,(16)\bar{G}_W = \Phi_L G_W \Phi_R^{\mathsf{T}}, \tag*{(16)}

rather than one dense k×pk \times p multiply. The entries of ΦL\Phi_L, ΦR\Phi_R are drawn i.i.d. from {−1,+1}\{-1,+1\}, which preserves inner products with the same guarantees as a Gaussian sketch ([1]). We write g^z∈Rk\hat{g}_z \in\mathbb{R}^k for the projected gradient obtained by flattening and concatenating the sketched blocks.

Random projection also makes curvature estimation cheaper. Rather than forming HH in parameter space and then projecting it, we work directly with a compressed pseudo-Hessian H^∈Rk×k\hat{H} \in\mathbb{R}^{k \times k} estimated in the projected space ([5]), again block-diagonal so that H^−1/2\hat{H}^{-1/2} stays cheap. Equation (15) becomes

I(z,z′)≈cos⁡(H^−1/2g^z′,H^−1/2g^z).(17)\mathcal{I}(z,z') \approx\cos\left(\hat{H}^{-1/2}\hat{g}_{z'}, \hat{H}^{-1/2}\hat{g}_z\right). \tag*{(17)}

The three methods below differ only in how they instantiate H^\hat{H}.

Hessian Approximations

We compare three choices of H^\hat{H}, in increasing order of how faithfully they model the loss curvature. Each is plugged into Equation (17); they differ in what they fit and at what cost. Figure 5 shows the correlation between the contrastive influence scores at the individual query–training-point level.

Figure 5. Agreement of GradSim, TrackStar, and K-FAC. Per-query-pair Spearman ρ\rho (left) and Pearson rr (right) on all queries between the ΔI\Delta I that two methods assign to the candidate sentences in DXD_X, 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.

Gradient Similarity (GradSim)

The simplest choice makes no curvature correction at all, H^=I\hat{H}=I, so that Equation (17) reduces to the cosine similarity of the raw projected gradients,

I(z,z′)≈cos⁡(g^z′,g^z).\mathcal{I}(z,z') \approx\cos(\hat{g}_{z'},\hat{g}_z).

This estimator follows Pruthi et al. (2020), who derive an influence estimator by tracing the training trajectory: a first-order expansion of the SGD update wt+1−wt=−ηtgz,tw_{t+1}-w_t=-\eta_t g_{z,t} gives a training point’s contribution to the query loss over training as a learning-rate-weighted sum of gradient dot products across checkpoints,

TracIn⁡(z,z′)=∑t:zt=zηtgz′,tTgz,t,(18)\operatorname{TracIn}(z,z') = \sum_{t:z_t=z} \eta_t g_{z',t}^{\mathsf{T}}g_{z,t}, \tag*{(18)}

with gz,t=∇θL(wt,z)g_{z,t}=\nabla_\theta\mathcal{L}(w_t,z). We evaluate gradients only at the final checkpoint θ∗\theta^* and assume constant step size for simplicity, which recovers H^=I\hat{H}=I. This sounds like a naive approach, but there are reasons to believe that it is not as poor as a choice as it seems ((Grünefeld et al., 2026)).

GradSim requires no fitting pass at all: its only cost is one projected gradient per point plus the scoring dot products, making it by far the cheapest method.

TrackStar

TrackStar ([5]) estimates H^\hat{H} directly in the projected space, as the autocorrelation (second moment) of the compressed gradients. Over the nn training points and the 2m2m query sentences (each of the mm minimal pairs contributes a positive and a negative sentence) it fits

H^train=1n∑i=1ng^zig^ziT,(19)\hat{H}_{\mathrm{train}} = \frac{1}{n}\sum_{i=1}^{n}\hat{g}_{z_i}\hat{g}_{z_i}^{\mathsf{T}}, \tag*{(19)}
H^query=12m∑j=12mg^zj′g^zj′T.(20)\hat{H}_{\mathrm{query}} = \frac{1}{2m}\sum_{j=1}^{2m}\hat{g}_{z'_j}\hat{g}_{z'_j}^{\mathsf{T}}. \tag*{(20)}

Because these gradients are taken at the observed training labels rather than at labels sampled from the model’s predictive distribution, H^\hat{H} is a (compressed) empirical Fisher, which in general differs from the true Fisher and only loosely tracks the loss Hessian near the optimum ((Kunstner et al., 2019)); (E)K-FAC (below) instead targets the true Fisher.

To suppress gradient directions that would otherwise dominate the score, TrackStar mixes the two estimates, H^mix=αH^query+(1−α)H^train\hat{H}_{\mathrm{mix}}=\alpha\hat{H}_{\mathrm{query}}+(1-\alpha)\hat{H}_{\mathrm{train}}, with the query weight α\alpha selected automatically so that the 1,000 most query-dominant components are downweighted ([5]). H^mix−1/2\hat{H}_{\mathrm{mix}}^{-1/2} is applied to both sides of Equation (17). The original formulation also divides gradients by the optimiser’s second-moment (Adafactor) estimate; we omit this term, following (Quirk et al., 2026). Fitting H^\hat{H} costs a single pass over the training gradients, and the block-diagonal structure keeps the inverse square root cheap.

K-FAC

K-FAC ((Martens and Grosse, 2015)) models the curvature most faithfully in theory, at the cost of more compute: unlike the two methods above, it approximates the Hessian itself.

Because the loss Hessian of a neural network is neither guaranteed positive definite nor tractable ([4] (Sagun et al. 2018)), K-FAC replaces it with the Gauss–Newton matrix, which for the cross-entropy loss equals the Fisher information matrix,

F(θ)=Ey∼pθ[∇θlog⁡pθ(y)∇θlog⁡pθ(y)T].(21)F(\theta)=\mathbb{E}_{y\sim p_\theta}\left[\nabla_\theta\log p_\theta(y)\nabla_\theta\log p_\theta(y)^{\mathsf{T}}\right]. \tag*{(21)}

The expectation is over labels drawn from the model’s own predictive distribution (the true Fisher), in contrast to TrackStar’s empirical Fisher; consequently FF cannot simply be estimated as an outer product of compressed gradients. FF is positive semidefinite by construction, and a damping term λ>0\lambda> 0 makes it strictly positive definite.

K-FAC then makes FF tractable in two steps. First, it assumes a block-diagonal structure across layers, one block FiF_i per weight matrix Wi∈Rdin×doutW_i \in\mathbb{R}^{d_{\mathrm{in}}\times d_{\mathrm{out}}}.

Second, it exploits the fact that the per-example gradient of WiW_i has the outer-product form ∇WiL=ai−1DsiT\nabla_{W_i}\mathcal{L}=a_{i-1}D_{s_i}^{\mathsf{T}}, the layer input ai−1a_{i-1} times the pre-activation pseudo-gradient DsiD_{s_i}.{^19} Assuming these are statistically independent, each block factorises into a Kronecker product,

Fi≈Ai⊗Si,(22)F_i \approx A_i \otimes S_i, \tag*{(22)}
Ai=E[ai−1ai−1T],Si=E[DsiDsiT].(23)A_i=\mathbb{E}[a_{i-1}a_{i-1}^{\mathsf{T}}],\qquad S_i=\mathbb{E}[D_{s_i}D_{s_i}^{\mathsf{T}}]. \tag*{(23)}

The factors AiA_i (din×dind_{\mathrm{in}}\times d_{\mathrm{in}}) and SiS_i (dout×doutd_{\mathrm{out}}\times d_{\mathrm{out}}) are far smaller than FiF_i and can be estimated in a single pass over the training data. We fit them for every linear layer except the language-model head (the token embedding is likewise excluded). Eigendecomposing the factors (Ai=QAΛAQAT, Si=QSΛSQST)(A_i = Q_A \Lambda_A Q_A^{\mathsf T},\ S_i = Q_S \Lambda_S Q_S^{\mathsf T}), the Kronecker structure gives a closed-form inverse-Hessian-vector product per block,

(Fi+λI)−1vec⁡(Gz,i)=vec⁡(QA(QATGz,iQS⊙Λ−1)QST),(24)(F_i+\lambda I)^{-1}\operatorname{vec}(G_{z,i}) = \operatorname{vec}\left(Q_A\left(Q_A^{\mathsf T}G_{z,i}Q_S \odot\Lambda^{-1}\right)Q_S^{\mathsf T}\right), \tag*{(24)}

where Gz,iG_{z,i} is the gradient of block ii, ⊙\odot is the element-wise product, and Λ−1\Lambda^{-1} element-wise inverts ΛA⊗ΛS\Lambda_A \otimes\Lambda_S after adding λ\lambda. This never forms or inverts the full block. Stacking the blocks yields the approximation to H−1gzH^{-1}g_z used in Equation (1).

EK-FAC. The independence assumption behind Equation (22) makes ΛA⊗ΛS\Lambda_A \otimes\Lambda_S only an approximation to the true eigenvalues of FiF_i in the Kronecker eigenbasis. EK-FAC ((George et al., 2018)) corrects this by re-estimating the diagonal directly in that eigenbasis, at the cost of one extra pass over the data.

(E)K-FAC with Whitening and Random Projections. Unlike GradSim and TrackStar, which are defined directly on the compressed gradients of app. A.2, (E)K-FAC was formulated in full parameter space and without the whitening of app. A.2 ((Martens and Grosse, 2015; George et al., 2018)): the factors Ai,SiA_i, S_i live in the layer dimensions din,doutd_{\mathrm{in}}, d_{\mathrm{out}}, and H−1H^{-1} is applied to full-dimensional gradients.

Whitening is cheap to add, since the Kronecker structure carries over to the symmetric square root,

Fi−1/2≈(Ai⊗Si)−1/2=Ai−1/2⊗Si−1/2,(25)F_i^{-1/2} \approx(A_i \otimes S_i)^{-1/2} = A_i^{-1/2} \otimes S_i^{-1/2}, \tag*{(25)}

with Ai−1/2=QAΛA−1/2QATA_i^{-1/2} = Q_A\Lambda_A^{-1/2}Q_A^{\mathsf T} and Si−1/2=QSΛS−1/2QSTS_i^{-1/2} = Q_S\Lambda_S^{-1/2}Q_S^{\mathsf T}; concretely, this amounts to replacing Λ−1\Lambda^{-1} by Λ−1/2\Lambda^{-1/2} in Equation (24) (where Λ\Lambda already carries the damping λ\lambda) on both the query and the training side, so the full K-FAC machinery carries over unchanged. EK-FAC’s corrected eigenvalues no longer factorise across the two sides as in Equation (25), but they remain diagonal in the Kronecker eigenbasis, so the square root is still available.

Scale remains a problem: a full-dimensional gradient must be materialised for every training point at scoring time and cannot be cached for reuse across queries. Two remedies are available: Two remedies are available: amortising one pass over many queries, or storing a compressed sketch per point. This gives the three schemes below, in decreasing order of cost.

(i) Query batching. Grosse et al. (2023) propose batching the queries so that a single pass over the training data scores a whole query batch at once, sharing the training-gradient computation across the batch. To fit a batch in memory they approximate each preconditioned query gradient as low-rank. They report this to incur only small error, but like the following two schemes it is not approximation-free. Cost: The Kronecker factors of the ‘Hessian’ are fitted in full parameter space, and scoring dominates: the low-rank matrix-vector products are repeated once per query batch, so time and memory both grow with the number of queries.

(ii) Sketched application (whiten, then project). Random projections can be introduced post-hoc: whiten each block exactly as in scheme (i), stack the results into the full whitened gradient gˉz\bar{g}_z, and only then reduce its dimension for storage and scoring, gˉz=Φg~z\bar{g}_z = \Phi\tilde{g}_z. The Kronecker factors are still fitted and applied in full parameter space. Because whitening happens before any information is lost to the projection, this scheme stays compatible with the EK-FAC eigenvalue correction. Cost: Fitting is as expensive as in scheme (i), but scoring is amortised: each training point is reduced once to a kk-dimensional sketch and reused for every query, leaving only kk-dimensional dot products. That single pass is still costly, since the full whitened gradient is formed before projecting.

(iii) Fused application (project and whiten in one step). We can avoid whitening in full parameter space entirely by folding it into the projection, at the price of a looser approximation. By Equation (25), the two-sided projection ΦL,ΦR\Phi_L,\Phi_R and the two-sided whitening Ai−1/2,Si−1/2A_i^{-1/2}, S_i^{-1/2} act on the same two sides, so each side can be precombined once, after the factors are fitted, into ML(i)=ΦL(i)Ai−1/2M_L^{(i)} = \Phi_L^{(i)} A_i^{-1/2} and MR(i)=ΦR(i)Si−1/2M_R^{(i)} = \Phi_R^{(i)} S_i^{-1/2}. Each block is then whitened and sketched in a single pair of matmuls,

Gˉz,i=ML(i)Gz,iMR(i)T,(26)\bar{G}_{z,i} = M_L^{(i)}G_{z,i}M_R^{(i)\mathsf T}, \tag*{(26)}

the projected counterpart of the whitened block in scheme (ii), but obtained without ever forming the full-dimensional whitened gradient. Cost: Fitting costs the same as schemes (i) and (ii), since the same factors are estimated; the saving is entirely at scoring, where each block collapses to small matmuls.

Damping, however, can no longer be shared between the two factors. Schemes (i) and (ii) add λ\lambda to the combined eigenvalues ΛA⊗ΛS\Lambda_A \otimes\Lambda_S (Equation (24)). However, for scheme (iii) the per-side split of Equation (25) has no access to this joint spectrum, so we instead damp each factor on its own,

Ai−1/2=QA(ΛA+λΛˉAI)−1/2QA⊤,(27)A_i^{-1/2} = Q_A \left(\Lambda_A + \lambda\bar{\Lambda}_A I\right)^{-1/2} Q_A^\top, \tag*{(27)}

and likewise for Si−1/2S_i^{-1/2}, where ΛˉA\bar{\Lambda}_A is the mean eigenvalue of AiA_i. Finally, since EK-FAC replaces ΛA⊗ΛS\Lambda_A \otimes\Lambda_S with a corrected diagonal that no longer factorises across the two sides, it cannot be absorbed into ML,MRM_L, M_R; scheme (iii) is therefore restricted to plain K-FAC.

Agreement. Figure 6 compares all three schemes on a small set of 16 query pairs ranked on 500,000 sentences sampled from the same distribution as in our main experiments, using a rank-32 low-rank approximation for the batched query gradients in scheme (i). Note that 16 queries per phenomenon is a small set, even at 500,000 candidates each. We therefore read it as a proxy for how the schemes relate rather than a ranking of them.

EK-FAC and K-FAC agree at ρ≥0.97\rho\ge0.97 within a scheme. Schemes (ii) and (iii) agree nearly as closely (ρ=0.90\rho= 0.90–0.970.97), while scheme (i) shows notable gaps to the others (ρ=0.20\rho= 0.20–0.750.75, r=0.55r = 0.55–0.850.85). As a sanity check that query batching does not overturn our main findings, we computed Precision@10 on the influence contrast for these 16 queries: it is never best on any phenomenon and trails the best scheme by at most 6 pp, so it offers no gain.

For the sketched approaches we run a more thorough analysis: Table 3 reports Precision@10 for schemes (ii) and (iii) over all existing query pairs per phenomenon and two values of λ\lambda. We leave query batching out here, since its cost grows with the number of queries and does not scale to this setting.

Scoring Metric and Learned Verdict

Scoring metric. We score a sequence by its summed, unnormalized log-probability log⁡pf(s)\log p_f(s). A model ‘prefers’ a sequence when it assigns it a higher log-probability than its counterpart (see Equation (2)). This aligns with the primary metric of the benchmarks we adopt, BLiMP ((Warstadt et al., 2020)) and BEAR ((Wiland et al., 2024)).

Notably, as also discussed by Wiland et al. (2024), this choice introduces a bias: the summed log-probability favours shorter members of a pair by design. The natural alternative, length-normalizing the scores, does not remove the bias but shifts it to a tokenization-dependent one. In our linguistic setting, for instance, our Goldfish tokenizer splits only into two tokens (on-ly) while even, remains a single token. So a normalized comparison would shift the preference toward even for length-related rather than grammatical reasons. The factual setting has the same issue by construction: entities differ in length (e.g. Stockholm vs. Paris) and are therefore split into differing numbers of tokens.

Warstadt et al. (2020) further propose two alternative strategies, one-prefix and two-prefix, which compare probabilities only at the point where a minimal pair diverges. Since these still depend on the tokenization of the differing parts, the concerns above persist. One-prefix and two-prefix scoring is also applicable in every setting (see Warstadt et al. (2020)), and thus offer no clear advantage.

Table 4 reports model performance for both settings, linguistic phenomena and factual knowledge on both metric, summed and length-normalized sequence likelihood.

PhenomenonTokensNNFull FS-LLFull LN-LLFull Δ\DeltaNo-X\mathcal{X} (filtered) FS-LLNo-X\mathcal{X} (filtered) LN-LLNo-X\mathcal{X} (filtered) Δ\Delta
Linguistic phenomena
Binding Reflexives68M100058.154.1+4.061.744.6+17.1
Binding Reflexives130M100059.656.7+2.956.944.8+12.1
Binding Reflexives1.3B100074.762.5+12.230.530.1+0.4
Binding Reflexives5.6B100075.062.1+12.949.949.6+0.3
NPI Licensing (own)68M10034.081.0−47.018.075.0−57.0
NPI Licensing (own)130M10041.083.0−42.026.082.0−56.0
NPI Licensing (own)1.3B10073.095.0−22.046.087.0−41.0
NPI Licensing (own)5.6B10086.099.0−13.054.091.0−37.0
Exist.-there Quant.68M100091.791.7+0.068.568.5+0.0
Exist.-there Quant.130M100097.197.1+0.087.587.5+0.0
Exist.-there Quant.1.3B100098.198.1+0.093.493.4+0.0
Exist.-there Quant.5.6B100098.198.1+0.091.391.3+0.0
Island Effects68M100021.821.8+0.012.612.6+0.0
Island Effects130M100022.022.0+0.019.519.5+0.0
Island Effects1.3B100039.339.3+0.027.827.8+0.0
Island Effects5.6B100058.758.7+0.044.544.5+0.0
NPI Lic. (BLiMP)68M700039.070.3−31.351.576.2−24.7
NPI Lic. (BLiMP)130M700047.370.1−22.863.078.4−15.4
NPI Lic. (BLiMP)1.3B700064.173.6−9.566.579.8−13.3
NPI Lic. (BLiMP)5.6B700072.281.6−9.471.979.7−7.8
BEAR facts
Wikipedia4.8B322120.57.9+12.617.37.1+10.2
Common Corpus5.6B60118.87.4+11.415.18.9+6.2
GPT\mathit{GPT}-2 (pretrained, no-No-X\mathcal{X} counterpart)
Binding Reflexives—100067.367.3+0.068.668.6+0.0
NPI Licensing (own)—10091.097.0−6.092.097.0−5.0
Exist.-there Quant.—100097.097.0+0.098.598.5+0.0
Island Effects—100057.757.7+0.050.450.4+0.0
NPI Lic. (BLiMP)—700073.167.7+5.474.670.9+3.7
BEAR (Wikipedia subset)—322111.64.8+6.818.35.1+13.2
BEAR (Common Corpus subset)—60128.19.0+19.139.610.0+29.6

Table 4. Full-sentence log-likelihood (FS-LL) vs. length-normalised log-likelihood (LN-LL) accuracy (%), for full models and their No-X\mathcal{X} (data-filtered) counterparts across training budgets. NN is the number of scored items per row: minimal pairs for the linguistic phenomena, corpus-supported facts for BEAR. Δ\Delta = 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 NN = 601 corpus-supported facts in the Common Corpus set and the NN = 3221 in the Wikipedia set.

quence likelihood. Table 5 reports Precision@10 for the linguistic phenomena on queries the full model learned while the No-χ\chi model did not, i.e. those attributable to the target property. For existential there quantifiers and wh-island effects both verdicts select the identical query set. Binding reflexives rise and NPIs fall. Both follow the length bias discussed above: himself is two tokens while the other reflexives are one, over-admitting those pairs under FS-LL; for NPIs the licensor lengthens the grammatical member, so the No-χ\chi model spuriously passes under LN-LL. The ranking of methods, however, is unchanged throughout.

PhenomenonNN FS-LLNN LN-LLGradSim FS-LLGradSim LN-LLTrackStar FS-LLTrackStar LN-LLK-FAC FS-LLK-FAC LN-LL
Binding Reflexives35422211.915.920.123.930.346.2
NPI Licensing (own)33834.516.245.222.550.927.5
Exist.-there Quant.696976.776.777.877.885.585.5
Island Effects19119137.137.115.415.450.450.4

Table 5. Precision@10 of the influence contrast ΔI\Delta\mathcal{I} under full-sentence (FS-LL) vs. length-normalised (LN-LL) likelihood scoring, for the 5.6B Common Corpus model. NN is the number of queries, which are ’attributable’ to X\mathcal{X}, i.e. learned by the full model but not by the No-X\mathcal{X} model.

Learned- and not learned-definition. Our learned/not-learned definition (Equation (2)) uses a deliberately loose criterion: a model counts as having learned a query if it merely prefers the correct member, i.e. assigns it the higher summed log-probability.

In the linguistic setting each query has a single counterexample, so this is one preference check between the grammatical sentence and its ungrammatical counterpart. In the factual setting each fact comes with three templates and multiple answer options, so we require the correct object to be the most likely candidate under all three templates; a fact counts as not learned as soon as any single template ranks some counterexample above the correct answer.

This criterion is loose in two ways. At the item level the margin between s+s^{+} and s−s^{-} may be small, so a ‘preference’ need not reflect ‘confidence’. And under filtering, a query with a large pre-filtering margin can retain a clear (if reduced) preference for s+s^{+} in the No-χ\chi model, yet still be counted as learned by both models.

To test whether this affects our conclusions, we re-run our analysis under stricter verdicts that require a minimum margin τ\tau between s+s^{+} and s−s^{-}, sweeping τ∈{0,0.5,1,2,3,5}\tau\in\{0, 0.5, 1, 2, 3, 5\} (τ=0\tau=0 recovers the main results).

To capture cases where filtering only partially reduces a large initial margin, we further allow separate thresholds for the two models, requiring τfull≥τno−χ\tau_{\mathrm{full}} \geq\tau_{\mathrm{no-\chi}}, so the full model must clear a higher bar than the No-χ\chi model. Tightening the margin necessarily discards queries that fall in the gap between the two thresholds.

Figure 7 and Figure 8 show how the attribution results change under different verdicts in the linguistic and factual setting. The top row of each plot

Figure 7. Linguistic phenomena: Precision@10 of the influence contrast ΔI\Delta 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}\tau\in\{0, 0.5, 1, 2, 3, 5\} for both the full model (τfull\tau_{\mathrm{full}}) and the No-X\mathcal{X} (τno−x\tau_{\mathrm{no-x}}) and ask how attribution results change for different margins for (τfull\tau_{\mathrm{full}} and τno−x\tau_{\mathrm{no-x}}). We require that (τfull≥(τno−x\tau_{\mathrm{full}} \ge(\tau_{\mathrm{no-x}}). (τfull=τno−x=0\tau_{\mathrm{full}} = \tau_{\mathrm{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\mathcal{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\mathcal{X} is on learned queries compared to not learned queries.

Figure 8. Facts: Precision@10 of the influence contrast ΔI\Delta 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).

reports Precision@kk of the influence contrast on queries the full model learned but the No-X\mathcal{X} model did not (those attributable to X\mathcal{X}), together with the number of remaining queries per cell (below). The bottom row reports the gap in Precision@10 between these learned queries and not-learned ones. Its lower-left cell (τfull=τno−X=0\tau_{\mathrm{full}}=\tau_{\mathrm{no-}\mathcal{X}}=0) reproduces the setup of the main paper.

The gap stays positive across nearly the entire grid, with two exceptions. For three of the four linguistic phenomena it is largest when the full-model threshold is high and the No-X\mathcal{X} threshold is low (upper-left cell). Similarly, for the facts and the Wikipedia model, the upper-left cell shows the largest gap. For the Common Corpus model no clear pattern emerges, mainly because few facts meet the threshold requirements (the low counts in the upper row of Figure 8). We conclude that attribution is well-connected to acquisition. At the same time, for binding reflexives and wh-island effects the gaps are rather small, which we attribute to the errors discussed in §6.3.

Experimental Setup Details

Syntactically Annotated Corpus

Sources. The use of fixed and re-shareable pre-training data is crucial to integrity and reproducibility, however, the licensing ambiguities of web-crawled data make this process exceedingly challenging. We build on the Common Corpus (Langlais et al., 2026)—a multilingual collection of 2T tokens of uncopyrighted or permissable licensed text from public sources. It contains well-documented licensing and authorship metadata, which we maintain in our pre-processed version.

Sampling & Deduplication. We applied a quality filter to the original Common Corpus data, removing any documents, which contain less than 85% alphanumeric, or less than 85% of the target language’s characters (e.g., to avoid OCR artifacts). From the filtered data we sampled 10B tokens, sentence-segmented them, and parsed them (Parsing below), yielding 2,565,931 documents and 340,886,709 sentences spanning 10,147,310,695 tokens of dependency-annotated text. We make the ∼10\sim10B dependency parsed corpus publicly available.20

The authors of Common Corpus report a ‘negligible’ amount of duplicates (Langlais et al., 2026).

However, we observed that the resulting sample contains substantial near-verbatim repetition, e.g., boilerplate in patent claims and government filings. Since proper attribution to duplicate data points remains a significant problem (Patel et al., 2026), we further deduplicated the sample. In particular, we hash each sentence of the sample by the MD5 digest of its space-joined FORM column (multiword-range and empty-node rows excluded) and only keep the first occurrence of each hash.

We then split the deduplicated corpus into a 90% training set and a 10% test set, reserving the latter for future study of model behavior on unseen data. The models reported in this work are trained on the training set.

For the second corpus used in this work, the Wikipedia corpus, no such split is applied. In this case, we train the model on the full sentence-segmented corpus.

Table 6 provides the amount of documents, sentences and words for each of stages of the pipeline, parsing, deduplication and train-test-splitting. Figure 9 report the provenance metadata of that sample.

Count%
Documents
Parsed corpus (released)2,565,931
Training corpus1,379,82553.8
Sentences
Parsed corpus (released)340,886,709
Training corpus162,691,84447.7
training split (90%)146,422,03643.0
held-out split (10%)16,269,8084.8
Words (CoNLL-U tokens)
Parsed corpus (released)10,147,310,695
Training corpus5,392,054,02553.1
Tokens (Goldfish subwords)
Training split5,660,798,493

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.

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.

Sentence length across the two corpora. The Wikipedia corpus spans more sentences than the Common Corpus sample (195.6M vs. 146.4M) despite the smaller token budget (4.8B vs. 5.6B), because Common Corpus sentences are considerably longer: 38.7 tokens on average against Wikipedia’s 24.3. This follows from the composition reported above. Patent claims are the largest component of the sample, which are single-sentence constructions of exceptional length.

Parsing. For our linguistic experiments, we used MaChAmp v0.4.2 (van der Goot et al., 2021) with default hyperparameters, train a single multi-task model that performs word segmentation, UPOS tagging, XPOS tagging, lemmatization, morphological labeling, and dependency parsing. We trained parsers based on four different language models: deberta-v3-large (He et al., 2023), luke-large (Yamada et al., 2020), roberta-large (Liu et al., 2019), ModernBERT-large (Warner et al., 2025). We manually inspected 20 sentences on which the parsers disagreed, i.e., where at least two models produced different dependency structures, and found the deberta-based parser to be the most accurate.

Models and Hyperparameters

Architecture. Table 7 lists the two architectures we use. For token budgets up to 1.3B we use the GPT-2 small configuration, and GPT-2 medium (Radford et al., 2019) for larger budgets. All models are trained from scratch. We train our own SentencePiece unigram tokenizer on a 130MB sample of our Common Corpus subset, following the Goldfish recipe (Chang et al., 2026). We do not retrain it for different token budgets, nor for the Wikipedia-based model.

Small (ours)Medium (ours)
Layers LL1224
Attention heads HH1216
Hidden size dmodeld_{\mathrm{model}}7681,024
FFN size dffd_{\mathrm{ff}}3,0724,096
Context length nctxn_{\mathrm{ctx}}5121,024
Vocabulary51,20051,200
Parameters124.8M355.8M
ActivationGELUGELU
Dropout (attn/emb/resid)0.10.1
LayerNorm ε\varepsilon10−510^{-5}10−510^{-5}
Init. std.0.020.02
Tied input/output embeddingsyesyes
Used for budgets≤1.3B\leq1.3\mathrm{B}>1.3B>1.3\mathrm{B}
Shared (except BM25)
Max. sequence length512
Random projection (per module)64×6464 \times64
Projection typeRademacher
Two-sided (block-diagonal)yes
Unit normalization (cosine)yes
Modules scoredall linear
excludedlm_head, embeddings
GradSim
Optimizer-state normalizationoff
TrackStar
Downweighted components1,000
Optimizer-state (Adafactor) termoff
K-FAC
Damping λ\lambda0.1
Application schemefused (iii)
BM25
Stopwordsretained

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.

Optimization. All runs share one recipe, taken from Goldfish (Chang et al., 2026): AdamW (β1=0.9\beta_1 = 0.9, β2=0.999\beta_2 = 0.999) with learning rate 1×10−41 \times10^{-4}, ε=10−6\varepsilon= 10^{-6}, weight decay 0.01, gradient clipping at 1.0,

linear decay to zero after a linear warmup over the first 10% of steps, and bf16 mixed precision. Every model is trained for exactly one epoch. The effective batch size is 64 sequences for the small models and 32 for the medium models. Random seeds are fixed per budget and shared between a full model and its No-X\mathcal{X} counterpart.

Data handling. The corpus is sentence-segmented (app. § 12.§ 1), tokenized into sequences of at most 512 tokens, and shuffled at the sequence level, and Shuffling is done independently per model, so a full model and its No-X\mathcal{X} counterpart do not share an example ordering. Importantly, every (budget, phenomenon) pair is trained from scratch rather than branched from a shared checkpoint to account for the sensitivity of IFs to training stochasticity (Mlodozeniec et al., 2025).

Baselines. The pretrained gpt2 (124M) and gpt2-medium (355M) checkpoints21 are used as released, with their own BPE tokenizer and 1,024-token context. They are evaluated but never retrained, and have no No-X\mathcal{X} counterpart.

Attribution hyperparameters. Table 8 lists the attribution settings, held fixed across phenomena, corpora, and token budgets. Gradients are compressed with a two-sided Rademacher projection to 64×6464 \times64 per weight module and unit-normalized

(app. A.2), so all three influence methods return cosine-similarity scores on a common scale; BM25 scores are L2L_2-normalized per query for the same reason.

The language-model head and the token embeddings are excluded from all approximation methods. K-FAC uses the fused scheme (iii) detailed in app. A.3 with damping λ=0.1\lambda= 0.1. Note, that for K-FAC damping is applied in auto_mean mode, following Quirke et al. (2026): λreal=λ⋅σ(H^)\lambda_{\mathrm{real}} = \lambda\cdot\sigma(\hat{H}), the mean eigenvalue of the approximation scaled by the multiplier λ\lambda.

Compute. All experiments ran on a single GPU per job, either an NVIDIA H100 NVL or an L40S. Total GPU-hours, energy, and emissions are reported in § 7.

Construction of Filters

Linguistic Setting

We select phenomena while aiming to balance several desiderata: (1) easy to isolate, unlikely to be learned by similar constructions, (2) a small enough filtered subset to keep the training data largely undisturbed, (3) spanning different levels of syntactic structure. This section describes each phenomenon and how its filter is applied.

  • Binding reflexives hinge on single closed-class lexical items. Here we experimented with lemma based filters targeting the parsed data’s lemma field, but manual checks on filtered results showed that the recall was low. As such, we filtered them based on surface form matches. Evaluation is conducted over a single BLiMP suite, principle_A_c_command, which solely targets reflexive binding.

  • NPIs. Similar to binding, we first experimented with syntactic filters on dependency parses, targeting only the licensed NPIs and letting unlicensed and polysemous forms pass through. However, manual checks showed that parser accuracy deteriorated with longer dependencies, such as NPIs licensed through matrix clauses. Again erring on the side of caution, we filtered them based on surface form matches. For evaluation, we use a subset of BLiMPPI (app. § 12.3.2).

  • Wh-island effects are tied to a sentence type that is very rare in written corpora, where wh-words are followed by a nominal, while preserving the question form. We use syntactic filters to isolate the sentences

exhibiting this structure. The BLiMP suite left_branch_island_simple_question is used for evaluation.

  • Existential there quantifiers combine a frequent construction, existential there, with a closed set of quantifier function words with narrowly defined semantics, and thus test the regime where X\mathcal{X} is common but still lexically bounded. Again we use syntactic filters, targeting existentials governing a quantifier. For evaluation, existential_there_quantifiers_1 and _2 are used.

Filter Precision and Recall We sampled 100 candidate sentences per phenomenon with a lexical trigger, annotated them by hand, and ran the filter over the same parses. ETQ: precision 0.93, recall 0.78. Wh-islands: precision 0.62, recall 0.62. For binding and NPIs the filters are lexical rather than syntactic, so we did not evaluate them separately. Most misses stem from broken parses rather than from the filter patterns. The missed sentences typically lack whitespace or are otherwise corrupted, so the correct parses never exist. Imperfect recall means some deformed forms of X\mathcal{X} still survive in Dbase\mathcal{D}_{\mathrm{base}}.22

Why Not BLiMP’s NPI Set?

Two types of contrast in BLiMP’s NPI suite proved incompatible with our framework. In npi_present_1 and npi_present_2, a grammatical positive sentence is contrasted with an ungrammatical counterpart in which an adverb is replaced by an NPI: Many skateboards also roll. vs. Many skateboards ever roll. Since the ablated models are trained without NPIs, the ungrammatical member, containing a word form the model has never seen, becomes even less likely. As shown in Table 12, No-X\mathcal{X} models consequently score higher than the full models.

PhenomenonTokensNNRand.FullNo-X\mathcal{X}Δ\Deltaboth models wrongFull correct, No-X\mathcal{X} wrongboth models correctFull wrong, No-X\mathcal{X} correct
Binding Reflexives68M100050.0%58.1%61.7%+3.6%107276305312
130M100050.0%59.6%56.9%−2.7%179252344225
1.3B100050.0%74.7%30.5%−44.2%19649924857
5.6B100050.0%75.0%49.9%−25.1%147354396103
NPI Lic. (own)68M10050.0%34.0%18.0%−16.0%6517171
130M10050.0%41.0%26.0%−15.0%5717242
1.3B10050.0%73.0%46.0%−27.0%2628451
5.6B10050.0%86.0%54.0%−32.0%1333531
Exist.-there Quantifiers68M100050.0%91.7%68.5%−23.2%832326850
130M100050.0%97.1%87.5%−9.6%29968750
1.3B100050.0%98.1%93.4%−4.7%19479340
5.6B100050.0%98.1%91.3%−6.8%18699121
Wh-island effects68M100050.0%21.8%12.6%−9.2%7391358343
130M100050.0%22.0%19.5%−2.5%7376815243
1.3B100050.0%39.3%27.8%−11.5%57914325028
5.6B100050.0%58.7%44.5%−14.2%36419139649
NPI Lic. (BLiMP)68M700050.0%39.0%51.5%+12.4%2072132614062196
130M700050.0%47.3%63.0%+15.7%1367122420842325
1.3B700050.0%64.1%66.5%+2.4%841150229851672
5.6B700050.0%72.2%71.9%−0.3%547141936331401

Table 12. Table 12: Effect of data filtering on linguistic phenomena. Full is the accuracy of the model trained on the complete corpus; No-X\mathcal{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%). Δ=No-X−Full\Delta= \text{No-}\mathcal{X} - \text{Full} (green (-): Δ<0\Delta< 0, Full exceeds No-X\mathcal{X}; red (+): Δ>0\Delta> 0, No-X\mathcal{X} exceeds full). NN 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.

The second contrast we observed issues with is only_npi_licensor_present, which keeps the NPI constant and varies the presence of the licensor (Only Peter ever comes here. vs. Even Peter ever comes here.). Here the licensor only is always contrasted with the non-licensing adverb even. As discussed in appendix § 11, the two are tokenized differently, which confounds the contrast. The remaining suites, which keep the NPI constant and vary either the scope or the presence of the licensor, are technically viable. However, BLiMP’s NPI

CorpusFiltered outSentencesΔ\Delta
FullNo-X\mathcal{X}
CC 5.6B891,011146,422,036145,531,025−0.61%-0.61\%
Wikipedia2,349,171195,620,725193,271,554−1.20%-1.20\%

caption: tbl: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\mathcal{X} counterpart. Δ\Delta 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.

:::

suites cover a single NPI, ever, so they test whether models learn the distribution of ever, rather than NPIs as a phenomenon.

We therefore use BLiMPPI ((Güven et al., 2026)), specifically the portion derived from Universal Dependencies ((Nivre et al., 2020)). This provides naturally occurring instances of different NPIs: anything, anywhere, ever, anymore, yet, at all, either, and whatsoever. The licensing environments are also more varied: sentential negation, nn-series negation (e.g. nobody), downward-entailing operators (e.g. hardly), and questions. We use 100 probes from BLiMPPI, released alongside our code.

Factual Setting

This section details the factual filtering procedure. Table 9 reports the amount of data removed.

Restricting to corpus-supported relations. Some BEAR relations ((Wiland et al., 2024)) are answered through prior bias rather than knowledge, e.g., when one candidate object is infrequent while the others never appear. For 5,938 of the 7,731 relations (76.8%) in the 5.6B Common Corpus subset, and for 1,875 (24.3%) in the Wikipedia, the corresponding entities don’t co-occur in a single sentence in the corpus. We therefore restrict the analysis to corpus-supported relations, whose two entities co-occur in at least 10 sentences of the training corpus. This leaves 601 relations at 5.6B and 3,221 for Wikipedia (Table 11).

CorpusTokensFull BEAR NNFull BEAR AccFull BEAR RandCorpus-supported NNFullNo-X\mathcal{X}Δ\DeltaRandboth models wrongFull correct, No-X\mathcal{X} wrongboth models correctFull wrong, No-X\mathcal{X} correct
Common Corpus1.3B77313.6%0.04%30923.6%14.6%−9.1%0.15%224403312
5.6B77313.6%0.04%60118.8%15.1%−3.7%0.10%458526130
Wikipedia4.8B773113.4%0.04%322120.5%17.3%−3.2%0.04%2404261398158

Table 11. 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\ge10 times in the training corpus and do not share a Wikidata alias or substring; NN is that subset’s size. For the corpus-supported set, Full and No-X\mathcal{X} are each model’s fraction of learned facts, and Δ=No-X−Full\Delta= \text{No-}\mathcal{X} - \text{Full} (green (-): Δ<0\Delta< 0, Full exceeds No-X\mathcal{X}; red (+): Δ>0\Delta> 0, No-X\mathcal{X} exceeds full). Rand is the chance level, averaging (1/A)3(1/A)^3 over the facts, where AA 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\mathcal{X} model (trained with the BEAR-supporting sentences removed).

Which relations are filtered? We filter only relations that are corpus-supported and answered correctly by the full model fθf_\theta (correct object ranked first on all three templates). Filtering the not-learned relations would shrink the corpus without changing anything the No-X\mathcal{X} model can be asked about.

What is removed? For each such relation we remove every sentence where the subject and object co-occur. Following Nadkarni et al. (2026), who find that this alone suppresses fact learning only partially, we also remove subject-only and object-only sentences. This step is applied per entity, and only to entities occurring in fewer than 30,000 corpus sentences. The cap prevents deleting a large, topically coherent slice of the corpus for a high-frequency entity such as Europe, which would confound the fθf_\theta vs. fθ−f_{\theta-} comparison with a general distribution shift.

Surface forms and matching. Entities take many surface forms, so for each we collect the union of (i) its Wikidata label, aliases, and demonyms via the Wikidata API ((Vrandečić and Krötzsch, 2014)); (ii) aliases shipped with BEAR; and (iii) a manually curated table of country names, demonyms, and capital names. Matching is at whole-word boundaries, case-insensitive with a Unicode (NFKD) fallback, except for short all-caps acronyms (US, UK, DC), which are matched case-sensitively.

Inseparable entity pairs. Some pairs cannot be told apart by any surface-form filter. We drop a relation if its both entities share a surface form after surface matching (Italy–Italian), or if one canonical label contains the other as a whole word (Mexico City–capital–Mexico); the containment test requires at least four characters. This removes 13 relations in each of the Common Corpus 5.6B and Wikipedia settings.

Supplementary Experimental Results

References

  1. [1]Dimitris Achlioptas. 2003. Database-friendly random projections: Johnson-Lindenstrauss with binary coins. Journal of Computer and System Sciences, 66(4):671–687.DOI
  2. [2]Ekin Akyürek, Tolga Bolukbasi, Frederick Liu, Binbin Xiong, Ian Tenney, Jacob Andreas, and Kelvin Guu. 2022. Towards tracing knowledge in language models back to the training data. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 2429–2446, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  3. [3]Juhan Bae, Wu Lin, Jonathan Lorraine, and Roger Grosse. 2024. Training data attribution via approximate unlearning. In Advances in Neural Information Processing Systems, volume 37, pages 66647–66686. Curran Associates, Inc.DOI
  4. [4]Juhan Bae, Nathan Ng, Alston Lo, Marzyeh Ghassemi, and Roger B Grosse. 2022. If influence functions are the answer, then what is the question? In Advances in Neural Information Processing Systems, volume 35, pages 17953–17967. Curran Associates, Inc.arxiv.org/abs/2209.05364
  5. [5]Tyler Chang, Dheeraj Rajagopal, Tolga Bolukbasi, Lucas Dixon, and Ian Tenney. 2025. Scalable influence and fact tracing for large language model pretraining. In International Conference on Learning Representations, pages 40976–40997.arxiv.org/abs/2410.17413

Paper details

vlnc:W_k2unwgkc
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 8

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents