Learning to reject meets OOD detection: Are all abstentions created equal?

Harikrishna Narasimhan, Aditya Krishna Menon, Wittawat Jitkrittum, Sanjiv KumararXiv 2023

Introduction

In real-world machine learning deployments, models must handle two distinct types of uncertainty: "hard" in-distribution (ID) samples (Selective Classification, SC) and entirely foreign out-of-distribution (OOD) outliers. While these problems have traditionally been studied in isolation, a unified framework is necessary for robust performance. This paper introduces Selective Classification with OOD Detection (SCOD), providing a rigorous statistical framework to determine the mathematically optimal way to reject samples based on both label uncertainty and distributional shifts.

Methodology

The core of the proposed approach is the derivation of the Bayes-optimal SCOD rule. The authors demonstrate that an ideal rejector should threshold a specific combination of the maximum inlier class probability (predictive confidence) and the density ratio between ID and OOD distributions (distributional confidence).

To implement this theory, the paper proposes two distinct "plugin" estimators tailored for different data availability scenarios:

  1. Black-box SCOD: Utilized when only ID data is available. It leverages existing SC scores (e.g., maximum softmax probability) and OOD scores (e.g., gradient norms) and combines them through a theoretically grounded formula.
  2. Loss-based SCOD: Designed for "in the wild" settings where an unlabeled mixture of ID and OOD data is available. This approach uses novel decoupled and coupled loss functions to learn optimal rejection boundaries directly during training.
Comparison of Black-box and Loss-based SCOD frameworks.

Key Insights

A significant finding of this research is the MSP Paradox. The popular Maximum Softmax Probability (MSP) baseline, often considered a standard for OOD tasks, can be fundamentally flawed in SCOD contexts. In certain open-set scenarios, the Bayes-optimal decision actually contradicts the suggestions of MSP. Furthermore, the authors show that optimal SCOD requires sample-dependent thresholds, moving away from the constant thresholds used in traditional methods.

Experimental Results

The methods were evaluated on benchmarks including CIFAR-100 and ImageNet (ID) against a variety of OOD datasets like SVHN and iNaturalist-O. Using the Area Under the Risk-Coverage curve (AUC-RC) as the primary metric, the proposed plugin estimators consistently outperformed existing heuristics.

  • Performance: On CIFAR-100 (with SVHN as OOD), the "Plug-in BB" estimator achieved an AUC-RC of 0.204, a substantial improvement over the MSP baseline of 0.318.
  • Scalability: The framework scales effectively to large-scale models such as BiT ResNet-101 on ImageNet, surpassing previous state-of-the-art methods like SIRC.
  • Robustness: The Black-box estimators remained competitive even when the OOD data encountered at test time differed from that seen during training.

Conclusion and Future Work

This work demonstrates that SC and OOD detection are two sides of the same coin. By providing a unified statistical objective, the authors enable simultaneous optimization of both tasks. Future research directions include improving density ratio estimation for the Black-box approach, addressing potential fairness issues where rejection rules might disproportionately affect specific subgroups, and applying these strategies to adaptive inference for "early-exit" models to save computational resources.

Summary updated

BibTeX
@misc{narasimhan2023learning,
  author = {Harikrishna Narasimhan and Aditya Krishna Menon and Wittawat Jitkrittum and Sanjiv Kumar},
  title = {{Learning to reject meets OOD detection: Are all abstentions created equal?}},
  year = {2023},
  url = {https://openreview.net/forum?id=ZfqZlVgSEA},
}
Figure