Bayesian Optimization with a Prior for the Optimum

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

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.67\times $$ 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 expensive "black-box" functions, such as hyperparameter optimization for deep learning or the configuration of complex hardware systems. Despite its success, standard BO suffers from a significant limitation: it is difficult to incorporate human expertise into the search process.

Typically, BO relies on a "prior over functions" (e.g., a Matern kernel) to define the expected smoothness of the objective function. However, domain experts rarely think in terms of kernel smoothness. Instead, they often have a "gut feeling" about where the best parameters are likely to be located—for instance, knowing that a learning rate is usually optimal near $10^{-3}$. Without a mechanism to ingest this spatial intuition, BO often wastes precious computational resources evaluating regions of the search space that an expert would have ignored.

The BOPrO Framework

BOPrO (Bayesian Optimization with a Prior for the Optimum) addresses this gap by allowing users to provide a probability distribution over the input space, representing where they expect the optimum to reside. This approach shifts the focus from abstract function properties to intuitive spatial locations.

The Pseudo-Posterior

The core of BOPrO is the construction of a pseudo-posterior, which blends human intuition with empirical data. The acquisition process is governed by three components:

  1. The Prior ($P_g(x)$): A user-defined distribution indicating where "good" points are expected. This can range from simple Gaussians to complex, hand-sketched, or multimodal distributions.
  2. The Model ($M_g(x)$): A standard probabilistic model (such as a Gaussian Process or Random Forest) that calculates the Probability of Improvement (PI) based on observed data.
  3. The Decay Mechanism: To ensure the optimizer remains data-driven, BOPrO combines these elements using a decaying weight formula: $$g(x) \propto P_g(x) \cdot M_g(x)^{t/\beta}$$ In this formula, $t$ represents the current iteration and $eta$ is a hyperparameter. In early iterations, the human prior $P_g(x)$ dominates the search. As $t$ increases, the data-driven model $M_g(x)$ gains more weight, allowing the algorithm to "wash out" the prior if the expert's advice is contradicted by the data.

This architecture effectively bridges the gap between density-based methods like Tree-structured Parzen Estimators (TPE) and traditional GP-based Bayesian Optimization.

Experimental Evaluation

The authors evaluated BOPrO across a diverse set of tasks, ranging from synthetic benchmarks to high-stakes hardware design:

  • Synthetic Benchmarks: The 2D Branin function served as a baseline for convergence speed.
  • Profet Benchmarks: Real-world surrogate tasks involving hyperparameter optimization for Support Vector Machines (SVM), Fully Connected Networks (FC-Net), and XGBoost.
  • Spatial Hardware Design: A real-world application involving the optimization of application accelerators for FPGAs, including 7D Convolutional Neural Networks (CNNs) and a 10D Molecular Dynamics (MD) grid application.

Key Results and Insights

Significant Acceleration

BOPrO demonstrated a massive increase in efficiency. On synthetic benchmarks, it reached the target performance in just 15 iterations, whereas the previous state-of-the-art (Spearmint) required 100 iterations—a 6.67× speedup. Furthermore, BOPrO with a strong prior was shown to outperform a massive 10,000× Random Search (where 10,000 random samples are drawn for every single BO sample).

Robustness to Misleading Advice

A critical concern with incorporating human intuition is the risk of "bad" advice. BOPrO addresses this through its decay mechanism. Experiments showed that even when provided with a misleading prior (intentionally centered on the worst possible points), BOPrO successfully recovered. The model eventually ignored the misleading prior and converged to the true optimum, matching the performance of a standard model with no prior at all.

Real-World Impact in Hardware Design

In the Spatial hardware benchmarks, BOPrO surpassed both manual expert configurations and the previous state-of-the-art optimizer, HyperMapper. It achieved up to a 10.4× speedup in finding optimal configurations for the MD Grid task, demonstrating its utility in complex, high-dimensional engineering problems.

Conclusion and Future Work

BOPrO provides a user-friendly and robust framework for integrating domain expertise into Bayesian Optimization. By allowing experts to specify where they think the optimum is, rather than how the function behaves, BOPrO achieves significant speedups without sacrificing the ability to recover from human error.

Future research directions include the integration of meta-learning to automatically generate these priors based on historical performance on similar tasks, potentially removing the need for manual human input while retaining the accelerated convergence benefits. Additionally, exploring non-factorized priors that capture correlations between parameters could further refine the search efficiency in highly complex spaces.

Summary updated

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