Unified Selective Classification and Out-of-Distribution Detection

This direction is merged into another direction: selective prediction. Its last version stays readable and citable here.

Version 1 of 121 papers44 conceptsfrozen 2026-10-04

In high-stakes machine learning deployments, a model’s most valuable output is often the decision to say nothing at all. This "reject option" is critical when a model is either likely to misclassify a familiar input or when it encounters something entirely outside its training distribution.

Historically, researchers treated these as two distinct silos: Selective Classification (handling internal model errors) and Out-of-Distribution (OOD) Detection (handling external novelties). However, recent work has converged on a unified framework—often called Selective Classification with OOD detection (SCOD)—proving that these two failure modes are mathematically inseparable and can be solved with a single, optimal decision rule.

The Two Faces of Uncertainty

To understand why a unified approach is necessary, consider the two ways a classifier fails. As Jihyo Kim and colleagues argue in A Unified Benchmark for the Unknown Detection Capability of Deep Neural Networks, a robust system must simultaneously manage:

  1. In-Distribution (ID) Risk: The model sees a "cat" but the image is blurry or ambiguous, leading to a high probability of misclassification.
  2. Out-of-Distribution (OOD) Risk: The model sees a "platypus," a category it was never trained to recognize.

Traditional "Open-set Recognition" often focused only on the latter, but Jun CEN and co-authors point out in The Devil is in the Wrongly-classified Samples that it is counterproductive to accept an ID sample that the model is going to get wrong. A truly safe system should reject both.

The Geometry of Optimal Rejection

The core breakthrough in this field is the discovery of the Bayes-optimal rejection rule. Researchers like Harikrishna Narasimhan and Aditya Krishna Menon have shown that the best way to decide whether to abstain is not a simple threshold on confidence.

In Plugin estimators for selective classification with out-of-distribution detection, the authors derive that the optimal strategy involves a comparison between the maximum posterior class probability (how sure the model is about its best guess) and the density ratio of the data distributions (how likely the input is to be in-distribution versus out-of-distribution).

Vojtech Franc and Daniel Průša further refined this in SCOD: From Heuristics to Theory. They demonstrate that the optimal selector is actually a linear boundary in a two-dimensional feature space. One dimension represents the conditional risk (the probability of error on known classes), and the other represents the likelihood ratio (the evidence that the sample is OOD). By combining these two scores linearly, a model can perfectly balance the trade-off between accuracy and coverage.

Rejection as a Hypothesis Test

Why does this linear combination work? Alvin Heng and Harold Soh provide an intuitive statistical framing in Know When to Abstain: Optimal Selective Classification with Likelihood Ratios. They frame selective classification as a hypothesis test:

  • $H_0$: The model’s prediction is correct.
  • $H_1$: The model’s prediction is incorrect.

Invoking the Neyman–Pearson lemma—a fundamental principle of statistics—they prove that the most powerful way to decide between these two is the ratio of their likelihoods. This explains why simple heuristics (like just looking at the top softmax score) often fail under distribution shift: they don't explicitly account for the "density" of errors.

From Theory to Post-hoc Practice

While the theory suggests we need to know the true data densities, recent work has focused on making these ideas practical for pre-trained "black-box" models.

Why Unification Matters

The unification of these tasks is more than a mathematical curiosity. As shown by Vojtech Franc and Daniel Průša in On discriminative learning of prediction uncertainty, different deployment goals—such as minimizing total cost or maximizing coverage under a fixed risk budget—all converge on the same optimal strategy. By treating ID and OOD uncertainty as two parts of a single scalar "uncertainty score," practitioners can finally build systems that know exactly when they don't know, regardless of where the uncertainty comes from.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_unified_selective_classification_and_out_1239af9b,
  title = {Unified Selective Classification and Out-of-Distribution Detection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/unified-selective-classification-and-out-of-distribution-detection/rdr_1239af9b5d2e41728c1362397118ef04},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-05},
}

This exact version (version 1, frozen text):

@misc{lacuna_unified_selective_classification_and_out_1239af9b_v1,
  title = {Unified Selective Classification and Out-of-Distribution Detection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/unified-selective-classification-and-out-of-distribution-detection/rdr_1239af9b5d2e41728c1362397118ef04/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-05},
}