Abstract
Standard uncertainty estimation methods often struggle to handle both "near" and "far" out-of-distribution (OoD) data simultaneously. This paper presents a unified approach that decomposes neural network representations into discriminative (class-related) and non-discriminative (class-irrelevant) features. By evaluating uncertainty in both subspaces independently, the proposed method excels at detecting both subtle semantic anomalies and obvious domain shifts, achieving superior AUROC scores across diverse benchmarks.
The Near vs. Far OoD Dilemma
In real-world deployment, machine learning models must reliably identify when input data falls outside their training distribution. This challenge is typically categorized into two types:
- Far OoD Detection: Distinguishing between completely different data domains (e.g., identifying a house number when trained on animal images).
- Near OoD Detection: Distinguishing between semantically similar but distinct classes (e.g., identifying a "beaver" when trained on "otters").
Existing techniques, such as the standard Mahalanobis distance, often excel at far OoD detection but fail on near OoD tasks. Conversely, recent attempts to improve near OoD performance frequently degrade a model's ability to catch far-flung anomalies. The authors argue this trade-off exists because standard methods conflate class-essential features with irrelevant background information within a single representation space.
Methodology: Feature Decomposition
The core innovation is the explicit separation of a model's learned representation ($z$) into two distinct components:
- $z_d$ (Discriminative): Features essential for classification (e.g., the specific shape of a cat's ears).
- $z_n$ (Non-discriminative): Features that are present in the data but irrelevant to the labels (e.g., background textures, lighting, or image style).
To achieve this, the researchers employ an independent cross-entropy (iCE) loss paired with an invertible neural network. The invertibility ensures that no information is discarded during the transformation. The iCE loss then forces the network to pack all class-relevant information into the first few dimensions ($z_d$), leaving the remaining dimensions ($z_n$) to capture "noise" or background features.
Once decomposed, uncertainty is calculated using the Mahalanobis distance on both parts separately. The final uncertainty score is the sum of these two distances. This dual-alarm system triggers if either the class features appear incorrect (near OoD) or the background/style features appear alien (far OoD).
Empirical Results and Insights
The decomposition method was tested using CIFAR-10 as the in-distribution dataset, with SVHN (far OoD) and CIFAR-100 (near OoD) as benchmarks.
Key findings include:
- Consistent Performance: The "Dis score + Non-dis score" approach achieved 98.41% AUROC on SVHN and 89.95% AUROC on CIFAR-100.
- Robustness: On a "Union" benchmark combining both SVHN and CIFAR-100, the method reached 94.18% AUROC, the highest in the study, proving it does not sacrifice one type of detection for the other.
- Interpretability: By categorizing features, we gain insight into why a model is uncertain. High discriminative uncertainty suggests a semantic mismatch, while high non-discriminative uncertainty suggests a stylistic or domain shift.
Conclusion and Future Directions
By decomposing representations, this research provides a more principled way to handle the spectrum of out-of-distribution data. While the method currently relies on high-quality pre-trained feature extractors and has primarily been tested on small-scale image benchmarks like CIFAR, it sets a new standard for deterministic uncertainty estimation. Future work will focus on scaling these techniques to high-resolution, real-world data such as autonomous driving datasets and enforcing even stricter independence between the decomposed feature sets.
Summary updated