Rejection via Learning Density Ratios

Alexander Soen, Hisham Husain, Philip Schulz, Vu Nguyen

Introduction

In high-stakes applications such as autonomous driving, medical diagnostics, and financial forecasting, the cost of an incorrect prediction often far outweighs the benefit of a correct one. In these contexts, a model must possess the ability to "abstain" from making a prediction when uncertainty is high—a task known as classification with rejection.

Traditional approaches to this problem typically fall into two categories: training specialized models from scratch using custom loss functions or relying on post-hoc confidence scores (like softmax probabilities). The former is computationally expensive and often fails to scale to multiclass problems, while the latter can be easily misled by overconfident but incorrect predictions. This paper proposes a third way: a mathematically grounded, post-hoc framework that treats rejection as a problem of identifying distributional shifts between real-world data and a model's "ideal" operating environment.

The Idealized Distribution Framework

The core innovation of this research is the shift in perspective from optimizing loss functions to analyzing data distributions. The authors introduce the concept of an Idealized Distribution ($Q$). This distribution represents a theoretical version of the world where the pre-trained classifier $h$ achieves its lowest possible risk.

Using Generalized Variational Inference (GVI), the idealized distribution $Q$ is defined by balancing two competing objectives:

  1. Risk Minimization: Minimizing the expected error of the model $h$.
  2. Distributional Fidelity: Staying close to the original data distribution $P$.

To decide whether to reject a specific input $x$, the framework calculates the density ratio $\rho(x) = dQ/dP$. A low ratio indicates that the input $x$ is significantly more likely to occur in the real-world distribution ($P$) than in the model's "ideal" distribution ($Q$). In such cases, the model is deemed unreliable for that specific input and opts to reject it.

Theoretical Unification via $\alpha$-Divergences

The "closeness" between the idealized distribution $Q$ and the real distribution $P$ is measured using $\phi$-divergences, specifically the family of $\alpha$-divergences. This choice provides both theoretical depth and practical flexibility:

  • Connection to Classical Theory: The authors demonstrate that when $\alpha=1$ (corresponding to KL-divergence), the framework recovers Chow’s rule, a foundational principle in classical rejection theory. This provides a modern optimization-based bridge to long-standing statistical concepts.
  • Robustness via Pearson $\chi^2$: When $\alpha=3$, the authors derive a closed-form solution that proves particularly robust in practice.

Crucially, this framework is entirely post-hoc. It only requires a calibrated version of the original model—achievable through simple techniques like temperature scaling—to estimate point-wise risk, meaning practitioners do not need to discard or retrain their existing, high-performing classifiers.

Experimental Evaluation

The framework was rigorously tested across six multiclass classification datasets, spanning tabular data (Gas Drift, HAR), standard image benchmarks (MNIST, CIFAR-10), and medical imaging (OrgMNIST, OctMNIST). To simulate real-world challenges, the authors also evaluated the models on noisy datasets where 25% of training labels were randomly flipped.

Key Findings

  1. Superior Accuracy-Rejection Trade-offs: The density-ratio rejectors (specifically KL and $\alpha=3$) consistently matched or outperformed state-of-the-art baselines like CSS and DEFER.
  2. Stability in High-Coverage Regimes: In scenarios where rejection must be kept to a minimum (e.g., accepting >95% of samples), the proposed method remained stable, whereas baseline accuracies often degraded sharply.
  3. Resilience to Noise: On corrupted versions of CIFAR-10 and MedMNIST, the $\alpha=3$ rejector was exceptionally effective at identifying and filtering out samples with flipped labels, maintaining high accuracy where other "wrap-around" methods failed.

Discussion and Limitations

This "Happy Place" perspective—asking how far a data point is from the model's ideal distribution rather than just measuring uncertainty—offers a more robust signal for rejection. By tuning the $\alpha$ parameter, practitioners can adjust the aggressiveness of the rejection region to suit the specific risk profile of their domain.

However, the method is not without limitations. Its effectiveness is intrinsically linked to the calibration of the pre-trained model. If a classifier is "confidently wrong" and poorly calibrated, the resulting density ratio will be inaccurate. Furthermore, while the framework shows promise for classification, extending it to regression remains challenging due to the difficulty of estimating conditional variance in continuous output spaces. Future research will focus on learning the density ratio $\rho$ directly through iterative optimization to further improve performance and generalizability.

Summary updated

BibTeX
@inproceedings{soen2024rejection,
  author = {Alexander Soen and Hisham Husain and Philip Schulz and Vu Nguyen},
  title = {{Rejection via Learning Density Ratios}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=JzcIKnnOpJ},
}
Figure