UNDERSTANDING INFLUENCE FUNCTIONS AND DATA-MODELS VIA HARMONIC ANALYSIS

Abstract

Influence functions estimate effect of individual data points on predictions of the model on test data and were adapted to deep learning in Koh & Liang (2017). They have been used for detecting data poisoning, detecting helpful and harmful examples, influence of groups of datapoints, etc. Recently, Ilyas et al. ( 2022) introduced a linear regression method they termed datamodels to predict the effect of training points on outputs on test data. The current paper seeks to provide a better theoretical understanding of such interesting empirical phenomena. The primary tool is harmonic analysis and the idea of noise stability. Contributions include: (a) Exact characterization of the learnt datamodel in terms of Fourier coefficients. (b) An efficient method to estimate the residual error and quality of the optimum linear datamodel without having to train the datamodel. (c) New insights into when influences of groups of datapoints may or may not add up linearly.

1. INTRODUCTION

It is often of great interest to quantify how the presence or absence of a particular training data point affects the trained model's performance on test data points. Influence functions is a classical idea for this (Jaeckel, 1972; Hampel, 1974; Cook, 1977) that has recently been adapted to modern deep models and large datasets Koh & Liang (2017) . Influence functions have been applied to explain predictions and produce confidence intervals (Schulam & Saria, 2019) , investigate model bias (Brunet et al., 2019; Wang et al., 2019) , estimate Shapley values (Jia et al., 2019; Ghorbani & Zou, 2019) , improve human trust (Zhou et al., 2019) , and craft data poisoning attacks (Koh et al., 2019) . Influence actually has different formalizations. The classic calculus-based estimate (henceforth referred to as continuous influence) involves conceptualizing training loss as a weighted sum over training datapoints, where the weighting of a particular datapoint z can be varied infinitesimally. Using gradient and Hessian one obtains an expression for the rate of change in test error (or other functions) of z ′ with respect to (infinitesimal) changes to weighting of z. Though the estimate is derived only for infinitesimal change to the weighting of z in the training set, in practice it has been employed also as a reasonable estimate for the discrete notion of influence, which is the effect of completely adding/removing the data point from the training dataset (Koh & Liang, 2017). Informally speaking, this discrete influence is defined as f (S ∪ {i})f (S) where f is some function of the test points, S is a training dataset and i is the index of a training point. (This can be noisy, so several papers use expected influence of i by taking the expectation over random choice of S of a certain size; see Section 2.) Koh & Liang (2017) as well as subsequent papers have used continuous influence to estimate the effect of decidedly non-infinitesimal changes to the dataset, such as changing the training set by adding or deleting entire groups of datapoints (Koh et al., 2019) . Recently Bae et al. (2022) show mathematical reasons why this is not well-founded, and give a clearer explanation (and alternative implementation) of Koh-Liang style estimators. Yet another idea related to influence functions is linear datamodels in Ilyas et al. (2022) . By training many models on subsets of p fraction of datapoints in the training set, the authors show that some interesting measures of test error (defined using logit values) behave as follows: the measure f (x) is well-approximable as a (sparse) linear expression θ 0 + i θ i x i , where x is a binary vector denoting a sample of p fraction of training datapoints, with x i = 1 indicating presence of i-th training point and x i = -1 denoting absence. The coefficients θ i are estimated via lasso

