Skip to content

Menu

WorksComputer Science

Influence Is the Target-Response Jacobian Times Residuals

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_6m93cyx8. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

We introduce the target-response Jacobian J=[∂y^i/∂yj]J = [\partial \hat y_i/\partial y_j], which measures how model predictions respond to changes in individual training targets. JJ complements training-data attribution (TDA) methods, which characterize sensitivity to the weights placed on training observations in the loss rather than to their targets, and can be computed matrix-free at the same cost as influence-based TDA methods. We show that sample-weight influence I\mathcal{I} and JJ follow from the same implicit differentiation argument and differ only by a per-example multiplier: for pointwise losses, I=Jdiag⁡(m)\mathcal{I} = J\operatorname{diag}(m) exactly at any stationary point with an invertible Hessian. For canonical-link losses (squared error, logistic, Poisson) the multiplier is the training residual, I=Jdiag⁡(r)\mathcal{I} = J\operatorname{diag}(r), and softmax cross-entropy obeys a multiclass version. The identity predicts three ways in which influence fails when used in place of JJ: small residuals shrink its predicted shift towards zero (interpolation collapse), residuals of mixed sign wash out its direction (direction washout), and under softmax cross-entropy it collapses a training point's per-class sensitivities towards its own true class (true-class collapse). We score both operators against refitting with a per-prediction R2R^2 across target perturbations, with no rescaling. On tanh networks trained with squared error (Friedman #1) and logistic loss (MAGIC, HIGGS), with NN from 2,000 to 10610^6, JJ reaches R2R^2 between 0.99 and 1.00, whereas influence's R2R^2 is negative on every dataset. On an MNIST softmax classifier, influence's R2R^2 is again negative, while JJ reaches 0.92. On HIGGS, one row of JJ, holding all 10610^6 sensitivities of one prediction, takes under 0.2 seconds on an RTX 3090 after a one-time setup of under five minutes, whereas refitting would take 10610^6 refits.

Introduction

This paper introduces the target-response Jacobian

J=[∂y^i∂yj],(1)J = \left[\frac{\partial\hat{y}_i}{\partial y_j}\right], \tag*{(1)}

which measures how a model’s predictions respond to changes in individual training targets without retraining. JJ complements existing training-data attribution (TDA) methods, which measure how a prediction depends on the weight given to each training example in the loss. JJ measures how it depends on the training targets themselves, which no existing method does for general differentiable learners. We show that JJ can be computed matrix-free at scale. For SS predictions and NN training points, JJ is an S×NS \times N matrix whose row ii gives one prediction’s sensitivity to every training target and whose column jj gives the effect of one training target on every prediction. At a fitted model, implicit differentiation of the stationarity condition splits JJ into three standard factors,

J=G⏟predictions← parameters(−H−1)⏟parameters← loss gradientC⏟loss gradient← targets,(2)J = \underbrace{G}_{\substack{\text{predictions}\\ \leftarrow\ \text{parameters}}} \underbrace{(-H^{-1})}_{\substack{\text{parameters}\\ \leftarrow\ \text{loss gradient}}} \underbrace{C}_{\substack{\text{loss gradient}\\ \leftarrow\ \text{targets}}}, \tag*{(2)}

where GG stacks the gradients of the predictions with respect to the parameters, HH is the Hessian of the training objective at the fitted parameters, and column jj of CC is the derivative of the training-loss gradient with respect to yjy_j. Each factor is available matrix-free in any model trained by gradient methods: GG costs a Jacobian-vector product, H−1H^{-1} an iterative solve against Hessian-vector products, and each column of CC one mixed gradient. JJ can therefore be computed for most models trained by gradient methods, and wherever influence functions can be computed. Throughout, a target change Δy\Delta y is a change in the training targets, and a shift is the resulting change in a prediction, either after refitting or as predicted by JJ or influence. A perturbation is a randomly drawn target change.

Sample-weight influence [12] runs the same pipeline with a different last factor. It uses BB, the matrix of per-example loss gradients, in place of CC, so that I=−GH−1B\mathcal{I}=-GH^{-1}B. For a pointwise scalar loss, column jj of BB is column jj of CC multiplied by a single number, and from this observation we prove a new identity: for canonical-link losses,1 sample-weight influence equals JJ times a diagonal matrix of training residuals (the canonical-link identity),

I=Jdiag⁡(r),(3)\mathcal{I}=J\operatorname{diag}(r), \tag*{(3)}

exactly, at any stationary point of the training objective with an invertible Hessian (Corollary 3.4).2 It follows that influence cannot stand in for JJ. As a model fits its training data more closely, the residuals rjr_j shrink, so influence’s predicted shift goes to zero even where JJ’s does not.

The canonical-link identity (3) is a special case of a more general modulation identity,

I=Jdiag⁡(m),mj=ℓf/ℓfy,(4)\mathcal{I}=J\operatorname{diag}(m),\qquad m_j=\ell_f/\ell_{fy}, \tag*{(4)}

where ℓf\ell_f and ℓfy\ell_{fy} are the first and mixed partial derivatives of the per-example loss (Theorem 3.3). For canonical-link losses (squared error, logistic, Poisson) the multiplier mjm_j reduces to the residual rjr_j, which recovers I=Jdiag⁡(r)\mathcal{I}=J\operatorname{diag}(r). Softmax cross-entropy obeys a multiclass version with one residual per class (Proposition 3.6). In terms of the factorisation (2), column jj of BB is mjm_j times column jj of CC. For canonical-link losses, JJ is therefore influence with the residual factor removed. Column jj of CC is then −1/N-1/N times the gradient of the model output at xjx_j, so if an influence implementation uses these scaled output gradients in place of the per-example loss gradients, it computes JJ. The identity also does not require the exact Hessian: it holds unchanged for any shared invertible surrogate, so the damped Gauss–Newton Hessian, which the experiments also report, inherits it (Remark 3.5).

In the absence of JJ, influence-type methods are the closest available proxy for applications that need target sensitivity, and they are used that way: Richardson et al. [21], for example, rank training points by their sample-weight influence on a fairness metric and then flip the labels of the highest-ranked points. The modulation identity implies three distinct ways in which influence fails in that role. Small residuals shrink its predicted shift towards zero (interpolation collapse, Corollary 4.1); residuals of mixed sign wash out its predicted direction (direction washout, Corollary 4.2); and under softmax cross-entropy it collapses the per-class target sensitivities of a training point onto a single direction, towards that training point’s own true class, whatever target change is asked about (true-class collapse, Corollary 4.3).

Figure 1 shows what this means for a concrete question: how would a house-price model’s predictions change if the top-coded values in California Housing had been recorded 20% higher? JJ reproduces the refit, which concentrates the shift mainly in two regions, whereas influence spreads a smaller shift along the coast and predicts only a small part of the shift in the block groups that move most (§ 9). None of this is a flaw in influence as such. It correctly measures what it was built to measure, the sensitivity of a prediction to per-example loss weights, but that sensitivity is not target sensitivity, and the modulation identity explains why.

Figure 1. What if the top-coded house values in California Housing had been recorded 20% higher? Each dot is one of 5,160 held-out block groups, coloured by the shift in its prediction after the target change (one colour scale for all panels). The refit (left) concentrates the shift mainly around the San Francisco Bay Area and Los Angeles, and JΔyJ\Delta y (centre), computed without refitting, reproduces it. Influence (right) spreads a smaller shift along the coast and predicts only a small part of the shift in the block groups that move most. § 9 gives the details.

Testing JJ, and these predictions about influence, requires a metric that matches what a target-sensitivity estimator claims, namely that the shift it predicts in a prediction equals the shift that refitting produces.

No standard metric in the data-attribution literature tests that claim directly. Pearson correlation tests direction; any affine-rescaled R2R^2 tests direction after a free rescaling; and rank-correlation scores, including the linear datamodelling score [11, 17], test only ordering. All three ignore scale and so cannot detect interpolation collapse, which acts on scale. The per-prediction coefficient of determination Ri2R_i^2, which is exactly r2_score from scikit-learn, compares the predicted shift with the refit shift directly, scale included. What differs from textbook usage is what varies. There, R2R^2 is computed across the instances of a dataset; here, Ri2R_i^2 is computed across random target perturbations applied at a single prediction ii (Section 5). Its Mincer–Zarnowitz decomposition [15] into direction ρi\rho_i, scale αi\alpha_i and bias βi\beta_i then makes each of the three failure modes visible. Interpolation collapse lowers αi\alpha_i; direction washout drives ρi\rho_i to zero; and true-class collapse lowers both. It lowers ρi\rho_i because influence points towards the training point’s own true class whichever class its label is moved to, and it shrinks αi\alpha_i as the probability the classifier assigns to that training point’s true class approaches one.

The experiments test these predictions against refitting. On tanh networks trained with squared error (Friedman #1, N=2,000N = 2{,}000) and with logistic loss (MAGIC, N=14,265N = 14{,}265, and HIGGS, N=106N = 10^6), JJ attains a per-prediction R2R^2 between 0.99 and 1.00, with direction and scale near one, whereas influence’s R2R^2 is negative on every dataset (§ 8.1, Table 2). Each predicted failure appears where the identity predicts it. Influence’s direction is washed out on all three datasets, with ρ\rho between −0.08 and 0.03, and on the two logistic datasets its scale is shrunk (α\alpha of 0.30 on MAGIC and 0.47 on HIGGS).

DatasetMethodR2R^2ρ\rhoα\alphaβ\beta
Friedman #1JJ0.998±0.0010.998 \pm0.0010.999±0.0010.999 \pm0.0011.000±0.0011.000 \pm0.001−0.001±0.001-0.001 \pm0.001
Influence−0.416±0.162-0.416 \pm0.1620.023±0.0980.023 \pm0.0980.675±0.0470.675 \pm0.047−0.007±0.011-0.007 \pm0.011
Random−0.996±0.023-0.996 \pm0.0230.002±0.0110.002 \pm0.0111.000±0.0001.000 \pm0.0000.000±0.0000.000 \pm0.000
MAGIC GammaJJ1.000±0.0001.000 \pm0.0001.000±0.0001.000 \pm0.0001.000±0.0011.000 \pm0.001−0.001±0.001-0.001 \pm0.001
Influence−0.203±0.061-0.203 \pm0.061−0.082±0.118-0.082 \pm0.1180.301±0.0250.301 \pm0.0250.099±0.0450.099 \pm0.045
Random−0.984±0.065-0.984 \pm0.0650.008±0.0320.008 \pm0.0321.000±0.0001.000 \pm0.0000.000±0.0000.000 \pm0.000
HIGGSJJ0.991±0.0040.991 \pm0.0040.996±0.0020.996 \pm0.0021.017±0.0081.017 \pm0.008−0.005±0.003-0.005 \pm0.003
Influence−0.208±0.095-0.208 \pm0.0950.026±0.0990.026 \pm0.0990.467±0.0210.467 \pm0.021−0.053±0.011-0.053 \pm0.011
Random−1.017±0.050-1.017 \pm0.050−0.008±0.025-0.008 \pm0.0251.000±0.0001.000 \pm0.0000.000±0.0000.000 \pm0.000
MNISTJJ0.924±0.0510.924 \pm0.0510.972±0.0210.972 \pm0.0210.994±0.0190.994 \pm0.019−0.018±0.006-0.018 \pm0.006
Influence−0.203±0.047-0.203 \pm0.047−0.373±0.088-0.373 \pm0.0880.101±0.0400.101 \pm0.0400.303±0.0420.303 \pm0.042
Random−0.930±0.287-0.930 \pm0.2870.035±0.1430.035 \pm0.1431.000±0.0001.000 \pm0.0000.000±0.0000.000 \pm0.000

Table 2. Per-prediction R2R^2 (20) and its direction, scale and bias components (21) against refits. Medians over predictions, mean ±\pm SD over five seeds. K=100K = 100 perturbations per seed, and K=20K = 20 on MNIST. Both operators use the exact Hessian. Random applies one shared permutation to the perturbation axis of the refit shifts, which breaks the pairing while keeping each prediction’s distribution of shifts. Each column is summarised separately, so the entries need not satisfy (21) exactly. Bold marks the better R2R^2 of JJ and influence.

On a softmax classifier for MNIST, with N=2,000N = 2{,}000 as on Friedman, influence’s R2R^2 is negative (−0.20), with a weak direction (ρ\rho of −0.37) and a shrunk scale (α\alpha of 0.10), as true-class collapse predicts, while JJ reaches R2R^2 of 0.92 (§ 8.2, Table 2).

As an application, § 9 asks how the model’s predictions would change if the top-coded house values in California Housing had been recorded higher (Figure 1), and checks both answers against a refit. For increases from 5% to 50%, JJ’s R2R^2 lies between 0.98 and 1.00, while influence’s is at most 0.27 (§ 9, Table 3).

IncreaseMethodR2R^2ρ\rhoα\alphaβ\beta
5%JJ1.0001.0001.0020.000
Influence0.2130.4700.549−0.040-0.040
10%JJ0.9960.9981.0020.001
Influence0.2150.4710.549−0.040-0.040
20%JJ0.9940.9971.0090.000
Influence0.2370.4920.553−0.041-0.041
50%JJ0.9770.9891.0110.000
Influence0.2740.5250.554−0.041-0.041

Table 3. Increasing the top-coded house values of California Housing. R2R^2 and its components (21) are computed across the 5,160 held-out predictions of each target change. Seed 0.

The implementation never forms JJ. On HIGGS, with N=106N = 10^6 training points, one row of JJ, which gives one prediction’s sensitivities to every training target, takes under 0.2 seconds on a single RTX 3090 after a one-time setup of under five minutes, whereas producing the same row by refitting would take 10610^6 refits, one per training target (Appendix § 17).

Related work

Panel A of Table 1 reorganises three earlier literatures, in statistics, smoothers and XAI, around a single property: that predictions are linear in the training targets. The OLS hat matrix (Hoaglin & Welsch [10]) and the kernel-ridge smoother (Saunders et al. [22]) have this property exactly, since y^=KOLSy\hat{\mathbf{y}} = K_{\mathrm{OLS}}\mathbf{y} and y^=KKRRy\hat{\mathbf{y}} = K_{\mathrm{KRR}}\mathbf{y}. Regression diagnostics combine two quantities, leverage (the diagonal of the hat matrix) and residuals. For OLS, where J=KOLSJ = K_{\mathrm{OLS}}, Cook & Weisberg [4] write the effect on prediction ii of deleting training point jj as (KOLS)ijrj/(1−(KOLS)jj)(K_{\mathrm{OLS}})_{ij}r_j/(1 - (K_{\mathrm{OLS}})_{jj}): a column of JJ scaled by the residual, with a leverage correction for removing the point entirely. Deletion is a change in sample weight, so this is the canonical-link identity for one learner, in finite form. Pregibon [19] extended these diagnostics to logistic regression, and St. Laurent & Cook [23, 24] to nonlinear models. The closest existing object is the generalized leverage of Wei et al. [26], defined as ∂y^/∂yT\partial\hat{\mathbf{y}}/\partial\mathbf{y}^{\mathsf{T}} for parametric models fitted by maximum likelihood. It is JJ with the evaluation points fixed at the training inputs. In explainable AI (XAI), AXIL (Geertsema & Lu [6]) extends the smoother identity to fixed-tree squared-error gradient boosting as y^=KAXILy\hat{\mathbf{y}} = K_{\mathrm{AXIL}}\mathbf{y}. It also states the increment form F(y⋆+δ)=F(y⋆)+Jδ+o(∥δ∥)F(\mathbf{y}^{\star}+\delta) = F(\mathbf{y}^{\star}) + J\delta+ o(\lVert\delta\rVert) for general differentiable learners, but leaves open how accurate that form is and how to compute it at scale. The JJ of this paper is the level form y^≈Jy+a⋆\hat{\mathbf{y}} \approx J\mathbf{y} + \mathbf{a}^{\star} (8), which places JJ alongside the smoothers as the local first-order operator.

ObjectIdentitySourceLiterature
Linear regressiony^=KOLSy\hat{\mathbf{y}} = K_{\mathrm{OLS}}\mathbf{y} exactlyHoaglin & Welsch [10]Statistics
Kernel ridge regressiony^=KKRRy\hat{\mathbf{y}} = K_{\mathrm{KRR}}\mathbf{y} exactlySaunders et al. [22]Smoothers
L2 gradient boosting, fixed treesy^=KAXILy\hat{\mathbf{y}} = K_{\mathrm{AXIL}}\mathbf{y} exactlyGeertsema & Lu [6]XAI
Target-response Jacobiany^≈Jy+a∗\hat{\mathbf{y}} \approx J\mathbf{y} + \mathbf{a}^{*} locallyEq. (8)TDA
Sample-weight influence I\mathcal{I}∂y^i/∂wj\partial\hat{y}_i/\partial w_j at w=1\mathbf{w} = 1Koh & Liang [12]TDA
Canonical TRAKprojected, ensembled ∂y^i/∂wj\partial\hat{y}_i/\partial w_jPark et al. [17]TDA
Modulation identityI=Jdiag⁡(m)\mathcal{I} = J\operatorname{diag}(m)Thm. 3.3TDA

Table 1. Training-point attribution operators, grouped by what is differentiated. Panel A collects operators of sensitivity to targets, through which predictions are linear in the targets: exactly for the classical smoothers and AXIL, and to first order for general learners. Panel B covers sensitivity to sample weights. The modulation identity links the two panels.

Panel B of Table 1 covers the other axis, sensitivity to sample weights. Sample-weight influence, which goes back to the influence curve of robust statistics (Hampel [8]) and was brought to modern machine learning by Koh & Liang [12], and canonical TRAK (Park et al. [17]) both compute ∂y^i/∂wj\partial\hat{y}_i/\partial w_j. The work that comes closest to target sensitivity is on labels. Koh & Liang [12] remark that analogous equations apply to label changes. Kong et al. [13] derive how relabelling a training point changes a test loss, and use it to choose training points to relabel. Adebayo et al. [1] derive the effect of label changes on a group fairness metric, and use it to find the label errors that most affect it. Other papers study particular label changes. Gong et al. [7] compute the parameter change for one candidate label replacement in partial-label learning, Zhang et al. [28] measure the test-loss effect of soft-label changes in programmatic weak supervision, and Warnecke et al. [25] give a closed-form parameter update that unlearns a specified set of label changes. Each of these papers computes the effect of one kind of change on one downstream quantity. JJ, by contrast, gives the first-order response of every prediction to every training target, and we check it against refits. Through the modulation identity, JJ also links the two panels of Table 1, and so connects literatures that have developed separately. The Jacobian itself is standard mathematics. To our knowledge, however, no prior work states JJ as the target-response operator for general learners at evaluation points, computes it at scale, checks it against refits, or relates it exactly to influence.

The target-response Jacobian and the modulation identity

This section defines JJ and sample-weight influence for a learner trained to a stationary point, and proves that for pointwise scalar losses the two operators differ only by a per-example factor, with a per-class analogue for softmax cross-entropy. Table 4 in Appendix A collects the notation.

Table 4: Global notation, grouped by topic, with the place where each symbol is defined or first used.

SymbolMeaningWhere
Data and indices
NN, SS, PPNumbers of training points, evaluation predictions and parametersSec. 3
i∈[S]i \in[S], j∈[N]j \in[N]Index of an evaluation prediction and of a training point; [N]:={1,…,N}[N] := \{1,\ldots,N\}Sec. 3
y\mathbf{y}, y⋆\mathbf{y}^{\star}Training targets (y1,…,yN)(y_1,\ldots,y_N); the observed targetsSec. 3
KcK_c, yjky_{jk}Number of classes; class-kk entry of a vector target yj∈RKc\mathbf{y}_j \in\mathbb{R}^{K_c}Sec. 3
Model, loss and training
θ∈RP\theta\in\mathbb{R}^{P}, θ⋆\theta^{\star}Parameters; the fitted parameters, a stationary pointSec. 3
θ⋆(y)\theta^{\star}(\mathbf{y})Locally defined solution for targets y\mathbf{y}, with θ⋆(y⋆)=θ⋆\theta^{\star}(\mathbf{y}^{\star}) = \theta^{\star}Sec. 3
L(θ;y)\mathcal{L}(\theta;\mathbf{y}), L(θ;y,w)\mathcal{L}(\theta;\mathbf{y},\mathbf{w})Training objective; the same with sample weights w\mathbf{w}Sec. 3
ℓj\ell_j, RRPer-example loss; regulariserSec. 3
w\mathbf{w}Sample weights, w=1\mathbf{w}=\mathbf{1} at the trained modelSec. 3
HHHessian of L\mathcal{L} at (θ⋆,y⋆)(\theta^{\star},\mathbf{y}^{\star})Sec. 3
fθ(x)f_{\theta}(\mathbf{x}), fjf_jModel output; fj:=fθ⋆(xj)f_j := f_{\theta^{\star}}(x_j)Sec. 3
qi(θ)q_i(\theta)Scalar prediction at ziz_i, such as a logitDef. 3.1
ℓ(f,y)\ell(f,y), ℓf\ell_f, ℓfy\ell_{fy}Pointwise loss; its partial derivative in ff and mixed partial in ff and yySec. 3
hh, ggThe functions in the canonical-link form ℓ(f,y)=h(f)−yf+g(y)\ell(f,y)=h(f)-yf+g(y)Cor. 3.4
pk(θ,x)p_k(\theta,x), pj,kp_{j,k}Softmax probability of class kk; at xjx_j and θ⋆\theta^{\star}Sec. 3
Operators
F(y)F(\mathbf{y}), F(y,w)F(\mathbf{y},\mathbf{w})Target-response map, the predictions as a function of the targets; the same with sample weightsDef. 3.1
y^\hat{\mathbf{y}}Predictions, y^:=F(y)\hat{\mathbf{y}} := F(\mathbf{y})Eq. (8)
JJTarget-response Jacobian ∂F/∂y\partial F/\partial\mathbf{y} at y⋆\mathbf{y}^{\star}, in RS×N\mathbb{R}^{S \times N} (RS×N×Kc\mathbb{R}^{S \times N \times K_c} for vector targets)Def. 3.2
IISample-weight influence ∂F/∂w\partial F/\partial\mathbf{w} at (y⋆,1)(\mathbf{y}^{\star},\mathbf{1}), in RS×N\mathbb{R}^{S \times N}Sec. 3
GG, gig_iS×PS \times P matrix with rows giTg_i^{\mathsf{T}}, where gi:=∇θqi(θ⋆)g_i := \nabla_{\theta}q_i(\theta^{\star})Proof of Thm. 3.3
CC, cjc_jP×NP \times N matrix with columns cj:=(1/N)∇θ(∂ℓj/∂yj)c_j := (1/N)\nabla_{\theta}(\partial\ell_j/\partial y_j)Proof of Thm. 3.3
BB, bjb_jP×NP \times N matrix with columns bj:=(1/N)∇θℓjb_j := (1/N)\nabla_{\theta}\ell_j, the per-example loss gradientsProof of Thm. 3.3
ψj\psi_jOutput gradient ∇θfθ⋆(xj)\nabla_{\theta}f_{\theta^{\star}}(x_j)Proof of Thm. 3.3
mjm_j, mmModulation factor ℓf/ℓfy\ell_f/\ell_{fy} at (fj,yj⋆)(f_j,y_j^{\star}); the vector of all mjm_jEq. (10)
rjr_j, rrTraining residual yj⋆−h(fj)y_j^{\star}-h(f_j); the vector of all rjr_jCor. 3.4
rjkr_{jk}Class-kk residual yjk−pk(θ⋆,xj)y_{jk}-p_k(\theta^{\star},x_j)Prop. 3.6
H^\hat{H}, J^\hat{J}, I^\hat{I}Surrogate Hessian; JJ and II computed with itRem. 3.5
HGNH_{\mathrm{GN}}, λdamp\lambda_{\mathrm{damp}}Gauss–Newton Hessian; damping, equal to the L2 penaltyRem. 3.5
KK, KOLSK_{\mathrm{OLS}}, KKRRK_{\mathrm{KRR}}, KAXILK_{\mathrm{AXIL}}Smoother matrices, with y^=Ky\hat{\mathbf{y}}=K\mathbf{y} exactlyTable 1
Perturbations and evaluation
Δy\Delta\mathbf{y}, δ\deltaTarget change (perturbation, if random)Eq. (7)
tjt_j, aaTrue (recorded) class of training point jj; destination class of a label change δ(ea−etj)\delta(e_a-e_{t_j})Cor. 4.3
KKNumber of perturbationsSec. 5
ΔFi\Delta F_iRefit shift of prediction iiDef. 5.1
Ri2R_i^2Per-prediction coefficient of determinationDef. 5.1
ρi\rho_i, αi\alpha_i, βi\beta_iDirection, scale and bias components of Ri2R_i^2Sec. 5

Table 4.

Setup. Let X=(x1,…,xN)X = (x_1,\ldots,x_N) be training inputs with targets y=(y1,…,yN)∈RN\mathbf{y} = (y_1,\ldots,y_N) \in\mathbb{R}^{N} and let Q=(z1,…,zS)Q = (z_1,\ldots,z_S) be an evaluation set. Throughout, i∈[S]i \in[S] indexes evaluation predictions and j∈[N]j \in[N] indexes training points, where [N]:={1,…,N}[N] := \{1,\ldots,N\}. ∥⋅∥\|\cdot\| is the Euclidean norm. The learner has parameters θ∈RP\theta\in\mathbb{R}^{P} and minimises

L(θ;y)=1N∑j=1Nℓj(θ,yj)+R(θ),(5)\mathcal{L}(\theta;\mathbf{y}) = \frac{1}{N}\sum_{j=1}^{N}\ell_j(\theta,y_j) + R(\theta), \tag*{(5)}

with each ℓj\ell_j twice continuously differentiable in (θ,yj)(\theta,y_j) and RR twice continuously differentiable in θ\theta near θ⋆\theta^\star. Write y⋆\mathbf{y}^\star for the observed targets and θ⋆\theta^\star for the fitted parameters. Assume θ⋆\theta^\star is an interior stationary point of L(⋅;y⋆)\mathcal{L}(\cdot;\mathbf{y}^\star) at which the Hessian H:=∇θθ2L(θ⋆;y⋆)H := \nabla_{\theta\theta}^{2}\mathcal{L}(\theta^\star;\mathbf{y}^\star) is invertible. The implicit function theorem then gives a unique differentiable map θ⋆(y)\theta^\star(\mathbf{y}) near y⋆\mathbf{y}^\star with ∇θL(θ⋆(y);y)=0\nabla_\theta\mathcal{L}(\theta^\star(\mathbf{y});\mathbf{y}) = 0 and θ⋆(y⋆)=θ⋆\theta^\star(\mathbf{y}^\star) = \theta^\star. Below, “trained model” means this locally defined solution θ⋆(y)\theta^\star(\mathbf{y}), which need not be a global minimiser.

Definition 3.1 (Target-response map). The target-response map F:RN→RSF : \mathbb{R}^{N} \to\mathbb{R}^{S} is

F(y):=(q1(θ⋆(y)),…,qS(θ⋆(y)))⊤,(6)F(\mathbf{y}) := \left(q_1(\theta^\star(\mathbf{y})),\ldots,q_S(\theta^\star(\mathbf{y}))\right)^\top, \tag*{(6)}

where qi(θ)q_i(\theta) is a differentiable scalar prediction at evaluation point ziz_i, such as a logit or a predicted probability.

Definition 3.2 (Target-response Jacobian). The target-response Jacobian is J:=∂F∂y(y⋆)∈RS×NJ := \frac{\partial F}{\partial\mathbf{y}}(\mathbf{y}^\star) \in\mathbb{R}^{S\times N}.

Entry JijJ_{ij} is the first-order change in prediction ii when training target jj moves by one unit,

F(y⋆+δ)=F(y⋆)+Jδ+o(∥δ∥)as δ→0.(7)F(\mathbf{y}^\star+\delta) = F(\mathbf{y}^\star) + J\delta+ o(\|\delta\|) \qquad\text{as } \delta\to0. \tag*{(7)}

Writing y^:=F(y)\hat{\mathbf{y}} := F(\mathbf{y}) for the predictions and a⋆:=F(y⋆)−Jy⋆\mathbf{a}^\star:= F(\mathbf{y}^\star) - J\mathbf{y}^\star, the expansion reads

y^≈Jy+a⋆,(8)\hat{\mathbf{y}} \approx J\mathbf{y} + \mathbf{a}^\star, \tag*{(8)}

the local version of the smoother identity y^=Ky\hat{\mathbf{y}} = K\mathbf{y} in Table 1. When F(y)=KyF(\mathbf{y}) = K\mathbf{y} exactly, J=KJ = K and a⋆=0\mathbf{a}^\star= 0. Vector targets yj∈RKcy_j \in\mathbb{R}^{K_c}, such as one-hot or soft labels over KcK_c classes, make JJ a 3-tensor in RS×N×Kc\mathbb{R}^{S\times N\times K_c} (Proposition 3.6).

The attribution literature uses a different per-example sensitivity, the sample-weight influence of Koh & Liang [12] (Appendix A relates its sign and scale to other conventions). To define it, give each example a weight, L(θ;y,w)=(1/N)∑jwjℓj+R(θ)\mathcal{L}(\theta;\mathbf{y},\mathbf{w}) = (1/N)\sum_j w_j\ell_j + R(\theta), let F(y,w):=(qi(θ⋆(y,w)))i=1SF(\mathbf{y},\mathbf{w}) := (q_i(\theta^\star(\mathbf{y},\mathbf{w})))_{i=1}^{S}, so that F(y)=F(y,1)F(\mathbf{y}) = F(\mathbf{y},\mathbf{1}), and set

I:=∂F∂w(y⋆,1)∈RS×N.(9)\mathcal{I} := \frac{\partial F}{\partial\mathbf{w}}(\mathbf{y}^\star,\mathbf{1}) \in\mathbb{R}^{S\times N}. \tag*{(9)}

The identity below holds for pointwise scalar losses ℓj(θ,yj)=ℓ(fθ(xj),yj)\ell_j(\theta,y_j) = \ell(f_\theta(x_j),y_j) with fθ(xj)∈Rf_\theta(x_j) \in\mathbb{R} and ℓ\ell twice continuously differentiable in (f,y)(f,y). Write fj:=fθ⋆(xj)f_j := f_{\theta^\star}(x_j) and let ℓf\ell_f and ℓfy\ell_{fy} be the partials of ℓ\ell at (fj,yj⋆)(f_j,y_j^\star). The modulation factor is

mj:=ℓf(fj,yj⋆)/ℓfy(fj,yj⋆),j∈[N],(10)m_j := \ell_f(f_j,y_j^\star) / \ell_{fy}(f_j,y_j^\star), \qquad j \in[N], \tag*{(10)}

which requires ℓfy(fj,yj⋆)≠0\ell_{fy}(f_j,y_j^\star) \ne0 at every training point.

Theorem 3.3 (Modulation identity). Under the conditions above, with ℓfy(fj,yj⋆)≠0\ell_{fy}(f_j,y_j^\star) \ne0 for every j∈[N]j \in[N], exactly at the trained model θ⋆\theta^\star,

I=Jdiag⁡(m).(11)\mathcal{I} = J\operatorname{diag}(\mathbf{m}). \tag*{(11)}

Proof. Step 1 (implicit differentiation). Let gi:=∇θqi(θ⋆)g_i := \nabla_\theta q_i(\theta^\star) and G:=[g1⋯gS]⊤∈RS×PG := [g_1 \cdots g_S]^\top\in\mathbb{R}^{S \times P}. Differentiating the stationarity condition ∇θL(θ⋆(y);y)=0\nabla_\theta\mathcal{L}(\theta^\star(y); y) = 0 in yjy_j gives

H∂θ⋆∂yj+cj=0,cj:=∇θ(∂L∂yj)(θ⋆,y⋆)=1N∇θ(∂ℓj∂yj).H\frac{\partial\theta^\star}{\partial y_j} + c_j = 0,\qquad c_j := \nabla_\theta\left(\frac{\partial\mathcal{L}}{\partial y_j}\right)_{(\theta^\star,y^\star)} = \frac{1}{N}\nabla_\theta\left(\frac{\partial\ell_j}{\partial y_j}\right).

so ∂θ⋆/∂yj=−H−1cj\partial\theta^\star/\partial y_j = -H^{-1}c_j and ∂qi/∂yj=−gi⊤H−1cj\partial q_i/\partial y_j = -g_i^\top H^{-1}c_j. With C:=[c1⋯cN]∈RP×NC := [c_1 \cdots c_N] \in\mathbb{R}^{P \times N},

J=−GH−1C.(12)J = -GH^{-1}C. \tag*{(12)}

Differentiating instead in wjw_j at w=1w = \mathbf{1} gives H∂θ⋆/∂wj+bj=0H\partial\theta^\star/\partial w_j + b_j = 0 with bj:=(1/N)∇θℓj(θ⋆,yj⋆)b_j := (1/N)\nabla_\theta\ell_j(\theta^\star,y_j^\star), so with B:=[b1⋯bN]∈RP×NB := [b_1 \cdots b_N] \in\mathbb{R}^{P \times N},

I=−GH−1B.(13)\mathcal{I} = -GH^{-1}B. \tag*{(13)}

Step 2 (per-example chain rule). Write ψj:=∇θfθ⋆(xj)\psi_j := \nabla_\theta f_{\theta^\star}(x_j). The chain rule on ℓ(fθ(xj),yj)\ell(f_\theta(x_j),y_j) gives ∇θℓj=ℓfψj\nabla_\theta\ell_j = \ell_f\psi_j and ∇θ(∂ℓj/∂yj)=ℓfyψj\nabla_\theta(\partial\ell_j/\partial y_j) = \ell_{fy}\psi_j, so bj=(1/N)ℓfψjb_j = (1/N)\ell_f\psi_j and cj=(1/N)ℓfyψjc_j = (1/N)\ell_{fy}\psi_j. Both are multiples of ψj\psi_j, and because ℓfy≠0\ell_{fy} \ne0, bj=mjcjb_j = m_jc_j with mj=ℓf/ℓfym_j = \ell_f/\ell_{fy}. Stacking the columns over jj gives

B=Cdiag⁡(m).(14)B = C\operatorname{diag}(m). \tag*{(14)}

Step 3 (combine). Substituting (14) into (13) and using (12),

I=−GH−1Cdiag⁡(m)=Jdiag⁡(m),(15)\mathcal{I} = -GH^{-1}C\operatorname{diag}(m) = J\operatorname{diag}(m), \tag*{(15)}

as required. □

Equation (12) is the pipeline (2) of the introduction, and influence runs the same pipeline with BB in place of CC.

Corollary 3.4 (Canonical-link losses). Suppose ℓ\ell has the canonical exponential-family form ℓ(f,y)=h(f)−yf+g(y)\ell(f,y) = h(f)-yf+g(y), with hh and gg twice continuously differentiable. Then ℓf=h′(f)−y\ell_f = h'(f)-y and ℓfy=−1\ell_{fy} = -1, so the hypothesis of Theorem 3.3 holds for any fitted model,

mj=yj⋆−h′(fj)=:rj(16)m_j = y_j^\star- h'(f_j) =: r_j \tag*{(16)}

is the training residual, and I=Jdiag⁡(r)\mathcal{I} = J\operatorname{diag}(r).

The residual is yj−fjy_j-f_j for squared error, yj−σ(fj)y_j-\sigma(f_j) for logistic loss and yj−efjy_j-e^{f_j} for Poisson regression. Influence is therefore zero for a point the model fits exactly, whatever that point’s effect on the predictions when its target moves.

Remark 3.5 (Surrogate Hessians). Step 2 of the proof does not involve HH. The identity therefore also holds for I^:=−GH^−1B\hat{\mathcal{I}} := -G\hat{H}^{-1}B and J^:=−GH^−1C\hat{J} := -G\hat{H}^{-1}C with any invertible H^\hat{H} used for both, I^=J^diag⁡(m)\hat{\mathcal{I}} = \hat{J}\operatorname{diag}(m).

Theorem 3.3 needs a scalar model output and a scalar target. For softmax cross-entropy the output is a vector of KcK_c logits, fθ:Rd→RKcf_\theta: \mathbb{R}^d \to\mathbb{R}^{K_c}, with probabilities pk(θ,x):=efk/∑k′efk′p_k(\theta,x) := e^{f_k}/\sum_{k'}e^{f_{k'}} and per-example loss ℓj(θ,yj)=log⁡∑k′efk′(θ,xj)−yj⊤f(θ,xj)\ell_j(\theta,y_j) = \log\sum_{k'}e^{f_{k'}(\theta,x_j)} - y_j^\top f(\theta,x_j) on soft or one-hot targets with ∑kyjk=1\sum_k y_{jk} = 1, and the identity takes a tensor form, with one residual per class.

Proposition 3.6 (Softmax cross-entropy). Let rjk:=yjk−pk(θ⋆,xj)r_{jk} := y_{jk} - p_k(\theta^\star,x_j) and let J∈RS×N×KcJ \in\mathbb{R}^{S \times N \times K_c} with Ji,j,k:=∂Fi(y⋆)/∂yjkJ_{i,j,k} := \partial F_i(y^\star)/\partial y_{jk}. Then

I:,j=∑k=1KcrjkJ:,j,k∈RS.(17)\mathcal{I}_{:,j} = \sum_{k=1}^{K_c}r_{jk}J_{:,j,k} \in\mathbb{R}^S. \tag*{(17)}

The same holds when both operators share any invertible H^\hat{H}.

Proof. Appendix D. □

Implications for influence

Suppose influence is used to predict how predictions change when training targets change. The modulation identity then predicts three ways in which influence fails, even though it still measures sensitivity to sample weights correctly.

The first failure concerns scale. When the modulation factors shrink, as the residuals do when a model fits its training data more closely, influence shrinks with them even while JJ stays bounded.

Corollary 4.1 (Interpolation collapse). Under Theorem 3.3, with NN and SS fixed, suppose that along a sequence of fitted models max⁡j∣mj∣→0\max_j |m_j| \to0 while the entries of JJ stay bounded. Then every entry of II goes to zero, and so does influence’s predicted shift IΔyI\Delta y for every bounded perturbation Δy\Delta y. As a target-sensitivity estimator, influence collapses to predicting no change. The same holds for any shared H^\hat{H}, with the bound imposed on the entries of J^\hat{J}.

Proof. ∣Iij∣=∣mj∣∣Jij∣≤max⁡l∣ml∣∣Jij∣→0|I_{ij}| = |m_j| |J_{ij}| \le\max_l |m_l| |J_{ij}| \to0, and (IΔy)i=∑jIijΔyj(I\Delta y)_i = \sum_j I_{ij}\Delta y_j is a sum of NN such entries times bounded factors.

Kernel ridge regression shows the collapse in closed form. As the ridge parameter goes to zero the model interpolates, the residuals vanish and influence goes to zero, while JJ converges to the interpolating smoother (Appendix § 13).

The second failure concerns direction. Draw a perturbation by choosing a training point UU uniformly from [N][N] and moving its target by a random amount δ\delta, Δy=δeU\Delta y = \delta e_U. At prediction ii, influence then predicts the shift rUJiUδr_U J_{iU}\delta and JJ predicts JiUδJ_{iU}\delta.

Corollary 4.2 (Direction washout). Under Corollary 3.4, fix a prediction ii with Ji,:≠0J_{i,:} \ne0, and let δ\delta be independent of UU with E[δ]=0\mathbb{E}[\delta] = 0 and E[δ2]>0\mathbb{E}[\delta^2] > 0. Weight training point jj by πij:=Jij2/∑lJil2\pi_{ij} := J_{ij}^2 / \sum_l J_{il}^2, and let μi\mu_i and σi2\sigma_i^2 be the mean and variance of the residuals under these weights, with μi2+σi2>0\mu_i^2 + \sigma_i^2 > 0. Then the correlation between the shifts predicted by influence and by JJ is

corr⁡(rUJiUδ,JiUδ)=μiμi2+σi2.(18)\operatorname{corr}(r_U J_{iU}\delta, J_{iU}\delta) = \frac{\mu_i}{\sqrt{\mu_i^2+\sigma_i^2}}. \tag*{(18)}

It is zero when the weighted mean residual is zero, and close to zero whenever that mean is small relative to the spread of the residuals.

Proof. Both shifts have mean zero because E[δ]=0\mathbb{E}[\delta] = 0 and δ\delta is independent of UU. Their covariance is E[rUJiU2]E[δ2]\mathbb{E}[r_U J_{iU}^2]\mathbb{E}[\delta^2], and their variances are E[rU2JiU2]E[δ2]\mathbb{E}[r_U^2 J_{iU}^2]\mathbb{E}[\delta^2] and E[JiU2]E[δ2]\mathbb{E}[J_{iU}^2]\mathbb{E}[\delta^2]. Dividing numerator and denominator by E[JiU2]E[δ2]>0\mathbb{E}[J_{iU}^2]\mathbb{E}[\delta^2] > 0 turns the expectations over UU into weighted means, Eπ[r]=μi\mathbb{E}_{\pi}[r] = \mu_i and Eπ[r2]=μi2+σi2\mathbb{E}_{\pi}[r^2] = \mu_i^2 + \sigma_i^2.

The third failure is specific to softmax cross-entropy.

Corollary 4.3 (True-class collapse). Under softmax cross-entropy with one-hot label yj=etjy_j = e_{t_j}, so that tjt_j is the recorded class of training point jj, Proposition 3.6 gives

I:,j=(1−pj,tj)J:,j,tj−∑k≠tjpj,kJ:,j,k.(19)I_{:,j} = (1-p_{j,t_j})J_{:,j,t_j} - \sum_{k\ne t_j} p_{j,k}J_{:,j,k}. \tag*{(19)}

For the label change Δyj=δ(ea−etj)\Delta y_j = \delta(e_a-e_{t_j}) that moves mass δ\delta from the true class tjt_j to a class a≠tja\ne t_j, and with influence scored as δIi,j\delta I_{i,j} (Appendix § 14), the predicted shifts in prediction ii are

(JΔy)i=δ(Ji,j,a−Ji,j,tj),(IΔy)i=δIi,j.(J\Delta y)_i = \delta(J_{i,j,a}-J_{i,j,t_j}), \qquad(I\Delta y)_i = \delta I_{i,j}.

JJ’s shift depends on the destination class aa, whereas influence’s does not.

Proof. Substitute the one-hot residuals rj,tj=1−pj,tjr_{j,t_j}=1-p_{j,t_j} and rj,k=−pj,kr_{j,k}=-p_{j,k} for k≠tjk\ne t_j into (17). JJ’s shift is ∑kJi,j,kΔyj,k\sum_k J_{i,j,k}\Delta y_{j,k}; Ii,jI_{i,j} depends on ii, jj and the fitted model but not on aa.

Softmax probabilities are positive, so in (19) the true class tjt_j of training point jj receives the only positive weight, 1−pj,tj1-p_{j,t_j}, and every other class kk a negative weight −pj,k-p_{j,k}; these sum to −(1−pj,tj)-(1-p_{j,t_j}). Influence’s column for a training point therefore always points towards that point’s own true class, whatever target change is asked about. It gives the same prediction whichever class the label moves to, and so contains no information about where the label goes. Its size shrinks as well: the whole column is 1−pj,tj1-p_{j,t_j} times a weighted difference of columns of JJ (Appendix D), so as the probability the classifier assigns to tjt_j approaches one, influence’s shift goes to zero.

The same reasoning suggests a problem for canonical TRAK [17], whose formula weights each training example by ∂ℓ/∂fj\partial\ell/\partial f_j. For canonical-link losses this weight is −rj-r_j. With its projection and ensembling held fixed, TRAK therefore contains the same residual factor, and we expect it to share the three failures. We do not test TRAK empirically: its reference implementation supports only multi-class tasks (image, text and CLIP classification), and applying it to the squared-error and single-logit models of our tabular experiments would require model-output code that does not yet exist.4

Evaluating a target-sensitivity estimator

The experiments compare JJ and influence with refits, and so need a score for how well a matrix predicts the effect of a target change. A target-sensitivity estimator is a matrix M∈RS×NM \in\mathbb{R}^{S \times N} used to predict the refit shift, ΔFi≈(MΔy)i\Delta F_i \approx(M\Delta y)_i. Both JJ and II are scored this way, with no rescaling.

Definition 5.1 (Per-prediction R2R^2). For prediction ii and a perturbation distribution DD on RN\mathbb{R}^N (RNKc\mathbb{R}^{NK_c} for vector targets),

Ri2(M;D):=1−EΔy∼D[(ΔFi(Δy)−(MΔy)i)2]Var⁡Δy∼D[ΔFi(Δy)],(20)R_i^2(M;D) := 1 - \frac{\mathbb{E}_{\Delta y \sim D}\left[\left(\Delta F_i(\Delta y) - (M\Delta y)_i\right)^2\right]}{\operatorname{Var}_{\Delta y \sim D}\left[\Delta F_i(\Delta y)\right]}, \tag*{(20)}

where ΔFi(Δy):=Fi(y⋆+Δy)−Fi(y⋆)\Delta F_i(\Delta y) := F_i(y^\star+ \Delta y) - F_i(y^\star) is the refit shift. The reported score is the median of Ri2R_i^2 over the evaluation set.

Unlike the usual regression R2R^2, which is taken across data points, this one is taken across perturbations at a single prediction. In practice we draw KK perturbations from DD and refit once for each, so every prediction has KK pairs of refit and predicted shifts, and Ri2R_i^2 is sklearn.metrics.r2_score [18] on those pairs. Predicting the mean refit shift for every perturbation scores zero, and an estimator that gets the direction wrong scores below zero. We report the median over predictions rather than the mean, which a few failing predictions would otherwise dominate.

At prediction ii, let ρi\rho_i be the correlation between predicted and refit shifts over DD, αi\alpha_i the standard deviation of the predicted shift divided by that of the refit shift, and βi\beta_i the difference of their means divided by the standard deviation of the refit shift. The Mincer–Zarnowitz identity [15] splits the score into direction, scale and bias (Lemma B.1),5

Ri2=2ρiαi−αi2−βi2.(21)R_i^2 = 2\rho_i\alpha_i - \alpha_i^2 - \beta_i^2. \tag*{(21)}

Among the failures of § 4, interpolation collapse drives αi\alpha_i to zero, direction washout drives ρi\rho_i to zero, and true-class collapse lowers both. Pearson correlation and rank-correlation scores, including the linear datamodeling score [11, 17], ignore scale and so cannot detect interpolation collapse. We therefore report Ri2R_i^2 with its three components beside it.

Experiments

Every experiment follows the same design. It trains a base model to stationarity, draws KK perturbations of training targets, refits each one by warm-started L-BFGS from the base parameters, and scores JJ and @page 8/19 starts_mid=1 ends_mid=1 Softmax probabilities are positive, so in (19) the true class tjt_j of training point jj receives the only positive weight, 1−pj,tj1-p_{j,t_j}, and every other class kk a negative weight −pj,k-p_{j,k}; these sum to −(1−pj,tj)-(1-p_{j,t_j}). Influence’s column for a training point therefore always points towards that point’s own true class, whatever target change is asked about. It gives the same prediction whichever class the label moves to, and so contains no information about where the label goes. Its size shrinks as well: the whole column is 1−pj,tj1-p_{j,t_j} times a weighted difference of columns of JJ (Appendix D), so as the probability the classifier assigns to tjt_j approaches one, influence’s shift goes to zero.

The same reasoning suggests a problem for canonical TRAK [17], whose formula weights each training example by ∂ℓ/∂fj\partial\ell/\partial f_j. For canonical-link losses this weight is −rj-r_j. With its projection and ensembling held fixed, TRAK therefore contains the same residual factor, and we expect it to share the three failures. We do not test TRAK empirically: its reference implementation supports only multi-class tasks (image, text and CLIP classification), and applying it to the squared-error and single-logit models of our tabular experiments would require model-output code that does not yet exist.4

Evaluating a target-sensitivity estimator

The experiments compare JJ and influence with refits, and so need a score for how well a matrix predicts the effect of a target change. A target-sensitivity estimator is a matrix M∈RS×NM \in\mathbb{R}^{S \times N} used to predict the refit shift, ΔFi≈(MΔy)i\Delta F_i \approx(M\Delta y)_i. Both JJ and II are scored this way, with no rescaling.

Definition 5.1 (Per-prediction R2R^2). For prediction ii and a perturbation distribution DD on RN\mathbb{R}^N (RNKc\mathbb{R}^{NK_c} for vector targets),

Ri2(M;D):=1−EΔy∼D[(ΔFi(Δy)−(MΔy)i)2]Var⁡Δy∼D[ΔFi(Δy)],(22)R_i^2(M;D) := 1 - \frac{\mathbb{E}_{\Delta y \sim D}\left[\left(\Delta F_i(\Delta y) - (M\Delta y)_i\right)^2\right]}{\operatorname{Var}_{\Delta y \sim D}\left[\Delta F_i(\Delta y)\right]}, \tag*{(22)}

where ΔFi(Δy):=Fi(y⋆+Δy)−Fi(y⋆)\Delta F_i(\Delta y) := F_i(y^\star+ \Delta y) - F_i(y^\star) is the refit shift. The reported score is the median of Ri2R_i^2 over the evaluation set.

Unlike the usual regression R2R^2, which is taken across data points, this one is taken across perturbations at a single prediction. In practice we draw KK perturbations from DD and refit once for each, so every prediction has KK pairs of refit and predicted shifts, and Ri2R_i^2 is sklearn.metrics.r2_score [18] on those pairs. Predicting the mean refit shift for every perturbation scores zero, and an estimator that gets the direction wrong scores below zero. We report the median over predictions rather than the mean, which a few failing predictions would otherwise dominate.

At prediction ii, let ρi\rho_i be the correlation between predicted and refit shifts over DD, αi\alpha_i the standard deviation of the predicted shift divided by that of the refit shift, and βi\beta_i the difference of their means divided by the standard deviation of the refit shift. The Mincer–Zarnowitz identity [15] splits the score into direction, scale and bias (Lemma B.1),5

Ri2=2ρiαi−αi2−βi2.(23)R_i^2 = 2\rho_i\alpha_i - \alpha_i^2 - \beta_i^2. \tag*{(23)}

Among the failures of § 4, interpolation collapse drives αi\alpha_i to zero, direction washout drives ρi\rho_i to zero, and true-class collapse lowers both. Pearson correlation and rank-correlation scores, including the linear datamodeling score [11, 17], ignore scale and so cannot detect interpolation collapse. We therefore report Ri2R_i^2 with its three components beside it.

Experiments

Every experiment follows the same design. It trains a base model to stationarity, draws KK perturbations of training targets, refits each one by warm-started L-BFGS from the base parameters, and scores JJ and influence against the same refits. Warm-starting matters because it targets the locally defined solution θ∗(y)\theta^*(y) that JJ differentiates, whereas retraining from a fresh initialisation can reach a different minimum. Every fit, base or refit, stops on the same gradient-norm rule. Both operators use the exact Hessian of the training objective, so neither score includes the error of a surrogate Hessian. Table 6 and Table 7 also report JJ with the damped Gauss–Newton Hessian of Remark 3.5. Appendix § 15 gives the architectures, perturbation distributions and the stopping rule. Kernel ridge regression, where JJ is the smoother matrix and scores R2=1.000R^2 = 1.000 exactly, is in Appendix § 13 (Table 5).

λ\lambdaR2R^2 (JJ)R2R^2 (Influence)
10−110^{-1}+1.000+1.000+0.131+0.131
10−310^{-3}+1.000+1.000−0.062-0.062
10−610^{-6}+1.000+1.000−0.002-0.002

Table 5. Kernel ridge regression on Friedman #1. Median per-prediction R2R^2 over 2,000 predictions.

Friedman #1MAGIC GammaHIGGS
Training points NN2,00014,2651.0⋅1061.0 \cdot10^{6}
Evaluation predictions SS2,0004,75510,000
Parameters PP7697693,841
Perturbations KK per seed100100100
Seeds555
Stopping tolerance on the gradient norm, smallest1.0⋅10−61.0 \cdot10^{-6}1.0⋅10−61.0 \cdot10^{-6}3.8⋅10−83.8 \cdot10^{-8}
Base fits: largest gradient norm1.0⋅10−61.0 \cdot10^{-6}8.1⋅10−78.1 \cdot10^{-7}3.5⋅10−83.5 \cdot10^{-8}
Refits at or above the tolerance8 of 5000 of 5000 of 500
Refits: largest gradient norm / ∥CΔy∥\lVert C\Delta y\rVert2.5⋅10−42.5 \cdot10^{-4}2.8⋅10−12.8 \cdot10^{-1}7.3⋅10−17.3 \cdot10^{-1}
Exact Hessian: smallest eigenvalue8.7⋅10−48.7 \cdot10^{-4}1.1⋅10−41.1 \cdot10^{-4}9.6⋅10−59.6 \cdot10^{-5}
Direct solves: largest relative error7.3⋅10−147.3 \cdot10^{-14}3.5⋅10−153.5 \cdot10^{-15}1.3⋅10−141.3 \cdot10^{-14}
∥B−Cdiag⁡(r)∥/∥B∥\lVert B-C\operatorname{diag}(r)\rVert/\lVert B\rVert, largest2.9⋅10−142.9 \cdot10^{-14}6.2⋅10−146.2 \cdot10^{-14}9.3⋅10−169.3 \cdot10^{-16}
Gauss–Newton CG iterations, largest1282631
JJ, Gauss–Newton Hessian: R2R^20.928±0.0140.928 \pm0.0140.949±0.0150.949 \pm0.0150.956±0.0150.956 \pm0.015
Influence, Gauss–Newton Hessian: R2R^2−0.489±0.190-0.489 \pm0.190−0.213±0.060-0.213 \pm0.060−0.190±0.085-0.190 \pm0.085

Table 6. Tabular runs: sizes, stopping rules and solver checks, pooled over seeds. ∥CΔy∥\lVert C\Delta y\rVert is the change in the training-loss gradient caused by one perturbation. The identity row is the relative error of the canonical-link identity B=Cdiag⁡(r)B=C\operatorname{diag}(r) on the computed loss gradients. The last three rows use the damped Gauss–Newton Hessian in place of HH.

Table 7: MNIST: sizes, stopping tolerances and solver checks, pooled over the five seeds. ∥CΔy∥\lVert C\Delta y\rVert is the change in the training-loss gradient caused by the label change, and uu is the exact-Hessian solution for one label change. The last row gives JJ’s R2R^2 with the Gauss–Newton Hessian.

Training points NN2,000
Evaluation predictions SS2,000
Retained pixels dd629–640
Parameters PP40,970–41,674
Perturbations KK per seed20
Seeds5
Test accuracy0.906–0.919
Training points: median pj,tjp_{j,t_j}0.920–0.931
Base fits: largest gradient norm9.9⋅10−79.9\cdot10^{-7}
Refits at or above 10−610^{-6}1 of 100
Refits: largest gradient norm / ∥CΔy∥\lVert C\Delta y\rVert8.3⋅10−38.3\cdot10^{-3}
Gauss–Newton CG iterations, largest86
MINRES iterations, median per seed626–875
MINRES relative solve error, largest2.1⋅10−72.1\cdot10^{-7}
min⁡u⊤Hu/u⊤u\min u^\top Hu/u^\top u7.1⋅10−57.1\cdot10^{-5}
∥B−Cdiag⁡(r)∥/∥B∥\lVert B-C\operatorname{diag}(r)\rVert/\lVert B\rVert, largest9.2⋅10−149.2\cdot10^{-14}
JJ, Gauss–Newton Hessian: R2R^20.739±0.0650.739\pm0.065

Table 7.

Tabular data

Table 2 reports one-hidden-layer tanh networks on Friedman #1 ([5]) with squared error and N=2,000N = 2{,}000, MAGIC Gamma ([3]) with logistic loss and N=14,265N = 14{,}265, and HIGGS ([2]) with logistic loss and N=106N = 10^6. Entries are medians over evaluation predictions, averaged over five seeds. The random row gives a floor.

On the three tabular datasets of Table 2, JJ reaches R2R^2 between 0.99 and 1.00, with direction ρ\rho of at least 0.99, scale α\alpha between 1.00 and 1.02 and bias near zero. Influence’s R2R^2, by contrast, is negative on all three datasets, because its direction is washed out (ρ\rho between −0.08-0.08 and 0.03; Appendix § 15 covers the class-dependent perturbations of MAGIC and HIGGS). A model that fits well over-predicts about as much as it under-predicts, so its residuals average close to zero, and unless their sign is related to the weights πij\pi_{ij} of Corollary 4.2, the weighted mean μi\mu_i is small relative to their spread. With ρ\rho near zero, (21) leaves −α2−β2-\alpha^2 - \beta^2, which is negative at any scale. On MAGIC and HIGGS the scale is also shrunk (α\alpha of 0.30 and 0.47), because logistic residuals lie between −1-1 and 1. On Friedman the loss is squared error, whose residual r=y−fr = y - f has the units of the target. Measuring the target in units cc times smaller therefore multiplies influence’s α\alpha by cc, which means its value there (0.68) is not a measure of shrinkage. With the Gauss–Newton Hessian, JJ’s R2R^2 is between 0.93 and 0.96 and influence’s is still negative (Table 6).

Softmax classifier on MNIST

MNIST ([14]) tests JJ and true-class collapse on a softmax classifier. The design follows the tabular runs. Each seed draws N=2,000N = 2{,}000 training images, the same NN as on Friedman, and 2,000 test images. It fits the same one-hidden-layer tanh network of width 64 to the flattened images, so PP is about 41,000 (Table 7). The prediction qiq_i is the logit of the base model’s predicted class at test image ii. Each seed draws K=20K = 20 label changes Δyj=δ(ea−et)\Delta y_j = \delta(e_a - e_t), with jj uniform on [N][N], tt the training image’s true class, aa a random other class and δ∼Unif⁡[0.01,0.30]\delta\sim\operatorname{Unif}[0.01, 0.30], the range used on MAGIC and HIGGS. KK is smaller than on the tabular data because each refit takes up to half a minute on average (Appendix § 15). With the Gauss–Newton Hessian, JJ’s R2R^2 is 0.74 (Table 7).

In Table 2, JJ reaches R2R^2 of 0.92 on MNIST, with direction ρ\rho of 0.97 and scale α\alpha of 0.99. Influence’s direction is weak (ρ\rho of −0.37-0.37), because its predicted shift is the same whichever class the label moves to, as true-class collapse predicts (Appendix § 14).6 Its scale is also shrunk (α\alpha of 0.10). The classifier assigns a training point’s true class a probability close to one (median between 0.92 and 0.93 across seeds; Table 7), so the prefactor 1−pj,tj1-p_{j,t_j} of Corollary 4.3 is small. Influence’s predicted shifts are therefore close to zero, and its R2R^2 is negative (−0.20-0.20).

Application: Censored house prices

California Housing ([16]) gives the median house value of 20,640 census block groups. Values above $500,000 are top-coded at $500,001, so the 965 most expensive block groups share one recorded target. How a fitted model’s predictions would change if the top-coded values were higher is a what-if about training targets. Increasing the top-coded targets by a fraction κ\kappa is the target change Δyj=κyj\Delta y_j = \kappa y_j on the top-coded training points, with Δyj=0\Delta y_j = 0 elsewhere. JJ predicts the shift in the predictions as JΔyJ\Delta y. Influence predicts IΔy=Jdiag⁡(r)ΔyI\Delta y = J\operatorname{diag}(r)\Delta y, which weights the target change of each top-coded point by that point’s residual. Each of the two predicted shifts costs one Hessian solve, for all held-out predictions at once.

We fit the squared-error network of § 8.1 to a random three quarters of the rows (N=15,480N = 15{,}480), increase the top-coded targets by 5%, 10%, 20% and 50%, refit, and compare the shift in the 5,160 held-out predictions with the shifts that JJ and influence predict. Each increase is a single target change rather than KK random perturbations, so R2R^2 and its components are computed across the held-out predictions of that target change. Appendix § 16 gives the protocol.

In Figure 2, JJ follows the refit over the whole range of shifts, whereas influence misses most on the block groups whose predictions move the most. JJ’s R2R^2 lies between 0.98 and 1.00 and influence’s between 0.21 and 0.27 (Table 3). Influence’s direction is only partly right, with ρ\rho between 0.47 and 0.53 (its α\alpha depends on the unit of the target, as on Friedman).

Figure 2. Increasing the top-coded house values by 20% (California Housing, seed 0). Each point is one of 5,160 held-out block groups. The horizontal axis is the shift in its prediction after refitting, and the vertical axis is the shift predicted by JJ (left) and by influence (right). The grey line marks equality.

Limitations

JJ is a first-order sensitivity at a stationary point. How well it predicts the effect of a finite target change depends on how nonlinear the refit is in that change, which varies with the learner and the size of the change. This limit, like the need for white-box access and one Hessian solve per row or column, applies equally to influence. Any difficulty in computing the solve accurately also affects both operators alike, because the modulation identity holds for any shared Hessian or surrogate. On MNIST, replacing the exact Hessian by the Gauss–Newton surrogate lowers JJ’s R2R^2 from 0.92 to 0.74 (Table 7). The modulation identity also needs a pointwise loss with ℓfy≠0\ell_{fy} \ne0, which every canonical-link loss satisfies. Where ℓfy=0\ell_{fy} = 0, as in the linear region of the Huber loss or almost everywhere for the L1L_1 loss, the modulation factor is undefined. The fit does not respond to that target to first order, so J:,j=0J_{:,j} = 0. Influence’s column I:,j\mathcal{I}_{:,j}, however, is in general nonzero, and no factor mjm_j can scale a zero column into a nonzero one.

Notation

Table 4 lists the symbols used across sections, including those defined inside a proof. Standard notation, and symbols used only within a single passage, proof or appendix, are defined where they are used.

Influence IijI_{ij} is the derivative with respect to upweighting training point jj in the (1/N)(1/N)-normalised loss. Leave-one-out work uses the opposite sign, and the additive-ϵ\epsilon form of Koh & Liang [12] drops the 1/N1/N. The modulation identity holds in those conventions up to the corresponding global sign or scale.

Direction, scale and bias

Lemma B.1 (Mincer–Zarnowitz decomposition). Let ρi\rho_i, αi\alpha_i and βi\beta_i be as in Section 5, with both standard deviations positive. Then Ri2=2ρiαi−αi2−βi2=ρi2−(αi−ρi)2−βi2R_i^2 = 2\rho_i\alpha_i - \alpha_i^2 - \beta_i^2 = \rho_i^2 - (\alpha_i - \rho_i)^2 - \beta_i^2.

Proof. Let s:=ΔFis := \Delta F_i and s^:=(MΔy)i\hat{s} := (M\Delta y)_i under Δy∼D\Delta y \sim\mathcal{D}, with means μs,μs^\mu_s,\mu_{\hat{s}} and standard deviations σs,σs^\sigma_s,\sigma_{\hat{s}}, so that αi=σs^/σs\alpha_i = \sigma_{\hat{s}}/\sigma_s and βi=(μs^−μs)/σs\beta_i = (\mu_{\hat{s}}-\mu_s)/\sigma_s. Then E[(s−s^)2]=(μs−μs^)2+σs2+σs^2−2ρiσsσs^=σs2(βi2+1+αi2−2ρiαi)\mathbb{E}[(s-\hat{s})^2] = (\mu_s-\mu_{\hat{s}})^2 + \sigma_s^2 + \sigma_{\hat{s}}^2 - 2\rho_i\sigma_s\sigma_{\hat{s}} = \sigma_s^2(\beta_i^2 + 1 + \alpha_i^2 - 2\rho_i\alpha_i). Dividing by Var⁡[s]=σs2\operatorname{Var}[s] = \sigma_s^2 and subtracting from one gives the result. □\square

Kernel ridge regression

For kernel ridge regression with training Gram matrix KXX∈RN×NK_{XX} \in\mathbb{R}^{N\times N}, evaluation kernel KQX∈RS×NK_{QX} \in\mathbb{R}^{S\times N} and ridge parameter λ>0\lambda> 0, the fit y^=KQX(KXX+λI)−1y\hat{y} = K_{QX}(K_{XX}+\lambda I)^{-1}y is linear in yy [22], and J=KQX(KXX+λI)−1J = K_{QX}(K_{XX}+\lambda I)^{-1} is the smoother matrix [9 eq. 5.57] at every yy. Corollary 3.4 gives I=Jdiag⁡(r)\mathcal{I} = J\operatorname{diag}(r) with rj=yj−[KXX(KXX+λI)−1y]jr_j = y_j - [K_{XX}(K_{XX}+\lambda I)^{-1}y]_j. As λ→0\lambda\to0 with KXXK_{XX} invertible, r→0r \to0 and I→0\mathcal{I} \to0, while J→KQXKXX−1J \to K_{QX}K_{XX}^{-1} stays finite. This is interpolation collapse in closed form.

Table 5 uses Friedman #1 (N=2,000N = 2{,}000, S=2,000S = 2{,}000) with an RBF kernel of bandwidth 1 on the raw features, and K=100K = 100 perturbations drawn as on Friedman in Appendix § 15. The fit is linear in the targets, so JΔyJ\Delta y equals the refit shift and JJ’s R2R^2 is 1.000 at every λ\lambda. Influence’s R2R^2 approaches zero, the score of predicting no change, as λ→0\lambda\to0.

Softmax cross-entropy

Proof of Proposition 3.6. Let ψjk:=∇θfk(θ∗,xj)\psi_{jk} := \nabla_\theta f_k(\theta^*,x_j). For ℓj=h(f(θ,xj))−yjTf(θ,xj)\ell_j = h(f(\theta,x_j)) - y_j^\mathsf{T}f(\theta,x_j) with h(f)=log⁡∑k′efk′h(f) = \log\sum_{k'} e^{f_{k'}}, the target derivative in class kk is ∂ℓj/∂yjk=−fk\partial\ell_j/\partial y_{jk} = -f_k, so cjk=(1/N)∇θ(∂ℓj/∂yjk)=−(1/N)ψjkc_{jk} = (1/N)\nabla_\theta(\partial\ell_j/\partial y_{jk}) = -(1/N)\psi_{jk}. The loss gradient is ∇θℓj=∑k(pk−yjk)ψjk=−∑krjkψjk\nabla_\theta\ell_j = \sum_k(p_k-y_{jk})\psi_{jk} = -\sum_k r_{jk}\psi_{jk}, so bj=∑krjkcjkb_j = \sum_k r_{jk}c_{jk}. Substituting into I:,j=−GH−1bj\mathcal{I}_{:,j} = -GH^{-1}b_j and using J:,j,k=−GH−1cjkJ_{:,j,k} = -GH^{-1}c_{jk} gives I:,j=∑krjkJ:,j,k\mathcal{I}_{:,j} = \sum_k r_{jk}J_{:,j,k}. The same steps with H^\hat{H} in place of HH give the surrogate version. □\square

With Kc=2K_c = 2 and the single logit f:=f1−f2f := f_1-f_2 this reduces to the logistic case of Corollary 3.4.

Class probabilities sum to one, so only perturbations with ∑kΔyjk=0\sum_k \Delta y_{jk} = 0 give valid targets. The partials J:,j,kJ_{:,j,k} ignore this constraint, but (17) is unaffected: because the residuals also satisfy ∑krjk=0\sum_k r_{jk} = 0, any part of J:,j,kJ_{:,j,k} that is common to all classes kk drops out of the sum.

Scoring influence on label changes. I:,j\mathcal{I}_{:,j} is one vector per training point, while a label change Δyj=δ(ea−et)\Delta y_j = \delta(e_a-e_t) is a vector in RKc\mathbb{R}^{K_c}. Scoring influence therefore needs a convention for sign and magnitude. We use δI:,j\delta\mathcal{I}_{:,j}, which treats the label change as upweighting training point jj by δ\delta, the same scalar mass that enters JJ’s prediction ∑kJ:,j,kΔyjk\sum_k J_{:,j,k}\Delta y_{jk}, with no rescaling. Scaling by the norm 2∣δ∣\sqrt{2}|\delta| of the label change instead would multiply influence’s αi\alpha_i by 2\sqrt{2} and leave ρi\rho_i unchanged. Its R2R^2 would stay negative wherever ρi<0\rho_i < 0, since 2ρiαi−αi2−βi2<02\rho_i\alpha_i-\alpha_i^2-\beta_i^2 < 0 for any αi>0\alpha_i > 0.

Why influence’s direction is weak. Factoring (1−pj,tj)(1-p_{j,t_j}) out of (19),

I:,j=(1−pj,tj)[J:,j,tj−Jˉ:,j],Jˉ:,j:=∑k≠tjpj,k1−pj,tjJ:,j,k,I_{:,j} = (1-p_{j,t_j})\left[J_{:,j,t_j}-\bar{J}_{:,j}\right], \qquad\bar{J}_{:,j} := \sum_{k\ne t_j} \frac{p_{j,k}}{1-p_{j,t_j}}J_{:,j,k},

with Jˉ:,j\bar{J}_{:,j} a probability-weighted average of the other-class columns. Write ui:=Ji,j,tj−Jˉi,ju_i := J_{i,j,t_j}-\bar{J}_{i,j} for the true-class term and vi:=Ji,j,a−Jˉi,jv_i := J_{i,j,a}-\bar{J}_{i,j} for the destination term. Then JJ’s shift is δ(vi−ui)\delta(v_i-u_i) and influence’s is δ(1−pj,tj)ui\delta(1-p_{j,t_j})u_i, up to the sign convention above. Influence carries the true-class term uiu_i but not the destination term viv_i. Treating 1−pj,tj1-p_{j,t_j} as roughly constant across perturbations, and with viv_i uncorrelated with uiu_i, as a random destination class makes plausible, the correlation between influence and JJ has magnitude σu/σu2+σv2\sigma_u/\sqrt{\sigma_u^2+\sigma_v^2} under either sign, where σu\sigma_u and σv\sigma_v are the standard deviations of uiu_i and viv_i over the perturbations. It is well below one whenever the destination term varies as much as the true-class term. On MNIST, influence’s ∣ρi∣|\rho_i| against the refit, which JJ tracks, is 0.37 (Table 2).

Protocol

Tabular networks. Friedman #1, MAGIC Gamma and HIGGS use a one-hidden-layer tanh network of width 64 (Friedman, MAGIC) or 128 (HIGGS). The smooth activation makes the loss twice continuously differentiable in θ\theta, as the theory requires. Training is full-batch Adam (lr = 5⋅10−35\cdot10^{-3}, up to 4,000 steps on Friedman and MAGIC and 2,000 on HIGGS, with early exit once the training loss falls below 10−410^{-4}) followed by L-BFGS with strong-Wolfe line search until the stopping rule below is met. The objective includes the penalty 12λdamp∥θ∥2\frac{1}{2}\lambda_{\mathrm{damp}}\lVert\theta\rVert^2 with λdamp=10−2\lambda_{\mathrm{damp}}=10^{-2}. On Friedman the per-example loss is (f−y)2(f-y)^2, twice the canonical form 12(f−y)2\frac{1}{2}(f-y)^2, so there h′′=2h''=2 and cj=−(2/N)ψjc_j=-(2/N)\psi_j. This leaves mj=rjm_j=r_j unchanged.

Friedman #1 has 10 features drawn uniformly on [0,1][0,1] and Gaussian noise with standard deviation 0.5, and each seed draws a new sample. MAGIC uses the 19,020 rows of the OpenML copy, and each seed draws a new stratified split with a quarter of the rows held out for evaluation. The HIGGS split is deterministic in file order. The first 10610^6 rows of the UCI file form the training set and the next 10410^4 the evaluation set. MAGIC and HIGGS features are standardised with training-set statistics. The seed also sets the initialisation and the perturbations. On MAGIC and HIGGS the prediction qiq_i is the logit of evaluation point ii, so all shifts are in logits.

Friedman and MAGIC run in float64 on the CPU, HIGGS in float64 on the GPU. Both operators use the exact Hessian HH of the regularised training objective (25). With P=769P=769 (Friedman, MAGIC) or 3,841 (HIGGS) parameters, HH is formed as a dense P×PP\times P matrix from Hessian-vector products, checked to be positive definite, and factorised by Cholesky, so every solve is direct. Influence is computed from its definition, with the loss gradients BB and its own solves, so it agrees with Jdiag⁡(r)J\operatorname{diag}(r) up to solver error. For comparison, both operators are also computed with the damped Gauss–Newton Hessian, in float32 by conjugate gradients to a relative solve error of 10−410^{-4}. Table 6 gives the size of each run and its fit and solver diagnostics.

Gauss–Newton Hessian. HH can be indefinite for nonlinear models, and a common surrogate replaces the data term by the Gauss–Newton Hessian

HGN:=1N∑j=1Nh′′(fθ∗(xj))ψjψjT,(24)H_{\mathrm{GN}} := \frac{1}{N}\sum_{j=1}^{N} h''\bigl(f_{\theta^*}(x_j)\bigr)\psi_j\psi_j^{\mathsf{T}}, \tag*{(24)}

with h′′=1h^{\prime\prime}=1 for squared error in the canonical form (h′′=2h^{\prime\prime}=2 on Friedman) and h′′=σ(f)(1−σ(f))h^{\prime\prime}=\sigma(f)(1-\sigma(f)) for logistic loss. For softmax cross-entropy the scalar h′′h^{\prime\prime} becomes the softmax Jacobian ∂pj/∂fj=diag⁡(pj)−pjpjT\partial p_j/\partial f_j=\operatorname{diag}(p_j)-p_jp_j^{\mathsf{T}} and ψj\psi_j becomes the P×KcP \times K_c Jacobian of the logits. Adding the penalty Hessian λdampI\lambda_{\mathrm{damp}}I gives J^:=−G(HGN+λdampI)−1C\hat{J}:=-G(H_{\mathrm{GN}}+\lambda_{\mathrm{damp}}I)^{-1}C. For linear-in-parameters squared error this is the exact JJ. In general, for a canonical-link loss with the L2 penalty, the exact Hessian is

H=HGN+λdampI−1N∑j=1Nrj∇θ2fθ(xj),(25)H=H_{\mathrm{GN}}+\lambda_{\mathrm{damp}}I-\frac{1}{N}\sum_{j=1}^{N}r_j\nabla_{\theta}^{2}f_{\theta}(x_j), \tag*{(25)}

so Gauss–Newton drops the residual-weighted curvature of the model output. For softmax cross-entropy the last term becomes −(1/N)∑j,krjk∇θ2fk(θ∗,xj)-(1/N)\sum_{j,k}r_{jk}\nabla_{\theta}^{2}f_k(\theta^{\ast},x_j). The dropped term is small when the residuals or the output curvature are small, but stationarity alone does not control it.

Tabular perturbations. Each perturbation moves one training target, Δy(k)=δkejk\Delta y^{(k)}=\delta_k e_{j_k}, with jkj_k uniform on [N][N]. On Friedman δ=s u σy\delta=s\,u\,\sigma_y, with sign ss uniform on {−1,+1}\{-1,+1\}, u∼Unif⁡[0.1,1.0]u\sim\operatorname{Unif}[0.1,1.0] and σy\sigma_y the standard deviation of the training targets. On MAGIC and HIGGS the soft-target perturbation is δ=(1−2yj)ν\delta=(1-2y_j)\nu with ν∼Unif⁡[0.01,0.30]\nu\sim\operatorname{Unif}[0.01,0.30], which keeps yj+δy_j+\delta in [0.01,0.99][0.01,0.99]. This ties the sign of δ\delta to the training point’s class, so it is not the symmetric distribution of Corollary 4.2. Washout still applies because logistic residuals have class-dependent signs (rj>0r_j>0 for positives, rj<0r_j<0 for negatives). Influence’s ρ\rho near zero on both datasets (Table 2) confirms this.

Refits. Each perturbed problem is refit by warm-started L-BFGS from θ∗\theta^{\ast} with the same L2 penalty and the same stopping rule, with an iteration cap. All estimators are scored against the same refits.

Stopping rule. A perturbation changes the training-loss gradient at θ∗\theta^{\ast} by ∥CΔy∥\lVert C\Delta y\rVert, which shrinks as 1/N1/N. A fit that stops with a gradient norm of that size leaves a refit error as large as the response being measured. Every fit, base or refit, therefore runs until the gradient norm of the full objective is below

τ=min⁡(10−6, 0.05⋅median⁡k∥CΔy(k)∥).\tau=\min\left(10^{-6},\,0.05\cdot\operatorname{median}_{k}\lVert C\Delta y^{(k)}\rVert\right).

with the median over the perturbations of the seed (on California Housing, over its four target changes). On Friedman, MAGIC, MNIST and California Housing τ=10−6\tau=10^{-6}; on HIGGS, where N=106N=10^{6}, it is smaller.

Tables 6 and 7 give the largest gradient norms and the largest remaining gradient of a refit as a fraction of its own ∥CΔy∥\lVert C\Delta y\rVert. Both also count the refits that stop at the iteration cap above τ\tau. Because τ\tau is set from the median, a perturbation whose ∥CΔy∥\lVert C\Delta y\rVert is far below the median, from a small ∣δ∣|\delta| or a training point with a small output gradient, can stop at a gradient of the same order as its own ∥CΔy∥\lVert C\Delta y\rVert. This happens on MAGIC and HIGGS (Table 6). Such a refit meets the same absolute tolerance as every other refit, and its shift is correspondingly small, so it adds little to the variance of refit shifts in the denominator of Ri2R_i^2. Refit error that is unrelated to JJ’s own error lowers JJ’s measured R2R^2, so JJ’s R2R^2 of 0.99 and above on these datasets also bounds how much the refit error can matter.

MNIST. Images are scaled to [0,1][0,1] and flattened, and pixels with zero variance in the training set are dropped, which leaves dd inputs (Table 7). The network is Linear(dd, 64) →\to tanh →\to Linear(64, 10), trained in float64 on the GPU by full-batch Adam (1,200 epochs, lr = 5⋅10−35 \cdot10^{-3}), then L-BFGS until the stopping rule is met, with the same L2 penalty λdamp=10−2\lambda_{\mathrm{damp}}=10^{-2}. Refits are warm-started L-BFGS on all parameters to the same tolerance. A refit takes 6 to 34 seconds, averaged over the perturbations of a seed, so each seed uses K=20K=20 perturbations.

Both operators use the exact Hessian HH of the regularised training objective (25), which differs from HGN+λdampIH_{\mathrm{GN}}+\lambda_{\mathrm{damp}}I by the residual-weighted curvature term. Each solve uses MINRES, since HH need not be positive definite for a nonconvex network, and is checked to reach a relative solve error ∥Hu−v∥/∥v∥\lVert Hu-v\rVert/\lVert v\rVert below 10−610^{-6}. Table 7 gives the largest such error and the smallest u⊤Hu/u⊤uu^\top Hu/u^\top u over the solutions uu for JJ, which is positive. Influence is computed from its definition, with right-hand side bjb_j built from the loss gradient and its own MINRES solve, and the identity bj=∑krjkcjkb_j=\sum_k r_{jk}c_{jk} is checked on the right-hand side. For comparison, JJ is also computed with the Gauss–Newton Hessian, by conjugate gradients in float64 to a relative solve error of 10−810^{-8}, on the same perturbations.

California Housing

We use the scikit-learn copy of California Housing [16], with 20,640 rows and 8 features. The target is the median house value in units of $100,000, and 965 rows have the top-coded value $500,001. A random quarter of the rows are held out for evaluation (seed 0). Features are standardised with training-set statistics, and the target keeps its units. The network, loss, penalty, training and refit rules are those of Friedman (Appendix § 15), in float64 on the CPU.

Both operators use the exact Hessian, formed and factorised as on Friedman (P=641P = 641). For each increase κ\kappa, JΔyJ\Delta y is one direct solve with right-hand side CΔyC\Delta y. Influence is computed from its definition, with right-hand side BΔy=1N∑jΔyj∇θℓjB\Delta y = \frac{1}{N}\sum_j \Delta y_j\nabla_\theta\ell_j built from the loss gradients and its own solve. Each target change is refit from θ∗\theta^*. R2R^2, ρ\rho, α\alpha and β\beta are those of (20) and (21), with the averages taken over the evaluation predictions of one target change instead of over perturbations at one prediction.

Compute

JJ is never formed. A column J:,jJ_{:,j} costs one Hessian solve, and a row Ji,:J_{i,:} costs one solve plus one Jacobian-vector product over the training set. On the tabular data and California Housing, the solve uses the Cholesky factor of the dense exact Hessian, which is formed once per fitted model from Hessian-vector products over the training set (Appendix E). On MNIST, where PP is about 41,000, the solve uses MINRES against Hessian-vector products, and HH is never formed. On HIGGS (N=106N = 10^6, S=104S = 10^4), one row Ji,:∈R106J_{i,:} \in\mathbb{R}^{10^6}, which is one prediction’s sensitivity to every training target, takes between 0.07 and 0.14 seconds (median 0.07) on one RTX 3090 across 30 rows, after a one-time setup of under five minutes that forms and factorises HH (last lines of Table 8). Computing the same row by refitting would take 10610^6 refits, one per training target.

DatasetNtrainN_{\mathrm{train}}Base fit (s)JJ columns (s)KK refits (s)
Friedman #1 (CPU)2,0007.2±0.77.2 \pm0.70.35±0.000.35 \pm0.0073±9173 \pm91 (K=100K=100)
MAGIC Gamma (CPU)14,2657.7±0.47.7 \pm0.42.1±0.02.1 \pm0.014±214 \pm2 (K=100K=100)
HIGGS (GPU)1.0⋅1061.0 \cdot10^6337±141337 \pm141263±0263 \pm0444±94444 \pm94 (K=100K=100)
MNIST (GPU)2,00021±721 \pm7138±22138 \pm22379±218379 \pm218 (K=20K=20)
HIGGS (GPU), one row of JJ: median 0.07 s, range 0.07–0.14 s, 30 rows
HIGGS (GPU), one-time setup per model: median 271.11 s, range 263.72–271.34 s

Table 8. Wall-clock per seed in seconds, mean ±\pm SD over five seeds. The last two lines time single rows of JJ on HIGGS and the one-time setup before them. Base fit is one training run. JJ columns covers forming and factorising the exact Hessian and the solves for the sampled columns. On MNIST it covers the MINRES solves for JJ. KK refits covers the refits used as ground truth.

All experiments run on one workstation with an Intel Core i9-14900K (PyTorch capped at four threads), 192 GB of RAM and an NVIDIA RTX 3090 (24 GB, CUDA 12.6). Friedman and MAGIC run on the CPU, and HIGGS and MNIST on the GPU. Base fits and refits run in float64, which the refits need to resolve small target changes. JJ and influence with the exact Hessian also run in float64, and the Gauss–Newton comparison runs in float32 on the tabular data and in float64 on MNIST. The refits dominate the wall-clock in Table 8. The HIGGS row timing above comes from a separate run that times 10 rows on each of three trained HIGGS models.

References

  1. [1]Julius Adebayo, Melissa Hall, Bowen Yu, and Bobbie Chern. Quantifying and mitigating the impact of label errors on model disparity metrics. In International Conference on Learning Representations, 2023.arxiv.org/abs/2310.02533
  2. [2]Pierre Baldi, Peter Sadowski, and Daniel Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature Communications, 5:4308, 2014. doi: 10.1038/ncomms5308.DOI
  3. [3]R. K. Bock, A. Chilingarian, M. Gaug, F. Hakl, T. Hengstebeck, M. Jiřina, J. Klaschka, E. Kotrč, P. Savický, S. Towers, A. Vaiciulis, and W. Wittek. Methods for multidimensional event classification: a case study using images from a Cherenkov gamma-ray telescope. Nuclear Instruments and Methods in Physics Research Section A, 516(2–3):511–528, 2004. doi: 10.1016/j.nima.2003.08.157.DOI
  4. [4]R. Dennis Cook and Sanford Weisberg. Residuals and Influence in Regression. Chapman and Hall, New York, 1982.
  5. [5]Jerome H. Friedman. Multivariate adaptive regression splines. The Annals of Statistics, 19(1):1–67, 1991. doi: 10.1214/aos/1176347963.DOI
  6. [6]Paul Geertsema and Helen Lu. AXIL: Exact instance attribution for gradient boosting. arXiv preprint arXiv:2301.01864, 2026. doi: 10.48550/arXiv.2301.01864.DOI
  7. [7]Xiuwen Gong, Dong Yuan, and Wei Bao. Partial label learning via label influence function. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of PMLR, pp. 7665–7678, 2022.
  8. [8]Frank R. Hampel. The influence curve and its role in robust estimation. Journal of the American Statistical Association, 69(346):383–393, 1974. doi: 10.1080/01621459.1974.10482962.DOI
  9. [9]Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. Springer Series in Statistics. Springer, 2 edition, 2009. doi: 10.1007/978-0-387-84858-7.DOI
  10. [10]David C. Hoaglin and Roy E. Welsch. The hat matrix in regression and ANOVA. The American Statistician, 32(1):17–22, 1978. doi: 10.1080/00031305.1978.10479237.DOI
  11. [11]Andrew Ilyas, Sung Min Park, Logan Engstrom, Guillaume Leclerc, and Aleksander Madry. Datamodels: Understanding predictions with data and data with predictions. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of PMLR, pp. 9525–9587, 2022.
  12. [12]Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of PMLR, pp. 1885–1894, 2017.arxiv.org/abs/1703.04730
  13. [13]Shuming Kong, Yanyan Shen, and Linpeng Huang. Resolving training biases via influence-based data relabeling. In International Conference on Learning Representations, 2022.
  14. [14]Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. doi: 10.1109/5.726791.
  15. [15]Jacob Mincer and Victor Zarnowitz. The evaluation of economic forecasts. In Jacob Mincer (ed.), Economic Forecasts and Expectations: Analysis of Forecasting Behavior and Performance, pp. 3–46. National Bureau of Economic Research, 1969. URL https://www.nber.org/system/files/chapters/c1214/c1214.pdf.
  16. [16]R. Kelley Pace and Ronald Barry. Sparse spatial autoregressions. Statistics & Probability Letters, 33(3):291–297, 1997. doi: 10.1016/S0167-7152(96)00140-X.DOI
  17. [17]Sung Min Park, Kristian Georgiev, Andrew Ilyas, Guillaume Leclerc, and Aleksander Madry. TRAK: Attributing model behavior at scale. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of PMLR, pp. 27074–27113, 2023.arxiv.org/abs/2303.14186
  18. [18]Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.arxiv.org/abs/1201.0490
  19. [19]Daryl Pregibon. Logistic regression diagnostics. The Annals of Statistics, 9(4):705–724, 1981. doi: 10.1214/aos/1176345513.DOI
  20. [20]Garima Pruthi, Frederick Liu, Satyen Kale, and Mukund Sundararajan. Estimating training data influence by tracing gradient descent. In Advances in Neural Information Processing Systems, volume 33, pp. 19920–19930, 2020.
  21. [21]Brianna Richardson, Prasanna Sattigeri, Dennis Wei, Karthikeyan Natesan Ramamurthy, Kush R. Varshney, Amit Dhurandhar, and Juan E. Gilbert. Add-remove-or-relabel: Practitioner-friendly bias mitigation via influential fairness. In Proceedings of the 2023 ACM Conference on Fairness, Accountability, and Transparency, pp. 736–752, 2023. doi: 10.1145/3593013.3594039.DOI
  22. [22]Craig Saunders, Alexander Gammerman, and Volodya Vovk. Ridge regression learning algorithm in dual variables. In Proceedings of the Fifteenth International Conference on Machine Learning, pp. 515–521. Morgan Kaufmann, 1998. URL https://dl.acm.org/doi/10.5555/645527.657464.
  23. [23]Roy T. St. Laurent and R. Dennis Cook. Leverage and superleverage in nonlinear regression. Journal of the American Statistical Association, 87(420):985–990, 1992. doi: 10.1080/01621459.1992.10476253.DOI
  24. [24]Roy T. St. Laurent and R. Dennis Cook. Leverage, local influence and curvature in nonlinear regression. Biometrika, 80(1):99–106, 1993. doi: 10.1093/biomet/80.1.99.DOI
  25. [25]Alexander Warnecke, Lukas Pirch, Christian Wressnegger, and Konrad Rieck. Machine unlearning of features and labels. In Network and Distributed System Security Symposium (NDSS), 2023. doi: 10.14722/ndss.2023.23087.
  26. [26]Bo-Cheng Wei, Yue-Qing Hu, and Wing-Kam Fung. Generalized leverage and its applications. Scandinavian Journal of Statistics, 25(1):25–37, 1998. doi: 10.1111/1467-9469.00086.DOI
  27. [27]Chih-Kuan Yeh, Joon Kim, Ian En-Hsu Yen, and Pradeep K Ravikumar. Representer point selection for explaining deep neural networks. In Advances in Neural Information Processing Systems, volume 31, 2018.arxiv.org/abs/1811.09720
  28. [28]Jieyu Zhang, Haonan Wang, Cheng-Yu Hsieh, and Alexander Ratner. Understanding programmatic weak supervision via source-aware influence function. In Advances in Neural Information Processing Systems, volume 35, pp. 2862–2875, 2022.arxiv.org/abs/2205.12879

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type