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:
- In-Distribution (ID) Risk: The model sees a "cat" but the image is blurry or ambiguous, leading to a high probability of misclassification.
- 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.
- Distributional Ratios: Alexander Soen and colleagues suggest in Rejection via Learning Density Ratios that we can frame rejection as a shift toward an "idealized" distribution where the model is most effective. By calculating the ratio between this ideal and the actual data, we can apply rejection post-hoc without retraining.
- Augmented Softmax: In Augmenting the Softmax with Additional Confidence Scores, Guoxuan Xia and Christos-Savvas Bouganis introduce SIRC, which combines standard softmax scores with class-agnostic feature metrics. This allows the model to retain its ability to catch ID errors while gaining the sensitivity needed to spot OOD samples.
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.