Acquisition Functions
The decision rule of Bayesian optimization: score candidate points by expected usefulness to balance exploration and exploitation.
Turning a surrogate into a decision
Given a probabilistic surrogate that predicts a mean and uncertainty everywhere, the acquisition function converts those predictions into a single score for how worthwhile it would be to evaluate each candidate point. Bayesian optimization then samples wherever this score is highest. The choice of acquisition function determines how the search balances exploiting good predictions against exploring uncertain regions.
Expected improvement
Expected improvement (EI) measures the expected amount by which a candidate would beat the best value seen so far, integrating over the surrogate's predictive distribution. Points with high predicted performance or high uncertainty both score well. EI has a closed form for Gaussian process surrogates and is the most widely used acquisition function.
Other common choices
- Upper confidence bound (UCB): mean + kappa*std, with kappa tuning exploration explicitly.
- Probability of improvement (PI): the chance of beating the current best, tends to be too greedy.
- Entropy search and knowledge gradient: value information about the location of the optimum directly, more expensive to compute.
The exploration knob
UCB makes the trade-off explicit through kappa: large kappa favors exploring uncertain regions, small kappa favors exploiting the predicted best. EI and PI encode the trade-off implicitly through the surrogate's variance. Some schemes anneal the exploration weight over the budget, exploring early and exploiting late.
Batch and constrained variants
When several evaluations can run in parallel, batch acquisition functions (q-EI) select multiple diverse points at once. Constrained Bayesian optimization multiplies the acquisition by the probability that constraints are satisfied. Multi-fidelity variants account for cheaper approximate evaluations, choosing both where and at what fidelity to sample.
from scipy.stats import norm
def expected_improvement(mu, sigma, best):
z = (best - mu)/sigma
return (best - mu)*norm.cdf(z) + sigma*norm.pdf(z)
Acquisition functions decide which expensive simulation to run next, extracting the most information per costly evaluation in a design study.