A General Recipe for Likelihood-free Bayesian Optimization

Jiaming Song, Lantao Yu, Willie Neiswanger, Stefano Ermon

Bayesian Optimization (BO) is the go-to strategy for optimizing expensive, black-box functions, such as tuning massive neural networks or running complex physics simulations. Traditionally, BO relies on restrictive surrogate models—like Gaussian Processes (GPs)—to keep the underlying mathematics tractable.

This paper introduces Likelihood-Free Bayesian Optimization (LFBO), a method that bypasses these restrictions by directly estimating the acquisition function via a weighted classification problem. This allows practitioners to use any non-negative utility function alongside flexible, scalable models like Neural Networks or XGBoost, resulting in faster and more accurate optimization.

The Bottleneck in Traditional BO

BO works by using a surrogate model to approximate the black-box function and an acquisition function to decide which data point to evaluate next. To calculate the acquisition function, practitioners usually need to compute the expected value of a "utility function" (which balances exploration and exploitation) over the surrogate model's probability distribution.

Because this requires tractable math, the field has largely been forced to use Gaussian Processes. However, GPs scale poorly with large datasets (requiring $O(n^3)$ complexity) and struggle with complex, high-dimensional spaces.

Recent alternatives, like Density Ratio (DR) methods (e.g., TPE, BORE), bypass GPs by modeling the ratio of "good" vs. "bad" outcomes using standard classifiers. However, the authors of this paper identify a critical theoretical flaw in these approaches: previous works claimed these DR methods were equivalent to the highly effective Expected Improvement (EI) utility function. The authors mathematically prove that DR methods are actually only equivalent to Probability of Improvement (PI)—a weaker utility that cares about whether an outcome is better, but ignores how much better it is.

Comparison of analytical Bayesian Optimization, BORE, and the proposed LFBO framework.

The LFBO Recipe: Weighted Classification

To fix the limitations of existing density ratio methods, the authors propose LFBO. Instead of modeling the probability distribution of the objective function and then integrating it, LFBO directly estimates the expected utility. It does this by transforming the acquisition function calculation into a weighted classification problem.

Here is how the recipe works:

  1. Split the Data: Divide your observed data into "positive" (above a certain threshold $\tau$) and "negative" (below $\tau$) samples.
  2. Train a Classifier: Train a probabilistic classifier (like a Neural Network, Random Forest, or XGBoost) to distinguish between the two.
  3. Apply Utility Weights: Weight the positive samples based on the chosen utility function. For Expected Improvement (EI), a positive sample is weighted by $(y - \tau)$. This means a massively better outcome heavily influences the classifier, while a marginally better one has less impact.
  4. Optimize: The output of this trained classifier is directly used as the acquisition function to pick the next point.
LFBO successfully approximates the Probability of Improvement (PI) and Expected Improvement (EI) acquisition functions on a 1D objective.

By framing the acquisition function as a classification task, LFBO completely frees BO from the need for tractable probabilistic inference. You can use any off-the-shelf classifier without needing it to output perfect, calibrated uncertainties.

Key Results and Capabilities

The authors evaluated LFBO across several domains, including synthetic 1D functions, HPOBench (hyperparameter optimization), NAS-Bench-201 (neural architecture search), and the Bliznyuk Environmental Model.

  • State-of-the-Art Accuracy: LFBO (using the EI utility function) consistently outperformed baselines like BORE, TPE, SMAC, and GP-based methods across almost all HPOBench and NAS-Bench-201 tasks.
  • Massive Speedups: Because LFBO avoids the $O(n^3)$ bottleneck of GPs, it is significantly faster. On the NAS-Bench-201 CIFAR-10 task, LFBO was about 5x faster than GP-EI.
  • Handling Composite Functions: In many real-world scenarios, the objective function has a known structure (e.g., minimizing the squared error of a black-box simulator's output). LFBO can exploit this by simply baking the known mathematical transformation into the final layer of a neural network classifier. On the environmental model task, this composite version of LFBO matched the accuracy of GP-based composite methods but was 15x to 30x faster, avoiding the slow Monte Carlo sampling required by GPs for intractable integrals.

Limitations and Future Work

While highly effective, LFBO does have limitations. Because it doesn't explicitly model uncertainty like a GP does, its explore-exploit behavior is less interpretable. It also requires choosing a threshold $\tau$ that is strictly below the current best observation to ensure there are "positive" samples to train on. Finally, the LFBO acquisition function can sometimes become over-confident, which may reduce the diversity of its exploration.

Future work will look to extend LFBO to more complex BO paradigms, such as multi-fidelity optimization, multi-objective optimization, and batch-based sampling, as well as exploring heuristics for dynamically selecting the threshold $\tau$.

Summary updated

BibTeX
@inproceedings{song2022general,
  author = {Jiaming Song and Lantao Yu and Willie Neiswanger and Stefano Ermon},
  title = {{A General Recipe for Likelihood-free Bayesian Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=Egc9M5wUu4},
}
Figure