Source-linked AI summary
On the Accuracy of Influence Functions for Measuring Group Effects
Pang Wei Koh, Kai-Siang Ang, Hubert H. K. Teo, Percy Liang
TL;DR
The paper asks whether influence functions remain useful for measuring the effects of large training-data groups, where first-order approximations may incur large errors. It empirically compares predicted and actual group effects and analyzes when their relationship holds. Across datasets and group types, effects correlate strongly despite underestimation, but the theory shows this behavior is not general.
Problem
Influence functions are designed for small perturbations, but practitioners also need to assess large groups of data whose removal can substantially change a model.
Method
The paper empirically compares influence-based predictions with retrained effects for groups and theoretically characterizes their relationship using a one-step Newton approximation.
Results
Across datasets, group types, and sizes, predicted effects correlate highly with actual effects and consistently tend to underestimate them, even when absolute and relative errors are large.
Takeaways & Limitations
Influence functions can still provide useful information about the relative effects of large coherent groups, including labeling functions and crowdworkers.
Takeaways & Limitations
Theoretical analysis shows that correlation and underestimation hold only in restricted settings and need not hold in general realistic settings.
Abstract
from arXiv · showhide
Influence functions estimate the effect of removing a training point on a model without the need to retrain. They are based on a first-order Taylor approximation that is guaranteed to be accurate for sufficiently small changes to the model, and so are commonly used to study the effect of individual points in large datasets. However, we often want to study the effects of large groups of training points, e.g., to diagnose batch effects or apportion credit between different data sources. Removing such large groups can result in significant changes to the model. Are influence functions still accurate in this setting? In this paper, we find that across many different types of groups and for a range of real-world datasets, the predicted effect (using influence functions) of a group correlates surprisingly well with its actual effect, even if the absolute and relative errors are large. Our theoretical analysis shows that such strong correlation arises only under certain settings and need not hold in general, indicating that real-world datasets have particular properties that allow the influence approximation to be accurate.
1 Introduction
Influence functions avoid retraining but are theoretically suited to small perturbations, raising questions about their accuracy for large, coherent groups. Empirically, group influences correlate strongly with actual effects despite potentially large errors, while theory shows this pattern is conditional.
- Influence functions estimate the effect of removing individual training points without retraining, supporting applications from prediction explanation to bias investigation.They have also been used for confidence intervals, human trust, and data poisoning attacks.
- Large, coherent groups create substantial data perturbations beyond the regime where first-order influence approximations are guaranteed accurate.Motivating examples include experimental batches, demographic groups, crowdworkers, and users in multi-party learning.
- Spearman ρ of 0.8 to 1.0: predicted and actual effects of groups are strongly correlated across real datasets and group types.Groups with the largest actual effects tend also to have the largest predicted effects.
- Influence functions can remain useful for large groups despite high absolute and relative prediction errors.The predicted effect tends to underestimate the actual effect.
- Theoretical analysis finds correlation and underestimation in certain settings, but not in general, leaving the empirical phenomenon tied to properties of real datasets.The paper characterizes group effects using a one-step Newton approximation and applies the relationship in CDR and NLI case studies.
- In the CDR case study, labeling-function influence correlates with the number of examples labeled but not average accuracy.The result suggests focusing on labeling-function coverage in that application.
2 Background and problem setup
The paper formulates group removal as retraining a regularized model after changing binary sample weights, then compares the resulting actual effect with an influence-based first-order approximation. It evaluates prediction, test-loss, and self-loss changes.
- The setup trains a twice-differentiable, convex model by minimizing L2-regularized empirical risk with uniform initial sample weights.The regularization parameter satisfies λ > 0.
- A removed group W is represented by binary sample weights w, with ||w||1 points removed and fraction α = ||w||1/n.Retraining on 1 − w gives the modified model parameters.
- The evaluation function f measures changes in test prediction, test loss, or self-loss on removed points.Average self-loss over subsets of a fixed size corresponds to the extra loss estimated by leave-||w||1-out cross-validation.
- Influence approximates the actual effect by removing an infinitesimal weight from each group member and linearly extrapolating to remove the whole group.For test prediction and test loss, group influence is additive across constituent points and can be computed efficiently from individual influences.
- The central challenge is that computing actual effects requires prohibitively expensive retraining for every subset.Prior accuracy work primarily studied single-point removal or small perturbations, whereas constant-fraction removal can produce large errors.
3 Empirical accuracy of influence functions on constructed groups
Experiments construct coherent groups from 0.25% to 25% of five datasets and compare influence estimates with retrained effects. Across prediction, test loss, and self-loss, rankings correlate strongly, although influence often underestimates effects and has large errors.
- Experimental design: Removing a constant fraction of data is a large perturbation, whereas random subset removal may leave model parameters close to their original values.The study instead targets coherent, non-random groups that can substantially change the model.
- Experimental design: Groups range from α = 0.25% to α = 25% and are constructed using shared features, feature or gradient clusters, class-based random sampling, or extreme influence.The models are L2-regularized logistic regression, or softmax regression for multiclass tasks.
- Results: Spearman ρ of 0.89 to 0.99: influences and actual effects are highly correlated across test prediction, test loss, and self-loss.The relationship persists across a wide range of regularization values, with correlation increasing with λ.
- Results: Influence tends to underestimate actual group effects, despite potentially large absolute and relative errors.The main exception is groups with negative influence on test loss; underestimation there is tied to positive actual effects.
- Datasets: The experiments use five datasets spanning applications, training-set sizes, and feature counts, while MultiNLI is reserved for later analysis because repeated retraining is too expensive.The first four datasets cover hospital readmission, spam classification, and object recognition.
4 Theoretical analysis
The analysis separates Newton-approximation error from influence–Newton discrepancy, showing that correlation and underestimation can hold in restricted settings but fail for general test predictions.
- 4.2 Characterizing the difference between the Newton approximation and influence: The cone constraint places actual group effects approximately between influence and Cmax times influence, implying underestimation and some correlation.The constraint holds in restricted settings, including self-loss and removing multiple copies of one point, with Cmax varying inversely with regularization.
- 4.1 Bounding the error of the one-step Newton approximation: The Newton approximation is accurate when regularization is large or the loss has small third derivatives, and its error is empirically small on most datasets.The bound decays as O(1/(σmin + λ)^3), while the Newton error is zero for quadratic losses.
- 4 Theoretical analysis: Increasing regularization reduces approximation error and increases correlation, whereas small λ/σmax permits wide cones and does not guarantee correlation.The experiments nevertheless show tighter empirical curves than the theoretical cones predict.
- 4.3 The relationship between influence and actual effect on self-loss: For self-loss, influence underestimates the Newton approximation and therefore the actual effect up to O(1/λ^3) terms.The resulting cone narrows as λ grows, because the error terms decay at O(1/λ^3).
- 4.4 The relationship between influence and actual effect on a test point: For test predictions, no general cone constraint applies: influence can be zero while the Newton approximation is large, and the two can even have opposite signs.Thus, low influence need not indicate a low Newton approximation or actual effect.
- 4.4 The relationship between influence and actual effect on a test point: When removing copies of a single point in a margin-based model, a restricted cone constraint returns, but its scaling can vary across groups and weaken correlation.The scaling factor can become large when few remaining points lie in the direction of the removed points.
5 Applications of influence functions on natural groups of data
The case studies apply influence functions to naturally defined groups from labeling functions and crowdworkers. Group influence tracks actual effects well, while coverage—not precision—predicts labeling-function influence and crowdworker example counts do not predict influence.
- Chemical-disease relation (CDR): Influence functions correlated with actual effects on CDR test loss for labeling-function groups.The reported Spearman correlation was ρ = 1.
- Chemical-disease relation (CDR): Higher labeling-function coverage predicted greater influence, whereas higher precision did not.Coverage is the fraction of unlabeled points labeled; precision is the proportion of correct output labels.
- MultiNLI: Crowdworker influence correlated with actual MultiNLI effects across genres, with Spearman ρ of 0.77 to 0.86.The analysis used influence on overall test loss.
- MultiNLI: The most prolific MultiNLI crowdworker contributed 35,000 examples but had negative influence on test performance.Retraining after removing those examples verified that overall test performance became worse.
- MultiNLI: Crowdworkers could improve performance on some genres while lowering it on others, independently of the number of examples contributed per genre.These results used a baseline logistic regression model with continuous bag-of-words features.
6 Discussion
The paper concludes that group influences consistently underestimate actual effects while correlating strongly across datasets, group types, and sizes. It also identifies theoretical limits and future questions about the role of data, models, and low-order approximations.
- Discussion: Group influences were highly correlated with and consistently underestimated actual effects across datasets, group types, and group sizes.The paper uses these patterns to analyze how different parts of the data affect models.
- Discussion: Influence functions provided insight into the effects of labeling functions and crowdworkers through their corresponding group effects.The discussion frames these applications as ways to understand different stories told by different parts of the data.
- Discussion: Influence functions could potentially discover coherent semantically relevant groups and approximate Shapley values or effects of adding training points.For added groups, the paper states that influence tends to overestimate actual effects.
- Discussion: The theoretical analysis shows that correlation and underestimation hold only in restricted settings, not generally in realistic settings.The paper highlights the gap between this theory and stronger correlations observed empirically.
- Discussion: The experiments and discussion leave open whether the observed trends depend on specific models, datasets, or subsets and extend to neural networks.The paper also notes that Newton approximation was more accurate than influence for predicting group effects.
A.1 Model training
The experiments train regularized logistic models, construct groups across varied sizes and selection strategies, and compare influence estimates with effects measured by retraining. The design includes ordinary, structured, and test-point-targeted groups.
- A.1 Model training: Experiments trained logistic regression or softmax models with an intercept and L2 regularization on weights.Regularization strength was selected by 5-fold cross-validation over 10 logarithmically spaced values.
- A.1 Model training: Groups were constructed at 100 sizes linearly spaced from 0.25% to 25% of each dataset.The protocol varied group size relative to the full dataset.
- A.1 Model training: Selection methods included shared features, feature clustering, gradient clustering, random within class, and random groups.The clustering variants used raw features or per-point loss gradients.
- A.1 Model training: The study targeted both average and difficult cases using three random test points and three highest-loss test points.For each test point, groups were selected for large positive influence on test loss across multiple size ranges.
- A.1 Model training: The multistage construction controlled confounding between group size and average influence.It selected small groups with both high and low average influence for comparison with larger groups.
- A.1 Model training: Actual effects were computed by retraining once per group, while group influence was obtained by summing individual training-point influences.The evaluation included changes in test prediction, test loss, and self-loss.
B Dataset details
The dataset details cover four prior benchmark datasets plus CDR and MultiNLI, with distinct preprocessing and modeling choices for the natural-group case studies. MultiNLI uses the development set as test data because test labels were unavailable.
- Dataset details: The experiments reused Diabetes, Enron, Dogfish, and MNIST versions from Koh and Liang and added CDR and MultiNLI.MultiNLI was omitted from repeated-retraining experiments because its size made actual-effect computation too expensive.
- CDR: CDR is a chemical-disease relation task collected through labeling functions generated from natural-language explanations.The task predicts whether a chemical causes a disease according to a sentence.
- CDR: For CDR, the study replaced label aggregation with weighted copies of examples labeled by each LF.Each copy received weight 1/k when k LFs labeled the example, and this weighting entered training and influence calculations.
- CDR: CDR preprocessing used L1 regularization for feature selection, retained 328 features, then trained an L2-regularized logistic regression model.The resulting F1 score was 42.0 versus the reported 42.3 from Hancock et al. (2018).
- MultiNLI: MultiNLI asks whether sentence pairs agree, contradict, or are neutral and was created by crowdworkers generating follow-on sentences.Its training set contained 392,702 examples from five genres.
- MultiNLI: The development set served as the test set because labels for the Kaggle test set were unavailable.The development data included matched and mismatched genre examples.
- MultiNLI: The MultiNLI application used concatenated sentence representations with logistic regression, achieving 50.4% test accuracy versus 64.7% for the original baseline.The paper attributes the difference to omitted representation dimensions and neural-network fine-tuning.
C.2 Regularization
Across datasets and evaluation functions, stronger regularization generally improves agreement between influence predictions and actual effects, while curvature and computational constraints shape accuracy.
- Regularization trends: Influence remains well-correlated with actual effects on average test points near the median of the test-loss distribution.The evaluation uses test points between the 40th and 60th loss percentiles.
- Experimental scope: Regularization experiments omitted CDR and MultiNLI and used a random 10% subset of MNIST because retraining was required for every λ and subset.
- Regularization trends: Correlation generally increases as regularization strength λ increases across test prediction, test loss, and self-loss.This trend was measured with Spearman ρ across Diabetes, Enron, Dogfish, and MNIST (small).
- Approximation accuracy: Curvature of the evaluation function can substantially increase approximation error, so low-curvature functions such as linear prediction are more accurate.
- Approximation accuracy: Approximating parameters first and then evaluating the function can mitigate curvature error, but it is more computationally expensive and helps little for self-loss.For self-loss, the Newton approximation is recommended because it is similarly complex and more accurate for leave-one-out cross-validation.
C.4 Additional analysis of influence functions applied to natural groups of data
Natural groups such as labeling functions and crowdworkers show strong influence–effect agreement, but their influence depends on group behavior and genre interactions rather than size or precision alone.
- Labeling functions: Influence is a good approximation of labeling-function effects, but positive and negative labeling functions affect positive and negative test sets in opposite directions.Analyzing the two test subsets separately prevents cancellation from obscuring this dichotomous behavior.
- Labeling functions: The magnitude of labeling-function influence correlates strongly with coverage but not with precision.Coverage is the proportion of examples on which a labeling function does not abstain; precision is its correctness among non-abstentions.
- Crowdworkers: Crowdworker influence correlates strongly with actual effects on both matched and mismatched MultiNLI test sets.The influence and actual effect refer to the examples generated by each individual crowdworker.
- Crowdworkers: Crowdworker influence does not correlate strongly with the number of contributed examples, so many examples can yield relatively little influence.
- Crowdworkers: Workers tended to help fiction, facetoface, and nineeleven while hurting travel, government, verbatim, letters, and oup, or vice versa.This genre-specific pattern held broadly despite workers contributing roughly equally across genres.
D Additional analysis on influence vs. actual effect on a test point
The appendix constructs counterexamples showing that influence and actual effects need not remain aligned, while identifying scaling, rotation, curvature, and regularization-related mechanisms behind such behavior.
- Rotation effect: The MoG construction selects point pairs with large angular differences between influence-predicted and Newton parameter changes, then chooses a test point making their effects approximately decorrelated.The construction uses two identity-covariance Gaussian classes in R60 with 120 training points and λ = 0.001.
- Counterexamples: Adversarially chosen subsets provide a counterexample in which the cone constraint does not hold.
- Scaling effect: The Ortho dataset uses repeated opposite-class points on two orthogonal axes to control influence and the scaling factor d(w) independently.Varying distances from the origin controls single-point influence and how d(w) grows as repeated copies are removed.
- Theoretical mechanism: For general subsets, variation in the error matrix D(w) can produce failure when the removed subset’s Hessian is nearly as large as the full Hessian in some direction.
- Evaluation functions: In margin-based models, test loss is a monotone function of the linear prediction, so both measurements have the same rank correlation.
- Theoretical mechanism: Under small higher-order errors, the second-order curvature term implies underestimation is preserved only when influence is positive.The curvature term is non-negative even when influence is negative.
E.3 Bounding the error of the one-step Newton approximation
The theoretical analysis decomposes influence error into Newton-approximation and evaluation-function curvature terms, with regularization and higher-order smoothness controlling the resulting bounds.
- Newton approximation: The Newton error depends only on third-order or higher derivatives of the loss and is zero for quadratic losses.
- Newton approximation: The Newton step is expressed using first and second derivatives of the empirical risk at the original optimum.
- Error decomposition: The error matrix D(w) has singular values bounded between 0 and σmax/(σmax + λ).
- Error decomposition: The Newton-influence error combines a second-order curvature term for f with a residual term from third-order derivatives of f.
- Special cases: For repeated copies of one training point in a margin-based binary classifier, the Newton approximation is related to influence through a scaling effect determined by the repeated subset.