Abstract
Out-of-distribution (OOD) detection is a critical component for the safe deployment of machine learning models in open-world environments. However, existing OOD detection methods often fail when faced with long-tailed class distributions, where a few "head" classes dominate and many "tail" classes have limited samples. In such scenarios, models tend to misclassify OOD samples as head classes due to over-representation bias, or mistake tail classes for outliers due to under-representation. This paper presents Calibrated Outlier Class Learning (COCL), a novel framework that addresses these challenges by introducing a dedicated outlier class and specialized debiasing techniques. COCL combines OOD-aware tail class prototype learning with debiased head class learning and outlier-class-aware logit calibration. Experimental results on CIFAR-LT and ImageNet-LT benchmarks demonstrate that COCL significantly outperforms existing state-of-the-art methods in both OOD detection and long-tailed recognition accuracy.
Introduction: The Challenge of Long-Tailed OOD Detection
Standard deep learning models typically assume a balanced distribution of classes. However, real-world data is inherently long-tailed: a few "head" classes have thousands of examples, while many "tail" classes have only a handful. This imbalance creates a "double bias" that severely degrades OOD detection performance.
Models trained on long-tailed data suffer from two primary types of confusion:
- Head Class Confusion: Models become overly biased toward majority classes, leading them to confidently misclassify unknown OOD objects as "head" classes.
- Tail Class Confusion: Because the model has seen so few examples of "tail" classes, it often treats legitimate minority-class samples as outliers.
Existing solutions often attempt to force OOD data to fit a "uniform distribution" during training, a technique known as Outlier Exposure (OE). However, this approach is mathematically incompatible with the skewed nature of long-tailed data, as it fails to account for the varying density of the in-distribution (ID) classes.
The COCL Framework
To overcome these limitations, the authors introduce COCL, which moves away from forcing OOD data into a uniform prior and instead treats the "Outlier" as its own $(k+1)$-th class. The framework is built upon two main pillars designed to decouple the biases of head and tail classes.
1. Debiased Large Margin Learning
This component refines the geometry of the feature space during training to ensure clear boundaries between ID and OOD samples:
- OOD-Aware Tail Class Prototype Learning: To help the model distinguish between rare tail samples and OOD samples, the authors utilize class "prototypes" (centroids in feature space). The training objective pulls tail samples toward their respective prototypes while simultaneously pushing OOD samples away.
- Debiased Head Class Learning: To prevent OOD samples from "leaking" into head class regions, the framework employs a semi-supervised one-class learning approach. This creates a dedicated "description region" for outliers that is explicitly separated from the high-density regions of the majority classes.
2. Outlier-Class-Aware Logit Calibration
During inference, the model does not rely solely on raw scores. It applies a calibration formula that accounts for the prior probability of each class. Unlike standard calibration methods that only consider the $k$ known classes, COCL incorporates the outlier class into the mathematical formulation. This balances the "confidence" across the entire spectrum, making the OOD detector robust to the frequency imbalances of the training set.
Experimental Evaluation
The authors evaluated COCL on major long-tailed benchmarks, including CIFAR10-LT, CIFAR100-LT, and ImageNet-LT. For auxiliary OOD training data, they utilized subsets of TinyImages 80M and ImageNet-Extra, testing against a suite of six OOD datasets (e.g., SVHN, Texture, Places365).
Key Results
COCL achieved state-of-the-art (SOTA) performance across all benchmarks:
- CIFAR10-LT: COCL reached an AUC of 93.28%, significantly outperforming standard Outlier Exposure (89.76%).
- False Positive Rate (FPR95): On CIFAR10-LT, the FPR (the rate at which outliers are mistaken for known classes) dropped from 53.19% to 30.88%.
- ImageNet-LT: On a large scale, COCL outperformed recent SOTA methods like BERL and PASCL, achieving a 71.85% AUC and improving overall classification accuracy to 51.11%.
Discussion and Conclusion
A key insight from this work is that improving OOD detection can actually enhance the model's accuracy on the original long-tailed task. By better defining the boundaries of what constitutes an outlier, the model becomes more proficient at recognizing its own rare tail classes.
While COCL currently requires access to auxiliary OOD data during training, it establishes a powerful paradigm for robust recognition in imbalanced environments. Future research may focus on achieving similar results without auxiliary data, potentially through generative modeling or self-supervised feature learning.
Summary updated