Back to AI Research

AI Research

Knowing When to Stop: Bayesian Optimal Stopping for... | AI Research

Key Takeaways

  • Knowing When to Stop: Bayesian Optimal Stopping for LLM Evaluations introduces optstop, a framework designed to reduce the computational cost of evaluating l...
  • LLM evaluations often use fixed sampling budgets, testing every item the same number of times even after estimates are precise.
  • The framework builds on hierarchical Bayesian inference, supports binary, ordinal, and continuous outcomes, and keeps every benchmark item eligible for sampling, without requiring a calibrated item bank.
  • It runs live or retrospectively, and includes a safeguard that samples more cautiously as measured performance approaches zero, where rare successes matter most.
  • In an illustrative 200-item, 10-epoch evaluation, it removes 57%-97% of planned trials across nine validation settings, with overall conclusions equivalent to the full run.
Paper AbstractExpand

LLM evaluations often use fixed sampling budgets, testing every item the same number of times even after estimates are precise. We introduce optstop, a precision-based adaptive stopping framework that treats evaluation as a sequential measurement problem: keep sampling where uncertainty remains high, and stop where estimates are precise or stable enough. The framework builds on hierarchical Bayesian inference, supports binary, ordinal, and continuous outcomes, and keeps every benchmark item eligible for sampling, without requiring a calibrated item bank. It runs live or retrospectively, and includes a safeguard that samples more cautiously as measured performance approaches zero, where rare successes matter most. In an illustrative 200-item, 10-epoch evaluation, it removes 57%-97% of planned trials across nine validation settings, with overall conclusions equivalent to the full run. These results show that LLM evaluation compute can be allocated by uncertainty rather than by fixed repetition counts, with the magnitude of savings depending on evaluation design.

Knowing When to Stop: Bayesian Optimal Stopping for LLM Evaluations introduces optstop, a framework designed to reduce the computational cost of evaluating large language models (LLMs) by stopping data collection once performance estimates reach a specific level of precision. Developed by Toby D. Pilditch of the UK AI Security Institute, the framework replaces fixed-repetition testing with an adaptive approach that monitors uncertainty in real-time.

Reducing Evaluation Costs

Current LLM evaluation practices often rely on fixed sampling budgets, where every item is tested a set number of times regardless of how quickly the model’s performance becomes clear. This leads to redundant testing for stable model-task combinations. The optstop framework treats evaluation as a sequential measurement problem, allowing auditors to stop sampling individual items or model-task groupings as soon as their Bayesian credible intervals meet a user-defined precision threshold. In an illustrative 200-item, 10-epoch evaluation, the framework removed between 57% and 97% of planned trials while maintaining results equivalent to a full, exhaustive run.

How the Framework Works

The framework uses hierarchical Bayesian inference to analyze data at two levels: the individual item level and the broader model-task grouping level. By partially pooling information across items, the system can produce stable estimates even when individual items are stopped at different times.
The tool supports three types of evaluation data:

  • Binary: Correct/incorrect outcomes.

  • Ordinal: Ordered categories, such as 0–10 rubrics.

  • Continuous: Normalized similarity metrics or aggregated scores.
    To prevent premature stopping on tasks where rare but critical successes are important, the framework includes an "asymmetric conservatism adjustment." When performance drops below a low threshold (defaulting to 1%), the system automatically requires more evidence before stopping, ensuring that rare-event scenarios are not overlooked.

Validation and Performance

In a validation experiment across nine different settings—varying by inference pathway and performance level—the framework achieved an average efficiency gain of 81.1%. The continuous pathway proved most efficient, reducing trials by 93%–97%, while binary and ordinal pathways saw reductions between 57% and 84%.
Franklin analysis indicates that the framework’s effectiveness is tied to the information density of the evaluation metrics; continuous scores provide more information per observation than binary outcomes, allowing for faster convergence. The author’s Bayesian equivalence testing confirmed that the truncated evaluations produced results statistically equivalent to full-run evaluations, with the overall mean difference falling well within the defined region of practical equivalence.

Considerations for Implementation

The framework is available as a Python library and integrates with the inspect_ai evaluation platform. Users should note that the framework requires randomized item presentation to function correctly. Additionally, while the framework is designed to be efficient, the author notes that finer groupings of data provide higher resolution but require more observations to reach the stopping threshold, whereas coarser groupings converge faster but may mask performance differences between specific tasks.

Comments (0)

No comments yet

Be the first to share your thoughts!