Assume our training data consists of n samples from X×Y and we have trained a model with parameters θn, e.g. through maximum likelihood estimation θn=argminn1∑i=1nL(xi,yi;θ). We would like to understand the influence of a single training datapoint (xj,yj) on our parameters. The naive approach would be to refit the model without this datapoint, i.e. θn∖j=argmin∑i=jL(xi,yi;θ).
It is clear that for e.g. neural networks this is not feasible on a large scale.
Influence functions (IF) offer a possible solution. Before we discuss IF we need to consider how we measure influence of a single datapoints, here multiple options present themselves:
Change in test loss: n1∑(x,y)∈DtestL(x,y;θn)−L(x,y;θn∖j)#
Change in parameters: ∣∣θn−θn∖j∣∣
We will begin by considering the second options.
It has been shown, Cook & Weisberg, 1986 that by upweighting the loss of (xj,yj), we can effeciently compute the change using second order approximations.
To this end we define θϵ,n∖j=argminn1∑i=1nL(xi,yi;θ)+ϵL(xj,yj). Essentially we weight the loss of (xj,yj) by an additional factor of ϵ.
Then
The key insight now, is to notice that upweighting by ϵ=−n1 corresponds to removing (xj,yj).
Further we can also compute the change of loss for a test point in closed form: