Open Set Recognition Through Deep Neural Network Uncertainty: Does Out-of-Distribution Detection Require Generative Classifiers?

Martin Mundt, Iuliia Pliushch, Sagnik Majumder, Visvanathan RameshWorkshops @ ICCV 2019

Abstract

We present an analysis of predictive uncertainty based out-of-distribution detection for different approaches to estimate various models' epistemic uncertainty and contrast it with extreme value theory based open set recognition. While the former alone does not seem to be enough to overcome this challenge, we demonstrate that uncertainty goes hand in hand with the latter method. This seems to be particularly reflected in a generative model approach, where we show that posterior based open set recognition outperforms discriminative models and predictive uncertainty based outlier rejection, raising the question of whether classifiers need to be generative in order to know what they have not seen.

Introduction

Modern deep learning models suffer from a "known unknown" problem: when presented with data completely unrelated to their training task, they often produce predictions with extremely high confidence. This overconfidence makes standard approaches, such as simple thresholding of softmax outputs, unreliable for safety-critical applications. While Bayesian methods like Monte Carlo Dropout (MCD) attempt to capture epistemic uncertainty, they are not always sufficient to distinguish between in-distribution and out-of-distribution (OOD) samples.

Classification confidence and entropy distributions for standard (top) vs. variational (bottom) classifiers.

Methods

The study compares three architectural paradigms based on a 14-layer Wide Residual Network:

  1. Standard Discriminative Classifier: A baseline mapping input $x$ to label $y$.
  2. Variational Discriminative Classifier: A Bayesian approach ($x \to z \to y$) utilizing a latent space $z$ to capture uncertainty.
  3. Variational Generative Model: A joint model $p(x, y, z)$ that performs classification while simultaneously reconstructing the input $x$ from the latent space $z$.

To identify OOD samples, the authors utilize Extreme Value Theory (EVT). Specifically, a Weibull distribution is fitted to the distances between training samples in the model's latent space. Inputs falling into the distribution's tail are rejected as outliers. Evaluation was performed by training on datasets like FashionMNIST and testing against unseen data such as KMNIST, CIFAR10, and AudioMNIST.

Results and Discussion

The analysis reveals that predictive entropy alone is an insufficient metric for OOD detection, as standard networks frequently assign low entropy (high confidence) to OOD data. However, performing outlier detection on latent features using EVT proves significantly more effective.

The most critical finding is the superiority of generative models. By modeling the underlying data distribution $p(x)$, the latent space becomes more structured, facilitating the definition of boundaries around known data. When combined with Monte Carlo Dropout, the generative EVT approach achieves near-perfect OOD detection in several scenarios.

Outlier rejection performance for the generative model across various OOD datasets.

As shown in the results, a generative model trained on FashionMNIST can reject approximately 95-97% of MNIST and CIFAR10 samples while maintaining a 95% inlier rate for its own training data. This represents a substantial improvement over standard discriminative models.

Model Variant OOD Rejection (MNIST) OOD Rejection (CIFAR10)
Standard Discriminative 38.36% 23.75%
Variational Generative 54.58% 48.69%
Generative + EVT + MCD 95.05% 97.16%
(Results for models trained on FashionMNIST at a 95% inlier threshold)

Conclusion

The integration of generative modeling with statistical outlier detection offers a robust path toward solving the open set recognition problem. While challenges remain regarding the scalability of generative reconstruction to high-resolution images and the computational cost of MCD, this research suggests that "knowing what you don't know" may fundamentally require models that understand the data distribution itself, rather than just the decision boundaries between labels.

Summary updated

BibTeX
@misc{mundt2019open,
  author = {Martin Mundt and Iuliia Pliushch and Sagnik Majumder and Visvanathan Ramesh},
  title = {{Open Set Recognition Through Deep Neural Network Uncertainty: Does Out-of-Distribution Detection Require Generative Classifiers?}},
  year = {2019},
  eprint = {1908.09625},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.09625},
}
Figure