NeurIPS2022

UQGAN: A Unified Model for Uncertainty Quantification of Deep Classifiers trained via Conditional GANs

Philipp Oberdiek, Gernot A. Fink, Matthias Rottmann

26 citations

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. The code and pre-trained weights can be found here: https://github.com/RonMcKay/UQGAN 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-distribution; 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 to the in-distribution data, while their color is coding the class membership.