NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Anytime Safe PAC Efficient Reasoning

Chengyao Yu, Hao Zeng, Youxin Zhu, Hongxin Wei, Huajun Zeng, Bingyi Jing

Abstract

Large Reasoning Models (LRMs) have demonstrated remarkable performance on complex tasks but suffer from high computational costs and latency. While selective thinking strategies improve efficiency by routing easy queries to non-thinking models, existing approaches often incur uncontrollable errors, especially in online settings where the performance loss of a non-thinking model is only partially observed and data are non-stationary. To address this, we propose Betting Probably Approximately Correct (B-PAC) reasoning, a principled method that enables anytime safe and efficient online reasoning under partial feedback. Specifically, we utilize inverse propensity scoring estimators to construct test supermartingales for candidate thresholds, and then dynamically adjust the routing threshold based on the accumulated statistical evidence of safety. Theoretically, we establish the anytime-valid performance loss control and the efficiency of B-PAC reasoning. Extensive experiments demonstrate that B-PAC reasoning significantly reduces computational overhead, decreasing thinking model usage by up to 81.01%, while controlling the performance loss below the user-specified level.

Introduction

Modern Large Reasoning Models (LRMs), such as OpenAI's o1 or DeepSeek-R1, achieve state-of-the-art performance by generating extensive "chain-of-thought" reasoning paths. However, this capability comes at the cost of significant latency and computational overhead, which is often unnecessary for simpler queries. Selective thinking—routing easier queries to faster, "non-thinking" models—offers a solution, but current implementations are often heuristic or rely on i.i.d. assumptions that fail in real-world, non-stationary online environments.

A critical challenge in online routing is partial feedback: when a query is routed to a cheap model, the system does not observe the "ground truth" answer from the expensive model, making it difficult to assess the error rate accurately. We introduce B-PAC (Betting Probably Approximately Correct) reasoning, a framework that ensures anytime-valid safety guarantees while maximizing efficiency under these constraints.

Methodology: Safety as a Betting Game

B-PAC reasoning frames the routing decision as a dynamic statistical game. The system maintains a set of candidate thresholds for the cheap model's uncertainty scores. For each threshold, it tracks a "test supermartingale"—a mathematical construct representing the accumulated evidence (or "wealth") that the threshold is safe.

To handle partial feedback, B-PAC employs Inverse Propensity Scoring (IPS) from causal inference to create unbiased risk estimators. By betting on the safety of various thresholds, the system can dynamically relax or tighten its routing criteria based on the live data stream. This approach ensures that the empirical risk remains below a user-defined tolerance $\epsilon$ at all times, regardless of shifts in data distribution or the quality of the underlying uncertainty scores.

Performance comparison on a non-stationary data stream. B-PAC (red) maintains the error rate (ER) below the tolerance (green), whereas the PAC baseline (blue) fails to adapt to the distribution shift.

Experimental Evaluation

We evaluated B-PAC across diverse benchmarks including MATH, MMLU-Pro, BBH, and Magpie. To test robustness, we simulated non-stationary data streams by mixing tasks of varying difficulty.

Key Results

  • Safety and Robustness: Unlike heuristic baselines or offline PAC methods, B-PAC consistently respects the error tolerance. In scenarios with sudden difficulty spikes, B-PAC detects the rising error rate and tightens the routing threshold immediately.
  • Efficiency Gains: On the Magpie dataset with an 8% error tolerance, B-PAC reduced expensive thinking model usage to just 18.99%, achieving an 81.01% reduction in thinking model calls. This also resulted in a 41.37% reduction in total tokens generated.
  • Tightness of Bounds: Standard statistical bounds (e.g., Hoeffding-based) are often too conservative for practical use, leading to nearly 100% routing to the expensive model. B-PAC's martingale-based approach provides much tighter bounds, enabling real-world compute savings.
Efficiency gains on a stable data stream. B-PAC significantly reduces the percentage of expensive thinking model calls (ECP) compared to the overly conservative PAC baseline, while still respecting the error tolerance.

Discussion

B-PAC reasoning decouples safety from the quality of uncertainty estimation. While poor uncertainty scores may reduce efficiency, they never compromise the safety guarantee. This makes B-PAC a robust choice for production systems where data distributions are unpredictable.

Future work includes extending the framework to cascades involving more than two models and developing "conditional" B-PAC strategies that adapt to specific query types. By providing a rigorous foundation for selective thinking, B-PAC paves the way for more sustainable and responsive large-scale reasoning systems.

Summary updated

BibTeX
@inproceedings{yu2026anytime,
  author = {Chengyao Yu and Hao Zeng and Youxin Zhu and Hongxin Wei and Huajun Zeng and Bingyi Jing},
  title = {{Anytime Safe PAC Efficient Reasoning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=iMuMdWc7uC},
}
Figure