Optimal Query Allocation in Extractive QA with LLMs: A Learning-to-Defer Framework with Theoretical Guarantees

Yannis Montreuil, Yeo Shu Heng, Axel Carlier, Lai Xing Ng, Wei Tsang OoiAISTATS 2026

TL;DR

This paper introduces a "Learning-to-Defer" framework for Extractive Question Answering (EQA) that intelligently routes queries to a mix of lightweight on-device models and more powerful off-device experts. By grounding this in statistical decision theory, they achieve a provably optimal balance between accuracy and computational cost, outperforming existing methods on standard EQA benchmarks.

What Problem Does This Paper Address?

Large Language Models (LLMs) are powerful for many tasks, but struggle with precise structured prediction like Extractive Question Answering (EQA), where the model must pinpoint an exact answer span within a text. This is especially problematic in resource-constrained environments (e.g., mobile devices) where large, high-capacity models are infeasible. While smaller models are deployable, they lack the accuracy for EQA. Conversely, specialized EQA models are accurate but inflexible. This creates a dilemma: use a versatile but error-prone small model, or a precise but narrow expert model, often requiring a trade-off between accuracy and efficiency. The paper addresses this by proposing a system that can dynamically choose the best model for each query based on its complexity and associated costs.

Methods

The core of the proposed solution is a Learning-to-Defer (L2D) framework. This framework treats EQA as a classification-with-deferral problem. It uses a rejector model that learns to estimate the "uncertainty" or "difficulty" of a query for both the start and end of the answer span. Based on these scores, the rejector decides whether to:

  1. Use a primary, lightweight on-device model (e.g., a small LLM).
  2. Defer the query to one of several pre-trained, more accurate off-device "expert" EQA models.

The key innovation lies in grounding this decision-making process in statistical decision theory. They define a True Deferral Loss (TDL) that captures the true cost of misprediction and consultation. To make this tractable for training, they introduce a Surrogate Deferral Loss (SDL), which is a differentiable proxy for the TDL. Minimizing this surrogate loss, with theoretical guarantees of Bayes-consistency, allows the learned rejector to converge to the Bayes-optimal allocation policy. This means the system learns to make decisions that are theoretically optimal in the long run, balancing accuracy and computational cost.

Datasets

The paper evaluates their framework on three standard EQA benchmarks:

  • SQuADv1
  • SQuADv2
  • TriviaQA

Key Insights and Ideas

  • EQA is Hard for General LLMs: The paper clearly highlights that while LLMs excel at generative tasks, their performance degrades significantly on structured prediction tasks like EQA, where precise span selection is critical.
  • The Cost-Accuracy Dilemma is Real: For resource-constrained environments, there's a fundamental trade-off between using small, efficient models and larger, more accurate ones. The paper frames this not just as an accuracy problem, but a cost-efficiency problem.
  • Statistical Decision Theory Provides a Principled Approach: By framing query allocation as a decision problem under uncertainty and cost, the authors leverage established theoretical frameworks to derive optimal strategies. This is a more robust approach than heuristic-based routing.
  • Learning to Defer is Provably Optimal: The theoretical guarantees of Bayes-consistency are crucial. They show that their learned deferral policy, derived from minimizing a surrogate loss, provably converges to the optimal policy, ensuring that the system doesn't just perform well in practice but is also theoretically sound.
  • Flexibility in Agent Selection: The framework is designed to work with heterogeneous agents (different models with varying capabilities and costs), making it adaptable to diverse deployment scenarios.

Key Results

  • Improved Accuracy-Efficiency Trade-off: The L2D framework consistently improves the accuracy-efficiency trade-off compared to static baselines and prior routing heuristics across SQuADv1, SQuADv2, and TriviaQA.
  • Cost-Aware Allocation: The rejector model effectively learns to respond to consultation costs. As consultation costs increase, the system relies more on cheaper agents, demonstrating a learned behavior that prioritizes cost-effectiveness.
  • Significant Computational Savings: The paper shows that their approach can achieve comparable or better performance than larger models while using significantly fewer computational resources. For example, they achieve at least a 4x efficiency improvement compared to running a larger Llama-8B model on the edge.
  • Competitive with Single-Expert Routers: In a simplified two-agent setting, their method matches the performance of existing routers when costs are zero and outperforms them when consultation incurs a non-zero cost, indicating the effectiveness of their cost-sensitive objective.
  • Lightweight Rejector: The rejector model itself is very small (4.39M parameters), making it suitable for deployment on resource-constrained devices.

Limitations and Future Work

  • Theoretical Guarantees Under Mild Assumptions: While the framework has theoretical guarantees, these are established under certain mild assumptions. The paper notes that the gap between surrogate and true risk can be influenced by function class restrictions.
  • Focus on EQA: The current work is specifically tailored to Extractive Question Answering. Extending the framework to other structured prediction tasks or generative tasks where uncertainty estimation is critical would be a natural next step.
  • Deployment-Specific Costs: While GFLOPS are used as a proxy for cost, the authors suggest that in practical deployments, costs could be calibrated using more direct metrics like network latency or monetary cost.
  • Future Work: The paper suggests exploring the framework in more complex scenarios, such as those involving non-stationary environments or dynamic agent availability. Further research into optimizing the surrogate loss and its theoretical properties is also implied.

Summary updated

BibTeX
@inproceedings{montreuil2026optimal,
  author = {Yannis Montreuil and Yeo Shu Heng and Axel Carlier and Lai Xing Ng and Wei Tsang Ooi},
  title = {{Optimal Query Allocation in Extractive QA with LLMs: A Learning-to-Defer Framework with Theoretical Guarantees}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=kEVupwepTq},
}
Figure