ArticleslgStudy

computer science

Bayesian optimization

Bayesian optimization is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bayesian optimization rather than just read about it. In short: Bayesian optimization is a sequential model-based strategy for global optimization of black-box objective functions whose evaluations are costly. It is commonly used when a single observation requires an experiment, engineering computation, numerical simulation, or machine-learning run, and when derivatives are unavailable or unreliable.

Bayesian optimization — main illustration
Bayesian optimization — illustration

Key takeaways

  • Bayesian optimization belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bayesian optimization to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bayesian optimization from memory before moving on to harder problems.

Reference excerpt

Bayesian optimization is a sequential model-based strategy for global optimization of black-box objective functions whose evaluations are costly. It is commonly used when a single observation requires an experiment, engineering computation, numerical simulation, or machine-learning run, and when derivatives are unavailable or unreliable. The objective need not have a closed-form expression. The method constructs a probabilistic model of the unknown function, often a Gaussian process (GP), and uses the resulting predictive distribution to choose the next evaluation point. This choice is made by optimizing a sampling criterion, also called an acquisition function. Common applications include hyperparameter optimization in machine learning, where each trial may require training and validating a model, and engineering design problems driven by expensive numerical simulations.

History Early Bayesian approaches to global optimization include work by Harold J. Kushner on locating extrema of noisy functions and work by Jonas Mockus on Bayesian methods for seeking extrema. Expected improvement is a prominent sampling criterion in this line of work. In 1998, Donald R. Jones, Matthias Schonlau, and William J. Welch introduced the efficient global optimization (EGO) algorithm, which used a kriging or Gaussian-process model with expected improvement for expensive black-box functions. Later work extended Bayesian optimization to noisy observations, constraints, batch and parallel evaluations, multiple objectives, and mixed or high-dimensional search spaces.

Problem setting In a standard single-objective setting, Bayesian optimization seeks a point

x⋆∈argminx∈𝒳f(x) where 𝒳 is a search space and f is an unknown objective function. A maximization problem can be written in the same form by minimizing −f. Although the search space may in principle be continuous, discrete, categorical, or mixed, the standard formulation is most directly applicable to continuous, low- to moderate-dimensional domains. Later methods attempt to relax these restrictions by addressing mixed variables, high-dimensional spaces, constraints, parallel evaluations, and multiple objectives. A useful distinction is between noiseless and noisy optimization. Many real applications also involve constraints, parallel evaluations, or multiple objectives. These variants change how the probabilistic model, incumbent solution, and sampling criterion are defined.

Basic method

A typical Bayesian optimization procedure builds a sequence of evaluation points. Starting from an initial design X0, the algorithm produces additional evaluation points x1,x2,…. After n sequential evaluations, Xn=X0∪{x1,…,xn} denotes the evaluated points and 𝒟n denotes the corresponding observations. The next point xn+1, or a batch of points, is selected by optimizing a sampling criterion computed from the current probabilistic model. The procedure has the following form:

Choose an initial design X0, often by a space-filling design or random sampling. Evaluate the objective function, and any constraints if present, at the initial design points. Construct or update a probabilistic model using the observed data 𝒟n. Define a sampling criterion, also called an acquisition function or infill criterion, from the probabilistic model. Optimize the sampling criterion to select xn+1, or a batch of points, for evaluation. Evaluate the selected point or points and update the data set. Repeat until an evaluation budget, convergence criterion, or stopping rule is reached. The Bayesian strategy treats the unknown objective as a random function and places a prior over it. The prior captures assumptions about the behavior of the function. After observations are collected, the prior is updated to form a posterior distribution over the objective function. The posterior distribution is then used to construct the sampling criterion that determines the next query point.

Probabilistic models Bayesian optimization requires a probabilistic model of the unknown objective function and, when present, of unknown constraints. Given the evaluations observed so far, the model gives a predictive distribution for unevaluated points in the search space. Sampling criteria are defined from this predictive distribution, so the model provides both predicted objective values and uncertainty estimates. Such probabilistic models are often called surrogate models or metamodels because they are used in place of direct evaluations of the expensive objective when choosing candidate points. Gaussian process regression is the standard probabilistic model in classical presentations of Bayesian optimization and remains common in applications. A Gaussian process prior defines a distribution over functions. After observations are collected, the posterior predictive mean and variance are used by sampling criteria such as expected improvement, probability of improvement, and upper confidence bound criteria. Other probabilistic models can be used when the search space, dimensionality, or data size favors another representation.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Bayesian optimization

Start with the simplest possible case. Write down what Bayesian optimization claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bayesian optimization before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bayesian optimization ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bayesian optimization

In research
Bayesian optimization appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bayesian optimization in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bayesian optimization is common in secondary-school and first-year university syllabi. It links to neighbouring topics Machine learning, Sequential experiments, Sequential methods, so understanding it makes those chapters shorter.
In everyday life
Look for Bayesian optimization outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bayesian optimization” →

How to study Bayesian optimization in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bayesian optimization means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bayesian optimization out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bayesian optimization in simple terms?

Bayesian optimization is a sequential model-based strategy for global optimization of black-box objective functions whose evaluations are costly. It is commonly used when a single observation requires an experiment, engineering computation, numerical simulation, or machine-learning run, and when de…

Why does Bayesian optimization matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bayesian optimization?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bayesian optimization.

Tags

  • Machine learning
  • Sequential experiments
  • Sequential methods
  • Stochastic optimization

Keep exploring