On the Role of Model Uncertainties in Bayesian Optimisation

Jonathan Foldager, Mikkel Jordahn, Lars Kai Hansen, Michael Riis AndersenUAI 2023

Abstract

Bayesian Optimization (BO) is a popular method for black-box optimization, which relies on uncertainty as part of its decision-making process when deciding which experiment to perform next. However, not much work has addressed the effect of uncertainty on the performance of the BO algorithm and to what extent calibrated uncertainties improve the ability to find the global optimum. In this work, we provide an extensive study of the relationship between the BO performance (regret) and uncertainty calibration for popular surrogate models and acquisition functions, and compare them across both synthetic and real-world experiments. Our results show that Gaussian Processes, and more surprisingly, Deep Ensembles are strong surrogate models. Our results further show a positive association between calibration error and regret, but interestingly, this association disappears when we control for the type of surrogate model in the analysis. We also study the effect of recalibration and demonstrate that it generally does not lead to improved regret. Finally, we provide theoretical justification for why uncertainty calibration might be difficult to combine with BO due to the small sample sizes commonly used.

Introduction

Bayesian Optimization (BO) is a standard strategy for optimizing expensive "black-box" functions, such as hyperparameter tuning for deep neural networks or chemical compound design. BO works by fitting a surrogate model (e.g., a Gaussian Process) to existing data and using an acquisition function to decide where to sample next. This decision-making process relies heavily on the model's predicted uncertainty to balance exploration and exploitation.

While the community generally assumes that "well-calibrated" models—those whose predicted probabilities match observed frequencies—yield better BO performance, this link has lacked rigorous empirical testing. This paper investigates whether better calibration actually leads to lower regret (the difference between the best possible value and the value found by the algorithm).

Methods

The researchers conducted an extensive empirical study comparing four surrogate models: Gaussian Processes (GPs), Random Forests (RFs), Deep Ensembles (DEs), and Bayesian Neural Networks (BNNs). These were paired with standard acquisition functions: Expected Improvement (EI), Upper Confidence Bound (UCB), and Thompson Sampling (TS).

The study utilized two main benchmarks:

  1. Synthetic Data: 128 optimization problems from the Sigopt benchmark.
  2. Real-World Data: Hyperparameter tuning for MLPs, CNNs, and SVMs across datasets including MNIST and Fashion-MNIST.

Beyond standard benchmarks, the authors performed an intervention study, manually scaling predicted standard deviations by a constant $c$ to simulate miscalibration, and a recalibration study, applying methods like isotonic regression during the BO loop.

Key Insights

The Simpson’s Paradox of Calibration

A primary finding is that the apparent correlation between calibration error (ECE) and regret is a "Simpson's Paradox." While lower ECE globally correlates with lower regret, this relationship largely disappears when controlling for the model type. This suggests that choosing a robust model architecture (like a GP or Deep Ensemble) is far more critical than fine-tuning the calibration of a weaker model.

Total Regret vs. ECE for synthetic (left) and real-world (right) tasks. Points cluster by model type, illustrating that model selection dominates the calibration-regret relationship.

Deep Ensembles and the Impact of Under-confidence

Deep Ensembles emerged as strong contenders, often outperforming GPs in real-world hyperparameter tuning. Furthermore, the intervention study revealed that under-confidence (overestimating uncertainty, $c > 1$) is significantly more damaging to BO performance than over-confidence. Under-confident models often cause the search to degrade into inefficient random sampling.

Impact of scaling uncertainty (factor $c$) on ECE. The study found that while ECE varies with $c$, the resulting regret is particularly sensitive to under-confidence ($c > 1$).

Results and Limitations

  • Recalibration Fails: Attempting to recalibrate models mid-optimization typically increased both calibration error and regret. The small, non-i.i.d. nature of BO data makes it nearly impossible to learn reliable recalibration mappings.
  • The Small-Data Trap: Theoretical analysis demonstrates that standard metrics like Expected Calibration Error (ECE) are unreliable when calculated on the small sample sizes typical of BO.
  • Quantitative Findings: The global correlation between ECE and regret (0.28–0.42) dropped to near zero or negative values when controlling for model type, reinforcing the importance of model selection over calibration.

Conclusion

This work challenges the intuition that calibration is a direct proxy for BO success. Practitioners should prioritize selecting high-quality surrogate models like GPs or Deep Ensembles rather than relying on post-hoc recalibration. Future research should focus on developing uncertainty metrics tailored for sequential, low-data regimes inherent to Bayesian Optimization.

Summary updated

BibTeX
@inproceedings{foldager2023role,
  author = {Jonathan Foldager and Mikkel Jordahn and Lars Kai Hansen and Michael Riis Andersen},
  title = {{On the Role of Model Uncertainties in Bayesian Optimisation}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=kuFGLDlyIb},
}
Figure