Abstract
Detecting out-of-distribution (OOD) samples is a critical challenge for deploying robust machine learning models, particularly when training data follows a long-tailed distribution. In such scenarios, models often suffer from head-class bias and tail-class confusion, leading to poor OOD detection performance. This paper introduces Refined Separate Class Learning (RSCL), a framework that addresses these issues through dynamic class-wise temperature adjustment and informative outlier mining. Our approach significantly improves OOD detection metrics across standard benchmarks without compromising—and often improving—in-distribution classification accuracy.
Introduction
Standard machine learning models are frequently overconfident, assigning high-certainty labels to unfamiliar OOD data. While OOD detection is well-studied for balanced datasets, real-world data is typically long-tailed: a few "head" classes dominate the sample count, while many "tail" classes are sparsely represented.
This imbalance creates a dual challenge. First, the lack of samples for tail classes causes the model to frequently misidentify them as OOD. Second, the model's inherent bias toward head classes leads it to misclassify OOD samples into these dominant categories. Existing Separate Class Learning (SCL) methods attempt to mitigate this by treating head and tail classes differently but are often limited by static hyperparameters and non-selective outlier exposure.
Proposed Method: Refined Separate Class Learning (RSCL)
RSCL refines the OOD detection process through two primary technical innovations designed to handle the complexities of imbalanced feature spaces.
1. Dynamic Class-wise Temperature Adjustment
In contrastive learning frameworks, the temperature parameter ($\tau$) dictates the sharpness of the probability distribution, controlling the "push" and "pull" forces between samples. RSCL moves beyond static temperatures by implementing a dynamic adjustment mechanism. The temperature scales based on both the training epoch and the class cardinality. As training progresses, the temperature for tail classes is reduced, effectively "sharpening" the feature representation. This makes tail classes more compact and more distinguishable from OOD noise.
2. Informative Outlier Mining
While standard Outlier Exposure (OE) uses random auxiliary OOD data, RSCL posits that not all outliers provide equal learning signals. The framework categorizes outliers into three types based on their proximity to the training data: tail-class-like, head-class-like, and neutral (ambiguous) outliers. RSCL employs a curriculum-based mining strategy: it begins with a broad mix of outliers and gradually focuses on "Neutral" outliers in the final stages of training to refine the decision boundary where ID and OOD data are most likely to overlap.
Experimental Results
We evaluated RSCL on three major long-tailed benchmarks: CIFAR10-LT, CIFAR100-LT (imbalance ratio of 100), and ImageNet-LT. For outlier exposure, we utilized the 300k Random Images and ImageNet-Extra datasets.
OOD Detection Performance
RSCL consistently outperformed state-of-the-art methods like PASCL and TSCL. On the CIFAR100-LT benchmark, RSCL achieved an average AUROC of 76.11%, a substantial gain over the previous best SCL method (73.10%). Furthermore, RSCL significantly reduced the False Positive Rate (FPR95); for instance, on CIFAR10-LT, the FPR95 dropped to 27.73% compared to 32.81% for standard OE.
In-Distribution Accuracy
A common drawback of OOD detection methods is the degradation of primary classification accuracy. RSCL avoids this trade-off. On ImageNet-LT, RSCL reached an ID accuracy of 46.12%, outperforming baselines by 1-3%. This suggests that the refined feature space created by dynamic temperature adjustment benefits both OOD detection and standard classification.
Conclusion
Refined Separate Class Learning (RSCL) provides a robust solution for OOD detection in imbalanced environments. By dynamically adjusting class-wise temperatures and strategically mining informative outliers, RSCL achieves superior performance across multiple benchmarks. Future work will focus on reducing the dependency on auxiliary OOD data through synthetic outlier generation and extending the framework to open-world continual learning settings.
Summary updated