Inferensys

Glossary

Acquisition Function

In Bayesian optimization, an acquisition function is a criterion used to select the next hyperparameter configuration to evaluate by balancing exploration of uncertain regions with exploitation of known promising areas.
ML engineer tuning hyperparameters on laptop, optimization curves visible, technical experimentation session.
BAYESIAN OPTIMIZATION

What is an Acquisition Function?

An acquisition function is the decision-making engine within Bayesian optimization, mathematically guiding the search for optimal hyperparameters by balancing exploration and exploitation.

An acquisition function is a mathematical criterion used in Bayesian optimization to select the next hyperparameter configuration to evaluate. It operates on a probabilistic surrogate model (like a Gaussian Process) that predicts both the expected performance and uncertainty for untested configurations. The function's core purpose is to automate the exploration-exploitation trade-off, determining whether to probe uncertain regions (exploration) or sample near known high-performing areas (exploitation) to efficiently find a global optimum.

Common acquisition functions include Expected Improvement (EI), which quantifies the potential improvement over the current best observation; Upper Confidence Bound (UCB), which adds a confidence interval to the predicted mean; and Probability of Improvement (PoI). The maximization of this function, which is cheap to compute compared to training a full model, defines the sequential model-based optimization loop, making hyperparameter search for expensive black-box functions tractable and data-efficient.

BAYESIAN OPTIMIZATION

Common Acquisition Functions

Acquisition functions are the decision-making engines of Bayesian optimization. They mathematically quantify the utility of evaluating a candidate hyperparameter configuration, balancing the exploration of uncertain regions against the exploitation of known promising areas to guide the search efficiently.

01

Expected Improvement (EI)

The most widely used acquisition function. It measures the expected amount of improvement over the current best observed value, given the surrogate model's predictive distribution.

  • Formula: EI(x) = E[max(0, f(x) - f(x⁺))], where f(x⁺) is the current best observation.
  • Behavior: Naturally balances exploration and exploitation. It has a closed-form solution under a Gaussian Process surrogate, making it computationally efficient.
  • Use Case: The default choice for most global optimization problems where the goal is to find the single best configuration.
02

Upper Confidence Bound (UCB/GP-UCB)

An acquisition function based on the principle of optimism in the face of uncertainty. It selects the point with the highest upper confidence bound of the surrogate model's prediction.

  • Formula: UCB(x) = μ(x) + β * σ(x), where μ is the mean prediction, σ is the standard deviation (uncertainty), and β is a parameter controlling the exploration-exploitation trade-off.
  • Behavior: Explicitly tunable via β. A higher β encourages more exploration of uncertain regions.
  • Use Case: Popular in theoretical analyses and multi-armed bandit problems. Provides provable regret bounds.
03

Probability of Improvement (PI)

A simpler, more exploitative criterion that calculates the probability that a candidate point will yield an improvement over the current best.

  • Formula: PI(x) = P(f(x) > f(x⁺) + ξ), where ξ is a small positive margin to prevent over-exploitation.
  • Behavior: Tends to be more greedy than EI, often focusing refinement near the current best point. The ξ parameter helps add moderate exploration.
  • Use Case: Useful when the optimization budget is very limited and quick, incremental improvement is the goal, though it is often outperformed by EI.
04

Predictive Entropy Search (PES) & Max-Value Entropy Search (MES)

Information-theoretic acquisition functions that seek to maximize the information gain about the location of the optimum.

  • Core Idea: They measure the reduction in entropy (uncertainty) of the posterior distribution over the optimal input x* (PES) or the optimal value f* (MES) after evaluating a candidate point.
  • Behavior: Often provides a superior exploration-exploitation balance by directly targeting the reduction of uncertainty about the optimum itself.
  • Use Case: State-of-the-art choice for problems where the surrogate model is highly accurate and evaluations are extremely expensive. MES is often preferred for its computational tractability.
05

Knowledge Gradient (KG)

A one-step lookahead acquisition function that considers the value of information after the surrogate model is updated with the new observation, not just the immediate improvement.

  • Core Idea: It measures the expected improvement in the posterior mean of the optimum after a hypothetical evaluation, rather than the improvement in the observed best value.
  • Behavior: More computationally intensive but can make better global decisions, especially in batch settings or when the final recommendation is the point with the best posterior mean, not the best observation.
  • Use Case: Important in closed-loop experimental design and when the final solution is based on the fully updated model, not just sampled points.
06

Thompson Sampling

A probabilistic algorithm that selects the next point to evaluate by sampling a random function from the posterior surrogate model and optimizing the sampled function.

  • Mechanism: 1) Draw a sample from the Gaussian Process posterior. 2) Find the point that maximizes this sample function. 3) Evaluate the true objective at that point.
  • Behavior: Provides a natural, randomized balance between exploration and exploitation. It is asymptotically optimal for certain bandit problems.
  • Use Case: Highly effective in parallel/batch Bayesian optimization settings, as multiple independent samples can be optimized to select a diverse batch of points in a single iteration.
BAYESIAN OPTIMIZATION

Comparing Common Acquisition Functions

A comparison of the primary acquisition functions used in Bayesian optimization to select the next hyperparameter configuration to evaluate, balancing exploration and exploitation.

Acquisition FunctionMathematical FormulationExploration vs. ExploitationKey CharacteristicsTypical Use Cases

Expected Improvement (EI)

EI(x) = E[max(0, f(x) - f(x⁺)) | D]

Balanced

Improvement over current best (incumbent). Requires an incumbent. Handles noise well with plug-in or integrated form.

General-purpose HPO, robust default choice.

Upper Confidence Bound (UCB / GP-UCB)

UCB(x) = μ(x) + β σ(x)

Tunable (via β)

Directly trades mean (μ) and uncertainty (σ). β is a tunable hyperparameter controlling exploration. Simple, interpretable.

When explicit control over exploration is needed. Theoretical regret bounds.

Probability of Improvement (PI)

PI(x) = P(f(x) > f(x⁺) + ξ | D)

Exploitative

Maximizes probability of exceeding incumbent by a small margin ξ. Prone to over-exploitation of known good areas.

Pure exploitation scenarios, low-noise settings.

Thompson Sampling

Sample f* ~ p(f | D), evaluate argmax f*(x)

Balanced (Stochastic)

Randomly samples a function from the posterior and optimizes it. Naturally balances exploration/exploitation. No explicit formula.

Parallel/Batch BO, combinatorial spaces, reinforcement learning.

Entropy Search / Predictive Entropy Search

Maximizes reduction in entropy of p(x* | D)

Informational

Seeks to reduce uncertainty about the optimum's location x*. Computationally expensive but information-theoretically optimal.

When evaluation budget is very limited and global understanding is critical.

Knowledge Gradient

Expected value of the maximum posterior mean after evaluation

Informational (Sequential)

Considers the impact of the evaluation on the posterior, not just immediate reward. Closed-form for finite spaces.

Optimal sequential decision-making, finite search spaces.

ACQUISITION FUNCTION

Key Applications in AutoML

Acquisition functions are the decision engines of Bayesian optimization, mathematically quantifying the utility of evaluating a candidate hyperparameter configuration. They systematically balance exploration and exploitation to guide the search toward the global optimum.

01

Expected Improvement (EI)

Expected Improvement (EI) is the most widely used acquisition function. It calculates the expected amount by which a candidate point's performance will improve upon the current best observed value, given the surrogate model's predictive distribution.

  • Mechanism: EI integrates over the probability distribution of possible outcomes above the current best, favoring points with high mean predictions, high uncertainty, or both.
  • Formula: (EI(\mathbf{x}) = \mathbb{E}[\max(f(\mathbf{x}) - f(\mathbf{x}^+), 0)]), where (f(\mathbf{x}^+)) is the best observed value.
  • Use Case: The default choice for most global optimization problems where the primary goal is to find the single best configuration.
02

Upper Confidence Bound (UCB/GP-UCB)

Upper Confidence Bound (UCB), often GP-UCB when using a Gaussian Process surrogate, selects the point that maximizes an optimistic bound on the possible function value. It explicitly balances the surrogate's mean prediction ((\mu(\mathbf{x}))) and its uncertainty ((\sigma(\mathbf{x}))).

  • Formula: (UCB(\mathbf{x}) = \mu(\mathbf{x}) + \kappa \sigma(\mathbf{x})), where (\kappa) is a tunable parameter controlling the exploration-exploitation trade-off.
  • Deterministic: Unlike EI, UCB is deterministic for a given (\kappa) and surrogate state, simplifying analysis.
  • Use Case: Particularly effective in bandit problems and when a predictable, tunable level of optimism is desired for exploration.
03

Probability of Improvement (PI)

Probability of Improvement (PI) is a simpler, earlier acquisition function that selects the point with the highest probability of exceeding the current best observed value by a small margin.

  • Mechanism: PI is calculated as the cumulative density of the surrogate's predictive distribution above a target threshold.
  • Limitation: It is purely exploitative in its basic form, as it favors points with high probability of even marginal improvement, often getting stuck in local optima.
  • Use Case: Less common than EI or UCB, but can be useful in contexts where any improvement is valuable and computational budget is very high, or when modified with a trade-off parameter.
04

Entropy Search & Predictive Entropy Search

Entropy Search and Predictive Entropy Search (PES) are information-theoretic acquisition functions. Instead of optimizing the function directly, they aim to reduce the uncertainty about the location of the global optimum within the search space.

  • Objective: They select the point that is expected to provide the greatest reduction in the entropy (i.e., uncertainty) of the posterior distribution over the optimum's location.
  • Computational Cost: More computationally intensive to evaluate than EI or UCB, as they require approximating complex integrals.
  • Use Case: Ideal when the precise identification of the optimum is more critical than simply finding a high-performing point, or when the evaluation budget is very limited.
05

Knowledge Gradient (KG)

Knowledge Gradient (KG) is a one-step lookahead acquisition function. It evaluates the expected value of the best point we could select after observing the outcome at a candidate location, not just the improvement at that location itself.

  • Global Perspective: KG considers how a new observation will improve our overall belief about the entire function, leading to better global decisions. It is less myopic than EI.
  • Computational Complexity: Computing the KG is often more expensive, as it requires reasoning about the updated surrogate model post-observation.
  • Use Case: Superior performance in sequential decision-making where each evaluation is extremely costly, justifying the extra computation for better long-term search efficiency.
06

Multi-Objective & Constrained Acquisition

Acquisition functions extend to complex optimization scenarios beyond single-objective maximization.

  • Multi-Objective Optimization: Functions like Expected Hypervolume Improvement (EHVI) are used when optimizing for multiple, competing objectives (e.g., accuracy and latency). EHVI measures the expected increase in the dominated volume of the objective space.
  • Constrained Optimization: Modified acquisition functions, such as Constrained Expected Improvement, incorporate probabilistic constraints (e.g., model size < 100MB). They only propose points that have a high probability of satisfying all constraints.
  • Use Case: Essential for Hardware-Aware NAS and real-world AutoML where models must satisfy practical deployment constraints.
ACQUISITION FUNCTION

Frequently Asked Questions

A core component of Bayesian optimization, the acquisition function guides the search for optimal hyperparameters by intelligently selecting the next point to evaluate. This FAQ addresses its purpose, mechanics, and common variants.

An acquisition function is a mathematical criterion used in Bayesian optimization to determine the next hyperparameter configuration to evaluate by quantifying the potential utility of sampling a given point, thereby balancing exploration of uncertain regions and exploitation of known promising areas.

It acts as a guide for the sequential optimization process. After a surrogate model (like a Gaussian Process) models the objective function, the acquisition function uses the model's predictions (mean) and uncertainties (variance) to compute a score for every point in the search space. The point with the highest score is selected for the expensive, true function evaluation (e.g., training a model). This transforms the global optimization problem into a series of easier, tractable optimization problems of the acquisition function itself.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.