Deep Evidential Uncertainty

1 INTRODUCTION Recent advances in deep supervised learning have yielded super human level performance and precision . While these models empirically generalize well when placed into new test enviornments , they are often easily fooled by adversarial perturbations ( Goodfellow et al. , 2014 ) , and have difficulty understanding when their predictions should not be trusted . Today , regression based neural networks ( NNs ) are being deployed in safety critical domains of computer vision ( Godard et al. , 2017 ) as well as in robotics and control ( Bojarski et al. , 2016 ) where the ability to infer model uncertainty is crucial for eventual wide-scale adoption . Furthermore , precise uncertainty estimates are useful both for human interpretation of confidence and anomaly detection , and also for propagating these estimates to other autonomous components of a larger , connected system . Existing approaches to uncertainty estimation are roughly split into two categories : ( 1 ) learning aleatoric uncertainty ( uncertainty in the data ) and ( 2 ) epistemic uncertainty ( uncertainty in the prediction ) . While representations for aleatoric uncertainty can be learned directly from data , approaches for estimating epistemic uncertainty focus on placing probabilistic priors over the weights and sampling to obtain a measure of variance . In practice , many challenges arise with this approach , such as the computational expense of sampling during inference , how to pick an appropriate weight prior , or even how to learn such a representation given your prior . Instead , we formulate learning as an evidence acquisition process , where the model can acquire evidence during training in support of its prediction ( Sensoy et al. , 2018 ; Malinin & Gales , 2018 ) . Every training example adds support to a learned higher-order , evidential distribution . Sampling from this distribution yields instances of lower-order , likelihood functions from which the data was drawn ( cf . Fig . 1 ) . We demonstrate that , by placing priors over our likelihood function , we can learn a grounded representation of epistemic and aleatoric uncertainty without sampling during inference . In summary , this work makes the following contributions : 1 . A novel and scalable method for learning representations of epistemic and aleatoric uncertainty , specifically on regression problems , by placing evidential priors over the likelihood ; 2 . Formulation of a novel evidential regularizer for continuous regression problems , which we show is necessary for expressing lack of a evidence on out-of-distribution examples ; 3 . Evaluation of learned epistemic uncertainty on benchmark regression tasks and comparison against other state-of-the-art uncertainty estimation techniques for neural networks ; and 4 . Robustness evaluation against out of distribution and adversarially perturbed test data . 2 MODELLING UNCERTAINTIES FROM DATA . 2.1 PRELIMINARIES . Consider the following supervised optimization problem : given a dataset , D , of N paired training examples , ( x1 , y1 ) , . . . , ( xN , yN ) , we aim to learn a function f , parameterized by a set of weights , w , which approximately solves the following optimization problem : min w J ( w ) ; J ( w ) = 1 N N∑ i=1 Li ( w ) , ( 1 ) where Li ( · ) describes a loss function . In this work , we consider deterministic regression problems , which commonly optimize the sum of squared errors , Li ( w ) = 12 ‖yi − f ( xi ; w ) ‖ 2 . In doing so , the model is encouraged to learn the average correct answer for a given input , but does not explicitly model any underlying noise or uncertainty in the data when making its estimation . 2.2 MAXIMUM LIKELIHOOD ESTIMATION . We can also approach our optimization problem from a maximum likelihood perspective , where we learn model parameters that maximize the likelihood of observing a particular set of training data . In the context of deterministic regression , we assume our targets , yi , were drawn i.i.d . from a Gaussian distribution with mean and variance parameters θ = ( µ , σ2 ) . In maximum likelihood estimation , we aim to learn a model to infer θ = ( µ , σ2 ) that maximize the likelihood of observing our targets , y , given by p ( yi|θ ) . In practice , we minimize the negative log likelihood by setting : Li ( w ) = − log p ( yi|µ , σ2︸ ︷︷ ︸ θ ) = 1 2 log ( 2πσ2 ) + ( yi − µ ) 2 2σ2 . ( 2 ) In learning the parameters θ , this likelihood function allows us to successfully model the uncertainty of our data , also known as the aleatoric uncertainty . However , our model remains oblivious to the predictive model or epistemic uncertainty ( Kendall & Gal , 2017 ) . In this paper , we present a novel approach for estimating the evidence in support of network predictions by directly learning both the inferred aleatoric uncertainty as well as the underlying epistemic uncertainty over its predictions . We achieve this by placing higher-order prior distributions over the learned parameters governing the distribution from which our observations are drawn . 3 EVIDENTIAL UNCERTAINTY FOR REGRESSION . 3.1 PROBLEM SETUP . We consider the problem where our observed targets , yi , are drawn i.i.d . from a Gaussian distribution now with unknown mean and variance ( µ , σ2 ) , which we seek to probabilistically estimate . We model this by placing a conjugate prior distribution on ( µ , σ2 ) . If we assume our observations are drawn from a Gaussian , this leads to placing a Gaussian prior on our unknown mean and an Inverse-Gamma prior on our unknown variance : ( y1 , . . . , yN ) ∼ N ( µ , σ2 ) µ ∼ N ( γ , σ2λ−1 ) σ2 ∼ Γ−1 ( α , β ) . where Γ ( · ) is the gamma function , m = ( γ , λ , α , β ) , and γ ∈ R , λ > 0 , α > 0 , β > 0 . Our aim is to estimate a posterior distribution q ( µ , σ2 ) = p ( µ , σ2|y1 , . . . , yN ) . To obtain an approximation for the true posterior , we assume that the estimated distribution can be factorized ( Parisi , 1988 ) such that q ( µ , σ2 ) = q ( µ ) q ( σ2 ) . Thus , our approximation takes the form of the Gaussian conjugate prior , the Normal Inverse-Gamma ( N.I.G . ) distribution : p ( µ , σ2︸ ︷︷ ︸ θ | γ , λ , α , β︸ ︷︷ ︸ m ) = βα √ λ Γ ( α ) √ 2πσ2 ( 1 σ2 ) α+1 exp { −2β + λ ( γ − µ ) 2 2σ2 } . ( 3 ) A popular interpretation of the parameters of the conjugate prior distribution is in terms of “ virtualobservations ” in support of a given property ( Jordan , 2009 ) . For example , the mean of a N.I.G . distribution can be interpreted as being estimated from λ virtual-observations with sample mean γ while its variance was estimated from 2α virtual-observations with sample mean γ and sum of squared deviations 2β . Following from this interpretation , we define the total evidence , Φ , of our evidential distributions as the sum of all inferred virtual-observations counts : ( Φ = λ+ 2α ) . Drawing a sample θj from the N.I.G . distribution yields a single instance of our likelihood function , namely N ( µj , σ2j ) . Thus , the N.I.G . hyperparameters , ( γ , λ , α , β ) , determine not only the location but also the dispersion concentrations , or uncertainty , associated with our inferred likelihood function . Therefore , we can interpret the N.I.G . distribution as higher-order , evidential , distribution on top of the unknown lower-order likelihood distribution from which observations are drawn . For example , in Fig . 2A we visualize different evidential N.I.G . distributions with varying model parameters . We illustrate that by increasing the evidential parameters ( i.e . λ , α ) of this distribution , the p.d.f . becomes tightly concentrated about its inferred likelihood function . Considering a single parameter realization of this higher-order distribution , cf . Fig . 2B , we can subsequently sample many lower-order realizations of our likelihood function , as shown in Fig . 2C . In this work , we use neural networks to infer the hyperparameters of this higher-order , evidential distribution , given an input . This approach presents several distinct advantages compared to prior work . First , our method enables simultaneous learning of the desired regression task , along with aleatoric and epistemic uncertainty estimation , built in , by enforcing evidential priors . Second , since the evidential prior is a higher-order N.I.G . distribution , the maximum likelihood Gaussian can be computed analytically from the expected values of the ( µ , σ2 ) parameters , without the need for sampling . Third , we can effectively estimate the epistemic or model uncertainty associated with the network ’ s prediction by simply evaluating the variance of our inferred evidential distribution . 3.2 LEARNING THE EVIDENTIAL DISTRIBUTION . Having formalized the use of an evidential distribution to capture both aleatoric and epistemic uncertainty , we next describe our approach for learning a model ( c.f . Fig . 2D ) to output the hyperparameters of this distribution . For clarity , we will structure the learning objective into two distinct parts : ( 1 ) acquiring or maximizing model evidence in support of our observations and ( 2 ) minimizing evidence or inflating uncertainty when the prediction is wrong . At a high level , we can think of ( 1 ) as a way of fitting our data to the evidential model while ( 2 ) enforces a prior to inflate our uncertainty estimates . ( 1 ) Maximizing the model fit . From Bayesian probability theory , the “ model evidence ” , or marginal likelihood , is defined as the likelihood of an observation , yi , given the evidential distribution parameters m and is computed by marginalizing over the likelihood parameters θ : p ( yi|m ) = p ( yi|θ , m ) p ( θ|m ) p ( θ|yi , m ) = ∫ θ p ( yi|θ , m ) p ( θ|m ) dθ . ( 4 ) The model evidence is not , in general , straightforward to evaluate since computing it involves integrating out the dependence on latent model parameters : p ( yi|m ) = ∫ ∞ σ2=0 ∫ ∞ µ=−∞ p ( yi|µ , σ2 ) p ( µ , σ2|m ) dµdσ2 ( 5 ) However , by placing a N.I.G . evidential prior on our Gaussian likelihood function an analytical solution for the model evidence does exist . For computational reasons , we minimize the negative logarithm of the model evidence ( LNLLi ( w ) ) . For a complete derivation please refer to Sec . 7.1 , LNLLi ( w ) = − log p ( yi|m ) = − log ( 2 1 2+αβα √ λ 2π ( 1 + λ ) ( 2β + λ ( γ − yi ) 2 1 + λ ) − 12−α ) . ( 6 ) Instead of modeling this loss using empirical Bayes , where the objective is to maximize model evidence , we alternatively can minimize the sum-of-squared ( SOS ) errors , between the evidential prior and the data that would be sampled from the associated likelihood . Thus , we define LSOSi ( w ) as LSOSi ( w ) = Eθ′∼p ( θ|m ) [ Ey′∼p ( y|θ′ ) [ ||y′ − yi||22 ] ] ( 7 ) = ∫ ∞ σ2=0 ∫ ∞ µ=−∞ Ey′∼p ( y|µ , σ2 ) [ ||y′ − yi||22 ] p ( µ , σ2|m ) dµdσ2 ( 8 ) = ( Γ ( α− 12 ) 4 Γ ( α ) λ √ β ) ( 2β ( 1 + λ ) + ( 2α− 1 ) λ ( yi − γ ) 2 ) . ( 9 ) A step-by-step derivation is given in Sec . 7.1 . In our experiments , using LSOSi ( w ) resulted in greater training stability and increased performance , compared to the LNLLi ( w ) loss . Therefore , LSOSi ( w ) is used in all presented results . ( 2 ) Minimizing evidence on errors . In the first term of our objective above , we outlined a loss function for training a NN to output parameters of a N.I.G . distribution to fit our observations , either by maximizing the model evidence or minimizing the sum-of-squared errors . Now , we describe how to regularize training by applying a lack of evidence prior ( i.e. , maximum uncertainty ) . Therefore , during training we aim to minimize our evidence ( or maximize our uncertainty ) everywhere except where we have training data . This can be done by minimizing the KL-divergence between the inferred posterior , q ( θ ) , and a prior , p ( θ ) . This has been demonstrated with success in the categorical setting where the uncertainty prior can be set to a uniform Dirichlet ( Malinin & Gales , 2018 ; Sensoy et al. , 2018 ) . In the regression setting , the KL-divergence between our posterior and a N.I.G . zero evidence prior ( i.e. , { α , λ } = 0 ) is not well defined ( Soch & Allefeld , 2016 ) , please refer to Sec . 7.2 for a derivation . Furthermore , this prior needs to be enforced specifically where there is no support from the data . Past works in classification accomplish this by using the ground truth likelihoood classification ( i.e. , the one-hot encoded labels ) to remove the non-misleading evidence . However , in regression , labels are provided as point targets ( not ground truth Gaussian likelihoods ) . Unlike classification , it is not possible to penalize evidence everywhere except our single point estimate , as this space is infinite and unbounded . Thus , these previously explored approaches for evidential optimization are not directly applicable . To address both of these shortcomings of past works , now in the regression setting , we formulate a novel evidence regularizer , LRi , based on the error of the i-th prediction , LRi ( w ) = ‖yi − E [ µi ] ‖p · Φ = ‖yi − γ‖p · ( 2α+ λ ) , ( 10 ) where ‖x‖p represents the L-p norm of x . The value of p impacts the penalty imposed on the evidence when a wrong prediction is made . For example , p = 2 , heavily over-penalizes the evidence on larger errors , whereas p = 1 and p = 0.5 saturate the evidence penalty for larger errors . We found that p = 1 provided the optimal stability during training and use this value in all presented results . This regularization loss imposes a penalty whenever there is an error in the prediction that scales with the total evidence of our inferred posterior . Conversely , large amounts of predicted evidence will not be penalized as long as the prediction is close to the target observation . We provide an ablation analysis to quantitatively demonstrate the added value of this evidential regularizer in Sec 7.3.2 . The combined loss function employed during training consists of the two loss terms for maximizing model evidence and regularizing evidence , Li ( w ) = LSOSi ( w ) + LRi ( w ) . ( 11 )

Summary: This paper proposes a novel approach to estimate the confidence of predictions in a regression setting. The approach starts from the standard modelling assuming iid samples from a Gaussian distribution with unknown mean and variances and places evidential priors (relying on the Dempster-Shafer Theory of Evidence [1] /subjective logic [2]) on those quantities to model uncertainty in a deterministic fashion, i.e. without relying on sampling as most previous approaches. This opens the door to online applications with fully integrated uncertainty estimates.