UQGAN: A Unified Model for Uncertainty Quantification of Deep Classifiers trained via Conditional GANs
Authors: Philipp Oberdiek
Gernot A. Fink
Matthias Rottmann
Venue: NeurIPS 2022 Accept (2022)
Keywords: uncertainty quantification
deep neural network
GAN
out-of-distribution

Abstract: We present an approach to quantifying both aleatoric and epistemic uncertainty for deep neural networks in image classification, based on generative adversarial networks (GANs). While most works in the literature that use GANs to generate out-of-distribution (OoD) examples only focus on the evaluation of OoD detection, we present a GAN based approach to learn a classifier that produces proper uncertainties for OoD examples as well as for false positives (FPs). Instead of shielding the entire in-distribution data with GAN generated OoD examples which is state-of-the-art, we shield each class separately with out-of-class examples generated by a conditional GAN and complement this with a one-vs-all image classifier. In our experiments, in particular on CIFAR10, CIFAR100 and Tiny ImageNet, we improve over the OoD detection and FP detection performance of state-of-the-art GAN-training based classifiers. Furthermore, we also find that the generated GAN examples do not significantly affect the calibration error of our classifier and result in a significant gain in model accuracy.

UQGAN: A Unified Model for Uncertainty Quantification of Deep Classifiers trained via Conditional GANs
Philipp Oberdiek
Gernot A. Fink
Department of Computer Science TU Dortmund University philipp. oberdeexss. tu-ccssttudooe tu-dortmund.cd
Department of Computer Science TU Dortmund University gernot. fernot.finkes.. tu-dortmund, de
Matthias Rottmann
School of Computer and Communication Sciences, EPFL School of Mathematics and Natural Sciences, University of Wuppertal matthias.c matthias. rottianss..tttmm ch
Abstract
We present an approach to quantifying both aleatoric and epistemic uncertainty for deep neural networks image classification, based on generative adversarial networks (GANs). While most works in the literature that use GANs to generate out-of-distribution (OoD) examples only focus the evaluation of OoD detection, we present a GAN based approach to learn classifier that produces proper uncer- tainties for OoD examples as well for false positives (FPs). Instead of shielding the entire in-distribution data with GAN generated OoD examples which is state- of-the-art, we shield each class separately with out-of-class examples generated by conditional GAN and complement this with one-vs-all image classifier. In our experiments, in particular on CIFARIO. 10, CIFAR 100 and Tiny ImageNet, we improve over the OoD detection and FP detection performance of state-of-the-art GAN-training based classifiers. Furthermore, we also find that the generated GAN examples do not significantly affect the calibration error of our classifier and result in a significant gain in model accuracy.
Figure 1: Toy example of two slightly overlapping Gaussian distributions. From left to right: 1. OoD heatmap with orange indicating a high probability of being OoD and white of in-iistribution; 2. Aleatoric uncertainty (entropy over Equation (3) with orange indicating high and white low uncertainty. Triangles indicate GAN-generated out-of-class examples and crosses correspond the in-distribution data, while their color is coding the class membership.
36th Conference on Neural Information Processing Systems (NcurIPS 2022).

---

Introduction
Deep learning has shown outstanding performance in image classification tasks due to the enormous capacity and the inability of rejecting examples, deep neural networks (DNNs) are not capable of expressing their uncertainties appropriately. DNNs have demonstrated the tendency to overfit training data [46] and to be easily fooled into wrong class predictions with high confidence [2] Also, importantly, ReLU networks have been proven to show high confidence far away from training data [4]. This is contrary to the behavior that would be expected naturally by humans, which is to be uncertain when being confronted with new data examples that have not been observed during training.
However,
Several approaches to predictive uncertainty quantification have been introduced in recent years, considering uncertainty in a Bayesian sense [2] 7 [8 well as from frequentist's point of view [5 5 34 A common evaluation protocol is to discriminate between true and false positives (FPs) by means of a given uncertainty quantification. For an introduction to uncertainty in machine learning,
we refer to 17 for a survey on uncertainty quantification methods for DNNs see g
By design of ordinary DNNs for image classification, their uncertainty is often studied on in- distribution examples [- The task of out-of-distributtin (OoD) detection (or novelty detection) is oftentimes considered separately from uncertainty quantification [29] 31]. Thus, OoD detection in deep learning has spawned an own line of research and method development. Among others, changes in architecture [3], loss function 41 48] and the incorporation of data serving as OoD proxy 16 have been considered in the literature. Generative adversarial networks (GANs) have been used to replace that proxy by artificially generated data examples. In (27]. examples of OoD data are created such that they shield the in-distribution regime from the OoD regime. Note that this often requires pre-training of the generator. E.g. in the aforementioned work, the authors constructed OoD data their 2D example to pretrain the generator. While showing promising results, such GAN-based approaches mostly predict a single score for Ool) detection and do not yield a principled approach to uncertainty quantification distinguishing in-distribution uncertainty between classes and out-of-distribution uncertainty.
In this work, we propose to use GANs to, instead of shielding all classes at once, shield each class separately from the out-of-class (OoC) regime (also cf. figure I. Instead of maximizing an uncertainty measure, like softmax entropy, we combine this with one-vs-all classifier in the final DNN layer. This is learned jointly with class conditionll generator for out-of-class. data in an adversarial framework. The resulting classifiers are used to model (class conditional) likelihoods. Via Bayes rule we define posterior class probabilities in principled way. Our work thus makes the following novel contributions:
1. We introduce a GAN- based model yielding a classifier with complete uncertainty quantifica- tion.
2. Our model allows to distinguish uncertainty between classes (in large sample limit, if properly Iearned, approaching alcatoric uncertainty) from OoD uncertainty (approaching epistemic uncertainty).
3. By conditional GAN trained with shielding in low dimensions without any pre-training of the generator.
beaserrsteinbaseed loss function, we achieve class
4. In higher dimensions, we use a class conditional autoencoder and train the GAN on the latent space. This is coherent with the conditional GAN, allows us use less complex generators and critics and reduces the influence of adversarial directions.
5. We improve over the OoD detection and FP detection performance of state-of-the-art GAN- training based classifiers.
We present in-depth numerical experiments with our method on MNIST, CIFAR1O. CIFAR100 and Tiny ImageNet, accompanied with various OoD datasets. We outperform other approaches, also GAN- based ones, in terms of OoD detection and FP detection performance on CIFARIO. Also on MNIST, CIFARI 10 and Tiny ImageNet we achieve superior OoD detection performance. Noteworthily, on the more challenging CIFARTO. 10, CIFAR 100 and Tiny ImageNet datasets, we achieve significantly stronger model accuracy compared to other approaches based on the same network architecture.

---

2 Related Work
In this section we give an overview of common uncertainty quantification methods as well as publications related to the different parts of our method. In this context the task of uncertainty quantification is to assign scalar values to predictions, quantifying aleatoric (in-distribution) and epistemic -out----iisributioo) uncertainty.
15 5 can be considered as early baseline methods for the task of OoD detection. They are frequentist approaches relying on confidence scores gathered from model outputs. The problem can oftentimes be attributed to the usage of the softmax activation function, which leads to overconfident predictions, in particular far away from training data, or to the decoupling of the confidence score from the original classification model during test time. Our proposed method does not make use of the softmax activation function and can produce unified uncertainty estimates during test time without the requirement of auxiliary confidence scores.
(Baselines) The works by [52
(Conformal methods) Methods associated with the term conformal predictions B5
B
30
predicting, for a given confidence value, a set of classes that is likely to contain the real class. As such, they can give a more intuitive explanation to which classes might be getting confused. In essence, the uncertainty of a prediction can be derived from the size of the predicted set, assigning higher prediction uncertainty to larger sets. They are however not able to quantify both, alcatoric and epistemic uncertainty, and assigning a scalar uncertainty value to predictions, as in our setting, might not be straight forward.
(Data perturbation and auxiliary data) Many methods use perturbed training examples 28 37
29
or auxiliary outlier datasets [16 20
28 use them for their confidence score based on class
conditional Gaussian distributions, while 29 and 377 are utilizing them to increase the separability
between in- and out-of-distribution examples. 16 use hand picked auxiliary outlier dataset during model training and [20] use it for selecting a suitable GAN discriminator during training which then serves for OoD detection. The common problem with using perturbed examples is the sensitivity to hyperparameter selection which might render the resulting examples uninformative. Additionally, auxiliary outlier datasets cannot always be considered readily available and pose the problem of covering only a small proportion of the real world. In contrast, our method is able to produce OoC examples that are very close to the in-distribution but still distinguishable from it, thus we do not require explicit data perturbation or any auxiliary outlier datasets.
(Bayesian methods) Bayesian approaches uncertainty quantification and OoD detection. [24] propose deep ensembles that approximate a distribution over models by averaging predictions of multiple independently trained models. 7 are utilizing Monte-Carlo (MC) sampling with dropout applied to each layer. In (2 a variational learning algorithm for approximating the intractable posterior distribution over network weights has been proposed. While the thcoretical foundation is strong, these methods often require changing the architecture, restricting the model space and/or increased computational cost. While making use of Bayes-rule, we are staying in a frequentist setting and are not dependent on sampling or ensemble techniques. This reduces computational cost and enables our model to produce high quality aleatoric and epistemic uncertainty estimates with a single forward pass. Also, our proposed framework does not change the network architecture, except for the output layer activation function, and thus makes compatible with previously published techniques.
7
2 24 provide strong theoretical foundation for
(One-vs-All methods) One-vs-All methods in the context of OoD detection have been recently studied by 6 [4 (8). In the work by [6] an ensemble of binary neural networks is trained to perform one-vs-all classification on the in-distribution data which are then weighted by standard softmax classifier. (34) use DNN with a single sigmoid binary output for every class and explore the possibility of training the one-vs-all network with a distance based loss function instead of the binary cross entropy. Domain adaptation is considered in [38]. where they utilize one-vs-all classifier for a first OoD detection step before classifying into known classes with a second model. Their training objective is also accompanied by a hard negative mining on the in in-distribution data. All these methods use the maximum predicted probability as score for OoD detection and/or classification and do not aggregate the other probabilities into single score like the method proposed by us. They also do not distinguish into different kinds of uncertainties as our work. Lastly their training objectives are only based in-distribution data. Generated OoC data as used in the present work is not considered.
3

---

(Generative methods) More recently generative model based methods [39 45 47 51 have shown strong performance on the task of -ott---distribution detection by supplying classification models with synthesized out-of-distribution examples. [39] utilize the latent space of a GAN by gradient based reconstruction of an input example. the work by [27], a GAN architecture with an additional classification model is built. The classification model is trained to output uniform distribution over classes on GAN examples close to the in-distribution. This approach is further improved by [45] who show improvements on the task of in the sample space and the quality of generated boundary examples however questionable [51]. A similar approach using& normalizing flow and randomly sampled latent vectors is proposed by [0]. The high level idea of the architectures proposed in the previously mentioned works similar to the one proposed by us. However, other works are not able to approximate the boundary of data distributions with multiple modes as shown by [51]. Due to the fact that our GAN is class conditional and trained on low dimensional latent space, we are able follow multiple distribution modes resulting from different classes. We improve the in-distribution shielding by using a low-dimensional regularizer and have additional advantage in terms of computational cost as cGAN model architecture can be chosen with considerably smaller size due to it being trained in the latent space. Furthermore, these methods do not yield separate uncertainty scores for FP and OoD examples.
detection. The generalization to distant regions
Generating OoD data based on lower dimensional latent representations has been explored in [50, 40 [50] utilize variational Autoencoder (vAE) produce examples that are inside the encoded manifold (type I) as well as outside of it (type II). [40) (GEN) also use a vAE and train a GAN in the resulting latent space, assigning generated examples to the OoD domain in order to estimate Dirichlet distribution on the class predictions. Utilizing a vAE has the advantage that one can make assumptions on the distribution of the latent space but also results in slightly blurry reconstructions. While the work of [40] is the most similar to our method, we improve on several shortcomings. First of all we employ class conditional models to improve diversity and class shielding. Additionally, we are able to distinguish aleatoric and epistemic uncertainty while the method by [40] is not. It assigns the same type of uncertainty to OoD and FP examples.
3 Method
3.1 One-vs-All Classification
We start by formulating our classification model as an ensemble of one-vs-all classifiers. Let C(olæ, y) model the probability that for given class y y = [I,...,,], n). an example with features E X = Rd is OoC. Analogously, C(ilz, v) = 1 - C(olz, y) for given class y models the probability of x being in-class. Let S X x y be our training dataset with p(y), y V, the estimated relative class frequencies. To model C(ilar, y), we use DNN with 2 2 output neurons equipped with sigmoid activations. For each class output y, the data corresponding to class y serves as in-class data and all other data OoC data. Hence, basic variant of our training objective is given by a weighted empirical binary cross entropy
Σ plv) log log(C(o)z,
min S
(o(((C()),)))
1/))
(1)
VEE p()")
Therein,
is weighting the OoC loss counter potential class imbalance. Similarly, 1 the OoC loss compared to the in-class loss. Applying the transformation
p(y) p(y')
weighs
C((xx))) n C((i), + n- C(olx,)))))
C(il,,y)
after training, we obtain an appropriate classifier, formalized as follows:
Lemma (Class posterior). Under typical assumptions of statistical learning theory and training C
on equation I it holds that for (S] + x0
Ö(il,, v)(
p(y|z) = Evey C(1p,,1(p1)) - p()(x))
(3)

---

Acne
(F.x0
Cloks Lap
(x:g)
Adeo
[R.g]
Le
C(de.a)) C(oi..))
Figure 2: Overview of the proposed architecture. Before training the GAN objective together with the classifier, the cΛE is pretrained on the in-distribution training dataset. After that the weights of Aene and Adec are frozen. The flow of information is from left to right, with the top attributed to the GAN loss LGD and the bottom to the classifier loss Lc-
See appendix A for the detailed assumptions and the proof, explaining choice of the classification model. We distinguish between aleatoric and epistemic uncertainty. While aleatoric uncertainty is considered to be inherent all observations and irreducible (for a fixed 2),, epistemic uncertainty is induced by the model choice and the amount of data and can be reduced by additional data and appropriate model selection. Using p(y]x), we estimate the probability of example æ being in-distribution by defining
((ilx,y)?ptt
((izz) = Σ C(il),
E yEy Eyer C(1 v')((')))))))
which yields quantification of epistemic uncertainty via C(olz) 1 Č(l.)). For aleatoric uncertainty estimation, we consider the Shannon entropy of the predicted class probabilities
(x)) - Σ (oll
(5)
NEY
This is sensible definition since we showed that p(y|>) - p(ylx) for - oc. If the real p(ylæ) close to uniform distribution over the classes (which maximizes the Shannon entropy) we have high uncertainty and vice versa. For epistemic uncertainty (())z)) can be considered as a proxy for p(ilæ:), which results in the epistemic uncertainty by 1- C((l)). In addition, we generate for each class OoC examples with conditional GAN. A joint training of classifier and GAN is introduced in upcoming section 3.2
3.2 GAN Architecture
Similar to (27), we combine our classification model with a GAN and train both alternatingly. The assumptions that we made for lemma [ are standard in statistical learning theory, however it is important to notice that we exclude the GAN-ggnnrated data from the statement. By incorporating GAN- MAN-generated data into the training of our classification model introduced in section 3.1 we are violating this assumption. However, in section we demonstrate empirically that this does not harm our classification model performance-wiee
The Wasserstein GAN with gradient penalty proposed by 11 serves basis for our conditional GAN (cGAN). Additionally, we condition the generator as well as the critic on the class labels to generate class specific OoC examples. Inspired by [40 50) where the latent space of a variational autoencoder (vAE) is utilized for GAN training, we proceed analogously, however using a vanilla conditional autoencoder (cAE) as we observed reconstructions with higher visual quality for this choice. Training the cGAN latent space, we do not generate adversarial noise examples and can use less complex generators and crities. Prior to the cGAN training, we train the cAE in-distribution data and then freeze the weights during the cGAN and classifier training. The optimization objective of the cAE given as pixel-wise binary cross-entropy
N
min A
Σ
log(t:) + xx)) -lg((1 34),
(6)
S
N
(2.8)ES
1=1
5

---

. y) the decoded latent variable. 2 = Aeno (z. y) being the encoded example, и; the i-th pixel of example æ and N₂ the number of pixels belonging to z. Therein, the pixel values are assumed to be in the interval [0, 1J. while 0 (0g 0. The cGAN is trained using the objective function
with 2; = (2,
min max
1
Σ (aN))ES
D(zly) - ((2gg) + Agp Lop
S
with D the conditional critic, = (Z, v), 2
G(e, y) the latent embedding produced by the conditional generator, e ~ U 1) noise from a uniform distribution, y class label and Lyp the
gradient penalty from 11 Integrating the classification objective into the cGAN objective, we
alternate between
LCD
min max G
Σ (8,0)S
D(=ly) ((2ly) + Xpp Lgp - da log((C(oo ()) + AnTn
(8)
D
S
and
Le
Areal
p(y)
min
log log(C((ilz,))
Σ
log log(C(o)zz
p(yr)
(2,8)ES
W'EN'oo
(9)
(1 Areat) loo[CCol
with Arcal E [0, 1] being an interpolation factor between real and generated OoC examples and LR being an additional regularization loss for the generated latent codes with hyperparameter ÅR 2 O, which we introduce in section 3.3 The latent embeddings produced by the cGAN are decoded with the pretrained cAE, thus I (2,
Adec (G(e, y). y). That is, the cGAN is trained on the latent space while the classification model is trained on the original feature space. Our entire visualized in figure
3.3
Low-Dimensional Regularizer
low dimensional latent spaces we found to be advantageous to apply an additional regularizer to the generated latent embeddings to improve class shielding. Let (z, y) be the latent embedding of an example or with corresponding class label y and 2(2, y) = [ 2 G(e,
(O, 1)] =
{2) ........ No all generated latent codes with the same class label and normalized to origin z. We
encourage the generator to produce latent codes that more uniformly shield the class by maximizing average angular distance between all ž E Z 2(2,y), which corresponds to minimizing
IR(2, v)
Σ
log
arccos
- π
(10)
N₂ (N: 1)
|
I' ((
i<j
with being the dot-product. The logarithm introduces an exponential scaling for very small angular distances, encouraging more evenly spread distribution of the generated latent codes. This loss is then averaged over all class labels and training data examples
LR LR= n
1
Σ yEY
An(Aee (x. (x.Y)ES
Σ
(11)
N
with NN. [( v')lv' y}1 the number of examples with class label y. In appendix B more detailed explanation this regularization loss is provided.
During our experiments we studied different regularizer losses such as Manhattan/Euclidan distance, infinity norm and standard cosine similarity. In experiments, we found that for our purpose equa- tion performed best. We argue that this can be attributed to the independence of the latent space

---

3
Method
Reference
4
4
Maximum softmax
15
Entropy
Bayes-by-Backpee
E
7
2
5 <
8
MC-Dropout
0
Beep-Ensemble
24
T
Confident Classifier
a)
GEN
440
Figure 3: Generated OoC examples by our approach. a) MNIST examples for digit classes 0-4 (left right). b) CIFARIO 10 examples for classes airplane, automobile, bird, cat and deer (left to right). See figure 5 for more examples.
Table I: Baselines and related meth- ods used for comparing work.
value range, which can have a large impact on the p-norm distance metrics, and to the exponential scaling for very small angular distances.
To this end, the basic variant of our method does not account for model uncertainty. Thus, we also include results with MC-Dropout, which also demonstrates the compatibility of our model with existing methods. Another limitation of our approach is that we are not explicitly accounting for adversarial attacks because during training in the cAE latent space removing any adversarial directions.
Experiments
We compare method with number of related approaches (ef. Iable While the first two methods are simple baselines, the subsequent three ones are Bayesian ones and the final two methods are GAN-based (cf. section 2 Following the publications 44 50 37 15], we consider four experimental
setups using the MNIST (28 x 28, 10 classes) (26). CIFARIO (32 x 32, 10 classes) 21, CIFAR 100 (32 32, 100 classes) 21 and Tiny IeageNet (64 64, 200 classes) 25 datasets as in-distribution,
respectively. Similar to 44 [50] and others, we split the datasets class-wise into two non-overlapping sets, i... MNIST 0-4 / 5-9, CIFARIO 0-4 / 5-9, CIFAR 0-49 / 50-99 and Tiny ImageNet 0-99 / 100-199. While the first half serves as in-distribution data, the second half constitutes OoD cases close to the training data and therefore difficult detect. For the MNIST 0-4 dataset, consider the MNIST 5-9, EMNIST-Letters 4, Bashion-MNISS [53] Omniglot 23 SVHN 33 and CIFARIO datasets as OoD examples. For the CIFARIO 0-4 datasets, we use CIFARIO 5-9, LSUN (55), SVHN Fashion-MNISS and MNIST as OoD examples. The same OoD datasets are used for CIFAR100 except CIFARTO 5-9 being replaced by CIFAR 100 50-99. For the Tiny ImageNet 0-99 dataset we use Tiny ImageNet 190- SVHN, Fashion-MNIST and MNIST as OoD examples. These selections yield compositions of training and OoD examples with strongly varying difficulty for state-of-ther of-thh--rttttttt- OoD detection. Besides that, we examine our method's behavior with two overlapping Gaussians (having trivial covariance structure), see figure I Additionally, we split the official training sets into 80% 20% training validation sets, where the latter are used for hyperparameter tuning and model selection. Like related works, we utilize the LeNet-5 architecture on MNIST and small ResNet on CIFAR1O, CIFARI00 and Tiny ImageNet classification models. To ensure fair conditions, we re- ie-imllemeeed all aforementioned methods while following the authors recommendations for hyperparameters and their reference implementations. For methods involving we used the proposed architectures for those components, while for the sake of comparability sticking to choice of classifier models. All implementations are using Py ToTch (36] and can be found in the associated repository!) ! For each method, we selected the network checkpoint with maximal validation accuracy during training. For more detailed overview of the hyperparameters used in our experiments, we refer to appendix D or the implementation.
2D toy example
more complex architectures, e.g. GAN or a VAF as in 27 40
For evaluation we use the following well established metrics:
Classification accuracy on the in-distribution datasets.
http:://gtthab..cc///oolllyyyyyp
7

---

Table 2: Results for MNIST (0-4) as in-distribution vs [MNIST (5-9), EMIISTT-Lettess, Omniglot,
Fashion Fashion-MNIST, SVHN, CIFARIO) as out- -otto---ditrbbutoon datasets
In-Distriburion
Out-of- Out-of-Distribution
Method
Accuracy
AUROC S/F
BCE
AUROC
AUPR-In
AUPR-Out
FPR@955% TPR.
Ours
90.74 (0.06) 98.35 (0.31)
(0.05)
98.03
30.05,2.663
99.87 (0.02)
8.73
Ours with MC-Dropout
99.80 (0.04)
99.42 (0.11)
1,38 (0.11)
98.58 (0.25)
83.71 (2.40)
99.91 (0.02)
5.60 (0.77)
One-vs-All Baveline
99.84 (0.06)
99.84 (0.06) 0.12 (0.04)
(7.12
66.68(
99.81 (0.01)
(0.56)
Max. Softmax [15
99.87 (0.02)
99.68 (0.13) 0.11 (0.02)
97.07 (0.12)
(1.63)
99.81 (0.01)
9.71 (0:37)
Entropy
99.87 (0.02)
99:06 (0.14) 0.11 (0.02)
17.13:011 (2)
(1.94)
99.81 (0.01)
9.65 (0.39)
Bayes-by-Buu By-aackrooppp
2
99.67 (0.112)
99.30 (0.06)
0.78 (1.05)
95. 16 (0.26)
(2.70)
99.60 (0.13)
17.33 (1.06)
MC-Dropout
99.91 (0.02)
99.62 (0.12)
0.83 (0.10)
69
(0.01)
24
99.89 (0.03)
99.74 (0.08)
0.15 (0.01)
(0.05)
73.099
99.86 (0.00)
7,81 (0.21)
Confdentt Classifier
27
99.82 (0.02)
99.62 (0.15)
0.16 (0.01)
98.15 (1550.13)
78.33 (2.01)
99.88 (0.01)
(0.46)
GEN
90.70 (0:03)
98. (0:45)
1.98 (0.85)
97.78 (0.70)
69.77 (10.20)
99.86 (0.04)
(1.90)
Entropy Oracle
99.79 (0.06)
98.93 (0.68)
0.82 (0.06)
99.90 (0.02)
98. 06 (0.28)
99.99 (0.00)
(0.10)
One-vs-All Oracle
99.77 (0:03)
99.47 (0.16)
(0.02)
99.90 (0.90(0.01)
98.50
99.99 (0.00)
0.40 (0:03)
Table 3: Results for CIFARIO (0-4) as in-distribution vs (CIFARIO (5-9), LSUN, SVHN Fashion- MNIST, MNIST) as out- -idt----ittiiuution datasets
In. Distribution
Out-of-Distriuuut
Method
Accuracy
AUROC S/F
ECE
AUROC
AUPR In
AUPR-Out 1 FPR6955 TPR.
Ours
87.26 (0.29) 84.71 (0.52)
(0.25(
86.49 (0.63)
49.08 (1.05)
98.72 (0.08)
45.78 (2.90)
Ours with MC- -rooDropuut
90.26 (0. (2) 89.19 (0.13)
2.34 (0.35)
89.64 (0.23)
53.15 (0.27)
99.01 (0.05)
43.54 (1.56)
One-vs-All Baseline
(1.62)
(0.81)
8.62 (4.55)
72.52 (2.16) 32.24 (2 12)
96.01 (0. 42)
88.74 (1.
Max. Softmax [B
82. 82.12 (0.31)
83:29 (0.89)
11.34 (0.83)
72.52 (0.51)
30.52 (0.97)
96.10 (0.05)
87.68 (0. (0:43)
Entropy
82.42 (0.31)
83.41 (1.88)
11:34 (0.83)
72.85 (0:49)
30.45 (0.87)
96,21 (0.06)
85.41 (0.89)
Bayes-by- Backkpo
2
81.05 (0.33)
85:22 (0.40)
(0.11)
74.23 (0.96)
29.91 (1.61)
96.48 (0.19)
83.97 (1.47)
MC- (
85.08 (0.56)
83.91 (0.49)
(..4()
71.56 (1 27)
38.75 (1 40)
96.85 (0.17)
82.35 (1:06)
Ense-Eneeellss
24
(0.22)
(0.57)
(.10(0.29)
71.21
32.81 (1 50)
96.13 10)
85.07 (0.81)
Confideat Classifier
X
83.58 (0.11)
85.08 (0.18)
9.31 (0.80)
73.33 (0.53)
32.32 (1 09)
96.29 (0.11)
85.04 (1:09)
GEN [0
82.46 (0.35)
82.88 (0.
(1.88).8))
86.01 (1.60)
12.52 (2.81)
98.66 (0.17)
45.39 (3.26)
Entrogy Oracle
83.41 (0.58)
80.73 (0.54)
7.53(0.22))
95.44 (0.28)
68.51
(0:57)
90.57 (0.04)
17:27 (1.44)
One-ts-All Oraele
83.70(0.50)
81,27 (1:03)
8.85 (0.49)
91.38 (0.74)
53.75 (1
99.15 (0.08)
35.91 (3.79)
Area under the Receiver Operating Characteristic Curve (AUROC). We apply the AUROC to the binary classification tasks tn//out-of-distrbbbe (via the score from equation 4 and
TP/FP (Success/Failure) (via the score from equation (
Expected Calibration Error (ECE) (32) applied the estimated class probabilities p(ylæ) for in-distribution examples x, computed on 15 bins.
Area under the Precision Recall Curve (AUPR) w.r.t. the binary pn--out-of-distribuii decision (via the score from equation ) We further distinguish between AUPR-In and
AUPR-Ou For AUPR-in the in-distribution class is the positive one, while for AUPR- -uu the out-of-distribution class is the positive one.
FPR @ 95% TPR computes the False Positive Rate (FPR) at the decision threshold on the OoD score from equation (4) ensuring True Positive Rate (TPR) of 95%.
Before discussing our results on MNIST, CIFAR1O, CIFAR100 and Tiny ImageNet, we briefly discuss our findings on the 2D example. As can be seen in figure 1 the generated OoC examples are nicely shielding the respective in- in-distribution classes. OoC examples of one class can be in on-distribution examples of other classes. This is an intended feature and to this end, the loss term for the synthesized OoC examples in equation p is class conditional. This feature is supposed to make our one-vs-all classifier predict a high OoC probability in the OoC regime. One can also observe that the estimated epistemic and alcatoric uncertainties are complementary, resulting in a high alcatoric uncertainty in the overlapping region of the Gaussians while also having low epistemic uncertainty there. This is one of the main advantages that sets our approach apart from related methods. Results for a slightly more challenging 2D toy example on the two moons dataset and on a grid of Gaussians are presented in appendix C. We now demonstrate that this result generalizes to higher dimensional problems.
For MNIST and CIFAR10, figure 3 shows the OoC examples produced at the end of the generator training. Due to using a conditional GAN and an AE, we are able to generate OoC examples (instead of only out-of-distribution as in related works) during test time. It can be seen that the resulting examples resemble lot of semantic similarities with the original class while still being distinguishable from them.
8

---

Table 4: Results for CIFARI00 (0-49) as in-distribution vs (CIFARI00 (50-99), LSUN, SVHN Bushion-MNISEE MNIST) as out-of-distribute datasets
In-Distriburion
Out-of-Distribation
Method
Accuracy
AUROC S/F
ECE
AUROC 1
AUPR-In
AUPR-Out
FPR@95% TPR. L
Ours
56.00 (0.73) 73.61 (0:33)
34.32
(0.42)
(0.11(1.40)
28.51 (1.32)
97.96 (7.96(0.19)
(3.23
Ours with MC-Dropout
64.53 (0.47)
80.35 (0.40)
10.92 (0.24)
80.75 (1.19)
31.75
(1.53)
98.04 (0.14)
(8.10(2.11)
One-vs-All Baveline
50.901 (0.53) 76.21 (0.91)
23.89 (2.16)
(1.99
15.69
94.33 (2.69)
92.44 (0.76)
Max. Softmax [15]
56.12 (0.60)
80.68 (0:29)
19.10 (3.25)
67.68 67.68(1.56)
23.08
95.47 (0.30)
88.42 (1.12)
Entropy
56.12 (0.60)
(0:16
19.10 (3:23)
69 69.73(1.71
23.75
95.77 (0.32)
87.08 (1.74)
Bayes-by-Buu By-aackrooppp
2
56.02 (0.50)
(0.55
14.71
(1.31)
69.74 (0.76)
21.60
95.86 (0.12)
87.011 (0.75)
MC-Dropout
59.88 (0.81)
82.37 (0.60)
(0.55 56)
(7.15))
24
62.36 (0.43)
82.77 (0.47)
2.72 (0.37)
(0.50)
29.35 (0.67)
96.53 (0.13)
83.37 (1.41)
Confdentt Classifier
27
54.16 (0.13)
81.07 (0.11) 27.19 (5.45)
68 66 (0.18)
22. 51 (0.20)
95.75 (0.08)
86.17 (0.55)
GEN
61.16 (0:26)
77.83 (0.50)
41.26 (2.06)
43 (2.59)
(2.41)
97.64 (0.33)
61-48 (4.33)
Entropy Oracle
63.66 (0.39)
81.39 (0.00)
19.82 (0. 34)
(0.41))
39. 63 (0.58)
98.68 (0.05)
44.67 (1.46)
One-vs-All Oracle
51.82 (1.81)
76.43 (0.53)
15.26 (4.27)
92.91 (0.25)
(1.33)).37)
99.39 (0.03)
22.35 (0.71)
Table 5: Results for Tiny ImageNet (0-99) in-distribution (Tiny ImageNet (100-199), SVHN, Fashion- Fashion-MNIST, MNIST) as cut-of-disttibution datasets.
Initistriburion
Out-of-Distriiutinn
Method
Accuracy
AUROC S/F
ECE
AUROC
AUPR-In 1
AUPR-Out
FPR095% TPR J
Ours
34.28 (0:37)
71.90 (0.47)
48.94 (0.66)
(1.25(1.61)
26.35 (2.25)
97.66 (0.20)
47.22 (1.85)
Ours with MC-Dropod
45.60 (0.43)
79.18 (0.42)
5.92 (1.38)
94.96 (0.13)
59.76 (0.64)
99.51 (0.01)
13.72 (0.30)
One-vs-All Baseline
35.18 (0.26)
76.23 (0.43)
11:59 (1.41)
55.19(2.29)
17.97 (2.41)
(0.69)
97.32 (0.62)
Max. Softmax [T5]
36.06 (0.30)
78.56 (0.68)
26,01 (7.25)
61 (1.04)
21.07 (0.98)
93.29 (0:29)
92.51 (0.87)
Entropy
36.06 (0.50)
79.39 (0.74)
26.01 (7.25)
21.90 (1.31
93.16 (0.16)
91.79 (1.28)
Bayss-by-Backorop 2
32.31 (0:13)
(0.91) 19.39 (0.62)
05 (2.29)
(1.21
95.23 (0.52)
81.70 (3.53)
MC Dropoutt 77
43.48 (0.53)
80.63 (0.30)
2.79 (0.35)
63.15 (4.25)
27.11 (2:29)
92.78 (1.06)
95.86 (1:28)
Deep-Ensemible
12.48 (0.22)
81.29 (0.38)
16.30 (6.91)
(6.227)
(0.112
(0.07)
98.79 (0.23)
Confideut Classifier
e
36.07 (0.53)
78.66 (0.67)
35.48 (2.13)
59.99 (1.99(1.84)
20. 58 (1.61)
92.66 (0.39)
94.19 (0.51)
GEN 40
30.55 (0.84)
73.40
28.79 (0.79)
84.65
36. (8.25)
98.28 (0.69)
39.67 (12.50)
Entropy Oracle
37.18 (0.50)
79.50 (0.63)
17.05 (2.82)
65.43(1.90)
41.95 (2.31)
99.27 (0.29)
48.74 (6.63)
One-ve-All Oracle
34.92 (0.56)
75.10 (0.92)
20.61 (3.50)
95.75
59.69 (0.50)
99.59 (0.01)
10.30 (0.46)
All presented results are computed on the respective (official) test sets of the datasets. We also conducted an extensive parameter study on the validation sets, which summarized in appendix E. The conclusion of this parameter study is that the performance of our framework is in general stable w.r.t. the choice of the hyperparameters. Increasing \rey positively impacts the model performance up to a certain maximum. The best performance is obtained by choosing latent dimensions such that the cAE is able to compute reconstructions of good visual quality. Across all datasets, choosing Areal E [0.5, 0.6] achieves the best detection scores, also indicating a positive influence of the generated OoC examples on the model's s classification accuracy.
Tables 2 to 5 present the results of our experiments. The scores in the columns of the section In- Dn-Disrribttion are solely computed on the respective in-distribution dataset. The scores in the columns of the section Out-of DfDDitrbbbutinn are displaying the OoD detection performance when presenting examples from the respective in-distribution dataset as well as from the entirety of all assigned OoD datasets. Note that we did not apply any balancing in the OoD datasets but included the respective test sets as (see appendix D for the sizes of the test sets). As an upper bound on the OoD detection performance we also show results for two oracle models, supplied with the real OoD training datasets they are evaluated on. One of them is trained with the standard softmax and binary-cross-entropp to maximize entropy on OoD examples and the other one with our proposed loss function, cf. equation (
We first discuss the in-distribution performance of our method. W.r... MNIST, the results given in the left section of table show that we are on par with -tate-of-the-art GAN-based approaches while still
having a similar ECE, only being surpassed by Deep-Ensembles and the other baselines by a fairly small margin. However, considering the respective CIFARIO results in the left section of table 3 we clearly outperform state-of of thet GAN-based methods as well as all other baseline methods by a large margin. Noteworthily, we achieve an accuracy of 90.26% which is (pp.) above the other classifiers and an AUROC S/F of 89.19% which is 4 to 6 pp. higher than for the other methods. This corresponds to a relative improvement of 33% in accuracy and 26% AUROC S/F compared to the second best method. A similar improvement in accuracy can be observed for CIFAR100 and Tiny ImageNet (tables 3 [5) where the AUROC S/F is slightly lower but still on par with other approaches. Considering BCE on CIFAR10/100 and Tiny ImageNet, our MC-Dropout
8 percent points
9

---

variant is outperforming nearly all related methods, except for CIFARI00 and Tiny ImageNet where it is ranked second. This signals that, although we incorporate generated OoC examples impurifying the distribution of training data presented to the classifier, empirically there is no evidence that this harms the learned classifier, neither w.r.t. calibration, nor w.r.t. separation.
Considering the OoD results from the right-hand sections of tables to 5 the superiority of our method compared to the other ones is now consistent over all four in-distribution datasets. On the MNIST dataset we are outperforming previously published works, especially considering the AUPR-In and FPR 95% TPR metries, with a 25% and 27% relative improvement over the second best method, respectively. This is consistent with the results for CIFARIO and CIFARION 100 as in- distribution datasets where we achieve for both AUROC and AUPR-In a relative improvement of 19%-26% and 3%-15%, respectively, over the second best method. On the higher dimensional Tiny ImageNet dataset, which has 20x more classes than MNIST/CIFAR 10 and 4x more input pixels, the results are even stronger with an 36%-67% relative improvement over the second best competitor.
Comparing our results with the ones of the oracles, two observations become apparent. Firstly, in some OoD experiments the GAN-generated OoC examples achieve results fairly close to or even surpassing the ones of the oracles while also in some of them there is still room for improvement left (in particular w.r.t. FPR TPR). Secondly, GA GAN-generated OoC examples can help improve generalization (in terms of classification accuracy) while real OoD data might be too far away from the in n-diisributtion data. An -att-ttset--wise breakdown of the results in tables 2 5] provided in appendix G. For MNIST, this breakdown reveals that our method performs particularly well in the difficult task of separating MNIST 0-4 and MNIST 5-9. On the other MNIST- reelated tasks we achieve mid-tier results, being slightly behind the other GAN-based methods. The same holds for CIFAR 100 0-49 and CIFAR 100 50-99. However, with regards to CIFAR10 and Tiny ImageNet we are consistently outperforming the other methods by large margins.
In appendix F we present results of an experiment where we perform FP and OoD detection jointly on the computed uncertainty scores. The main observations there are that our method outperforms other
methods and that our method including dropout achieves the overall best detection performance.
5 Conclusion
In this work, we introduced a GAN-based model yielding one-vs-all classifier with complete uncertainty quantification. Our model distinguishes uncertainty between classes (in large sample limit approaching aleatoric uncertainty) from OoD uncertainty (approaching epistemic uncertainty). We have demonstrated in numerical experiments that our model sets a new state-of-the-art w.r.t. OoD as well as FP detection. The generated OoC examples do not harm the training success in terms of calibration, but even improve it in terms of accuracy. We have seen that incorporating MC dropout to account for model uncertainty can further improve the results.
Broader Impact
We are contributing generally applicable methodology which can be used in any real world application. The general direction of making the deployment of models more feasible due to improved quality of uncertainties might ultimately result in a reduction of the number of jobs in the respective sectors. However, as of now, it is also important to note that this method cannot give any guarantees on the estimated uncertainties and thus these should be used with caution and never solely relied upon.
Acknowledgment
M.R. acknowledges useful and interesting discussions with Hanno Gottschalk.
Funding
No third-party funding or support has been received for this work.
10

---

References
[1] Arsenii Ashukha, Alexander Lyzhov, Dmitry Molchanov, and Dmitry P. Vetrov. Pitfalls of in-domain uncertainty estimation and ensembling in deep learning. In 8th International Con- ference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
[2] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural networks. CoRR, abs/1505.05424, 2015.
[3] Maxime Cauchois, Suyash Gupta, and John C. Duchi. Knowing what you know: valid and validated confidence sets in multiclass and multilabel prediction. J. Mach. Learn. Res., 22:81:1- 81:42, 2021.
[4] Gregory Cohen, Saced Afshar, Jonathan Tapson, and André van Schaik. EMNIST: an extension of MNIST to handwritten letters. CoRR, abs/ 702.05337, 2017.
[5] Terrance DeVries and Graham W. Taylor. Learning confidence for -nttof--iittibution detection in neural networks. CoRR, abs/18022 00000.00......... 2018.
[6] Gianni Franchi, Andrei Bursuc, Emanuel Aldea, Séverine Dubuisson, and Isahelle Bloch. One versus all for deep neural network incertitude (OVNNI) quantification. CoRR, abs/2006. 00054, 2020.
[7] Yarin Gal and Zoubin Ghahramani. Bayesian convolutional neural networks with bernoulli approximate variational inference. CoRR, abs/1506.02158, 2015.
[8] Jakob Gawlikowski, Cedrique Rovile Njieutcheu Tassi, Mohsin Ali, Jongseok Lee, Matthias Humt, Jianxiang Feng, Anna M. Kruspe, Rudolph Triebel, Peter Jung, Ribana Roscher, Muham- mad Shahzad, Wen Yang. Richard Bamler, and Xiao Xiang Zhu. A survey of uncertainty in deep neural networks. CoRR, 0bs/2107.03342 2021.
[9] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adver- sarial examples. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
[10] Matej Greie, Petra Bevandic, and Sinisa Segvic. Dense open-set recognition with synthetic outliers generated by real NVP. In Giovanni Maria Farinella, Petia Radeva, José Braz, and Kadi Bouatouch, editors, Proceedings of the 16th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, VISIGRAPP 2021, Volume 4: VISAPP, Online Streaming, February 8-10, 2021, pages 133-143. SCITEPRESS, 2021.
[11] Ishaan Gulrajani, Faruk Ahmed, Martín Arjovsky, Vincent Dumoulin, and Aaron C. Courville. Improved training of wasserstein GANs. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5767-5777, 2017.
[12] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 1321-1330. PMLR, 2017.
[13] Kaiming He, Xiangyu Zhang, Shanqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770-778. IEEE Computer Society, 2016.
[14] Matthias Hein, Maksym Andriushchenko, and Julian Bitterwolf. Why ReLU networks yield high-confidence predictions far away from the training data and how to mitigate the problem. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 41-50. Computer Vision Foundation / IEEE, 2019.
[15] Dan Hendrycks and Kevin Gimpel. baseline for detecting misclassified and -iitr-ddistiiuution examples in neural networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Truck Proceedings. OpenReview.net, 2017.
11

---

[16] Dan Hendrycks, Mantas Mazeika, and Thomas G. Dietterich. Deep anomaly detection with outlier exposure. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
[17]
Eyke Hüllermeier and Willem Waegeman. Alcatoric and epistemic uncertainty in machine learning: an introduction to concepts and methods. Mach. Learn, 110(3):47--566, 2021.
[18] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In Isabelle Guyon, Ulrike von Luxburg. Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages
2017.
[19] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA. USA, May 7-9, 2015, Conference Track Proceedings, 2015.
[20] Shu Kong and Deva Ramanan. OpenGAN: Open-set recognition via open data generation. CoRR, abs/2104.02939, 2021.
[21] Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Léon Bottou, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 25: 26th Anmual Conference on Neural Information Processing Systems 2012. Proceedings of meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pages 1106-11 4, 2012.
[23] B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through 2015.
probabilistic program induction.
[24] Balaji Lakshminarayanaan Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 1402-6413 2017.
[25] Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 23IN, 7(7):3, 2015.
[26] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proc. IEFE, 86(1) 1 11:2278822324 1998.
(27] Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training confidence--alibrate classi- fiers for detecting out-of-distribution samples. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
[28] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting -ii-ri--iittituiionn samples and adversarial attacks. In Samy Bengio, Hanna M. Wallach, Hugo Larochelle, Kristen Grauman, Nicolò -isncBia and Roman Garnett, editors, Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information P Processing Systems 2018, NeurlPS 2018 December 3-8, 2018, Montréal, Canada, pages 7167-7177, 2018
[29] Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing the reliability of -utoof-distributton image detection in neural networks. In 6th International Conference Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018
[30] Soundouss Messoudi, Sylvain Rousseau, and Sébastien Destercke. Deep conformal prediction for robust models. In Marie-Jeanne Lesot, Susana M. Vieira, Marek Z. Reformat, João Paulo Car- valho, Anna Wilbik, Bernadette Bouchon-Meunier, and Ronald R. Yager, editors, Information Processing and Management of Uncertainly in Knowledge-Band -Based Systems- 18th International Conference, IPMU 2020, Lishon, Portugal, June 15-19, 2020, Proceedings, Part I, volume 1237 of Communications in Computer and Information Science, pages 528-540 Springer, 2020.
12

---

[31] Martin Mundt, Iuliia Pliushch, Sagnik Majumder, and Visvanathan Ramesh. Open set recog- nition through deep neural network uncertainty: Does -fittiibbttiittionnn detection require generative classifiers? In 2019 IEEE/CVE International Conference on Computer Vision Workshops, ICCV Workshops 2019, Seoul, Korea (South), October 27-28, 2019, pages 753-757. IEEE, 2019.
[32] Mahdi Pakdaman Naeini, Gregory F. Cooper, and Milos Hauskrecht. Obtaining well calibrated probabilities using bayesian binning. In Blai Bonet and Sven Koenig, editors, Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, January 25-30, 2015, Austin, Texas, USA, pages 2901 -907.. AAAI Press, 2015.
[33] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Ng. Reading digits in natural images with unsupervised feature learning. NIPS, January 2011.
[34] Shreyas Padhy, Zachary Nado, Jie Ren, Jeremiah Z. Liu, Jasper Snock, and Balaji Lakshmi- narayanan. Revisiting one-vs-all classifiers for predictive uncertainty and out-of-distribution detection in neural networks. CoRR, 011220077.5113. 2020.
[35] Sangdon Park, Osbert Bastani, Nikolai Matni, and Insup Lee. PAC confidence sets for deep neural networks via calibrated prediction. In 8th International Conference on Learning Repre- sentations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
[36] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang. Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high- performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d' d'Alché- Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc., 2019.
[37] Jie Ren, Peter Liu, Emily Fertig, Jasper Snock, Ryan Poplin, Mark A. DePristo, Joshua Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-din of-distribution detection. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d' Alché- Buc, Emily B. Fox, and Roman Gamett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 14680-14691, 2019.
[38] Kuniaki Saito and Kate Saenko. Ovanet: One-vs-all network for universal domain adaptation. CoRR, abs/2104.00 03344, 2021.
[39] Thomas Schlegl, Philipp Seeböck, Sebastian M. Waldstein, Ursula Schmidt-Erfurth and Georg Langs. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In Mare Niethammer, Martin Styner, Stephen R. Aylward, Hongtu Zhu, Ipek Oguz, Pew-Thian Yap, and Dinggang Shen, editors, information Processing in Medical Imaging 25th International Conference, IPMI 2017, Boone. NC, USA, June 25-30, 2017, Proceedings. volume 10265 of Lecture Notes in Computer Science, pages 146-157. Springer, 2017.
[40] Murat Sensoy, Lance M. Kaplan, Federico Cerutti, and Maryam Saleki. Uncertainty-awar deep classifiers using generative models. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 5620-5627. AAAI Press, 2020.
[41] Murat Sensoy, Lance M. Kaplan, and Melih Kandemir. Evidential deep learning quantify classification uncertainty. In Samy Bengio, Hanna M. Wallach, Hugo Larochelle, Kristen Grauman, Nicold
and Roman Gareett, editors, Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018 December 3-8, 2018, Montréal, Canada, pages 3183-3193, 2018
[42] Shai Algorithms. Cambridge University Press, 2014.
and Shai Ben-David Understanding Machine Learning From Theory to
[43] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
13

---

[44] Jasper Snoek, Yaniv Ovadia, Emily Fertig, Balaji Lakshminarayanan. Sebastian Nowozin, D. Sculley, Joshua Dillon, Jie Ren, and Zachary Nado. Can you trust your model's un- certainty? evaluating predictive uncertainty under dataset shift. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d' Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13969-13999 13960, 2019.
[45] Kumar Sricharan and Ashok Srivastava. Building robust classifiers through generation of confident out of distribution examples. CoRR, abs/1812.00239, 2018.
[46] Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdi- nov. Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res., 15()):1229-198, 2014.
[47] Ke Sun, Zhamxing Zhu, and Zhouchen Lin. Enhancing the robustness of deep neural networks by boundary conditional GAN. CoRR, abs/1902. 1029, 2019.
[48] Joost van Amersfoort, Lewis Smith, Yee Whye Teh, and Yarin Gal. Uncertainty estimation using single deep deterministic neural network. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 9690-9700. PMLR, 2020.
[49] Ramon van Handel. Probability in high dimensions, 2016.
[50] Sachin Vernekar, Ashish Gaurav, Vahdat Abdelzad, Taylor Denouden, Rick Salay, and Krzysztof Czamecki. Outto--distr detection in classifiers via generation. CoRR, abs/1910.04244 2019.
[51] Sachin Vernekar, Ashish Gaurav, Taylor Denouden, Buu Phan, Vahdat Abdelzad, Rick Salay, and Krzysztof Czarnecki. Analysis of confident-classifiers for out-of-distribution detection. CoRR, abs/1904. 12220, 2019.
[52] Yan Xia, Xudong Cao, Fang Wen, Gang Hua, and Jian Sun. Learning discriminative reconstruc- tions for unsupervised outlier removal. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago. Chile, December 7-13, 2015, pages 1511-1519, IEEE Computer Society, 2015.
[53] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017.
[54] Dmitry Yarotsky. Universal approximations of invariant maps by neural networks. CoRR, abs/1804. 1018004..000 2018.
[55] Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. LSUN: construction of large-scale image dataset using deep learning with humans in the loop. CoRR, abs/1506.03365. 2015.
14

---

Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper's
contributions and scope? [Yes]
(b) Did you describe the limitations of your work? [Yes] See section
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See
section [
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
2. If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results? [Yes] See appendix A.
(b) Did you include complete proofs of all theoretical results? [Yes] See appendix A.
3. If you ran experiments..
(a) Did you include the code, data, and instructions needed to reproduce the main experi- mental results (either in the supplemental material as URL)? [Yes] The code can be found in the associated repository under https: hopp:://gthhb com Hamm//onMcKay/UGAAN
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See appendices D and E.
(c) Did you report error bars (e.g., with respect the random seed after running experi- ments multiple times)? [Yes] Experiments were run 5 times and standard deviation is reported in all tables.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, cloud provider)? [Yes] See appendix D.
4. If you using existing assets (e.g., code, data, models) or curating/releasing
assets...
(a) If your work uses existing assets, did you cite the creators? [Yes] See section 4
(b) Did you mention the license of the assets? [No] All used datasets and their usage rights are well known the research community and publicly available.
(c) Did you include any new assets either the supplemental material or as URL? [No]
(d) Did you discuss whether and how consent was obtained from people whose data you's 're using/curating? [N/A]
(c) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
5. If you used crowdsourcing conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, applicable? [N/A]
(b) Did you describe any potential participant risks, with links Institutional Review Board (IRB) approvals, if applicable? [N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
15


Reviews:
[{"review_id": "vWJUxLW3hE", "reviewer": "Reviewer_pmCh", "summary": "The paper presents UQGAN, a model for uncertainty quantification, including both OoD and FP detection.\nThe proposed model contains a classifier C that outputs for a pair sample-label $(x,y)$ the probability that the pair is in-distribution. \n\nFor training C, the in-distribution pairs consists of real pairs $(x,y)$ directly drawn from the dataset, while out-of-distribution pairs are of two types: either $(x,y')$ where $y'$ is not the correct label associated to $x$, accounting for class uncertainty, or $(\\hat{x}, y)$ where $\\hat{x}$ is a sample generated by a cGAN conditionned on $y$.\nThe cGAN's generator is trained in the latent space of a pretrained conditional auto-encoder jointly with a discriminator, but also with the classifier C so that the generated data pair $(\\hat{x}, y)$ is considered to be out-of-distribution by C.\nAdditionally, a regularizer pushes the generated samples to cover a large range of directions in the latent space.\n\nThey also combine their method with MC dropout and observe further improvements.", "questions": "Looking at the generator objective, it includes a GAN objective, so that the generated distribution p(G(e,y), y) is similar to the real latent distribution p(z,y). This would imply that it pushes $p(\\hat{x}, y)$ close to $p(x,y)$, according to a metric induced by the latent space and the discriminator.\nThe other objective of the generator is given by C, and makes it so that the generated data $(\\hat{x}, y)$ is out-of-distribution, essentially pushing away $p(\\hat{x}, y)$ and $p(x,y)$.\nIn some sense, the overall objective of the generator is a compromise between being in-distribution (according to D) and out-of-distribution (according to C).\n- Can the authors comment on how much those conflicting objectives are a problem when training the generator? I would guess it would be quite unstable when training for a long time, but that the use of a pre-trained decoder alleviates the issue.\n- If we consider the overall objective of the discriminator as a compromise between the two losses, perhaps another way to balance them would be to have the generator target intermediate values for $C(o | \\hat{x},y)$ and $D(\\hat{x},y)$ such as .75 for instance instead of binary classification. Of course, that would require a different loss for the GAN (and not the wasserstein loss). Have the authors considered something in this direction?\n\n", "limitations": "The authors have adressed societal impact in the adequate section.", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strength:\n- The paper is well organized and didactic. As someone not particularly familiar with the uncertainty literature, I especially appreciate the effort put into the related work section.\n- It proposes a novel unified approach for both OoD and FP detection.\n- The experiments are comprehensive, with detailed breakdown and hyper-parameter analysis in the supplementary.\n\nWeakness:\n- The method seems fairly complex to use as it requires different parts (cAE, Generator/Discriminator, Classifier) and hyper-parameters to tune.", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "XXWfjMpFsLQ", "reviewer": "Reviewer_PSka", "summary": "This paper proposes a method to estimate both aleatoric and epistemic uncertainties. It does so by training a conditional GAN in a latent space of a pretrained autoencoder to shield each class with out-of-class samples.", "questions": "Please see my questions in Weakness. Additional question:\n- We know that GAN usually produces much higher sharper images than VAEs. However, given the images Fig. 3 are so blurry, and image quality is not the main focus of this paper, can the authors their design choice of using GAN here? Can other generative model be used here?", "limitations": "N/A", "rating": 5, "confidence": 3, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "## Strength\n- Evaluation metrics are comprehensive.\n- The provided toy dataset is illustrative.\n\n## Weakness\n- Some related works are missing, e.g., conformal prediction.\n- It is hard to assess the effectiveness of the proposed method without experiments on ImageNet. I understand that the limited computational resources might be a concern, but any form of ImageNet like low resolution of 64x64 or TinyImageNet (which has 200 classes) would be very helpful.\n- Section 3.1 and 3.2 are disconnected. How exactly are aleatoric and epistemic uncertainties computed? How are generated $\\tilde{x}$ used? Why are they valid definitions?\n- Why is one-vs-all classifier necessary here? Can similar results be achieved by normal multiclass classifiers?\n- MC-Dropout is basically Bayesian ensemble and can be plugged in other methods as well. It is known that ensemble can drastically improve performance. So the comparisons in Table 3, 4 seem not very fair. Without MC-Dropout, the improvements of the proposed method is not always significant.", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "NCivu_8FmQm", "reviewer": "Reviewer_tm8m", "summary": "This paper introduces cGANs to help deep classifier modelling uncertainty. The generator is encouraged to generate features that lie in real distribution (evaluated by the discriminator) and out-of-class regions (assessed by the classifier). A low-dimensional regulariser is introduced to generate diverse features. The authors verify their ideas on several benchmarks. The improved performance on out-of-distribution data splits shows the effectiveness of the proposed method. Ablation studies verify the importance of the proposed regulariser.", "questions": "-What will happen if the cAE is also trained (not pretrained) during training.\n\n-It seems that the discriminator can easily tell the real features from the fake ones since the distribution of the real features are far away from the fake distribution. In such senario, the generator will occur mode collapse easily as far as my experience. Howevery, mode collapse is not occured in the proposed method. Maybe it's because the low-dimensional regularizer alleviates this issue. Can the authors provide the generated images of the variant in which the low-dimensional regularizer is removed?", "limitations": "NA", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 2, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n-The authors conduct experiments on several datasets, with results showing that the proposed methods are better than previous baselines.\n\n-The authors provide comprehensive ablation studies in the supplementary material to support the soundness of the design of the method.\n\n-The idea of generating out-of-class samples is interesting.\n\n\nWeakness:\n\n-The visualization experiments are conducted on simple datasets which only contain 2 classes. Authors are encouraged to show some visualization results on datasets having multiple-classes.\n\n-All experiments are conducted on small-scale and small-resolution datasets. The authors are encouraged to verify their method on more challenging datasets, such as ImageNet-Dog, ImageNet-O [1] dataset.\n\n[1] Hendrycks, et al. \"Natural adversarial examples.\" CVPR 2021.\n", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "CwoCIOVEE-v", "reviewer": "Reviewer_5piP", "summary": "This paper proposes a GAN-based approach to quantify both out-of-distribution and in-distribution uncertainty in image classification. Specifically, the authors use GANs to generate examples from the out-of-class regime several times, and each time then use the examples to train a one-vs-all classifier in the final DNN layer. Finally, the resulting classifiers are sued to model class conditional likehoods. The authors conduct experiments on MNIST, CIFAR10， CIFAR100 and show state-of-the-art performance in terms of OoD detection and FP detection.", "questions": "1. Typically, GANs are trained to model the distribution of real data, and sometimes even humans cannot distinguish real data from examples generated by state-of-the-art GANs [1].  My question is how to determine whether a GAN-generated example is out-of-distribution or in-distribution? How to choose the GAN models? How does the quality of GAN-generated examples affect uncertainty quantification?\n\n[1] Karras T, Laine S, Aittala M, et al. Analyzing and improving the image quality of stylegan[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2020: 8110-8119.\n\n2. Although the authors provide a survey [16] on uncertainty quantification methods in Line 28, we suggest a brief introduction to uncertainty quantification in the section of Related Work. Besides, we suggest breaking the section of Related Work into several subsections, which can make it clear.\n", "limitations": "1. The organization of the section of Related Work is not clear. \n2. It would be better to show more GAN-generated examples for reference. Besides, it would be better to conduct experiments on a relatively large dataset, e.g., ImageNet. \n", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths： \n1. The presentation of this paper is clear and easy to follow. \n2. Existing GAN-based approaches mostly only predict a single score for OoD examples, while this paper proposes to quantify both in-distribution uncertainty and out-of-distribution uncertainty. This paper achieves this by repurposing the training scheme of the classifier and the generation of OoD examples. The idea is interesting and can inspire others in this community. \n3. The authors show strong results in several datasets, including MNIST, CIFAR10， CIFAR100.\n\nWeaknesses:\n1. There are no ablation studies to study and verify the effectiveness of each design of the proposal. For example, the number of classes used for training the classifier each time, the different image quality of GAN-generated examples, etc. \n2. It would be better to clarify the necessity and importance (or practical significance) of quantifying both in-distribution and out-of-distribution uncertainty in a single model.\n", "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": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ["I don’t know"]}, "extra_text": {}}]

Author rebuttal:

Decision: Accept