Cost-aware Stopping for Bayesian Optimization

Qian Xie, Linda Cai, Alexander Terenin, Peter I. Frazier, Ziv Scully

TL;DR

This paper introduces a novel, principled stopping rule for Bayesian Optimization (BO) that explicitly accounts for varying evaluation costs. By theoretically grounding this rule in state-of-the-art cost-aware acquisition functions (PBGI and LogEIPC), they achieve theoretical guarantees on cost-adjusted regret and demonstrate strong empirical performance across various benchmarks.

What Problem Does This Paper Address?

Bayesian Optimization (BO) is a powerful technique for optimizing expensive black-box functions, commonly used in areas like hyperparameter tuning and scientific discovery. A critical challenge in real-world BO applications is deciding when to stop the optimization process, especially when evaluating the black-box function incurs significant and potentially varying costs. Existing stopping rules often fall into two camps: heuristic (e.g., fixed number of iterations) or theoretically grounded but designed for uniform costs, meaning they don't explicitly account for the cost of each evaluation. This can lead to unnecessary spending and suboptimal performance when costs are high or vary significantly. The authors aim to bridge this gap by developing a stopping rule that is cost-aware, theoretically sound, and adaptable to varying evaluation costs.

Methods

The core contribution is a new cost-aware stopping rule for Bayesian Optimization. This rule is derived from the theoretical underpinnings of the Pandora's Box Gittins Index (PBGI) and log expected improvement per cost (LogEIPC) acquisition functions. The authors show that a principled stopping criterion can be established by leveraging the connection between these two acquisition functions. Specifically, their rule stops when the expected improvement at any unobserved point is no longer worth its evaluation cost.

Key aspects of their method include:

  • Theoretical Grounding: The stopping rule is derived from the optimal policy for the Pandora's Box problem and extended to the correlated setting of BO.
  • Unified Framework: The rule is designed to be compatible with both PBGI and LogEIPC acquisition functions, offering a unified approach.
  • Cost-Awareness: Unlike previous methods, the stopping criterion directly incorporates the cost of function evaluations.
  • Theoretical Guarantees: They prove that their stopping rule, when paired with PBGI or LogEIPC, provides a theoretical bound on the expected cost-adjusted simple regret, ensuring it's no worse than stopping immediately.

Datasets

The paper evaluates their proposed stopping rule on a variety of synthetic and empirical benchmarks:

  • Synthetic Tasks:
    • 1D and 8D Bayesian regret experiments using Gaussian Processes (GP) with Matérn 5/2 kernels.
  • Various cost functions were used: uniform, linear, and periodic.
  • Empirical Benchmarks:
    • LCBench: A hyperparameter optimization benchmark with 35 datasets.
  • NATS-Bench: A neural architecture size search benchmark.

Key Insights and Ideas

  • The Importance of Cost-Aware Stopping: The paper strongly emphasizes that simply optimizing for simple regret (solution quality) without considering evaluation costs can lead to excessive spending. A cost-aware stopping rule is crucial for practical BO.
  • Unified Stopping Rule for PBGI and LogEIPC: The authors demonstrate a surprising theoretical connection that allows a single, principled stopping rule to work effectively with two distinct, state-of-the-art cost-aware acquisition functions. This simplifies implementation and broadens applicability.
  • Theoretical Guarantees Matter: Providing a formal guarantee that the proposed stopping rule is "no worse than immediate stopping" is a significant theoretical contribution, especially in the context of cost-aware optimization where naive stopping rules can perform poorly.
  • Smoothing for Robustness: In high-dimensional or noisy settings, acquisition function optimization can be unstable, leading to spurious stopping signals. The authors show that applying a moving average to the stopping criterion significantly improves robustness and performance.
  • Val/Test Mismatch as a Cause of Underperformance: For some smaller LCBench datasets, the proposed rule's performance degraded. The authors attribute this not to a flaw in the stopping rule itself, but to an intrinsic "validation-test rank preservation" issue within those benchmarks, where optimizing for validation error doesn't reliably translate to test error.

Key Results

  • Theoretical Guarantee: The proposed PBGI/LogEIPC stopping rule, when paired with its matching acquisition function, satisfies a theoretical upper bound on expected cost-adjusted regret, generalizing beyond simpler settings.
  • Empirical Performance: Across synthetic and empirical benchmarks (LCBench, NATS-Bench), the PBGI/LogEIPC stopping rule, particularly when paired with PBGI, consistently matched or outperformed other acquisition-function-stopping-rule pairs in terms of cost-adjusted simple regret.
  • Robustness to Cost Variation: The rule demonstrated strong performance across various cost-scaling factors and cost types (uniform, linear, periodic).
  • Efficiency: The stopping rule was found to be computationally efficient, comparable to other state-of-the-art methods like SRGap-med and UCB-LCB, and significantly faster than PRB.
  • Smoothing Benefits: Applying a moving average window to the stopping criterion improved performance, especially in challenging settings with noisy acquisition function optimization.

Limitations and Future Work

  • Model Misspecification: The paper notes that in some empirical settings (e.g., certain LCBench datasets), model misspecification can lead to suboptimal performance, though the proposed rule remains competitive.
  • Val/Test Mismatch: For smaller LCBench datasets, the performance degradation was linked to an intrinsic benchmark issue rather than a flaw in the stopping rule.
  • Future Work: The authors suggest extending their framework to settings with noisy, multi-fidelity, or batched evaluations, and to alternative objective formulations (e.g., reflecting user preferences beyond simple accuracy). They also highlight the potential for further theoretical improvements by adopting an "after-posterior-update" stopping approach.

Summary updated

BibTeX
@inproceedings{xie2026cost,
  author = {Qian Xie and Linda Cai and Alexander Terenin and Peter I. Frazier and Ziv Scully},
  title = {{Cost-aware Stopping for Bayesian Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=o1Tn2ie0Wy},
}
Figure