Density-Ratio Losses for Post-Hoc Learning to Defer

Alexander Soen, Ragnar Thobaben, Joakim Jaldén, Richard NockarXiv 2026 · arXiv

TL;DR

This paper introduces a novel "post-hoc" framework for Learning to Defer (L2D), where a fixed AI model decides when to hand off a task to an expert. By framing deferral as a density-ratio estimation problem between "ideal distributions"—reweightings of data where each agent performs best—the authors create a robust scoring system that can adjust deferral rates on the fly without retraining.

What Problem Does This Paper Address?

In high-stakes fields like medicine or finance, AI models shouldn't always have the final word. Learning to Defer (L2D) aims to build systems that know their own limits and route difficult cases to human experts.

However, most L2D methods require training the model and the "deferral rule" together from scratch. In the era of massive, expensive-to-train foundation models, this is often impractical. Post-hoc L2D attempts to add a deferral mechanism to a pre-trained, fixed model. The challenge is that existing post-hoc methods often struggle when the expert has specialized knowledge or when the data distribution shifts. Furthermore, many current methods require a full retrain if you want to change the "budget" (how often the model is allowed to call the expert).

Methods

The authors propose a distributional perspective based on Ideal Distributions.

  1. Ideal Distributions: For both the model and the expert, the authors define an "ideal" version of the data distribution. This is a version of the original data, reweighted so that the specific agent (model or expert) achieves low loss.
  2. Density-Ratio Deferral: The decision to defer is treated as a hypothesis test. If a specific input $x$ is "more likely" under the expert's ideal distribution than the model's, the system defers. This is calculated using a density ratio.
  3. DR CPE Loss: Estimating density ratios directly is hard. The authors use a mathematical reduction to turn this into a Class-Probability Estimation (CPE) problem. Essentially, they train a lightweight "rejector" model to distinguish between the model's and the expert's ideal distributions using a binary classification loss.
  4. Joint vs. Marginal: The paper explores two ways to construct these ideals. While "marginal" ideals recover classical rules like Chow’s Rule, "joint" ideals lead to a more practical "expert-tilted" posterior that accounts for the expert's specific strengths and weaknesses.

Datasets

The authors evaluated their approach using ResNet architectures on three primary image datasets, modified to simulate real-world challenges:

  • CIFAR-100: A standard vision benchmark.
  • PathMNIST: A colon pathology dataset (9 classes).
  • DermaMNIST: A dermatoscopy image dataset (7 classes).

To test robustness, they applied three types of "corruptions" to the training data:

  • Label Noise: Randomly flipping labels for certain classes.
  • Long-tail: Subsampling classes to create a heavy imbalance.
  • Specialist: Subsampling data such that the expert is only highly proficient in a specific subset of classes (e.g., a "mammal specialist" in CIFAR-100).

Key Insights and Ideas

  • Deferral as Hypothesis Testing: One of the "aha" moments is realizing that deciding to defer is mathematically equivalent to a likelihood ratio test. The system asks: "Which agent's 'ideal world' does this specific data point belong to?"
  • The "Expert Tilt": By using joint distributions, the method doesn't just look at where the model is weak; it looks at where the expert is comparatively strong. This "expert-tilted" view is crucial for specialized domains where an expert isn't a generic oracle but has specific niches.
  • Post-hoc Flexibility: Because the output is a continuous score rather than a binary "yes/no" decision, users can adjust the deferral threshold at inference time. If the human expert suddenly becomes busy, you can lower the deferral rate instantly without touching the weights of the model.

Key Results

The proposed DR CPE approach proved to be highly robust compared to common baselines like confidence-based thresholding or two-stage surrogate losses.

  • Robustness: While some baselines performed well on clean data, they "crashed" in specialized or long-tail settings (e.g., the TwoStage-Exp baseline performed poorly on the DermaMNIST specialist task). DR CPE remained competitive or superior across all corruption types.
  • Expert Comparison: The method outperformed Estimate-MaxProb (which regresses expert confidence) in almost all corrupted scenarios, showing that the density-ratio approach captures the relationship between model and expert more effectively than simple confidence matching.

Limitations and Future Work

  • Consistency Guarantees: Unlike some end-to-end L2D methods, this post-hoc approach currently lacks formal consistency guarantees (proofs that it will always converge to the absolute optimal decision rule).
  • Hyperparameter Sensitivity: The "temperature" parameter ($\gamma$) used to define the ideal distributions can significantly impact performance and requires careful tuning.
  • Multi-Expert Scaling: The current work focuses on a single model and a single expert. The authors suggest that future work should explore "cascades" or routing between multiple base models and multiple specialized experts.

Summary updated

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.
BibTeX
@misc{soen2026density,
  author = {Alexander Soen and Ragnar Thobaben and Joakim Jaldén and Richard Nock},
  title = {{Density-Ratio Losses for Post-Hoc Learning to Defer}},
  year = {2026},
  eprint = {2605.19557},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.19557},
}

Loading related content...

Figure