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.
Methods
The study compares three architectural paradigms based on a 14-layer Wide Residual Network:
- Standard Discriminative Classifier: A baseline mapping input $x$ to label $y$.
- Variational Discriminative Classifier: A Bayesian approach ($x \to z \to y$) utilizing a latent space $z$ to capture uncertainty.
- 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.
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