“Why Not Looking backward?” A Robust Two-Step Method to Automatically Terminate Bayesian Optimization

Shuang Li, Ke Li, Wei LiNeurIPS 2023

TL;DR

This paper introduces a robust, two-step method to automatically terminate Bayesian Optimization (BO) by "looking backward" at previous samples. By proactively detecting when the search enters a local convex region and calculating the local regret, the method saves up to 80% of the computational budget with significantly less performance degradation than existing techniques.

The Million-Dollar Question: When Do We Stop?

Bayesian Optimization (BO) is the go-to strategy for optimizing "expensive" black-box functions—tasks like tuning hyperparameters for deep learning or finding the best control policy for a robot where every single evaluation costs significant time or money.

The critical challenge in BO is deciding when to stop. Currently, most researchers use a fixed budget (e.g., "run for 100 iterations") or simple heuristics (e.g., "stop if the best result hasn't changed in 10 steps"). These approaches are often wasteful or stop too early. Existing "intelligent" termination indicators, such as monitoring the Expected Improvement (EI), tend to be "myopic"—they only look at the current step—and are notoriously unstable across different types of problems.

Oscillating trajectories of existing termination criteria.

A Two-Step "Looking Backward" Method

The authors propose a strategy that evaluates the search history to make a more informed stopping decision. Their method consists of two primary conditions:

  1. Convexity Detection: The algorithm examines the last $\tau$ observed points to determine if the search has entered a convex region (a "bowl" in the landscape). This is done by checking if the observed values satisfy Jensen’s inequality.
  2. Local Regret Estimation: Once a convex region is identified, the method calculates the "local regret"—the potential gap between the current best solution and the true local optimum. If this regret falls below a threshold ($\eta_{lb}$), the process terminates.

To ensure numerical stability, the authors introduce a novel way to calculate the termination indicator by solving a bilevel optimization problem. This helps find a reliable lower bound for the Gaussian Process (GP) variance, preventing the algorithm from being fooled by numerical noise or model underfitting.

Key Insights and Ideas

  • Stability through History: By looking at a window of past samples rather than just the current iteration, the termination signal becomes much smoother and more reliable. Looking backward provides a clear signal of convergence that is invisible if you only look at the current step.
1D search dynamics showing GP predictive mean and variance at different time steps.
  • Robustness Across Tasks: Unlike previous indicators (like EI or PI) which can vary by orders of magnitude depending on the function's scale, the proposed indicator remains remarkably consistent across diverse problems. This makes it much easier to set a "universal" threshold.
  • The Convexity Safeguard: Requiring the search to be in a convex region before stopping prevents the algorithm from terminating prematurely in complex, multi-modal landscapes where it might just be stuck in a flat, non-optimal area.

Experimental Results

The researchers evaluated their method against a wide array of benchmarks, including synthetic functions (Ackley, Levy, Schwefel), Reinforcement Learning tasks (Lunar Lander, Swimmer), and Hyperparameter Optimization (SVM, MLP, Random Forests).

The proposed method significantly outperforms "naïve" and state-of-the-art termination criteria:

  • Efficiency: It saves approximately 80% of the computational budget compared to running a full fixed-budget BO.
  • Performance: The degradation in the final solution quality is an order of magnitude smaller than that of other peer methods.
  • Consistency: The proposed indicator converges to a consistent threshold across all tested problems, whereas other methods diverge wildly depending on the specific task.

Limitations and Future Work

While the method is highly robust, it still requires the user to pre-define a termination threshold ($\eta_{lb}$) and a look-back window ($\tau$). Although the authors provide recommended ranges, finding the absolute optimal threshold for a brand-new, unknown problem remains a minor challenge.

Looking forward, the authors suggest that this "looking backward" philosophy could be extended beyond BO termination to other areas, such as early stopping in neural network training or anomaly detection in data streams.

Summary updated

BibTeX
@inproceedings{li2023why,
  author = {Shuang Li and Ke Li and Wei Li},
  title = {{“Why Not Looking backward?” A Robust Two-Step Method to Automatically Terminate Bayesian Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=IMiGRqltQQ},
}
Figure