liveBook · Manning

Batch optimization

As explained in Bayesian Optimization in Action

Batch optimization is an optimization setting in which multiple candidate evaluations are selected or executed together.

Batch optimization selects multiple candidate inputs for evaluation together rather than waiting for each result before choosing the next. In batch Bayesian optimization, this uses parallel machines, computers, or experiments to increase evaluation throughput for expensive black-box objectives. section 7.0 section 7.1.1

When batching helps

Tune several ML hyperparameter combinations at once when multiple processing units are available. Other batchable settings include synthesizing drug prototypes on separate laboratory machines and showing several product recommendations simultaneously. section 7.0

A batch loop chooses k input locations, evaluates all k objective values simultaneously, then adds them to the observed data. The GP model remains unchanged; the acquisition policy must instead score a whole batch. section 7.1.1 section 7.2.2

Figure 7.2 The batch BayesOpt loop. Compared to sequential BayesOpt, batch BayesOpt requires multiple query points to be identified at step 2 and evaluates the objective function at these points simultaneously at step 3.

Compare the sequential loop with the batch loop: selection and objective evaluation operate on multiple query points at each iteration. section 7.1.1

Selecting the top k scores from an ordinary sequential acquisition function is ineffective: high-scoring points cluster near its single optimum, spending parallel evaluations on nearly the same region. Batch policies therefore value the set of points jointly and favor more useful spread. section 7.1.2

For PoI, EI, and UCB, batch scoring rewrites a sequential score as an average of a quantity of interest, then evaluates the batch by taking that quantity's maximum across its members before averaging over their multivariate Gaussian belief. This makes the batch valuable when at least one member performs well, while still accounting for the points together. section 7.2.1

Batch-policy extensions include:

  • Batch PoI, batch EI, and batch UCB, which use the shared maximum-within-batch strategy. section 7.6
  • Batch Thompson sampling, which repeatedly samples from the GP and maximizes samples until reaching the target batch size. section 7.6
  • Batch MES with cyclic optimization, which refines individual batch members cyclically because direct batch acquisition optimization is computationally difficult. section 7.6

In BoTorch, a batch BayesOpt loop needs few structural changes. Set optimize_acqf() parameter q to the batch size k; it returns a k-by-d tensor of candidate inputs, whose k evaluations are appended to training data. Batch PoI, EI, and UCB are available as qProbabilityOfImprovement, qExpectedImprovement, and qUpperConfidenceBound. section 7.2.2

Batch size four for SVM tuning

With 20 total queries and batch size 4, run five iterations. Each iteration fits the GP, selects four C-and-γ configurations, evaluates their SVM test accuracy, and appends all four results. A two-point batch-EI heatmap likewise selects relatively separated locations. section 7.2.2

Parallel airplane-design simulations

Treat simulated aerostructural performance as a four-parameter black-box objective, then compare batch policies while tuning design variables such as body length, wing span, and turbine-related parameters. section 7.5

How Bayesian Optimization in Action covers it

How deep it goes
Develops batch acquisition heuristics and BoTorch loops, then addresses Thompson sampling, MES, and cyclic optimization.
Examples
Illustrates parallelism with cookies, ML hyperparameter tuning, drug discovery, SVM tuning, and simulated airplane design.
What it assumes
Builds on sequential Bayesian optimization policies and GP models, which remain unchanged while batch decision-making changes.
What you can do after
Apply it via BoTorch by setting optimize_acqf() q to a chosen batch size and evaluating returned candidates together.
How it connects
Connects Bayesian optimization with Gaussian processes, acquisition functions, PoI, EI, UCB, Thompson sampling, MES, and cyclic optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bayesian Optimization in Action. The section links point to the parts of the book it draws on.