The Discriminative Jackknife: Quantifying Uncertainty in Deep Learning via Higher-Order Influence Functions

1 INTRODUCTION . Deep learning models have achieved state-of-the-art performance on a variety of supervised learning tasks , and are becoming increasingly popular in various application domains ( LeCun et al . ( 2015 ) ) . A key question often asked of such models is “ Can we trust this particular model prediction ? ” This question is highly relevant in high-stakes applications where the model is used to guide and inform critical decision-making — examples of such applications include : medical decision support , autonomous vehicle control , and financial forecasting ( Amodei et al . ( 2016 ) ) . Despite their impressive predictive accuracy , rigorously quantifying the predictive uncertainty of deep learning models is a challenging and yet an unresolved problem ( Gal ( 2016 ) ; Ovadia et al . ( 2019 ) ) . Actionable estimates of predictive uncertainty are ones that ( 1 ) cover the true prediction target with high probability , and ( 2 ) discriminate between high- and low-confidence predictions . ( Figure 1 depicts a pictorial visualization for the coverage and discrimination requirements . ) The first requirement , frequentist coverage , is especially relevant in applications where predictive uncertainty is incorporated in a decision-theoretic framework ( e.g. , administering medical treatments ( Dusenberry et al . ( 2019 ) ) , or estimating value functions in model-free reinforcement learning ( White & White ( 2010 ) ) ) . The second requirement , discrimination , is crucial for auditing model reliability ( Schulam & Saria ( 2019 ) ) , detecting dataset shifts and out-of-distribution samples ( Barber et al . ( 2019a ) ) , and actively collecting new training examples for which the model is not confident ( Cohn et al . ( 1996 ) ) . Existing methods for uncertainty quantification are based predominantly on Bayesian neural networks ( BNNs ) , whereby predictive uncertainty is evaluated via posterior credible intervals ( Welling & Teh ( 2011 ) ; Hernández-Lobato & Adams ( 2015 ) ; Ritter et al . ( 2018 ) ; Maddox et al . ( 2019 ) ) . However , BNNs require significant modifications to the training procedure , and exact Bayesian inference is computationally prohibitive in practice . Approximate dropout-based inference schemes ( e.g. , Monte Carlo dropout ( Gal & Ghahramani ( 2016 ) ) and variational dropout ( Kingma et al . ( 2015 ) ) ) have been recently proposed as computationally efficient alternatives . However , Bayesian inference in dropout-based models has been shown to be ill-posed , since the induced posterior distributions in such models do not concentrate asymptotically ( Osband ( 2016 ) ; Hron et al . ( 2017 ) ) , which jeopardizes both the coverage and discrimination performance of the resulting credible intervals . Moreover , even with exact inference , Bayesian credible intervals generally do not guarantee frequentist coverage ( Bayarri & Berger ( 2004 ) ) . Alternative non-Bayesian methods have been recently developed — mostly based on ad-hoc ensemble approaches ( Lakshminarayanan et al . ( 2017 ) ) — but formal frequentist methods with rigorous theoretical guarantees are still lacking . Summary of Contributions . In this paper , we develop a formal procedure for constructing frequentist ( pointwise ) confidence intervals on the predictions of a broad class of deep learning models . Our method — which we call the discriminative jackknife ( DJ ) — is inspired by the classic jackknife leave-one-out ( LOO ) re-sampling procedure for estimating variability in statistical models ( Miller ( 1974 ) ; Efron ( 1992 ) ) . In order to ensure both frequentist coverage and discrimination , DJ constructs feature-dependent confidence intervals using the LOO local prediction variance at the input feature , and adjusts the interval width ( for a given coverage probability ) using the model ’ s average LOO error residuals . Whereas the classic jackknife satisfies neither the coverage nor the discrimination requirements ( Barber et al . ( 2019b ) ) , DJ provides strong theoretical guarantees on both ( i.e. , DJ generates confidence intervals resembling those in the rightmost panel of Figure 1 with high probability ) . Central to the DJ procedure is the usage of influence functions — a key concept in robust statistics and variational calculus ( Efron ( 1992 ) ; Cook & Weisberg ( 1982 ) ; Hampel et al . ( 2011 ) ) — in order to estimate the parameters of models trained on LOO versions of the training data , without the need to exhaustively re-train the model for each held-out data point . That is , using the von Mises expansion ( Fernholz ( 2012 ) ) — a variant of Taylor series expansion for statistical functionals — we represent the ( counter-factual ) model parameters that would have been learned on LOO versions of the training dataset in terms of an infinite series of higher-order influence functions ( HOIFs ) for the model parameters trained on the complete dataset . We show that a truncated von Mises expansion ( with a finite number of HOIFs ) is sufficient to preserve the guarantees on coverage and discrimination . To enable efficient computation of the von Mises expansion , we derive a recursive formula that links HOIFs with lower-order influence functions and the partial derivatives of the model loss function . Comprehensive experimental evaluation demonstrates that the DJ procedure performs competitively compared to both Bayesian and non-Bayesian methods . In particular , we found that the DJ procedure outperforms Bayesian neural networks with respect to discriminative performance , and provides better frequentist coverage compared to existing non-Bayesian methods , while being significantly less computationally expensive than both classes of methods . 2 PRELIMINARIES . Learning Setup . We consider a standard supervised learning setup with ( x , y ) being a feature-label pair , where the feature x belongs to a d-dimensional feature space X ⊆ Rd , and y ∈ R. A model is trained to predict y using a dataset D , { ( xi , yi ) } ni=1 of n training examples which are drawn i.i.d from an unknown distribution P. Let the learning model be denoted as f ( x ; θ ) : X → Y , where θ ∈ Θ are the model parameters , and Θ is the parameter space . The learned model parameters θ̂ ∈ Θ are obtained by solving the optimization problem θ̂ = arg minθ∈Θ L ( D , θ ) , with a loss function L ( D , θ ) , 1n ∑n i=1 ` ( yi , f ( xi ; θ ) ) , ( 1 ) where we fold in any regularization terms into ` ( . ) . We do not pose any assumptions on how the loss function in ( 1 ) is optimized . The model f ( x ; θ ) can be any neural network variant ( e.g. , feed-forward , convolutional , etc ) . Throughout the paper , we limit our discussion to the regression task ; extending our framework to classification tasks is an interesting direction for future work . Uncertainty Quantification . The predictions issued by the trained model ( with learned parameters θ̂ ) are given by f ( x ; θ̂ ) . Our main goal is to obtain estimates for the uncertainty in the model predictions , expressed through a pointwise confidence interval C ( x ; θ̂ ) defined as follows : C ( x ; θ̂ ) , [ fL ( x ; θ̂ ) , fU ( x ; θ̂ ) ] , fL ( x ; θ̂ ) < f ( x ; θ̂ ) < fU ( x ; θ̂ ) , ∀x ∈ X . ( 2 ) The extent of uncertainty in the model ’ s prediction ( for a data point with feature x ) is quantified by the interval widthW ( . ) of C ( x ; θ̂ ) , defined asW ( C ( x ; θ̂ ) ) , fU ( x ; θ̂ ) −fL ( x ; θ̂ ) . Wider intervals imply less confidence , and vice versa . For C ( x ; θ̂ ) to be usable , it has to satisfy the following requirements : ( i ) Frequentist coverage : The confidence interval C ( x ; θ̂ ) covers the true prediction target with an arbitrarily prespecified coverage probability of ( 1− α ) , α ∈ ( 0 , 1 ) , i.e. , P { y ∈ C ( x ; θ̂ ) } ≥ 1− α , where the probability is taken with respect to a ( new ) test point ( x , y ) as well as with respect to the training data D ( Lawless & Fredette ( 2005 ) ; Barber et al . ( 2019b ) ) . ( ii ) Discrimination : The confidence interval C ( x ; θ̂ ) is wider ( on average ) for test points with less accurate predictions ( Leonard et al . ( 1992 ) ) , i.e. , for the test points x , x′ ∈ X , we have E [ W ( C ( x ; θ̂ ) ) ] ≥ E [ W ( C ( x′ ; θ̂ ) ) ] ⇔ E [ ` ( y , f ( x ; θ̂ ) ) ] ≥ E [ ` ( y′ , f ( x′ ; θ̂ ) ) ] , where the expectation E [ . ] is taken with respect to the training data D. In the next Section , we develop a formal post-hoc procedure that takes the dataset D and the trained model f ( x ; θ̂ ) as inputs , and evaluates an uncertainty estimate Ĉ ( x ; θ̂ ) that satisfies both requirements . 3 THE DISCRIMINATIVE JACKKNIFE . Before presenting our proposed discriminative jackknife ( DJ ) procedure , we start with a brief recap of the classical jackknife . The jackknife quantifies predictive uncertainty in terms of the ( average ) prediction error , which is estimated with a leave-one-out ( LOO ) construction found by systematically leaving out each data point from the training dataset D , and evaluating the error of the re-trained model on the held-out sample . That is , for a target coverage of ( 1− α ) , a naïve jackknife estimates the uncertainty in the prediction for a test point x as ( Miller ( 1974 ) ; Efron ( 1992 ) ) : Ĉα , n ( x ; θ̂ ) = f ( x ; θ̂ ) ± Q̂α , n ( R ) , R = { r1 , . . . , rn } , ( 3 ) where ri = | yi − f ( xi ; θ̂−i ) | is the error residual on the ith data point , θ̂−i are the parameters of the model re-trained on the dataset D \ { ( xi , yi ) } with the ith point removed , and Q̂α , n is the ( 1− α ) quantile for the empirical distribution of elements of the setR = { r1 , . . . , rn } defined as1 Q̂α , n ( R ) , the d ( 1− α ) ( n+ 1 ) e-th smallest value of the elements ofR . 1Note that , from the definition of Q̂α , n , it follows that Q̂α , n ( R ) = Q̂1−α , n ( −R ) . Albeit intuitive , the naïve jackknife estimate in ( 3 ) is not guaranteed to achieve the target coverage of ( 1− α ) ( Barber et al . ( 2019b ) ) . More crucially , the interval width W ( Ĉα , n ( x ; θ̂ ) ) is a constant that does not depend on the feature x , which renders discrimination impossible , i.e. , when applied , the naïve jackknife would result in confidence intervals resembling the leftmost panel in Figure 1 .

Summary: In this work, the authors develop the discriminative jackknife (DJ), which is a novel way to compute estimates of predictive uncertainty. This is an important open question in machine learning and the authors have made a substantial contribution towards answering the question of "can you trust a model?" DJ constructs frequentist confidence intervals via a posthoc procedure. Throughout, the authors provide excellent background and exposition. They develop an exact construction of the DJ confidence intervals in Section 3.1. This is an intuitive approach that the authors explain well. Next, they explain and then develop the concept of higher order influence functions. They do a great job of communicating this concept. Section 3.4 provides the theoretical guarantees for DJ. The related work section is extensive and thorough. The authors have thoughtful experiments that demonstrate positive attributes of DJ.