Uncertainty-Estimation with Normalized Logits for Out-of-Distribution Detection

Mouxiao Huang, Yu Qiao2023

Abstract

Deep learning models are frequently prone to "confident ignorance," where they assign high-probability predictions to Out-of-Distribution (OOD) data that they have never encountered during training. This paper introduces UE-NL (Uncertainty-Estimation with Normalized Logits), a novel framework designed to mitigate overconfidence by decoupling logit magnitude from direction and incorporating a learnable uncertainty module. By utilizing a predicted uncertainty score as an adaptive temperature scalar during training, UE-NL achieves state-of-the-art OOD detection performance while simultaneously improving In-Distribution (ID) classification accuracy.

Introduction

In safety-critical applications such as autonomous driving and medical diagnostics, the ability of a neural network to identify what it does not know is as crucial as its classification performance. Standard approaches, such as Maximum Softmax Probability (MSP), often fail because models naturally learn to minimize training loss by increasing the magnitude (norm) of their output logits. This leads to inflated confidence scores even for OOD samples.

Existing solutions often require exposure to OOD data during training—which is impractical for truly unknown scenarios—or suffer from a trade-off where OOD detection improvements come at the cost of ID classification accuracy. UE-NL addresses these challenges through a robust architectural design that treats uncertainty as a fundamental component of the learning process.

Methodology

The UE-NL framework is built upon three core pillars designed to stabilize confidence and improve separation between known and unknown data.

1. Logit Normalization

To prevent the model from simply scaling up logit magnitudes to reduce loss, UE-NL enforces a constant vector norm on the logits. This decoupling ensures that the optimization process focuses on the relative relationships (direction) between classes rather than raw magnitude, directly addressing the root cause of softmax overconfidence.

2. Learnable Uncertainty Module

The architecture includes a small auxiliary sub-network that predicts a sample-specific uncertainty score ($u$). This score is integrated into the softmax function as an adaptive temperature scalar.

  • For "easy" samples, the predicted uncertainty is low, allowing for strong, confident learning signals.
  • For "hard" or noisy samples, the uncertainty score increases, effectively softening the softmax distribution. This acts as a regulator, making the optimization process more robust to outliers and noise.

3. Uncertainty as a Metric

Unlike traditional methods that rely on the final softmax probability for OOD detection, UE-NL utilizes the magnitude of the predicted uncertainty score itself. This provides a more direct and reliable measure of the model's unfamiliarity with an input.

To prevent the uncertainty score from growing unbounded, the authors implement a KL Divergence loss as a regularizer, framing the uncertainty estimation as a probabilistic, Bayesian-inspired process.

Experimental Setup

The researchers evaluated UE-NL against several state-of-the-art baselines, including LogitNorm and RTS, using standard benchmarks:

  • In-Distribution (ID) Training: CIFAR-10 and CIFAR-100.
  • Out-of-Distribution (OOD) Evaluation: A diverse suite including Textures, SVHN, LSUN-C, LSUN-R, and iSUN.

Results and Discussion

UE-NL demonstrates significant improvements across both detection and classification metrics.

Superior OOD Detection

On the challenging CIFAR-100 dataset, UE-NL achieved a mean FPR95 (False Positive Rate at a 95% True Positive Rate) of 60.1%. This represents a substantial improvement over the previous state-of-the-art, LogitNorm, which recorded 70.1%. The method provides a much cleaner separation between ID and OOD score distributions, particularly in complex multi-class scenarios.

Enhanced Classification Accuracy

Critically, UE-NL does not sacrifice standard performance for safety. On CIFAR-10, the model reached 94.67% accuracy, outperforming the standard Cross-Entropy baseline. This suggests that the uncertainty-aware training process helps the model learn more generalized features by effectively down-weighting noisy training samples.

Robustness

The method proved more resilient to noisy ID data, which often triggers false OOD alarms in other models. By allowing the model to "express" its doubt through the uncertainty module, the backbone remains focused on high-quality feature extraction.

Conclusion and Future Work

UE-NL represents a significant step forward in creating reliable deep learning systems. By integrating logit normalization with an adaptive uncertainty module, the framework provides a principled way to handle the unknown without compromising on-task performance.

Future research directions include:

  • Scalability: Investigating the sensitivity of hyperparameters ($\delta$ and $\lambda$) on large-scale datasets like ImageNet.
  • Near-OOD Detection: Testing the model's ability to distinguish between highly similar classes that were not part of the training set.
  • Computational Efficiency: Further optimizing the auxiliary module to minimize the already small computational overhead for real-time applications.

Summary updated

BibTeX
@misc{huang2023uncertainty,
  author = {Mouxiao Huang and Yu Qiao},
  title = {{Uncertainty-Estimation with Normalized Logits for Out-of-Distribution Detection}},
  year = {2023},
  eprint = {2302.07608},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.07608},
}
Figure