Deep Classifiers with Label Noise Modeling and Distance Awareness
Authors: Vincent Fortuin
Mark Collier
Florian Wenzel
James Urquhart Allingham
Jeremiah Zhe Liu
Dustin Tran
Balaji Lakshminarayanan
Jesse Berent
Rodolphe Jenatton
Effrosyni Kokiopoulou
Venue: ICLR 2022 Submitted (2022)
Keywords: Deep learning
uncertainty estimation
out-of-distribution detection

Abstract: Uncertainty estimation in deep learning has recently emerged as a crucial area of interest to advance reliability and robustness in safety-critical applications. While there have been many proposed methods that either focus on distance-aware model uncertainties for out-of-distribution detection or on input-dependent label uncertainties for in-distribution calibration, both of these types of uncertainty are often necessary. In this work, we propose the HetSNGP method for jointly modeling the model and data uncertainty. We show that our proposed model affords a favorable combination between these two complementary types of uncertainty and thus outperforms the baseline methods on some challenging out-of-distribution datasets, including CIFAR-100C, Imagenet-C, and Imagenet-A. Moreover, we propose HetSNGP Ensemble, an ensembled version of our method which adds an additional type of uncertainty and also outperforms other ensemble baselines.

Under review as a conference paper at ICLR 2022
DEEP CLASSIFIERS WITH LABEL NOISE MODELING AND DISTANCE AWARENESS
Anonymous authors Paper under double-blind review
ABSTRACT
Uncertainty estimation in deep learning has recently emerged as crucial area of interest advance reliability and robustness in safety-critices applications. While there have been many proposed methods that either focus on distance-aware model uncertainties for -uito-ddistribution detection or on input-dependent label uncer- tainties for in-distribution calibration, both of these types of uncertainty are often necessary. In this work, we propose the HetSNGP method for jointly modeling the model and data uncertainty. We show that our proposed model affords fa- vorable combination between these two complementary types uncertainty and thus outperforms the baseline methods some challenging out-of-distribution datasets, including CIFAR-IOOC, Imagenet-C, and Imagenet-A. Moreover, we propose HetSNGP Ensemble, an ensembled version of our method which provides an additional type of uncertainty and also outperforms other ensemble baselines.
INTRODUCTION
While deep learning has led to impressive advances predictive accuracy, models often still suf- fer from overconfidence and ill-calibrated uncertainties (Ovadia al., 2019). This is particularly problematic in safety-critical applications (e.g.. healthcare, autonomous driving), where uncertainty estimation is crucial ensure reliability and robustness (Filos et al., 2019; Dusenberry al., 2020).
Predictive uncertainties generally come in two flavors: model uncertainty (also known as epistemic) and data uncertainty (also known aleatoric) (Murphy, 2012). Model uncertainty measures how confident the model should be based on what it knows about the world, that is, how much it can know about certain test data given the training data it has seen. Data uncertainty measures the uncertainty intrinsic in the data itself, for example due to fundamental noise in the labelling process. Good model uncertainty estimates allow for -iittr-disttiuttion (OOD) detection, that is, for recognizing data examples that are substantially different from the training data. On the other hand, good data uncertainty estimates allow for in-distribution calibration, that is, knowing which training (or testing) data examples the model should be more or less confident about.
Many recently proposed models for uncertainty estimation excel at one or the other of these uncer- tainty types. For instance, the a latent Gaussian process to achieve distance-aware model uncertainties and thus affords excellent OOD detection. Conversely, the heteroscedastic classification method (Collier al., 2020; 2021) offers excellent calibration and improved accuracy thanks to modeling input- and class-dependent label noise in the training data. However, there have been many attempts combine the comple- mentary benefits of these two types of uncertainty modeling (e.g., Depeweg et al., 2018) (see related work in Appendix A.1).
Gaussian process (SNGP) (Liu et al., 2020) uses
In this work, we propose the heteroscedastic SNGP (HetSNGP) model, which allows for joint mod- cling of model and data uncertainties based on hicrarchy of two latent random variables. We show that HetSNGP gives good in-distribution and OOD accuracy and calibration, yielding a model with uncertainties suitable for deployment in critical applications.
Our main contributions are:
We propose a new model, the heteroscedastic spectral- normalized Gaussian process (Het- SNGP), which provides both distance-aware model and data uncertainties.

---

Under review as a conference paper at ICLR 2022
(a) Deterministic
(b) Heteroscedasticc
(c) SNGP
(d) Posterior Net
(e) HeiSNGP
(f) Deterministic
(g) Heteroscedastic
(h) SNGP
Posterior Net
HetSNGP
Figure 1: Estimated uncertainties synthetic datasets. The red cluster of points are unseen OOD points, while the other colors represent different classes of training data. The background color shows the normalized predictive uncertainty for the different methods. The deterministic and het- eroscedastic methods are overconfident on the OOD data, while the other methods offer distance- aware uncertainties. The uncertainties of the Posterior Network do not grow quickly enough away from the data, such that only the SNGP and proposed HetSNGP provide effective OOD detection.
We describe an efficient approximate inference scheme that allows training HetNGG with computational budget that is comparable to standard neural network training.
We show empirically different benchmark datasets that HetSNGP offers favorable combination model and data uncertainty. It generally preserves the SNGP's OOD per- formance and the heteroscedastic in-distribution performance and even outperforms these baselines on some datasets, where OOD and heteroscedastic uncertainties are helpful.
We propose an ensembled version of our model, the HetSNGP Ensemble, which addition- ally accounts for parameter uncertainty and outperforms other ensemble baselines.
2 BACKGROUND
2.1 MODEL UNCERTAINTY AND SPECTRAL-NNRMALIZZH GAUSSIAN PROCESS
Model uncertainty (or epistemic uncertainty) captures all the uncertainty about whether given model correctly specified for certain task, given the training data. Before any training data has been observed, this uncertainty depends only on the prior knowledge about the task, which can for instance encoded into distributions about the model parameters or into the architecture of model (i.e., the model class) (Fortuin, 2021). After training data has been observed, should expect the model uncertainty to decrease within the support of the training data distribution, that is, points that close to the training data in the input space. We will generally call these points in-distribution (ID). Conversely, on points that are far away from the training points and thus out-of- distribution (OOD), we should not expect the model uncertainty to decrease, since the training data points are not informative enough to make any assertions about the correctness of the given model on these points. In this sense, the optimal model uncertainty should be distance-aware, that is, should grow away from the training data (Liu et al., 2020).
The spectral-normalizz normalized Gaussian process (SNGP) (Liu et al., 2020) provides such distance- aware model uncertainties by specifying a Gaussian process prior (Rasmussen & Williams, 2006) over the latent data representations the penultimate layer of the neural network. Distance-awarenes, is ensured by using spectral normalization on the hidden layers (Behrmann et al., 2019), which encourages bi-Lipschitzness of the mapping from data to latent space, constraining the model from collapsing any input feature dimensions in the latent representations and approximately preserving the distances between data points the latent space (Liu et al., 2020). Note that this approach only partially captures the model uncertainty, namely in form of the uncertainty not however capture the uncertainty over the model parameters, such as for instance Bayesian neural networks (MacKay, 1992; Neal, 1993) ensemble methods (Taakshminarayanan al., 2016).
the latents. It does
2

---

Under review as a conference paper at ICLR 2022
2.2 DATA UNCERTAINTY AND THE HETEROSCEDASTER METHOD
As opposed to the model uncertainty described above, data uncertainty is intrinsic in the data and thus irreducible with increasing amounts of data. In the case of continuous data (e.g., regression problems), data uncertainty often comes in the form of random noise on the measurements. For discrete data (c.g., classification problems), it usually comes as label noise, that of data points will be assigned the wrong label in the training data. This label noise can be class- and input-dependent (Beyer al., 2020). For instance, the Imagenet dataset (Deng et al., 2009), contains 100 different classes of dog breeds, which are often harder to tell apart for human labelers than the other classes in the dataset. Modeling this type of data uncertainty can improve the calibration and robustness of predictive models (Collier et al., 2020).
certain number
A model that does explicitly handle the input- and class-dependent label noise is the heteroscedas- tic method (Collier et al., 2021). The heteroscedastic method models input- and class-dependent noise by introducing a latent multivariate Gaussian distribution on the softmax logits of a standard neural network classifier. The covariance matrix of this latent distribution is function of the input (heteroscedastic) and models inter-class correlations in the logit noise.
3 METHOD
3.1 SETUP AND NOTATION
Let us consider a dataset D = ((.,, 9:) y:) of input-output pairs, where æ; E Rd and yı E {1...., K}, that is, classification problem with K classes. The data examples assumed to be sampled i..dd from some true gettrreenn distribution as (x,, ~ p" (xx
3.2 GENERATIVE PROCESS
To jointly model the two different types of uncertainty, we propose a hierarchical model of two latent random variables, which we denote by f and u. f is a latent function value associated to the input x (as in the Gaussian process literature) and is designed to capture the model uncertainty, while is a latent vector of logits (or utilities) that capture the data uncertainty, similar to the setup in Collier et al. (2020), which was inspired by the econometrics literature (Train, 2009). Similarly to place latent Gaussian process (GP) prior over f, p(f) GPP(O, ()(:))),
Liu et al. (2020), where Kg is a parameterized kernel function with parameters 0. Evaluating this kernel on all pair- wise combinations of datapoints in yields the kernel matrix (o(æ, x)). We then define u (heteroscedastically) noisy observation of f.
Stacking the variables across the whole dataset gives us the matrices F, RNN We refer to their respective rows as fú, E R& and their columns as for ue E RR.. The columns are independent under the GP prior, but the rows are not. Conversely, the columns are correlated in the heteroscedasticc noise model, while the rows are independent. A hierarchical model using both uncertainties therefore leads to logits that are correlated across both data points and classes.
The full generative process is
fo ~ N(O, Ks 2))
(1)
u: N(fs. E(< a P))
p(y, cl u:)
arg max Wik
(3)
The predictive can then be computed my marginalizing. that p(y| Eulp(y u) p(yl u) p(u/ æ)) du. Intuitively, f captures the model uncertainty, that is, the uncertainty about the functional mapping between æ and y on the level the latents. It uses the covariance between data points to achieve this distance-awareenss. namely it uses the kernel function to assess the sim- ilarity between data points, yielding an uncertainty estimate that grows away from the data. On the other hand, u captures the data uncertainty, by explicitly modelling the per-class uncertainty on the level of the logits. can learn to encode correlations in the noise between different classes (e.g.. the dog breeds in Imagenet). It does not itself capture the model uncertainty, but inherits it through its
3

---

Under review as a conference paper at ICLR 2022
hierarchical dependence on f, such that the resulting probability p(y] u) ultimately jointly captures both types of uncertainty.
In practice, we usually learn the kernel using deep kemel learning (Wilson et al., 2016), that is, define it as the RBF kernel kg (z;, x3) = kRrr hy)) = exp( h; - 1//12/A A) with length scale and h, (=;;;; 0) IR' with h(:;6) being neural network model (e.g.. ResNet) parameterized by 8. This kernel is then shared between classes. Moreover, following Liu et al. (2020), we typically encourage bi-Lipschitzness of h using spectral normalization (Behrmann al., 2019), which then leads to an approximate preservation of distances between the input space and latent space, thus al- lowing for distance-aware aware uncertainty modeling in the latent space, Additionally, {):pp) is usually also a neural network parameterized by y. To case notation, we will typically drop these parameters in the following. Note that the prior over fc (and thus also u.)) has zero mean, thus leading to a uniform output distribution away from the data. Note that this is also reminiscent of multi-task GPs (Williams et al., 2007), where separate kernels are used to model covariances between data points and tasks and are then combined into Kronecker structure.
3.3 COMPUTATIONAL APPROXIMATIONS
The generative process above requires computing two integrals (i.e., over and f) and inferring an exact GP posterior, making it computationally intractable. We make several approximations to ensure tractability.
Low-rank approximation. The heteroscedastic covariance matrix E(x;; (p) is a K x K matrix which is a function of the input. Parameterizing this full matrix is costly in terms of computation, parameter count, and memory. Therefore, following Collier et al. (2021), we make low-rank ap- proximation [x;; = (<;)) + dl (z:)) Here, V(x,) is a K x R matrix with R <<<>> K and d' (x:)) is K dimensional vector added to the diagonal of V (ax,) Va:;) This approximation assumes that the similarities between different classes in the data, which in turn lead to nonzero co- variance entries, can be approximately described being linear in a suitable R-dimensional space. Note that R can be tuned as hyperparameter and can thus be made large enough, such that this assumption holds.
Also following Collier et al. (2021), we introduce a parameter-efficient version of our method to enable scaling to problems with many classes, for instance, Imagenet21k which has 21,843 classes. In the standard version of our method, V(x,) is parameterized as an affine transformation of the shared representation h4- this way, HetSNGP can be added as a single output layer on top of a base network. For the parameter-efficient HetSNGP, we parameterize V(x.) = v(x::) R @ V where v(x;) is a vector of dimension R, 1 is a vector of ones of dimension R. V is a K x R matrix of free parameters, and C denotes element-wise multiplication. This additional approxi- mation assumes that the similarity between classes is largely www---ooiniieeeeeeneee (i.e., different classes are intrinsically similar), while the specific data point can be responsible for scaling certain dimensions of similarity in the R-dimensional space.
Random Fourier feature approximation. Computing the exact GP posterior requires O(N3) operations (because ones needs to invert an N x N kernel matrix), which can be prohibitive for large datasets. Following Liu et al. (2020), we thus use a random Fourier feature (RFF) approximation (Rahimi et al., 2007), leading a low-rank approximation of the kernel matrix as K Ke(æ, a:) Φ
(& R.Nx)), with random features 4; V 2 cos(WWs ( h; + b) where W is fixed weight matrix m
with entries sampled from (O, 1) and b is a fixed bias vector with entries sampled from (0, 2r). This approximates the infinite-dimensional reproducing kernel Hilbert space (RKHS) of the RBF kernel with subspace spanned by m randomly sampled basis functions. This reduces the GP inference complexity to O(N?²,, where m is the dimensionality of the latent space. We can then write the model as linear model in this feature space, namely
u, f: d(x;) O CK + V(E:)ER with f and ((B.) = Im): p(EK) = ((, p(En) = NO
(4)
Here, Φ.3, is linear regressor in the space of the random Fourier features and the other two terms of u, the low-rank approximation to the heteroscedastic uncertainties (as described above). Again,
4

---

Under review as a conference paper at ICLR 2022
m can be tuned hyperparameter to trade off computational accuracy with fidelity of the model. Since most data sets contain a lot of redundant data points, one often finds an m < N that models the similarities in the data faithfully.
Algorithm 1 HetSNGP training
Algorithm 2 HetSNGP prediction
Require: dataset D = {(x, 8)) Initialize 8, (p, W. b, Σ
Require: test example x"
:'
/ cos(WW((x)) + b)
for train step Take minibatch (X;; (:) from D for to do
to max step do
for 8 to do
B p(3. D)
Ck ~ (0, I R ~ NN
cK ~ (0, I Ent (R,
u = & B + d(x') c EK +
uh = Φ Be + d(x;)) @ ck
V E
((
end for
end for C= 9 E log p( (X, Y: un) 11,112
ply ==|===/>)>>))>)))))>>)) E S
exp(u2, ./T)
Le=1 Σk= oxp("2 (T)
Predict y² = arg max, ply" = cl
Update {0.4, if Linace then
4. }} via SGD on C
Compute {Σ-1) end if end for
Jc as per Eq. (5)
Laplace approximation. When using Gaussian likelihood (i.e., in regression setting), the GP posterior inference can be performed in closed form. However, for classification problems this is not possible, because the Categorical likelihood used is not conjugate to the Gaussian prior. We thus need to resort to approximate posterior inference. Again following Liu et al. (2020), we perform a Laplace approximation (Rasmussen & Williams, 2006) the RFF-GP posterior, which yields the closed-form approximate posterior for Gr
N
D) (N E.) with E-1= Im + Σ Pi.a1 Pi.e) >,
(5)
i=1
where Pt.e is shorthand for the softmax output p(u: el ú;) as defined in Eq. (3), where iis a. B.. The derivation of this deferred to Appendix A.3. Here, Σ.¹ can be cheaply computed over minibatches of data by virtue of being a sum over data points. Moreover, 3. is the MAP solution, which can be obtained using gradient descent on the unnormalized log posterior,
p(3) DD x
- -logpt p(D (3 - || where the squared norm regularizer stems from the standard Gaussian prior on B. Using our likelihood, the training objective takes the form of ridge-regularized cross-entropy loss. We also use this objective to train the other trainable parameters 0 and &p of our model. Note that this approximation
necessarily ignoring multi-modality of the posterior, since it can by definition only fit one mode around the MAP solution. Nonetheless, recent works have shown that it can achieve suprisingly good performance in many settings and sometimes even be competitive with the true posterior (Immer et al., 2021b:a).
Monte Carlo approximation. Finally, we are ultimately interested E., jp(y [u] I p(y u) p(u æ:) du, which again would require solving a high-dimensional integral and is thus computationally intractable. Following Collier et al. (2020), we approximate it using Monte Carlo samples. Moreover, approximate the argmax in Eq. (3) with a softmax. To allow for a more controlled trade-off between bias and variance in this approximation, we introduce an additional temperature parameter into this softmax, leading
p(u = x;))
5 Σ p(y: = -c =c
1
exp(uf,//T)
(6)
S s=1 Ex exp(ux
with -r_-- क B d(x;) o & + V(z,)< and B ~ p( and
6x ~~~N Ix) and c N( In)
5

---

Under review as a conference paper at ICLR 2022
Train labels
Determinstic (acc 0.835 0.004)
SNGP (acC 0.855 0.001)
Heterosoedasstcc (acc 2.968 D. 0.002)
HetSNGP
(acc 0.867 0.002)
Figure 2: Predicted labels on synthetic data with label noise. We that the proposed method performs on par with the heteroscedastic method and that they both outperform the other baselines thanks to their label noise modeling capabilities.
It should be noted that we only use Eq. (6) at test time, while during training we replace 3 with its mean 3. instead of sampling (see Section 3.4). Note also that, while a larger number of Monte Carlo samples increases the computational cost, these samples can generally be computed in parallel on modern hardware, such that the wallclock runtime stays roughly the same. Again, the number of samples S can be tuned hyperparameter, such that this approximation exact with increased runtime (or, as mentioned, increased parallel computational power).
be made arbitrarily
3.4 IMPLEMENTATION
The training of our proposed model is described in Algorithm and the prediction in Algorithm 2.
The distance uncertainties of the SNGP are modeled through $. which itself depends on the latent representations h. which are approximately dirtenic thanks to the bi- bi-Lipschitzness. This means that when we have an input Pür that is far away from the training data, the values of the RBF kernel exp(I| - harr / A) will be small, and thus the uncertainty of fe will be large. The resulting output uncertainties will therefore be large regardless of the heteroscedastic variance E(x;) (since they are additive) allowing for effective OOD detection. Conversely, if we have in in-distribution input, the kernel values will be large and the model uncertainty captured in fo will be small. In this case, the additive output uncertainty will be dominated by the heteroscedastic variance E(,;), allowing for effective label noise modeling in-distribution.
Intuition.
While at first it might seem straightforward to combine the two types of uncertainty, it should be noted that the proposed hierarchical model is by means arbitrary choice. Rather, it is the only design we found that robustly achieves a disentanglement of the two uncertainty types dur- ing training. When using other architectures, for instance, using the heteroscedastie uncertainty directly in the likelihood of the GP or using two additive random variables with respective GP and heteroscedastic distributions, the two models will compete for the explained uncertainty and the het- eroscedastic prediction network will typically try to explain as much uncertainty as possible. Only in this hierarchical model setting, where the SNGP adds uncertainty to the mean first and the het- eroscedastic uncertainty is added in the second step, can robustly achieve correct assignment of the different uncertainties using gradient- based optimization.
Challenges and limitations. As outlined above, the main challenge in this model is the inference. We chose an approximate inference scheme that is computationally efficient, utilizing series of approximations, and the fact that we model the distance-aware and heteroscedastic variances addi- tively. If we wanted to make the model more powerful, at the cost of increased computation, we could thus consider several avenues of improvement: (i) use inducing points even full GP in- ference for the GP posterior; (ii) use a more powerful approximation than Laplace, for instance, a variational approximation; (iii) model the variances jointly, such that do not only have covari- ance between data points in f and between classes in u. but have a full covariance between different classes of different data points in u. All of these ideas are interesting avenues for future research.

---

Under review as a conference paper at ICLR 2022
Table 1: Results on CIFAR-100. We used Places365 as far-OOD and CIFAR-I0 as near-OO) datasets. The reported values are means and standard errors over 10 runs. Bold numbers are within one standard error of the best performing model. Our model outperforms the baselines in terms of accuracy on corrupted data and performs par with the best models on OOD detection.
Method
tDD Acc
JID NLL
1Corr Ace
JCom NLL
NNear-ROC
[Neur-FPR95
Faa-ROC
FPRy5
Det.
0.808 Duee
0.794 uue
0,455 a.cs
2.890
0,506
0.963 tar
0.442
0.935
Net.
0.728 x suen
1.603
0014
0.444 4.0s
5,086
x: tuxo
0.472 woss
1.000- tan
0.518
cote
1.000 :: woo
Het.
0.807
0.782 0o2
0.447 a.0
3.130
0.496
0.957
0.420
onzz
0.958
SNGP
0.797 600
0.762 nom
0.466 2o0e
2.339 oven
0.493 200
0.961
nows
0.518
nors
0.919 2m0
HeISNGP
0.799 0000
0.856 woxs
0.471 0000
2.565 + to0n
0.499 2000
0,955 wore
0.525
toes
0.910
= 0004
4 EXPERIMENTS
We conducted experiments on synthetic data and standard image classification benchmarks. As baselines we compare against a standard deterministic model (He et al., 2016; Dosovitskiy et al., 2020), the heteroscedastic method (Collier et al., 2021) and SNGP (Liu et al., 2020). We also compare against the Posterior Network model (Charpentier et al., 2020), which also offers distance- aware uncertainties, but it only applies to problems with few classes. Note that main motivation for the experiments is to assess whether combining the SNGP and heteroscedastic method can suc- cessfully trade off the complementary benefits of the two methods. Since not all tasks and data sets require both types of uncertainty at the same time, we do not expect our proposed model to outper- form the baselines on all tasks. We would however expect that, depending on the particular task and required uncertainty type, it would generally outperform one of the two baselines. Our non-synthetic experiments are developed within the open source codebases uncerta inty baayybaaellle ines (Nado et al., 2021) and robust testeenssstt wtesteeettsssseeeeeeeeeeee .eetrricss (Djolonga et al., 2020) (to assess the OOD perfor- mances). Implementation details are deferred to Appendix A.2.
To measure the predictive performance of the models, we use their accuracy (Acc) and negative log-likelihood (NLL). To measure their uncertainty calibration, we use the expected calibration error (ECE) (Nacini et al., 2015). To measure OOD detection, we use the area under the receiver-operator characteristic curve when using the predictive uncertainty as score (ROC) and the false-positive rate (rate of classifying OOD data point as being in-distribution) at 95% recall (FPR95).
4.1 SYNTHETIC EXPERIMENTS
Synthetic OOD data Following the SNGP paper (Liu et al., 2020), to assess the distance- awareness property of HetSNGP in a visually verifiable way, we performed experiments on two- dimensional synthetic datasets; (i) two moons and (ii) Gaussian mixture. We see in Fig. 1 that neither the deterministic or heteroscedastic models offer distance-aware uncertainties and are there- fore overconfident on the OOD data (red points). The Posterior network does offer distance-aware uncertainties, which on these datasets grow more slowly away from the training data than the SNGP methods. However, we will see later that scaling the Posterior network datasets with many classes is too expensive to be practical. Only the SNGP and our proposed HetSNGP are highly uncertain on the OOD points, thus allowing for effective OOD detection.
Synthetic heteroscedastic data We now wish to verify in a low-dimensional setting that Het- SNGP also retains the in-distribution heteroscedastic modelling property of the heteroscedastic method. We use the noisy concentric circles from Berthon et al. (2021), where the three circular classes have the same mean, but different amounts of label noise. We see that the heteroscedastic model and our proposed method are able to capture this label noise and thus achieve better per- formance, while the deterministic baseline and the SNGP are not. Based on these two synthetic experiments, it becomes apparent that our proposed HetSNGP successfully combines the desirable OOD uncertainties of the SNGP with the heteroscedastic uncertainties on these simple datasets. We now proceed to evaluate these properties on more challenging higher-dimensioonl datasets.
7

---

Under review as a conference paper at ICLR 2022
Table 2: Results on Imagenet. We used Imagenet-C as near-OOD and Imagenet-A as far-OOD. We report the mean and standard error over 10 runs. Bold numbers are within one standard error of the best model. HetSNGP performs best in terms of accuracy on Imagenet-C and Imagenet-A.
Method
11D Acc
NLL
JID
1
JInC NLL
JlnC
ECE
Imm Acc
JImA
JImA ECE
Det.
0.759
0.952 uoe
0,033 1ame
0.419 e00
3,078 wwer
0.096 sore
0.006 190
8.098 c00
0.421 uee
Het.
2000
1000
0.033 s0
0.424 200
1.200 2000
2000
0.010 300
7.941
0.436
200
SNGP
0.757 0000
0.947 1.00
0.014
1:000
0.420
2,970 0007
0.046 ooe
0.007
1.00
7.184
8000
0.356
00000
HeINNGP
0.927 oo0
0.033
1..00
0.428
6201
0.016
7,113
caus
0.401
000
4.2 CIFAR EXPERIMENT
We start by assessing our method on real-world image dataset; we trained it on CIFAR-100 and used CIFAR-10 10 as a near-OOD dataset and Places365 (Zhou et al., 2017) as far-OOD, We measure the OOD detection performance in terms of area under the receiver-perator-chanttette (ROC) and false-positive-rate at 95% confidence (FPR95). We also evaluated the methods' gen- eralization performance on corrupted CIFAR-100 (Hendrycks & Dietterich, 2019). In Table we see that HetSNGP yields a performance between the heteroscedastic and SNGP methods in terms of in-distribution accuracy, but outperforms all baselines in accuracy on the corrupted data. More- over, it performs on par with the best performing models on both near- and far-OOD detection. This suggests that in-distribution, only the heteroscedastic uncertainty is needed, such that both the heteroscedastic method and our HetSNGP outperform the standard SNGP in terms of accuracy. However, on the corrupted data, which is outside of the training distribution, the SNGP outperforms the heteroscedastic method in terms of accuracy and our HetSNGP outperforms both baselines, since both types of uncertainty are useful in this setting.
curve
4.3 IMAGENET EXPERIMENT
A large-scale dataset with natural label noise and established OOD benchmarks is the Imagenet dataset (Deng et al., 2009; Beyer et al., 2020). The heteroscedastic method has been shown to improve in-distribution performance on Imagenet (Collier et al., 2021). We see in Table 2 that Het- SNGP outperforms the SNGP in terms of accuracy and likelihood on the in-distribution Imagenet validation set and performs almost on par with the heteroscedastic model. The slight disadvantage compared to the heteroscedastic model suggests a small trade-off due to the restricted parameteriza- tion of the output layer and application of spectral normalization.
However, the true benefits of our model become apparent when looking at the Imagenet OOD datasets (Table 2, right side). Here, we still have the noisy label properties from the original Im- agenet dataset, such that heteroscedastic uncertainties are useful, but we are also outside of the training distribution, such that distance-awar model uncertainties become crucial. On Imagenet-C and Imagenet-A, we see that our proposed model makes good use of both of these types of uncer- tainties and thus manages to outperform all the baselines in terms of accuracy. Additional OOD results on Imagenet-R and Imagenet-V2 are shown in Table 5 in Appendix A.4.
4.4 IMAGENET-2IK
We introduce a new large-scale OOD benchmark based on Imagenet-21k. 21k. Imagenet-21k is larger version of the standard Imagenet dataset used above (Deng et al., 2009). has over 12.8 million training images and 21,843 classes. Each image can have multiple labels, whereas for standard Imagenet a single label given per image. Note that 999 of the 1,000 Imagenet classes are contained in Imagenet-21k 21 (class n04399382 is missing).
We train a ViT-B/16 (Dosovitskiy et al., 2020) vision transformer model on the Imagenet-21K dataset. See Appendix A.2 for training details. We then evaluate the model on the 1,000 Ima- genet classes (setting the predictive probability of class n04399382 to zero). Despite now being in setting where the model is trained more classes, we can use the standard Imagenet OOD datasets. This assesses the scalability of our method. We also hope this new benchmark will prove useful for future OOD research.
order of magnitude more data and greater than 21x
8

---

Under review as a conference paper at ICLR 2022
Table 3: Results on Imagenet-2Ik. The reported values are means and standard errors over runs. Bold numbers are within one standard error of the best performing model. We use standard Ima- genet, Imagenet-C, Imagenet-A, Imagenet-R, -,, and Imagenet- V2 as OOD datasets. HetSNGP outper- forms the baselines all OOD datasets.
Method
1DD prec@1 1
1mm Acc
1mC Acc
1mmA Acc
fImR Acc
1 Acc
Det.
0.471
0.000
0,800
0.000
0,603 0.0000
0.149
0,000
0.311 I 0.000
0,694 1. 0,000
Het.
0.480
0.001
0.796
0.002
0.590
0.00
0.132
0.001
0.300
0.006
0.687 1. 0,000
SNGP
0.468 0001
0.799
0.001
0.602
0.00
0.165
0,003
0.328
0.005
0.696
+ 0.00
HetSNGP
0.477 0:001
0.806 0.001
0.613 0.005
0.172 0.007
0.336 0.002
+ 0.705
Table 4: Results on Imagenet. Ensemble size=4, Imagenet-C is used as the OOD dataset. HetSNGP outperforms the baselines terms of in-distribution accuracy and all on OOD metrics.
Method
ID Acc
LID NLL
LID ECE
1mC Acc
JmmC NLL
JmC ECE
Det Ensemble
0.779
0.857
0.017
0.449
2.82
0.047
Het Ensemble
0.795
0.790
0.015
0.449
2.93
0.048
SNGP Ensemble
0.781
0.851
0.039
0.449
2.77
0.050
HetSNGP Ensemble 0.797
0.798
0.028
0.458
2.75
0.044
We see in Table that the parameter-efficien heteroscedastic method has the best in-distribution precision@) @ However, its generalization performance to the OOD benchmarks is the weakest of all the methods. To scale to over 21k output classes, we use the parameter-efficient HetSNGP method. Our method recovers almost the full in-distribution performance of the heteroscedastic method, significantly outperforming the deterministic and SNGP methods. Notably, it also clearly outperforms all other methods on the OOD datasets. Similarly the CIFAR experiment, we thus see again that in-distribution, the heteroscedastic method and our HetSNGP both outperform the SNGP, since OOD uncertainties are not that important there, while on the OOD datasets, the SNGP and our HetSNGP both outperform the heteroscedastic method. Our method therefore achieves the optimal tradeoff.
We found that SNGP and HetSNGP underfit to the data when using the posterior p(3, (D) at test time, instead the posterior mode / at both training and test time. Additionally, found spectral normalization was not necessary to preserve distance awareness for the ViT architecture; hence Imagenet-21k experiments are run without spectral normalization.
4.5 ENSEMBLING EXPERIMENT
Deep ensembles are popular methods for model uncertainty estimation due to their simplicity and good performance (Lakshminarayanal et al., 2016). We propose a variant of our HetSNGP method which captures further source of model uncertainty in the form of parameter uncertainty by a deep ensemble of HetNGGP models. HetSNGP Ensemble is therefore powerful yet simple method for capturing three major sources of uncertainty; 1) data uncertainty the labels, 2) model uncertainty in the latent representations and 3) model uncertainty in the parameters.
We compare the HetSNGP Ensemble to a determinstic ensemble as well as ensembles of het- croscedastic and SNGP models. We see in Table 4 that in the case of ensemble of size four, HeISNGP Ensemble outperforms the basclines on the Imagenet-C OOD dataset in terms of all met- rics, while also outperforming them the standard in-distribution Imagenet dataset in terms of accuracy. Due to computational constraints we do not have error bars in this experiment. However, do not expect them be much larger than in Table 2.
ETHICS AND REPRODUCIBILITY STATEMENTS
Ethics. We present generic classification algorithm. HetSNGP is not upplication-spede and has the computational cost of the heteroscedastic and SNGP methods combined. We do not foresee

---

Under review as a conference paper at ICLR 2022
ethical issues specific to method beyond any already associated with the heteroscedastic and SNGP methods or deep neural network classifiers in general.
Reproducibilityy Hyperparameters and further details required to reproduce our results are pro- vided in Appendix A.2. We have open-sourced the code to reproduce our CIFAR and Imagenet results. We plan to open-source the code to reproduce the Imagenet-21k experiments. Further de- tails on our use of the Laplace approximation are provided in Appendix A.3.
REFERENCES
Ben Adlam, Jasper Snoek, and Samuel L Smith. Cold posteriors and aleatoric uncertainty. arXiv preprint arXiv:2008.00022 2020.
Laurence Aitchison. A statistical theory of cold posteriors in deep neural networks. In International Conference on Learning Representutions, 2020.
Javier Antorán, James Urquhart Allingham, and José Miguel Hernández-Lobato. Depth uncertainty in neural networks. arXiv preprint 2Xiv:2000.08837,, 2020.
Jens Behrmann, Will Grathwohl, Ricky TQ Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. In International Conference Machine Learning, pp. 573-582. PMLR, 2019.
Antonin Berthon, Bo Han, Gang Niu, Tongliang Liu, and Masashi Sugiyama. Confidence scores make depenee-de label-noise learning possible. In International Conference on Machine Learning, pp. 825-836. PMLR, 2021.
Lucas Beyer, Olivier Hénaff, Alexander Kolesnikov, Xiaohua Zhai, and Aäron den Oord. Are we done with imagenet? arXiv preprint arXiv:2006.07153 2020.
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International Conference on Machine Learning, pp. 1613-1622. PMLR, 2015.
Bertrand Charpentier, Daniel Zügner, and Stephan Günnemann. Posterior network: Uncertainty es- timation without ood samples via density-based pseudo-counts. arXiv preprint arXiv:2006 09239,, 2020.
Kamil Ciosek, Vincent Fortuin, Ryota Tomioka, Katja Hofmann, and Richard Turner. Conserva- tive uncertainty estimation by fitting prior networks. In International Conference on Learning Representations, 2019.
Mark Collier, Basil Mustafa, En Kokiopoulou, Rodolphe Jenatton, and Jesse Berent. simple probabilistic method for deep classification under input-dependent label noise. arXiv preprint arXiv:2003.06778. 2020.
Mark Collier, Basil Mustafa, Ef Kokiopoulou, Rodolphe Jenatton, and Jesse Berent. Correlated input-dependent label noise large-scale image classification. In Proceedings of the IEEF/CVF Conference on Computer Vision and Pattern Recognition, pp. 1551- 2021.
Francesco D' Angelo and Vincent Fortuin. Repulsive deep ensembles bayesian. arXiv preprint
arXiv:2 / 1642, 2021.
Francesco D' Angelo, Vincent Fortuin, and Florian Wenzel. On stein variational neural network ensembles. arXiv preprint arXiv:2 10760, 2021.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hi- erarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. Icee, 2009.
Stefan Depeweg, Jose-Miguel Hernandez-Lobato Finale Velez, and Steffen Udluft. Decom- position of uncertainty in bayesian deep learning for efficient and risk-sensitive learning. In International Conference Machine Learning, pp. 1184-1193 PMLR, 2018.
10

---

Under review as a conference paper at ICLR 2022
Josip Djolonga, Frances Hubis, Matthias Minderer, Zachary Nado, Jeremy Nixon, Rob Romijnders, Dustin Tran, and Mario Lucic. Robustness Metrics, 2020. URL https: htttps://githbb github. com/ wtw.glleeeeeeaarrrobostutttaeee
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, al. An image is worth 16x16 16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010. /9299 2020.
Michael W Dusenberry. Dustin Tran, Edward Choi, Jonas Kemp, Jeremy Nixon, Ghassen Jerfel, Katherine Heller, and Andrew M Dai. Analyzing the role of model uncertainty for electronic health records. In Proceedings of the ACM Conference on Health, Inference, and Learning, pp-
204-213, 2020.
Angelos Filos, Sebastian Farquhar, Aidan Gomez, Tim GJ Rudner, Zachary Kenton, Lewis Smith, Milad Alizadeh, Arnoud De Kroon, and Yarin Gal. A systematic comparison of bayesian deep learning robustness diabetic retinopathy tasks. arXiv preprint arXiv: 10481, 2019.
Vincent Fortuin. Priors in bayesian deep learning: A review. arXiv preprint arXiv:2105.06868, 2021.
Vincent Fortuin, Adrià Garriga-Alonso, Mark van der Wilk, and Laurence Aitchison. Bnnpriors: A library for bayesian neural network inference with different prior distributions. Software Impacts, 9:100079, 2021a.
Vincent Fortuin, Adrià Garriga-Alonse Florian Wenzel, Gunnar Rätsch, Richard Turner, Mark van der Wilk, and Laurence Aitchison. Bayesian neural network priors revisited. arXiv preprint N0Xv::2002.067//. 2021b.
Yarin Gal and Zoubin Ghahramani. Dropout as bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning. pp. 1050-1059.
PMLR, 2016.
Adrià Garriga-Alonso and Vincent Fortuin. Exact langevin dynamics with stochastic gradients.
arXiv preprint arXiv:2102.0169// 2021.
Alex Graves. Practical variational inference for neural networks. Advances in neural information processing systems, 24, 2011.
Danijar Hafner, Dustin Tran, Timothy Lillicrap, Alex Irpan, and James Davidson. Noise contrastive priors for functional uncertainty. In Uncertainty in Artificial Intelligence, pp. 905-914. PMLR, 2020.
Marton Havasi, Rodolphe Jenatton, Stanislav Fort, Jeremiah Zhe Liu, Jasper Snoek, Balaji Laksh- minarayanan, Andrew M Dai, and Dustin Tran. Training independent subnetworks for robust prediction. arXiv preprint arXiv:2010.0661 066100 2020.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp- 770-778, 2016.
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common ruptions and perturbations. Proceedings of the International Conference on Learning Represen- tations, 2019.
Geoffrey E Hinton and Drew Van Camp. Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings the sixth annual conference on Computational learning theory, pp. 5-13, 1993.
Marius Hobbhahn, Agustinus Kristiadi, and Philipp Hennig. Fast predictive uncertainty for classifi- cation with bayesian deep networks. arXiv preprint arXiv:2003301222, 2020.
11

---

Under review as a conference paper at ICLR 2022
Alexander Immer, Matthias Bauer, Vincent Fortuin, Gunnar Rätsch, and Mohammad Emtiyaz Khan. Scalable marginal likelihood estimation for model selection in deep learning. arXiv preprint arXiv:2104.04973 2021a.
Alexander Immer, Maciej Korzepa, and Matthias Bauer. Improving predictions of bayesian neural nets via local linearization. In International Conference on Artificial Intelligence and Statistics, pp. 703-711, PMLR, 2021b.
Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? arXiv preprint (eXXiv/703.0491) 2017.
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Ph1) thesis, University of Toronto, 2009.
Balaji Lakshninarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. arXiv preprint arXiv: 2016.
Jeremiah Zhe Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax- Weiss, and Balaji Lakshmi- narayanan. Simple and principled uncertainty estimation with deterministic deep learning via distance awareness. arXiv preprint arXiv:2006.10108, 2020.
David JC MacKay, practical bayesian framework for backpropagation networks. Neural compu- tation, 4(3):448-477) 472, 1992.
Andrey Malinin and Mark Gales. Predictive uncertainty estimation via prior networks. arXiv preprint arXiv:180.11001,, 2018.
Andrey Malinin, Bruno Mlodozeniec, and Mark Gales. Ensemble distribution distillation. arXiv preprint arXiv:9055000076 2019.
Dimitrios Milios, Raffaello Camoriano, Pietro Michiardi, Lorenzo Rosasco, and Maurizio Filip- pone. Dirichlet-based gaussian processes for large-scale calibrated classification. arXiv preprint 10X1::1805.10915. 2018.
Miguel Monteiro, Loic Le Folgoc, Daniel Coelho de Castro, Nick Pawlowski, Bernardo Marques, Konstantinos Kamnitsas, Mark van der Wilk, and Ben Glocker. Stochastic segmentation net- works: Modelling spatially correlated aleatoric uncertainty. arXiv preprint arXiv:2006 06015, 2020.
Kevin P Murphy. Machine learning: probabilistic perspective, 2012.
Zachary Nado, Neil Band, Mark Collier, Josip Djolonga, Michael Dusenberry, Sebastian Farquhar, Angelos Filos, Marton Havasi, Rodolphe Jenatton, Ghassen Jerfel, Jeremiah Liu, Zelda Mariet, Jeremy Nixon, Shreyas Padhy, Jie Ren, Tim Rudner, Yeming Wen, Florian Wenzel, Kevin Mur- phy, D. Sculley, Balaji Lakshminarayanan, Jasper Snoek, Yarin Gal, and Dustin Tran. Uncer- tainty Baselines: Benchmarks for uncertainty & robustness in deep learning. arXiv preprint arXiv:2106.04015 2021.
Mahdi Pakdaman Naeini, Gregory Cooper, and Milos Hauskrecht. Obtaining well calibrated prob- abilities using bayesian binning. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015.
Radford Neal. Bayesian learning via stochastic dynamics. Advances neural information processing systems, pp. 475-4454444 1993.
Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan. and Jasper Snock. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. arXiv preprint arXiv:1906.02530 2019.
Tim Pearce, Alexandra Brintrup. Mohamed Zaki, and Andy Neely. High- prediction inter- vals for deep learning: A distribution- free, ensembled approach. International Conference on Machine Learning, pp. 4075-4084. PMLR, 2018.
12

---

Under review as a conference paper at ICLR 2022
Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Seikit-leamn Machine learning in python. the Journal of machine Learning research, 12:2825-2830, 2011.
Ali Rahimi, Benjamin Recht, al. Random features for large-scale kernel machines. In NIPS, volume 3, pp. 5. Citeseer, 2007.
Carl Edward Rasmussen and Christopher K Williams. Gaussian processes for machine learning, volume 2. MIT press Cambridge, MA, 2006.
Murat Sensoy, Lance Kaplan, and Melih Kandemir. Evidential deep learning to quantify classifica- tion uncertainty. arXiv preprint /806.0 2018.
Andrew Stirn and David Knowles. Variational variance: Simple, reliable, calibrated heteroscedas- tic noise variance parameterization. arXiv preprint 0rXiv:2000.049100, 2020.
Natasa Tagasovska and David Lopez-Paz. Single-model uncertainties for deep learning. arXiv preprint 1rXiv:1811 1.00908, 2018.
Kenneth E Train. Discrete choice methods with simulation. Cambridge university press, 2009.
Linh Tran, Bastiaan S Veeling, Kevin Roth, Jakub Swiatkowski, Joshua V Dillon, Jasper Snoek, Stephan Mandt, Tim Salimans, Sebastian Nowozin, and Rodolphe Jenatton. Hydra: Preserving ensemble diversity for model distillation. arXiv preprint hitv:2001.04994, 2020.
Max Welling and Yee W Tch. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICMI.-1), pp. 681-688 Citeseer, 2011.
Florian Wenzel, Kevin Roth, Bastiaan S Veeling, Jakub Swikatkowski, Linh Tran, Stephan Mandt, Jasper Snoek, Tim Salimans, Rodolphe Jenatton, and Sebastian Nowozin. How good the bayes posterior in deep neural networks really? In International Conference Machine Learning, 2020.
Chris Williams, Edwin V Bonilla, and Kian M Chai. Multi-task gaussian process prediction. Ad- vances in neural information processing systems, pp. 153-160, 2007.
Andrew Gordon Wilson, Zhiting Hu, Ruslan Salakhutdinov, and Eric Xing. Deep kernel learning. In Artificial intelligence and statistics, pp. 370-378. PMLR, 2016.
Wanqian Yang. Lars Lorch, Moritz A Graule, Srivatsan Srinivasan, Anirudh Suresh, Jiayu Yao, Melanie F Pradier, and Finale Doshi-Velez. Output--onstrained bayesian neural networks. arXiv preprint arXiv: 1et::002000. 2019.
Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 mil- lion image database for scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017.
13

---

Under review as a conference paper at ICLR 2022
A APPENDIX
A.1 RELATED WORK
Uncertainty estimation. There has been a lot of research on uncertainty estimation in recent years (Ovadia et al., 2019), including the early observation that one needs data and model uncertainties for successful use in real-world applications (Kendall & Gal, 2017). There have also been attempts to directly optimize specialized loss functions to improve model uncertainty (Tagasovska & Lopez-Paz, 2018; Pearce et al., 2018). However, if one wants to directly implement prior knowledge regarding the OOD behavior of the model, one usually needs access to OOD samples during training (Yang et al., 2019; Hafner et al., 2020). Another popular idea is to use a hierarchical output distribution, for instance a Dirichlet distribution (Milios et al., 2018; Sensoy al., 2018; Malinin & Gales, 2018; 8 Malinin et al., 2019; Hobbhahn et al., 2020), such that the model uncertainty can be encoded in the Dirichlet and the data uncertainty in its Categorical distribution samples. This idea was also used in our Posterior Network baseline (Charpentier et al., 2020). Similarly to our idea of learning separate variances, has also been proposed treat the output variance variationally and to specify a hierarchical prior over it (Stimn & Knowles, 2020).
The gold-standard for capturing model uncertainty over the parameters are Bayesian neural networks (Neal, 1993; MacKay, 1992), but they are computa- tionally quite expensive, require a careful choice of prior distribution (Fortuin et al., 2021b; Fortuin, 2021), and require specialized approximate inference schemes, such as Laplace approximation (Im- mer et al., 2021b;a), variational inference (Hinton & Van Camp, 1993; Graves, 2011; I; Blundell et al., 2015), or Markov Chain Monte Carlo (Welling & Teh, 2011; Garriga-Alone Alonsoo & Fortuin, 2021; For- tuin et al., 2021a). A more tractable model class are deep ensemble methods (Lakshminarayanan et al., 2016; Ciosek et al., 2019; D' Angelo et al., 2021; D' Angelo & Fortuin, 2021), although they are computationally still expensive. There are however some ideas to make them less expensive by distilling their uncertainties into simpler models (Malinin et al., 2019; Tran al., 2020; Havasi et al., 2020; Antorán et al., 2020).
Bayesian neural networks and ensembles.
SNGP and heteroscedastic method. The models most relevant our approach are the SNGP (Liu et al., 2020) and the heteroscedastic method (Collier et al., 2020; 2021). SNGP yields distance- aware model uncertainties, which grow away from the training data. The heteroscedastic method models input- and class dependee label noise data uncertainty inside the training distribution. Het- eroscedastic data uncertainty modelling can also improve segmentation models (Monteiro et al., 2020) and has been linked to the cold posterior effect in Bayesian neural networks (Wenzel et al., 2020; Adlam et al., 2020; Aitchison, 2020). Prior work has primarily focused on modelling data and distance- model uncertainty separately. But safety-critical practical applications require both types of uncertainty, HetSNGP is a novel method which fulfills this requirement.
A.2 IMPLEMENTATION DETAILS
To assess our proposed model's predictive performance and uncertainty estimation capabilities, we conducted experiments on synthetic two moons data (Pedregosa et al., 2011), a mixture of Gaussians, the CIFAR-IOU dataset (Krizhevsky et al., 2009), and the Imagenet dataset (Deng et al., 2009). We compare against a standard deterministic ResNet model as a baseline (He et al., 2016). against the heteroscedastic method (Collier et al., 2020; 2021) and the SNGP (Liu et al., 2020) (which form the basis for our combined model) and against the recently proposed Posterior Network model (Charpentier et al., 2020), which also offers distance-aware uncertainties, similarly to the SNGP. We used the same backbone neural network architecture for all models, which was fully-connected ResNet for the synthetic data, a WedeResNet18 on CIFAR and a ResNer50 Imagenet.
For most baselines, we used the hyperparameters from the uncertainty.baast (Nado et al., 2021). On CIFAR, we trained our HetSNGP with a learning rate of 0.1 for 300 epochs and used R- = 6 factors for the heteroscedastic covariance, a softmax temperature of 7 0.5 and S = 5000 Monte Carlo samples. On Imagenet, we trained with a learning rate of 0.07 for 270 epochs and used R 15 factors, softmax temperature of 1.25 and S 5000 Monte Carlo samples. We implemented all models in TensorFlow in Python and trained on Tensor Processing Units (TPUs) in the Google Cloud.
ines library
14

---

Under review as a conference paper at ICLR 2022
We train all Imagnet-21k models for 90 epochs with batch size 1024 8 X 8 TPU slices. We train using the Adam optimizer with initial learning rate of 0.001 using a linear learning rate decay schedule with termination point 0.00001 and a warm-up period of 10,000 steps. We train using the sigmoid cross-entropy loss function and 1.2 weight decay with multiplier 0.03. The heteroscedastic method uses temperature of 0.4, 1,000 Monte Carlo samples and R = 50 for the low rank approx- imation. HetSNGP has the same heteroscedastic hyperparameters except the optimal temperature 1.5. For SNGP and HetSNGP the GP covariance approximated using the momentum scheme presented in Liu et al. (2020) with momentum parameter 0.999.
A.3 LAPLACE APPROXIMATION
In this section, we will derive the Laplace posterior in Eq. (5). The derivation follows mostly from the sections 3,4 and 3.5 in Rasmussen & Williams (2006).
First note that the log posterior 3r given data
log p( æ. log ply [B) + log) Z
where a normalization constant that does not depend on Be. Following Rasmussen & Williams (2006), will denote the unnormalized log posterior
Vr ((3.) = log (.)) + ((..(
Recall that the first term is the likelihood and the second term is prior from Eq. (4).
The Laplace approximation now approximates the posterior with a local second-order expansion around the MAP solution, that
p(Gel v. ~ (B.,, A-1)
with the MAP solution G. arg maxp. ((3)) and the Hessian A - (())) B.
The MAP solution can be found using standard (stochastic) gradient descent, while the Hessian is given by
(.V( = v logg(u B.)) 4 logg(33)
Va(V p(y 3z Im
Va(V Vu log p(y w) Im
② v2 log ply
u) Im
= W + + Im
where we used the chain rule and the fact that second derivatives of the likelihood, that is, W₂ = - V log p(y) uz) (Rasmussen Williams, 2006). For instance. in the case of the logistic likelihood, W p: P:). where p; is vector of output probabilities for logits u, To get the Hessian at the MAP, we then just need to compute this quantity for û = +
4/3 and W is diagonal matrix of point-wise
The approximate posterior therefore
p(3. x. v) R N( (W +Im)) 1mm)-
(10)
where the precision matrix can be computed over data points (recovering Eq. (5)) as
N
A = Im Σ -
(11)
A.4 ADDITIONAL EXPERIMENTAL RESULTS
We add additional baselines for our Imagenet experiment from the epistemic uncertainty literature. In particular benchmark MC Dropout (Gal & Ghahramani, 2016) and MIMO (Havasi et al., 2020). We use the implementations and Imagenet hyperparameters from the Uncertainty Baselines codebase (Nado et al., 2021).
15

---

Under review as a conference paper at ICLR 2022
Table 5: Additional Imagenet OOD results on Imagenet-R and Imagenet-V2. The reported values are means and standard errors over 10 runs. Bold numbers are within one standard error of the best performing model. Our model outperforms the baselines in terms of accuracy Imagenet- V2.
Method
1mmR Ace
JlmR NLL
JlmR ECE
1 V2 Acc
JImV2 NLL
L/ ECE
Det.
0.229 0001
5.907 0014
0.239
0.001
0.638
0.001
1.598
0.00
0.077 0:01
Het.
0.235 1 0.001
5.761 0.00
0.251
0.001
0.648
0.001
1.581
0.000
0.084
0:001
SNGP
0.230 0001
5.344 0.000
0.175
0.001
0.637 0.001
1.552 0.001
0.041 0.011
HetSNGP
0.232 0001
5.452 0u013
0.225
0.647 0.001
1.564
0.080
Table 6: Additional Imagenet baselines for Imagenet (in-dist), Imagenet-C and Imagenet-A, The reported values are means and standard errors over 10 runs.
Method
1DD Ace
LID ECE
1LmC
LlmC NLL
fImA
JImA NLL
JlmA
MC Dropout
0.930
0.436
2.876
0.005
7.620
0.344
MIMO
0.772 2000
0.901 san
0.039 con
0.440 gree
2,979 200
0.101 100
0.013 cm0
7.777 2000
0.432 gooes
Table 7: Additional Imagenet baselines for Imagenet-R and Imagenet-Va V2. means and standard errors over 10 runs.
The reported values are
Method
1mR Acc
UmR NLL
JmR ECE
f2 Acc
JlmV2 NLL
Llm ECE
MC Dropout
0.244 amm
5.546 + 0.03
0.157 n002
0.641 00001
1.543 + 0:06
0.020 + nom
MIMO
0.245 000
5.851 0,099
0.248
0.654 0.00
1.538 0o0n
0.085 no0s
Table 8: Runtimes of inference per sample for different methods. Runtimes are computed on Ima- geNet using Resnet50.
METHOD
RUNTIME (MS PER EXAMPLE)
DETERMINISTIC
0.04
SNGP
0,047
MIMO
0.040
MC DROPOUT
0.405
HET. (5000 MC SAMPLES)
0.061
HETSNGP (100 MC SAMPLES)
0.045
Table Comparison to related work.
UNCERTAINTY
UNCERTAINTY
ENSEMBLE (SIZE=M)
APPROX. BAYESIAN INFERENCE
DETERMINISTIC ENSEMBLE
O(M) OMM
SNGP
X
MC. DROPOUT
POSTERIOR NETWORK
V
CLASSES
HET.
HEISNGP
HETSNGP ENSEMBLE
V
O(M)
HETSNGP MIMO
16


Reviews:
[{"review_id": "yTteQe7q_Gi", "reviewer": "Reviewer_wQfZ", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The first contribution, that jointly model two different types of uncertainty, as far as I know,  make the first step for noisy label. The second contribution, amounts to large-scale matrix computation approximation, makes the whole method be accessible. However，the contribution of the whole paper can not meet the requirement of ICRL as (1) limited novelty. The proposed method is a limited improvement of SNGP. (2) The computation approximation all come from the existing techniques [1,2,3]. (3) For joint uncertainty estimation setting, it is not very novel and easily to be solved. We can use methods in [1,3] to handle the data uncertainty, then use the method in [2] to handle model uncertainty.\n\n(1)\tExperimental results. Compared to the baseline model SNGP, the proposed method uses more complex method but achieve slight performance promotion even performance reduction. Only using the ensemble strategy can bring stable performance promotion (Table 4).  More discussion is needed.\n(2)\tFor computation approximation, four types of approximations are used, the performance and time yield should be discussed in the experimental section. For practicable, the author can verified the algorithm (w/wo approximation) on small datasets.\n(3)\tIn experimental section, the evaluation metrics are not clear. \n\n[1] Mark Collier, Basil Mustafa, Efi Kokiopoulou, Rodolphe Jenatton, and Jesse Berent. Correlated\ninput-dependent label noise in large-scale image classification. In Proceedings of the IEEE/CVF\nConference on Computer Vision and Pattern Recognition, pp. 1551–1560, 2021.\n[2] Jeremiah Zhe Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax-Weiss, and Balaji Lakshminarayanan. Simple and principled uncertainty estimation with deterministic deep learning via\ndistance awareness. arXiv preprint arXiv:2006.10108, 2020\n[3] Mark Collier, Basil Mustafa, Efi Kokiopoulou, Rodolphe Jenatton, and Jesse Berent. A simple\nprobabilistic method for deep classification under input-dependent label noise. arXiv preprint\narXiv:2003.06778, 2020.\n", "summary_of_the_paper": "This paper studies the combination between model uncertainty and data uncertainty based on spectral-normalized Gaussian process. Theoretical results show that heteroscedastic SNGP allows for joint modeling of model and data uncertainties. The paper then proposes an approximate inference scheme for efficient model training. Experiment results support these claims on synthetic datasets and typical classification benchmarks. ", "summary_of_the_review": "The jointly model data and model uncertainty seem some novel. However, the contribution is incremental when compared to SNGP. The experimental analysis is not sufficient and strong. Overall, I tend to reject this paper. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "XFVA-zs3Znr", "reviewer": "Reviewer_ru45", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The paper is well written and the scientific contributions are clearly formulated and experimentally validated.\nThe experimental results look quite convincing and show the benefits of this combined uncertainty model.\n\nThere are many technical details that are quite hard to understand and that seem to originate from other papers from the literature, notably in Section 3.3 (computational approximations). \nThis makes the paper difficult to follow.\nAlso, it seems that the experimental evaluation is missing a comparison with some more existing methods for uncertainty estimation and OOD (like the ones mentioned in Section 5, \"Related Work\").\n\nOverall, I still think the paper is interesting and of good quality.\n", "summary_of_the_paper": "This paper presents a new method for model and data uncertainty estimation in deep neural networks combining the heteroscedastic method (Collier et al. 2020) and the Spectral-Normalised Gaussian Process (SNGP) method (Liu et al. 2020). It is shown that the two methods are complementary and their combination outperforms state-of-the-art methods on Out-Of-Distribution (OOD) detection on common image classification benchmarks. \n", "summary_of_the_review": "The proposed approach is scientifically sound, the presentation is of good quality. \nBut the experimental results may lack some SOTA comparison.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "3Y9yj4hDkGP", "reviewer": "Reviewer_m1FZ", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "strengths\n+ How to build a model can jointly mode the model and data uncertainty is an interesting problem.\n+ A method is proposed that has a good calibration performance. It can be used for out-of-distribution detection. \n\nweakness\n+ The technical contribution of this paper may not be enough. Specifically, algorithms in this paper seem to be similar to SNGP [1]. I think that the major difference between the two methods comes from the different data generative processes.\n+ The assumption used in this paper might be strong. The authors propose a hierarchical model of two latent random variables which are sampled from two Gaussian distributions. It is better to add more explanations that how realistic this assumption is. I think that the proposed method could be more useful if this assumption can be mitigated. Additionally, different approximations are made to ensure the tractability of distributions. Although some of them are commonly used, it is better to add more discussions to show that these approximations will not lead to large biases. \n+ The experimental advantage of the proposed method is not large. Table 2, Table 3, and Table 4 show that the performance of the proposed method and the baseline method SNGP are quite similar.  \nThe baselines considered are not that inclusive. I understand this problem is novel and there hasn't been fruitful literature. But I think it is better to add more calibration methods as baselines.\n\n[1]. Liu, Jeremiah Zhe, et al. \"Simple and principled uncertainty estimation with deterministic deep learning via distance awareness.\" arXiv preprint arXiv:2006.10108 (2020).", "summary_of_the_paper": "The authors propose a method that can jointly learn the model uncertainty for out-of-distribution detection and data uncertainty for in-distribution calibration. The effectiveness of their method has been validated on different out-of-distribution datasets.", "summary_of_the_review": "Overall, I think this work is well motivated. But I have some concerns for both technical and empirical novelties.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "1w6QoBr3OD6", "reviewer": "Reviewer_tqBj", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strengths:\nThis paper is well-motivated. Uncertainty estimation in deep learning has lately been a hot topic for improving reliability and resilience in safety-critical applications. This paper combines the complementary benefits of these two types of uncertainty modeling and achieves a good calibration performance.\n\nConcerns:\n1.\tThe proposed method Is a combination of well-known techniques. The novelty of this paper Is limited.\n2.\tThe proposed method Is a little bit too heuristic. There are many assumptions which are not sufficiently justified. This may limit the scope of application of the method.\n3.\tThe experiment results are weak. The proposed method cannot surpass baseline consistently.\n4.\tThis paper is hard to understand. \n", "summary_of_the_paper": "The paper proposed a new model HetSNGP that captures distance-aware model uncertainties as well as heteroscedastic data uncertainties. HetSNGP combines these two types of uncertainty in a beneficial way, allowing for out-of-distribution detection and generalisation as well as in-distribution performance and calibration on a variety of benchmark datasets.", "summary_of_the_review": "Overall, I think this is a well-motivated work but the novelty and contributes are limited.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper studies the combination between model uncertainty and data uncertainty based on the spectral-normalized Gaussian process. Empirical results show the effectiveness of the proposed method. Overall, the paper is well-motivated and well-written. However, there are several concerns about the paper. (1) The novelty is marginal. The contribution of combining SNGP and heteroscedastic models into a single model may not be enough. (2) More analyses and insights are needed on why the mentioned two types of uncertainty are complementary. (3) More recent state-of-the-art methods on classification with noisy labels are suggested to be included to interest the readers. There are diverse scores. However, no one wants to champion the paper. We believe that the paper will be a strong one by addressing the concerns.
Decision: Reject