Abstract
Bayesian optimization (BO) is a widely popular approach for the hyperparameter optimization (HPO) in machine learning. At its core, BO iteratively evaluates promising configurations until a user-defined budget, such as wall-clock time or number of iterations, is exhausted. While the final performance after tuning heavily depends on the provided budget, it is hard to pre-specify an optimal value in advance. In this work, we propose an effective and intuitive termination criterion for BO that automatically stops the procedure if it is sufficiently close to the global optimum. Our key insight is that the discrepancy between the true objective (predictive performance on test data) and the computable target (validation performance) suggests stopping once the suboptimality in optimizing the target is dominated by the statistical estimation error. Across an extensive range of real-world HPO problems and baselines, we show that our termination criterion achieves a better trade-off between the test performance and optimization time. Additionally, we find that overfitting may occur in the context of HPO, which is arguably an overlooked problem in the literature, and show how our termination criterion helps to mitigate this phenomenon on both small and large datasets.
Introduction
Hyperparameter optimization (HPO) is a critical yet often inefficient phase of the machine learning pipeline. Practitioners typically rely on Bayesian Optimization (BO) to navigate the search space of model settings. However, a persistent challenge remains: determining the optimal stopping point. Traditional approaches rely on fixed budgets—either a set number of iterations or a time limit—which often lead to either premature termination (missing the optimal model) or excessive compute waste.
Researchers from ETH Zürich and Amazon Web Services have introduced a smarter, data-aware termination criterion. Presented at the AutoML Conference 2022, this method stops the search when the potential for further improvement is outweighed by the statistical noise inherent in the evaluation process.
Methodology: Balancing Optimization and Estimation Error
The core philosophy of the proposed termination criterion is that HPO involves two distinct types of error:
- Optimization Error: The gap between the best configuration found so far and the true global optimum on the validation set.
- Estimation Error: The discrepancy between performance on the validation set and the actual performance on unseen test data.
The search should ideally stop once the optimization error becomes smaller than the estimation error. To implement this, the researchers leverage the Gaussian Process (GP) surrogate model used in BO.
By defining an upper bound on "simple regret" ($\bar{r}_t$), the algorithm estimates the maximum possible improvement still available. When this bound falls below a threshold—specifically, the standard deviation of the cross-validation estimator—the algorithm terminates. This ensures that the search doesn't waste resources "optimizing noise" once the signal from the validation data is exhausted.
Experimental Evaluation and Results
The method was rigorously tested across diverse benchmarks, including tabular data from OpenML/UCI (tuning XGBoost and Random Forests), NAS-HPO-Bench (MLPs), and NAS-Bench-201 (Neural Architecture Search for image classification).
Key findings from these experiments include:
- Robustness: The method successfully ensured that true regret remained within user-defined tolerances in 80-90% of cases.
- Efficiency: It achieved a superior trade-off between time saved and performance maintained compared to standard heuristics like stopping after $K$ stagnant iterations.
- Adaptability: Unlike fixed-iteration rules, this criterion adapts to the difficulty of the task; it stops early on noisy datasets and continues when a clear signal for improvement persists.
Mitigating HPO Overfitting
A significant contribution of this work is highlighting "HPO overfitting." If a search continues for too long on a small validation set, it may find hyperparameters that perform exceptionally well on that specific subset but generalize poorly to the test set. The proposed termination criterion acts as a natural regularizer, stopping the search before the model begins to chase validation-specific quirks, thereby often resulting in lower test error than full-budget runs.
Conclusion and Future Directions
While the method provides a robust framework for automatic termination, its effectiveness depends on a well-calibrated surrogate model. Future work may explore more refined variance estimation techniques and the application of this logic to other domains of Bayesian Optimization. By shifting from fixed budgets to principled stopping rules, practitioners can significantly reduce the environmental and financial costs of HPO without sacrificing model quality.
Reference: Makarova, A., et al. (2022). Automatic Termination for Hyperparameter Optimization. AutoML Conference 2022.
Summary updated