Inferensys

Glossary

Bayesian Optimization

A sequential design strategy for global optimization of expensive-to-evaluate black-box objective functions, using a probabilistic surrogate model and an acquisition function to intelligently select the next sampling point.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
HYPERPARAMETER TUNING

What is Bayesian Optimization?

Bayesian optimization is a sequential design strategy for the global optimization of expensive-to-evaluate black-box functions, most commonly applied to hyperparameter tuning in machine learning.

Bayesian optimization constructs a probabilistic surrogate model—typically a Gaussian Process (GP)—of the unknown objective function. This surrogate provides a posterior distribution over the function's output for any given input, explicitly quantifying the uncertainty of the prediction. The model is initialized with a small set of random evaluations and iteratively refined as new observations are collected.

An acquisition function, such as Expected Improvement (EI) or Upper Confidence Bound (UCB), is maximized to determine the next point to sample. This function balances exploitation (sampling where the surrogate predicts a high value) against exploration (sampling where the predictive uncertainty is high), efficiently navigating the trade-off to find the global optimum with minimal evaluations.

PROBABILISTIC HYPERPARAMETER TUNING

Key Characteristics of Bayesian Optimization

Bayesian optimization is a sequential design strategy for global optimization of expensive black-box functions. It constructs a probabilistic surrogate model and uses an acquisition function to balance exploration and exploitation when selecting the next evaluation point.

01

Probabilistic Surrogate Model

Instead of directly evaluating the expensive objective function, Bayesian optimization builds a cheap-to-evaluate probabilistic proxy—typically a Gaussian Process (GP). This surrogate models the posterior distribution over the objective function, providing both a predicted mean and a quantified uncertainty (variance) for every point in the search space. The GP is updated with each new observation, refining its belief about where the global optimum lies. Alternative surrogates include Tree-structured Parzen Estimators (TPE) and Random Forest regressors, which handle discrete and conditional hyperparameter spaces more naturally than GPs.

02

Acquisition Function

The acquisition function is the decision rule that determines where to sample next by leveraging the surrogate model's predictions. It mathematically formalizes the exploration-exploitation trade-off:

  • Expected Improvement (EI): Measures the expected gain over the current best observation, naturally balancing high mean and high uncertainty regions.
  • Probability of Improvement (PI): Selects the point with the highest probability of exceeding the current best value.
  • Upper Confidence Bound (UCB): Optimistically selects points based on a weighted sum of the predicted mean and standard deviation, controlled by a tunable parameter κ. The acquisition function is maximized—often using gradient-based methods or evolutionary algorithms—to propose the next candidate for evaluation.
03

Sequential Decision Process

Bayesian optimization operates in a closed-loop iterative cycle:

  • Step 1: Fit the surrogate model to all previously observed (hyperparameter, objective) pairs.
  • Step 2: Use the acquisition function to select the most promising hyperparameter configuration.
  • Step 3: Evaluate the true objective function at the proposed configuration—this is the expensive step, such as training a deep neural network.
  • Step 4: Append the new observation to the history and repeat. This sequential nature distinguishes it from grid or random search, which are non-adaptive and waste evaluations in unpromising regions. Each iteration actively learns from past results.
04

Sample Efficiency

The defining advantage of Bayesian optimization is its extreme sample efficiency. It typically finds near-optimal hyperparameters in 10-100x fewer evaluations than grid or random search. This is critical when each function evaluation is expensive—for example, training a large transformer model that takes days and costs thousands of dollars in compute. By reasoning probabilistically about where the optimum might be, Bayesian optimization avoids wasting trials on regions already known to be poor. This makes it the default choice for hyperparameter tuning of deep learning models, simulation-based optimization, and experimental design in wet-lab science.

05

Kernel Function Selection

The behavior of a Gaussian Process surrogate is governed by its covariance kernel, which encodes prior assumptions about the smoothness and structure of the objective function:

  • Matérn 5/2 kernel: The most common choice for hyperparameter optimization; assumes the function is twice-differentiable and works well for realistic, non-smooth response surfaces.
  • Radial Basis Function (RBF) kernel: Assumes infinite differentiability, which is often too smooth for practical hyperparameter landscapes.
  • Dot product kernel: Suitable for modeling linear trends. Kernel hyperparameters—length scales and signal variance—are learned from data by maximizing the marginal likelihood, allowing the surrogate to adapt its smoothness assumptions automatically.
06

Handling Constraints and Multi-Fidelity

Modern Bayesian optimization frameworks extend beyond unconstrained single-objective optimization:

  • Constrained BO: Incorporates feasibility constraints by modeling constraint functions with separate GPs and weighting the acquisition function by the probability of feasibility.
  • Multi-objective BO: Uses Expected Hypervolume Improvement (EHVI) to find the Pareto frontier when optimizing multiple competing objectives simultaneously.
  • Multi-fidelity BO: Leverages cheap, low-fidelity approximations—such as training with fewer epochs or on a subset of data—to accelerate the search before committing to expensive full evaluations. Frameworks like Hyperband combine multi-fidelity early stopping with Bayesian model-based selection.
BAYESIAN OPTIMIZATION

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Bayesian Optimization for hyperparameter tuning and quantitative finance applications.

Bayesian Optimization is a sequential design strategy for optimizing expensive-to-evaluate black-box objective functions. It works by constructing a probabilistic surrogate model—typically a Gaussian Process (GP)—of the unknown objective function and then using an acquisition function to intelligently select the next point to evaluate. The process iterates: the surrogate model is updated with each new observation, refining its uncertainty estimates, and the acquisition function balances exploration (sampling where uncertainty is high) against exploitation (sampling where the predicted value is optimal). This makes it dramatically more sample-efficient than grid or random search, often finding near-optimal hyperparameters in 10-100x fewer evaluations.

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.