Prior-guided Bayesian Optimization

Artur L. F. Souza, Luigi Nardi, Leonardo B. Oliveira, Kunle Olukotun, Marius Lindauer, Frank Hutter

Abstract

While Bayesian Optimization (BO) is a very popular method for optimizing expensive black-box functions, it fails to leverage the experience of domain experts. This causes BO to waste function evaluations on bad design choices (e.g., machine learning hyperparameters) that the expert already knows to work poorly. To address this issue, we introduce Bayesian Optimization with a Prior for the Optimum (BOPrO). BOPrO allows users to inject their knowledge into the optimization process in the form of priors about which parts of the input space will yield the best performance, rather than BO's standard priors over functions, which are much less intuitive for users. BOPrO then combines these priors with BO's standard probabilistic model to form a pseudo-posterior used to select which points to evaluate next. We show that BOPrO is around 6.67x faster than state-of-the-art methods on a common suite of benchmarks, and achieves a new state-of-the-art performance on a real-world hardware design application. We also show that BOPrO converges faster even if the priors for the optimum are not entirely accurate and that it robustly recovers from misleading priors.

Introduction

Bayesian Optimization (BO) has become the standard approach for tuning "black-box" functions, such as hyperparameter optimization for neural networks or hardware configuration. However, standard BO often suffers from a "cold start" problem, spending significant resources exploring regions of the search space that human experts already know to be suboptimal. While BO theoretically allows for the inclusion of prior knowledge via kernels (priors over functions), these mathematical abstractions are often unintuitive for practitioners. An engineer might know a learning rate should be "around 0.001," but translating that intuition into a Gaussian Process kernel is difficult. BOPrO bridges this gap by allowing experts to specify a probability distribution directly over the location of the optimum.

The BOPrO Framework

BOPrO introduces a "pseudo-posterior" that combines human intuition with empirical data. This approach is model-agnostic, leveraging the Probability of Improvement (PI) metric to translate standard discriminative models, like Gaussian Processes, into a generative framework similar to Tree-structured Parzen Estimators (TPE).

Visualization of the data-driven model $M_g(x)$ which captures the probability of a point being "good" based on observed evaluations relative to a threshold $f_\gamma$.

The framework relies on two primary components:

  1. The User Prior ($P_g(x)$): A distribution provided by the expert representing where high-performing points are likely to be found.
  2. The Data-Driven Model ($M_g(x)$): A probabilistic model that learns from actual function evaluations during the optimization process.

Prior Forgetting

A critical innovation in BOPrO is the "prior forgetting" mechanism. The pseudo-posterior is calculated as: $$g(x) \propto P_g(x) \cdot M_g(x)^{t/\beta}$$ where $t$ is the current iteration and $\beta$ is a decay hyperparameter. As the number of evaluations increases, the weight of the data-driven model grows exponentially. This ensures that if the initial human prior is accurate, the optimum is found rapidly; if the prior is misleading, the algorithm eventually ignores the human advice and follows the data to the true optimum.

The evolution of the prior and posterior over 20 BO iterations. As more data is collected, the influence of the initial prior diminishes in favor of the data-driven model.

Experimental Results

The authors evaluated BOPrO across synthetic benchmarks (e.g., the Branin function), surrogate hyperparameter tuning tasks (SVM, XGBoost), and real-world FPGA hardware design applications.

  • Efficiency: On standard benchmarks, BOPrO achieved a 6.67× speedup over popular tools like Spearmint. In hardware design tasks, such as the Molecular Dynamics Grid (MD Grid), it reached a 10.4× speedup over manual expert configurations.
  • Robustness: Experiments demonstrated that even with "misleading" priors intentionally pointing toward the worst values, BOPrO's forgetting mechanism allowed it to recover and eventually match the performance of standard BO baselines.
  • Simplicity: While complex multivariate priors are possible, the authors found that simple, independent priors for each dimension (factorized priors) are sufficient for significant performance gains.

Conclusion and Future Work

BOPrO successfully integrates human expertise into the BO loop in an intuitive and robust manner. While the current implementation uses static priors, future work may explore meta-learning to automatically generate priors from historical data. Additionally, developing graphical user interfaces to help experts "sketch" these distributions could further lower the barrier to entry for complex optimization tasks.

Summary updated

BibTeX
@inproceedings{souza2021prior,
  author = {Artur L. F. Souza and Luigi Nardi and Leonardo B. Oliveira and Kunle Olukotun and Marius Lindauer and Frank Hutter},
  title = {{Prior-guided Bayesian Optimization}},
  booktitle = {Lecture Notes in Computer Science},
  year = {2021},
  doi = {10.1007/978-3-030-86523-8\_17},
}
Figure