Papers
Topics
Authors
Recent
Search
2000 character limit reached

Density-Ratio Losses for Post-Hoc Learning to Defer

Published 19 May 2026 in stat.ML and cs.LG | (2605.19557v1)

Abstract: We study post-hoc Learning to Defer (L2D) through the lens of ideal distributions: divergence-regularized reweightings of the data distribution under which a model attains low loss. We define deferral via the density-ratio between a model's and an expert's ideals. Using the reduction from density-ratio estimation to class-probability estimation, we derive the DR CPE losses for post-hoc L2D scorers. Deferral decisions are then made by thresholding the scorer, allowing deferral rates to be adjusted without retraining. For KL-based ideal distributions, our deferral rules recovers Chow's rule under the original distribution and a connection to an expert-tilted Bayes posterior -- which incorporates the expert's performance -- depending on if the ideal distributions are joint or marginal distributions. Experimentally, our approach is competitive compared to common baselines and more robust across dataset settings. More broadly, our results cast post-hoc L2D as density-ratio learning between ideal distributions, bridging Chow-style rules, expert comparison, and elucidating connections to related learning settings including anomaly detection.

Summary

  • The paper proposes a novel framework using density-ratio losses to enable post-hoc learning to defer without modifying the base classifier.
  • It leverages class-probability estimation to dynamically adjust deferral thresholds, ensuring robust performance under distribution shifts.
  • Empirical results on CIFAR-100 and MedMNIST datasets show stable accuracy-deferral tradeoffs, particularly under label noise and expert specialization.

Density-Ratio Losses for Post-Hoc Learning to Defer: A Distributional Perspective

Introduction and Problem Setting

The paper "Density-Ratio Losses for Post-Hoc Learning to Defer" (2605.19557) proposes a distributional framework for post-hoc Learning to Defer (L2D). L2D extends the standard supervised classification paradigm by enabling a model to defer its prediction to an external expert (such as a more accurate model or a human) when its own prediction is likely to be unreliable. This setting is particularly relevant for high-stakes applications and scenarios demanding model cascades or resource optimization.

The focus is on post-hoc L2D, where the base model is frozen and only the deferral mechanism is trained. This is increasingly important as retraining modern large models is resource-intensive. Existing heuristics in post-hoc L2D struggle, especially under expert specialization or distribution shift, and often lack the ability to flexibly adjust the deferral rate without further retraining.

Theoretical Framework: Ideal Distributions and Density-Ratio Thresholding

Central to the proposed framework is the notion of ideal distributions: divergence-regularized reweightings of the data distribution P\mathbb{P} such that a fixed classifier-loss pair (h,)(h, \ell) achieves minimum expected loss up to a regularization parameter. Importantly, for L2D there is a pair of ideal distributions: one for the model hh and one for the expert h(expert)h^{(\mathrm{expert})}.

Deferral decisions are based on density ratios between these ideal distributions. The principal rule is to defer for input xx if the density ratio dQhdQh(expert)(x)\frac{d Q_h}{d Q_{h^{(\mathrm{expert})}}}(x) is below a threshold τ\tau. This design has three critical features:

  1. Plug-in and post-hoc: The mechanism operates without modifying the underlying classifier.
  2. Adjustable deferral rate: The deferral threshold τ\tau can be tuned for different operational points without retraining.
  3. Generality: The construction naturally relates to both Learning to Reject (L2R, where the comparator is the data measure) and anomaly detection via likelihood ratio tests.

The framework formalizes both marginal and joint ideal distributions, with Kullback-Leibler (KL) divergence as the canonical regularizer. Under KL, the optimal solution yields multiplicative exponential reweightings of the data distribution, exposing connections to Generalized Variational Inference and Distributionally Robust Optimization.

(Figure 1)

Figure 1: Post-hoc L2D reduction to learnable density-ratio deferral: the model and expert are associated with their respective ideal distributions, the density-ratio is estimated via CPE, and the decision threshold τ\tau controls deferral rate.

Connection to Chow's Rule and Expert-Tilted Posteriors

A notable theoretical result is that, for marginal ideal distributions with KL divergence, the density-ratio rule recovers the classical Chow's rule for optimal rejection—deferring based on expected loss difference being less than a cost cc. For joint ideal distributions, the rule aligns with Chow's rule but under a tilted data distribution, where the expert’s losses reweight the class-posterior. This expert-tilted Bayes posterior reflects not merely the ambiguity of the input, but ambiguity where the expert's comparative value is maximized.

This is an important divergence from L2R-based analysis, as the L2D joint density-ratio rule can be more conservative and accounts explicitly for areas where the expert has an advantage.

Practical Algorithm: Density-Ratio Estimation via Class-Probability Estimation

A significant barrier to direct use of closed-form density-ratio formulas is the dependence on the true Bayes posterior and access to the expert’s output at inference. The paper addresses this by reducing density-ratio estimation (DRE) to a class-probability estimation (CPE) problem. This reduction enables the learning of a deferral scoring function as a binary classifier to discriminate the model's and expert's ideal distributions.

The associated loss functions—termed Ideal DR CPE Losses—are efficiently estimated using samples reweighted by the exponential of the model or expert loss. The family of such losses encompasses both the marginal and joint ideal settings, though, in practice, the joint-form is preferable due to statistical properties (lower estimation variance and unbiasedness).

Critically, the resulting decision procedure allows post-hoc adjustment of the deferral threshold and can be trained as a simple two-way classifier, facilitating deployment and model selection.

Relationship to Prior Approaches and Anomaly Detection

The paper grounds several recent expert-comparison estimation techniques as limiting cases or specializations of the proposed DR CPE loss family. For example, pointwise regression upon the difference in accuracy between model and expert is shown to be a low-temperature ((h,)(h, \ell)0) limit of the joint DR CPE loss with squared error. Special cases with LSIF and KLIEP losses are also discussed, highlighting when various forms of "difference" or "ratio" decision rules are optimal.

There is also a conceptual bridge to selective classification/anomaly detection: thresholding the density ratio is mathematically equivalent to a generalized likelihood ratio test, as in Neyman-Pearson optimal hypothesis testing.

Empirical Results

Comprehensive experiments on corrupted CIFAR-100 and MedMNIST derivatives (including label noise, long-tailed, and expert-specialist settings) evaluate the DR CPE approach against key baselines: confidence-based rejection, two-stage surrogate losses, and expert-comparison regression.

Under clean data, all approaches perform similarly, but under distribution shift or expert specialization, the DR CPE mechanism is consistently among the best or second-best. Notably, some widely-used two-stage or confidence-based heuristics fail dramatically in adversarial settings (e.g., on DermaMNIST with specialist corruption).

The robustness and accuracy-deferral tradeoff provided by DR CPE is more stable across diverse corruption modes, particularly as deferral rates are increased (see Figure 2). Figure 2

Figure 2: Accuracy versus deferral rate across datasets and corruption regimes for ResNet-based cascades; the density-ratio (DR CPE) methods yield favorable and robust trade-offs compared to common alternatives.

Implications and Future Directions

The framework introduces a principled mechanism for post-hoc deferral in black-box neural networks and model cascades, supporting fine-tuned deferral cost trade-offs without model retraining. The empirical evaluation confirms the robust generalization of DR CPE, especially in the presence of label noise, class imbalance, and expert specialization—scenarios relevant to safety- and reliability-critical AI deployment.

On the theoretical side, the paper’s lens unifies L2R, L2D, and anomaly detection under the umbrella of density-ratio/composite loss estimation. This clarifies the conditions under which various classical rules (e.g., Chow’s, expert-comparison) can be recovered or generalized.

Limitations include the absence of calibration/consistency guarantees enjoyed by some surrogate-loss approaches, and reliance on temperature regularization hyperparameters with practical effect on performance.

Prospective Research Directions

  • Multi-expert/cascade learning: Extending the framework to settings with multiple experts or stages is a logical next step. Connections to multi-distributional DRE and multiclass CPE could be systematically explored to enable adaptive deferral in more complex system architectures.
  • Constraint integration: The ideal distribution view suggests avenues for incorporating fairness, privacy, or budget constraints into the deferral learning process (e.g., limiting expert calls, fairness regularization).
  • Finite-sample (generalization) bounds: Given the reduction to CPE, classical statistical learning theory could potentially provide quantitative robustness guarantees in the style of expert-comparison estimation.

Conclusion

The paper composes an elegant and theoretically grounded advance for post-hoc L2D. By framing defer decisions as thresholded density-ratio comparisons between model and expert ideal distributions—leveraged via class-probability estimation—it provides a robust, modular, and empirically validated mechanism for safe and adaptive prediction systems. The framework further elucidates fundamental ties between selective prediction, anomaly detection, and distributionally robust learning, offering a solid foundation for future work in high-stakes, modular AI.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 8 likes about this paper.