[Paper Review] BayesOpt: A Bayesian Optimization Library for Nonlinear Optimization, Experimental Design and Bandits
BayesOpt is a high-performance, cross-platform Bayesian optimization library implemented in C++ with interfaces for C, C++, Python, and MATLAB/Octave. It enables efficient nonlinear optimization, experimental design, and stochastic bandit problems by leveraging Gaussian process surrogates with adaptive acquisition functions, kernel learning, and computationally optimized inference via incremental Cholesky updates and precomputed terms, achieving state-of-the-art sample efficiency and speed.
BayesOpt is a library with state-of-the-art Bayesian optimization methods to solve nonlinear optimization, stochastic bandits or sequential experimental design problems. Bayesian optimization is sample efficient by building a posterior distribution to capture the evidence and prior knowledge for the target function. Built in standard C++, the library is extremely efficient while being portable and flexible. It includes a common interface for C, C++, Python, Matlab and Octave.
Motivation & Objective
- To develop a high-performance, portable, and extensible Bayesian optimization library for solving expensive, nonlinear, and multimodal optimization problems.
- To improve computational efficiency in Bayesian optimization by optimizing kernel learning and acquisition function maximization through incremental matrix updates and precomputation.
- To provide a flexible, extensible framework supporting continuous, discrete, and categorical optimization, including high-dimensional spaces and constrained problems.
- To enable seamless integration across C, C++, Python, and MATLAB/Octave with a unified, object-oriented API and support for advanced models like non-Gaussian processes and metacriteria.
- To ensure numerical robustness and correctness through thread safety, exception handling, and stable implementations of delicate algorithms like GP-Hedge.
Proposed method
- The library uses a semiparametric surrogate model: $ f(\mathbf{x}) = \phi(\mathbf{x})^T\mathbf{w} + \epsilon(\mathbf{x}) $, where $ \epsilon(\mathbf{x}) $ is a nonparametric process (e.g., Gaussian, Student-t, or mixture of Gaussians).
- It supports empirical Bayes (ML/MAP) and MCMC for posterior inference, with hyperpriors on weights $ \mathbf{w} $, noise variance $ \sigma_s^2 $, and kernel hyperparameters $ \theta $.
- Kernel parameters $ \theta $ are optimized using derivative-free methods like DIRECT and BOBYQA, which outperform gradient-based methods in CPU time and avoid derivative computation overhead.
- The Cholesky decomposition of the kernel matrix $ \mathbf{K}(\theta) $ is computed incrementally, reducing cost from $ \mathcal{O}(n^3) $ to $ \mathcal{O}(n^2) $ per new point via rank-one updates.
- Acquisition function evaluation is accelerated by precomputing terms independent of the query point $ \mathbf{x} $, enabling efficient sequential optimization.
- A factory design pattern allows runtime composition of kernels, criteria, and models, supporting complex combinations like $ \text{cHedge}(\text{cEI}, \text{cLCB}, \text{cThompsonSampling}) $.
Experimental results
Research questions
- RQ1How can Bayesian optimization be made more computationally efficient for expensive, nonlinear, and multimodal functions?
- RQ2What is the impact of incremental Cholesky updates and precomputation on the performance of Bayesian optimization in practice?
- RQ3Can a single, unified library with cross-language support achieve competitive performance against specialized open-source alternatives?
- RQ4How effective are derivative-free optimization methods for learning kernel hyperparameters compared to gradient-based approaches?
- RQ5To what extent can flexible, composable components (kernels, criteria, hyperpriors) improve the adaptability of Bayesian optimization to diverse problem types?
Key findings
- BayesOpt outperforms SMAC, HyperOpt, Spearmint, and DiceOptim in sample efficiency and speed, achieving a gap of 0.00000 on the Camelback function with only 100 iterations.
- With 200 iterations, BayesOpt1 achieved a gap of 0.00000 on the Camelback function and 0.04742 on Branin, significantly outperforming Spearmint and HyperOpt in accuracy.
- BayesOpt2 achieved a gap of 0.00000 on Camelback with 100 seconds of runtime, while HyperOpt required only 8 seconds but had a higher gap of 0.03383.
- The use of incremental Cholesky updates reduced per-iteration cost from $ \mathcal{O}(n^3) $ to $ \mathcal{O}(n^2) $, significantly improving scalability.
- Precomputing terms independent of the query point reduced redundant computation during acquisition function maximization, enhancing overall efficiency.
- The library achieved high performance with minimal configuration, achieving competitive results even with only 2 initial design points, compared to 5–10 in other tools.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.