Abstract
Standard Convolutional Neural Networks (CNNs) are notoriously overconfident, often classifying out-of-distribution (OOD) samples into known categories with high certainty. While "Outlier Exposure"—training models on known OOD datasets—can mitigate this, the selection of these proxy datasets has historically been a matter of trial and error. This paper introduces three computationally efficient metrics—Softmax-based Entropy, Coverage Ratio, and Coverage Distance—to identify "protective" OOD sets. These metrics allow researchers to select training data that leads to significantly higher detection rates on unseen anomalies and improved robustness against adversarial attacks.
Introduction
The deployment of CNNs in safety-critical applications is hindered by their tendency to assign high-confidence scores to inputs far from the training distribution. To address this, researchers use OOD training sets to teach models to recognize "none of the above." However, not all OOD sets are equally effective. For instance, using house numbers (SVHN) to train a classifier for general objects (CIFAR-10) might not generalize to other types of anomalies.
This research addresses a fundamental question: How can we mathematically differentiate OOD sets to pick the one that provides the best "protection" for our model?
Proposed Metrics for OOD Protectiveness
The authors propose that an ideal OOD set should closely "wrap" the sub-manifolds of the in-distribution (ID) data in the model's feature space. To quantify this "protectiveness," three metrics are introduced:
- Softmax-based Entropy (SE): This measures the diversity of the OOD set relative to ID classes. High entropy indicates that OOD samples are distributed evenly across the ID class boundaries, preventing the model from becoming biased toward rejecting only specific types of inputs.
- Coverage Ratio (CR): This measures the percentage of ID data points that have at least one OOD neighbor within a certain radius in the feature space. A high CR suggests the OOD set provides a comprehensive boundary around the valid data.
- Coverage Distance (CD): Serving as a tie-breaker, CD measures the average distance between OOD samples and their nearest ID neighbors. A smaller CD indicates a "tighter" protective shell.
Experimental Results
The metrics were evaluated across image (CIFAR-10, SVHN) and audio (Urban-Sound) benchmarks. The results demonstrate a strong correlation between the proposed metrics and actual OOD detection performance.
Superior Detection and Consistency
In the SVHN task, training with the most protective OOD set identified by the metrics (CIFAR-100) resulted in a 99.88% average rejection rate on unseen OOD data. Conversely, the least protective set (ISUN) achieved only 47.23%. The metrics also correctly identified that synthetic Gaussian noise is a poor training choice due to its low Softmax-based Entropy, despite its apparent diversity.
Adversarial Robustness
A significant finding is the link between protectiveness and adversarial defense. Models trained on highly protective OOD sets were significantly better at detecting black-box Fast Gradient Sign (FGS) attacks. As the attack magnitude increased, the samples were pushed further from the ID manifold and into the "protective" boundary established during training.
Conclusion
This work provides a principled framework for selecting OOD training data. By using Softmax-based Entropy and Coverage Ratio, researchers can identify "protective" datasets that ensure models generalize their rejection capabilities to unknown anomalies. Crucially, these metrics can be calculated using a single pre-trained vanilla CNN, making them a highly efficient alternative to exhaustive trial-and-error training.
Summary updated