Introduction
In real-world deployments, vision systems face two distinct types of failures: encountering a class they were never trained on (Out-of-Distribution or OoD), and misclassifying a known class (In-Distribution Wrong or InW). Traditional Open-set Recognition (OSR) focuses solely on rejecting OoD samples while attempting to accept all known classes, even if the model's prediction is incorrect.
This paper argues for a more practical paradigm: Unified Open-set Recognition (UOSR). A truly reliable system should only accept In-Distribution Correct (InC) samples, rejecting both unknown samples and wrongly classified known samples. The core challenge is that InW samples often hide in the same high-uncertainty regions as OoD samples, making them notoriously difficult to distinguish.
Key Findings: The "Devil" is the Misclassified Sample
The authors conducted a deep analysis of existing OSR methods (such as SoftMax, ODIN, and OpenMax) and uncovered a surprising trend: these methods are actually better suited for UOSR than traditional OSR.
Why does this happen? The uncertainty distribution of misclassified known samples (InW) is nearly identical to that of unknown samples (OoD). Because OSR methods try to "accept" these InW samples, they inadvertently lower their own performance. When evaluated on the UOSR task—where rejecting InW samples is rewarded—performance metrics like AUROC significantly improve.
Interestingly, the authors found a contradiction between feature space and uncertainty space. Misclassified samples are more similar to correct samples in the feature space, yet their uncertainty scores align more closely with unknown samples. This suggests the "wrongness" stems from the decision boundaries of uncertainty estimation rather than the underlying features themselves.
The Impact of Training Settings
The paper also investigates how common training enhancements affect UOSR:
- Pre-training: Using large-scale datasets (like ImageNet-21k) helps the model distinguish between correct and incorrect known samples, benefiting UOSR.
- Outlier Exposure (OE): Training with unlabeled "background" data is a standard trick for OoD detection. However, the authors show it is a double-edged sword: while it helps identify unknown samples, it can actually harm the model's ability to distinguish between correct and incorrect known samples.
Proposed Method: FS-KNNS
To tackle the UOSR challenge, the authors formulate a "few-shot UOSR" setting, where a small number (1-5) of samples from unknown classes are available during evaluation. They propose FS-KNNS (Few-Shot K-Nearest Neighbor with Softmax), a novel fusion method that leverages both feature distance and uncertainty:
- KNN-based scores: Excellent at separating known from unknown samples based on feature distance.
- Softmax uncertainty: Better at identifying misclassified known samples.
The fusion mechanism uses a sigmoid-like function to dynamically weight the KNN score only when uncertainty is high. This prevents the few-shot OoD information from degrading the classification accuracy of known samples.
Key Results
Across both image (CIFAR100, TinyImageNet) and video (UCF101, HMDB51) domains, UOSR performance consistently outpaced OSR performance for standard methods.
Furthermore, in the few-shot setting, FS-KNNS achieved state-of-the-art results. On the CIFAR100/TinyImageNet (5-shot) benchmark, FS-KNNS reached a UOSR AUROC of 95.51%, significantly outperforming the standard SoftMax baseline (90.51%) and previous state-of-the-art methods.
Limitations and Future Work
While highly effective, FS-KNNS has a few practical limitations:
- Dependence on Reference Samples: The method requires a few samples of unknown classes during evaluation. In a truly "open" world, prior examples of specific unknown classes might not be available.
- Hyperparameter Sensitivity: The fusion relies on hyperparameters that can be challenging to optimize for a completely new dataset without a validation set.
- Computational Cost: KNN-based methods scale poorly as the training set grows, though efficient search algorithms can help mitigate this overhead.
Summary updated