This is an explainer and reimplementation of the 2026 paper by Chen et al.
Note: This post is currently incomplete!
In this post, I attempt to explain and walk through this recent paper on training data attribution.
Objective
We want to perform a kind of training data attribution. Specifically, we want to trace internal mechanisms exhibited by interpretable units of a language model (such as induction heads) back to specific training examples. We can do this through influence functions.
Background on Influence Functions
Definition. Let zk=(xk,yk) be an element of a dataset D={zi}i=1N, and let ϵ be the weighting of zk. Then the response function is the optimal solution θ∗(ϵ) that minimizes the loss L:
θ∗(ϵ)=argminθ∈RDN1i=1∑NL(zi,θ)+ϵL(zk,θ)
Definition. The influence function Iθ∗(zk) is a function that measures the influence of a specific training example zk on the perturbed model parameters θ∗.
This influence is exactly equal to the difference between the perturbed and unperturbed optima, which can be found through a first-order Taylor expansion at 0:
Iθ∗(zk)=θ∗(ϵ)−θ∗(0)=∂ϵ∂θ∗(ϵ)⋅ϵ
We can easily obtain the expression for this partial as:
∂ϵ∂θ∗(ϵ)=−H−1∇θL(zk,θ∗)
where H=∇θ2(N1∑i=1NL(zi,θ∗)+ϵL(zk,θ∗))
However, this expression alone is not very useful for our purposes. Instead, we would like to find the influence of the training example zk on the test loss L(ztest,θ∗). Let's call this function f for simplicity. Then the influence If of zk on f is given by:
Problem.H is a huge matrix. Indeed, for a layer of dimensions din×dout, the Hessian is of size (din×dout)2. This is computationally infeasible to invert.
Solution. We approximate the Hessian as the Kronecker product of two smaller matrices using a clever method called EKFAC. For EKFAC specifics, see my post here.
Mechanistic Data Attribution
Definition. The MDA framework is characterized by the 3-tuple (μ,π,fprobe):
The monitoring metric μ measures when the behaviour of a certain head shows variation, e.g. prefix-matching score for induction heads
The subspace projection π identifies a parameter subspace corresponding to an interpretable unit of the model, i.e. π(θ)=θsub⊆θ
fprobe measures the performance of the interpretable unit in question on a test dataset Dprobe (and thus we may have μ=fprobe).
To measure the influence of training examples on specific interpretable units, we modify the expression for I as follows: