Source-linked AI summary
Efficient and Principled Scientific Discovery through Bayesian Optimization: A Tutorial
Zhongwei Yu, Rasul Tutunov, Alexandre Max Maraval, Zikai Xie, Zhenzhi Tan, Jiankang Wang, Bin Cao, Zijing Li, Liangliang Xu, Qi Yang, Jun Jiang, Sanzhong Luo, Zhenxiao Guo, Tongyi Zhang, Haitham Bou-Ammar, Jun Wang
TL;DR
Scientific discovery often involves expensive black-box optimisation under unknown mechanisms and constraints. This tutorial presents Bayesian optimisation as a principled framework for guiding experiments, reporting consistent advantages over blind random search across diverse scientific tasks and broad applicability to scientific discovery.
Problem
Scientific discovery requires optimisation under unknown objective mechanisms, constraints, and expensive evaluations, creating a need for methods that integrate model learning with decision-making.
Source: §1.3 · p. 6, §2.3 · p. 12Method
The tutorial explains Bayesian optimisation through surrogate models, acquisition functions, iterative model updating, and trust-region constraints for scientific experimentation.
Source: §1.3 · p. 6, §20 · p. 63Results
Bayesian optimisation consistently outperformed blind random search across catalysis, materials science, organic synthesis, and molecular design tasks.
Source: Demonstrative Experiments and Conclusion · p. 59Takeaways & Limitations
The tutorial demonstrates BO’s broad applicability as a computational realisation of the iterative scientific discovery process.
Source: §20 · p. 63The tutorial’s standard Gaussian-process focus limits applicability to small-to-medium datasets, typically n ≲ 10^3, and provides limited coverage of scalable alternatives.
Source: §21.1 · p. 64
Abstract
from arXiv · showhide
Traditional scientific discovery relies on an iterative hypothesise-experiment-refine cycle that has driven progress for centuries, but its intuitive, ad-hoc implementation often wastes resources, yields inefficient designs, and misses critical insights. This tutorial presents Bayesian Optimisation (BO), a principled probability-driven framework that formalises and automates this core scientific cycle. BO uses surrogate models (e.g., Gaussian processes) to model empirical observations as evolving hypotheses, and acquisition functions to guide experiment selection, balancing exploitation of known knowledge and exploration of uncharted domains to eliminate guesswork and manual trial-and-error. We first frame scientific discovery as an optimisation problem, then unpack BO's core components, end-to-end workflows, and real-world efficacy via case studies in catalysis, materials science, organic synthesis, and molecule discovery. We also cover critical technical extensions for scientific applications, including batched experimentation, heteroscedasticity, contextual optimisation, and human-in-the-loop integration. Tailored for a broad audience, this tutorial bridges AI advances in BO with practical natural science applications, offering tiered content to empower cross-disciplinary researchers to design more efficient experiments and accelerate principled scientific discovery.
4 Coding an Optimisation Problem … Scientific Discovery as Optimisation Problems
This section frames scientific discovery as objective-driven optimisation of unknown functions under uncertainty, presenting Bayesian Optimisation as a computational framework for probabilistic modelling and acquisition-guided experimental design. It introduces foundational concepts, practical workflows, and domain examples to support more data-efficient scientific searches and bridge AI methods with natural-science practice.
1 Introduction
- Scientific discovery is presented as an evolving methodological process culminating in Bayesian hypothetico-deductive reasoning that updates beliefs across uncertain hypothesis spaces.The section connects deductive, inductive, hypothetico-deductive, falsificationist, and paradigm-shift perspectives to Bayesian belief updating.Source: §1 · p. 4, §1.1 · p. 4, Figure 2 · p. 5
1.2 A General Workflow for Scientific Discovery with Bayesian Optimisation
- BO operationalises objective-driven discovery through a surrogate model that represents uncertain outcomes and an acquisition function that balances exploitation with exploration.The workflow frames design spaces, constraints, and objectives; evaluates experiments or oracles; updates the surrogate; repeats the loop; and extracts both optimal conditions and model-based insights.Source: §1.1 · p. 4, §1.2 · pp. 5–6
- BO must be tailored to domain structure, using representations such as graph-based surrogates for molecules and constrained discrete spaces with competing objectives for materials.This tailoring replaces guesswork with principled decision-making while preserving scientific rigour.Source: §1.2 · p. 6
1.3 Illustrative Example I: Antibody Discovery with BO
- Fewer than fifty sequence evaluations enabled AntBO to identify high-affinity antibody candidates within a combinatorially explosive search space.AntBO combines a Gaussian-process surrogate, a trust-region constraint for biologically developable sequences, and oracle feedback in an iterative loop.Source: §1.3 · pp. 6–7
1.4 Illustrative Example II: Accelerating OER Catalyst Discovery with BO
- Orders-of-magnitude lower experimental cost enabled BO to identify a Cu-doped RuO2 catalyst with low overpotential and excellent durability.A two-stage strategy first optimises inexpensive activity, then searches a CVAE-defined low-overpotential subspace for stability using single-candidate iterations.Source: §1.4 · pp. 7–8
1.5 Literature Review of Bayesian Optimisation
- The literature review identifies a persistent gap between AI-centric BO advances and their practical translation to diverse real-world scientific problems.Scientific users often rely on accessible software, while existing resources provide limited code-level guidance and insufficiently address how scientific questions become optimisation problems.Source: §1.5 · p. 9
1.6 Organisation of this Tutorial
- The tutorial is organised into modular parts spanning foundational problem formulation, Gaussian-process surrogates, acquisition functions, implementations, extensions, coding, and experimental validation.Content is stratified by technical background so experimental scientists and method developers can follow appropriate learning paths.Source: §1.6 · pp. 9–10
Scientific Discovery as Optimisation Problems
- Scientific researchers implicitly optimise unknown functions by manually adjusting experimental conditions, exploring parameter spaces, and seeking optimal settings.This optimisation framing is often obscured because researchers do not explicitly describe iterative experiment design and execution using optimisation theory.Source: Scientific Discovery as Optimisation… · p. 11
- The section formalises scientific discovery as an optimisation problem in experimental design, opening the way to computational tools that automate and accelerate scientific progress.It introduces foundational optimisation elements for readers without prior exposure and provides a conceptual roadmap for deeper theoretical study.Source: Scientific Discovery as Optimisation… · p. 11
2 Optimisation Problems and Algorithms · 3 Theoretical Concepts of Optimisation
The sections formalise scientific discovery as constrained sequential optimisation under unknown, noisy, and expensive evaluations, motivating Bayesian optimisation as a model-based strategy for efficient experimentation. They also establish convergence and regret as complementary criteria for analysing sequential optimisation, with sublinear regret implying convergence in average.
2.1 The Definition of Optimisation Problems
- The canonical optimisation problem selects x∗ from a decision space X to maximise or minimise a real-valued objective, with constrained variants restricting solutions to a feasible set Xg.Equality constraints must be satisfied exactly, whereas inequality constraints impose threshold conditions.Source: §2.1 · p. 11
2.2 The Latent Optimisation Problem of Scientific Discovery
- Scientific discovery is formulated as choosing designs x to maximise reward r(x, M*(x)) subject to constraints induced by the unknown mechanism M*, recovering standard constrained optimisation.This formulation distinguishes hypothesis-level, explanatory, and actionable knowledge, while Bayesian optimisation extends Bayesian experimental design from explanation toward action selection.Source: §2.2 · p. 12
2.3 Optimisation Challenges for Scientific Discovery
- Scientific optimisation is difficult because objectives and constraints are black-box, observations are noisy and partially observable, and experiments are costly, making sample efficiency essential.These conditions require methods that reason under epistemic uncertainty, model observation noise, and identify strong solutions with few experiments.Source: §2.3 · p. 12
2.4 Optimisation Algorithms for Scientific Discovery
- Because analytic optima and derivatives are generally unavailable, sequential optimisation selects each new design from accumulated experimental data, motivating derivative-free methods and Bayesian optimisation.Sequential model-based optimisation cycles through model selection, model fitting, and decision-making; Bayesian optimisation adds Bayesian uncertainty quantification and decision-theoretic principles.Source: §2.4.1 · p. 13, §2.4.2 · p. 13, §2.4 · p. 13
2.4.3 Incorporating Model Uncertainty: Bayesianism for Optimisation
- Bayesian optimisation updates a probabilistic model of the decision space after each observation, transferring information across correlated choices while balancing exploitation of promising regions against exploration of uncertain ones.This strategy aims to make each experiment informative and efficiently navigate large or complex spaces.Source: §2.4.3 · p. 13
3 Theoretical Concepts of Optimisation
- Theoretical optimisation distinguishes local from global optima because unknown scientific mechanisms may produce multiple local maxima, while sequential algorithms evaluate noisy outcomes and update their strategies over query points.The framework defines convergence and regret to assess how effectively algorithms approach the global optimum.Source: §3 · p. 14
- Convergence to the global optimum implies vanishing average regret, linking asymptotic solution quality to the cumulative performance measure used for sequential optimisation.The result follows because instantaneous regret f(x∗) − f(xt) tends to zero as iterates approach the optimum.Source: §3 · p. 15
- Sublinear cumulative regret, RT = o(T), implies convergence in average, establishing regret minimisation as a theoretical foundation for designing efficient scientific optimisation algorithms.Together, the two directions connect low cumulative regret with spending most iterations near optimal solutions and provide criteria for practical algorithm evaluation.Source: §3 · p. 15
4 Coding an Optimisation Problem
This section implements unconstrained Bayesian optimisation in Python, using HEBO to represent heterogeneous scientific design spaces and evaluate objectives through experiments, simulations, manual input, or mock oracles. It covers numeric, integer, binary, and categorical variables, including logarithmic, stepped, and exponent-scaled representations.
4.1 Specifying the Design Space
- HEBO represents heterogeneous scientific design spaces containing continuous, categorical, integer, and boolean variables that exceed standard hyper-rectangular library assumptions.The section focuses on unconstrained optimisation; constrained Bayesian optimisation is identified as beyond scope [76].Source: §4 · p. 15, §4.1 · p. 16
4.1.1 Numeric Variables
- Numeric variables model continuously controllable parameters over [a, b], while the pow type logarithmically transforms variables spanning multiple orders of magnitude for balanced exploration.Examples include reaction temperature and a reaction rate constant ranging from 10^-5 to 10^-1.Source: §4.1.1 · p. 16
4.1.2 Integer Variables
- HEBO supports integer variables as bounded discrete values, logarithmic integers with pow_int, fixed-step integers with step_int, and integer-base powers with int_exponent.These representations cover catalyst-layer counts, molecule numbers spanning 10^20 to 10^24, two-second time increments, and memory sizes from 2^0 = 1 to 2^10 = 1024.Source: §4.1.2 · p. 17
4.1.3 Binary and Categorical Variables
- Binary variables encode boolean decisions as 0 or 1, whereas categorical variables encode unordered discrete options whose categories have no inherent numeric ordering.For example, catalyst use is boolean, while solvent selection is categorical; treating solvent choices as integers would incorrectly imply an ordering.Source: §4.1.3 · p. 17
4.2 Defining and Evaluating the Objective Function
- The objective function maps each design x ∈ X to an unknown or expensive scalar performance metric obtained through laboratory experiments, physical processes, or complex simulations.In HEBO, evaluation accepts a batch of m design points as a pandas DataFrame and returns one NumPy scalar value per design, enabling parallel evaluation.Source: §4.2 · p. 17
- Objective evaluation can incorporate human-in-the-loop experiments through manual input or use mock oracles that mimic black-box behaviour for rapid pipeline development, debugging, and validation.Mock oracles may be analytic expressions or fitted models, while more sophisticated proxies can be fitted to empirical databases for expensive black-box functions.Source: §4.2 · pp. 18–19
5 Case Studies
The case studies formulate diverse scientific discovery problems as optimisation tasks and show that Bayesian optimisation consistently outperforms random trials under the same fixed experimental budget. They cover catalyst, alloy, organic-synthesis, and molecule-discovery settings with continuous, simplex, mixed, high-dimensional, and structured discrete spaces.
5 Case Studies
- The cases translate complex scientific questions into well-posed optimisation problems spanning high-dimensional continuous, simplex, mixed-variable, and structured feature spaces.Most evaluations use mock oracles fitted to existing databases, while the principles also apply to real-world experiments.Source: §5 · p. 19
- BO consistently outperforms random trials across all case studies, achieving superior objective values under the same fixed experimental budget.Table 1 previews final optimisation performance across the scientific discovery tasks.Source: §5 · p. 19, Table 1 · p. 19
5.1 Catalyst Design for Photocatalytic Water Splitting
- Photocatalytic water-splitting catalyst design maximises hydrogen evolution rate by selecting ten material amounts, each continuously varied within [0, 5].The ten materials include dyes, sacrificial donors, pH or ionic-strength regulators, surfactants, and stabilising or synergistic additives; coarse discretisation yields 6^10 candidates.Source: §5.1 · pp. 19–20
5.2 High-Entropy Alloy Formulation Optimisation as Nanozymes
- High-entropy alloy nanozyme optimisation maximises catalytic efficiency by adjusting Co, V, Mn, Cu, and Fe ratios constrained to sum to 1, with each ratio in [0.05, 0.35].The objectives are to maximise Vmax and minimise KM for hydrogen-peroxide conversion into hydroxyl radicals; mock oracles use random-forest or AutoGluon models.Source: §5.2 · p. 20
5.2.1 Reparameterisation Transform of the Bounded Simplex Space
- A bijective reparameterisation transforms the bounded simplex into the hypercube [0, 1]^(n−1), enabling Bayesian optimisation over the constrained alloy domain.The inverse map recursively reconstructs feasible components and preserves the original constraints.Source: §5.2.1 · p. 21
5.3 Catalyst Design for Electrolytic Water Splitting
- Electrolytic water-splitting catalyst design minimises overpotential η at 10 mA cm−2 across categorical, continuous, and process variables in a search space exceeding 30 dimensions.Practical development may involve competing activity, stability, and cost objectives, motivating Pareto-frontier-based multi-objective BO.Source: §5.3 · pp. 21–22
5.4 High-Dimensional Organic Synthesis
- Organic-synthesis optimisation uses 530 DFT-derived features from 1,728 Buchwald–Hartwig conditions, reducing the search to the top 20 random-forest-ranked features because black-box exploration is otherwise impractical.The example illustrates latent optimisation rather than directly controllable reaction-condition optimisation, and high-dimensional BO is suggested for richer latent structures.Source: §5.4 · p. 22
5.5 Discovering the Best-Performing Molecule
- Molecule discovery optimises black-box scores such as QED over valid SMILES, requiring sample-efficient methods that respect chemical structure, enormous search spaces, and domain knowledge.In practice, the molecule domain is often restricted to a finite curated subset such as ZINC.Source: §5.5 · p. 23
Understanding the Black Box · 6 Surrogate Model
Surrogate models provide computationally efficient, uncertainty-aware proxies for costly and noisy scientific objectives, enabling sequential experimental design. The section develops hypothesis spaces, probabilistic modelling, Bayesian inference, and surrogate choices for scientific optimisation.
Understanding the Black Box
- Surrogates approximate costly, noisy objectives from prior observations, predicting outcomes and quantifying uncertainty that decreases near observed data as evidence accumulates.This supports sequential design by replacing direct objective queries with computationally cheaper predictions.Source: Understanding the Black Box · p. 24, §6 · p. 24
6 Surrogate Model
- The surrogate-model foundations define hypothesis spaces, motivate probabilistic beliefs over models rather than single best fits, and establish Bayesian inference for sequential optimisation.These foundations connect surrogate modelling to Bayesian optimisation and scientific discovery.Source: §6 · p. 24, §6.2 · p. 25, §6.3 · p. 25
6.1 Hypothesis Space
- Hypothesis spaces may comprise weights, parametric functions, or entire function spaces, with selection balancing computational practicality against prior scientific knowledge such as smoothness.The hypothesis space determines representational power and computational efficiency while incorporating assumptions about noisy observations.Source: §6.1 · pp. 24–25
6.2 Motivation for Probabilistic Surrogate Models
- Because finite data cannot reliably accept or reject a single imperfect hypothesis, probabilistic surrogate models represent knowledge about the objective as a belief distribution over hypotheses.The deterministic alternative assumes the true objective lies within the hypothesis space, an assumption the section identifies as rarely valid.Source: §6.2 · p. 25
6.3 Bayesian Inference of the Surrogate Model
- Bayesian inference updates a prior p(h) to the posterior p(h|D) using observed data, then marginalises over hypotheses to produce predictions for new designs.Gaussian process regression permits closed-form posterior and predictive distributions, whereas complex hypothesis spaces may require MCMC or variational inference.Source: §6.3 · pp. 25–26
6.4 Choices of Surrogate Models
- Gaussian processes are canonical because they flexibly model functions while offering closed-form inference and efficient uncertainty quantification, but alternative surrogates address non-smoothness, outliers, scalability, and expressiveness.Alternatives include Student-t processes, TPE, Bayesian linear regression, random forests, and Bayesian neural networks.Source: §6.4 · pp. 26–27
- Pretrained foundation models and domain-specific surrogates can supply strong prior knowledge or encode scientific factors, symmetries, and mechanisms, improving sample efficiency and interpretability when carefully validated.These approaches may not be strictly Bayesian and require consistency checks with both data and scientific principles.Source: §6.4 · p. 27
7 Gaussian Process
Gaussian processes provide Bayesian optimisation with a flexible function-space surrogate whose priors encode structural beliefs and whose posterior predictions quantify uncertainty. The section develops GP conditioning, kernel design, computational approximations, and equivalence to Bayesian linear regression.
7.1 Foundations and Intuition
- GPs place a prior directly over functions, with the mean encoding expected behaviour and the kernel encoding similarity and structural properties such as smoothness or periodicity.Finite collections of function values follow a multivariate Gaussian distribution, generalising multivariate Gaussians to arbitrary index sets.Source: §7.1 · p. 27
7.2 GP as Surrogate Model
- Conditioning jointly Gaussian evidence preserves a GP, while standard regression specializes this result to i.i.d. Gaussian observation noise and yields posterior means and covariances for prediction.The posterior mean estimates the function at new points, while posterior covariance quantifies uncertainty for Bayesian optimisation.Source: §7.2.1 · pp. 27–28, §7.2.2 · p. 28
7.3 Mean Function
- Mean functions encode prior beliefs, while valid positive-semidefinite kernels encode smoothness, periodicity, linearity, or domain-specific similarity across numeric, structured, and discrete inputs.Kernels can be added, multiplied, and scaled to capture additive effects, interactions, heterogeneous variables, multiple properties, and high-dimensional feature groups.Source: §7.3 · p. 28, §7.4 · p. 28, §7.4.1 · p. 29
7.4.2 Non-Numeric Kernels
- String and Fisher kernels extend GPs to sequences, graphs, and other non-vectorial data by exploiting shared motifs or generative-model structure, while composite kernels encode domain-specific interactions.String-kernel algorithms support sequence data in text classification and bioinformatics, and Fisher kernels use similarities derived from a probabilistic model.Source: §7.4.2 · p. 29, §7.4.3 · p. 30
7.5.1 Complexity Analysis and Approximate Inference
- Exact GP inference costs O(n3) time and O(n2) memory, motivating incremental factorisation, sparse approximations, inducing points, and variational methods with roughly O(nm2) time and O(nm) memory.Here m ≪n denotes the reduced approximation size.Source: §7.5.1 · p. 30
7.6 Equivalence to Bayesian Inference of Linear Regression
- Bayesian linear regression with Gaussian weight priors is equivalent to a GP using kernel k(x, x′) = ϕ(x)⊤Σϕ(x′), linking kernel methods to Bayesian linear models and neural tangent kernels.The predictive mean and covariance match those of the corresponding GP.Source: §7.6 · p. 30
8 Implementation · 9 Coding the Surrogate Model
Sections 8 and 9 explain how to implement and customize surrogate models in Bayesian Optimization, emphasizing domain-appropriate representations, hyperparameter adaptation, and practical Gaussian Process workflows. They combine software examples with guidance on choosing accessible or scalable tools, while noting that the code patterns are illustrative rather than exhaustive.
8.1 Feature Representation
- Domain-specific feature representations, such as molecular graphs, protein sequence embeddings, and structural features, can improve surrogate-model performance when matched to the optimisation task.Source: §8.1 · p. 31
8.2 Hyperparameter Adaptation; 8.2.1 Maximising the Marginal Likelihood; 8.2.2 Hierarchical Bayes
- Surrogate predictive accuracy and uncertainty depend strongly on kernel, mean-function, noise-model, and other hyperparameter choices, which can be adapted by maximising marginal likelihood or integrating over Bayesian hyperparameter posteriors.Marginal-likelihood optimisation applies generally to hyperparameterised surrogate models, while hierarchical Bayes commonly requires MCMC or variational inference.Source: §8.2 · p. 31, §8.2.1 · p. 31, §8.2.2 · p. 31
8.2.2 Hierarchical Bayes
- Hierarchical Bayes provides more robust uncertainty estimates when data are scarce or hyperparameters are poorly identified, although integrating hyperparameters is often computationally intractable.Source: §8.2.2 · p. 31
9 Coding the Surrogate Model
- The coding section presents invariant, practical patterns for configuring Gaussian Process surrogates in BO frameworks and creating them from scratch, without case-by-case studies.Source: §9 · p. 31
9.1 Surrogate Modelling in BO Software; 9.2 Surrogate Modelling in HEBO
- BO software commonly infers GP hyperparameters from data and exposes surrogate configuration through interfaces whose customization is often limited; HEBO instead provides a robust default for heterogeneous variables.HEBO combines a Matern kernel for numeric variables with appropriate categorical kernels, initializes lengthscales from the dataset, and permits further configuration through model_config; its default settings are generally suitable for most use cases.Source: §9.1 · p. 31, §9.2 · p. 32
9.2 Surrogate Modelling in HEBO; 9.2.1 Surrogate Modelling in Bgolearn
- HEBO also supports Random Forest, neural-network-based probabilistic regressors, and feature-selection models, while Bgolearn provides GP, Random Forest, Support Vector Regression, Multi-Layer Perceptron, and AdaBoost alternatives.These alternatives broaden BO beyond traditional Gaussian Processes for non-smooth, discrete, categorical, or noisy objectives.Source: §9.2 · p. 32, §9.2.1 · pp. 32–33
9.3 Creating Your Own Gaussian Processes
- Researchers can fully inspect and customize GP surrogates using Scikit-Learn or GPyTorch: Scikit-Learn favors accessible rapid prototyping, whereas GPyTorch supports scalable, GPU-accelerated, fine-grained modeling at greater complexity.The tutorial is introductory and its minimal examples are illustrative; production or large-scale deployment should consult the libraries’ official documentation.Source: §9.3 · p. 33
9.3.1 GP Modelling using Scikit-Learn; 9.3.2 GP Modelling using GPyTorch
- Scikit-Learn streamlines GP regression through automatic marginal-likelihood hyperparameter optimisation and predictions with uncertainty estimates, while GPyTorch requires explicit model, likelihood, and optimisation-loop construction for greater control over kernels, inference, and training.Source: §9.3.1 · p. 33, §9.3.2 · pp. 34–35
Acting and Decision Making
Scientific decision making maps current beliefs about hypotheses to subsequent experiment selections, aiming to gain knowledge about the unknown and improve objective values. In sequential optimisation, a policy uses accumulated data and a posterior model to choose each next design.
Acting and Decision Making
- Decision making translates current beliefs about a scientific hypothesis into selecting subsequent experiments to acquire knowledge and achieve higher objective values.Source: Acting and Decision Making · p. 36
- In sequential optimisation, a policy π maps accumulated data D_t to the next design x_t+1 ∈ X using the posterior model M(f̂|x̂, D_t).Source: Acting and Decision Making · p. 36
10 Acquisition Function · 11 Bayesian Decision Theory for Optimisation
Bayesian optimisation selects experiments by maximising acquisition functions that quantify expected benefit from a surrogate model, balancing exploration and exploitation at far lower cost than evaluating the black-box objective. Bayesian decision theory grounds these functions in expected posterior utility, explaining the practical dominance of myopic strategies while identifying non-myopic planning as potentially valuable under extremely limited budgets.
10 Acquisition Function
- Acquisition functions convert Bayesian optimisation’s next-experiment decision into tractable white-box optimisation based on the surrogate model and current data.Their optimisation is typically negligible compared with conducting real experiments, making experimental design more manageable than directly optimising the costly objective.Source: §10 · p. 36, §10.1 · p. 36
10.2 Trading off Exploration and Exploitation
- By combining surrogate predictions with uncertainty, acquisition functions balance exploitation of promising regions against exploration of poorly understood regions.This allocation uses uncertainty estimates to reduce ignorance while seeking high objective values.Source: §10.1 · p. 36, §10.2 · pp. 36–37
10.3 Common Choices of Acquisition Functions
- PI targets likely improvements, EI accounts for improvement probability and magnitude, UCB combines posterior mean and uncertainty, and Thompson Sampling samples posterior functions to choose maximisers.For UCB, αUCB(x | D) = µ(x) + β σ(x), with larger β encouraging exploration and smaller β favouring exploitation; PI may become overly exploitative without an improvement threshold.Source: §10.3 · pp. 37–38
- These standard acquisition functions are usually myopic and computationally efficient, whereas non-myopic alternatives may be worthwhile when only a very small number of trials is possible.Myopic methods ignore effects beyond the next decision; precise long-term planning can cost more than it benefits when the surrogate is itself approximate.Source: §10.3 · p. 38
11.1 Utility and Bayesian Decision Making
- Bayesian decision theory defines experiment selection as maximising expected posterior utility, with future observations, model adaptation, and subsequent decisions creating a recursive sequential-decision problem.A utility may measure the best objective value after s additional experiments, while other utilities may measure information gain.Source: §11.1 · pp. 38–39
11.2 From Utility to Acquisition Function
- The acquisition function α(x|D_t) := E[u(D_t+s)|D_t, x] is the expected utility of each next action, so common acquisition functions implicitly encode particular utility choices.This formulation directly connects acquisition-function design to Bayesian decision theory rather than treating acquisition functions as arbitrary scoring rules.Source: §11.2 · p. 39
- A one-step look-ahead produces myopic acquisition functions that are practical because they avoid modelling future decisions and model updates beyond the next experiment.These functions are widely used because their computational tractability supports efficient optimisation.Source: §11.2 · p. 39
11 Bayesian Decision Theory for Optimisation
- Longer look-ahead requires predicting observations, updating the model, and accounting for later decisions, making non-myopic acquisition functions often computationally intractable despite potentially more globally optimal planning.Approximate methods exist but are seldom used because of their complexity and cost; extremely limited budgets can nevertheless justify them.Source: §11.1 · p. 38, §11.2 · p. 39
12 Coding the Acquisition Function
This section explains how acquisition functions determine Bayesian Optimisation evaluation points and demonstrates their implementation in BO software and Gaussian-process workflows. It covers configurable strategies in HEBO and Bgolearn, plus custom implementations for Scikit-Learn and GPyTorch.
12.1 Specifying Acquisition Functions in BO Software
- Acquisition functions determine how Bayesian Optimisation selects its next evaluation points, and the section provides representative implementation code.Source: §12.1 · p. 39
12.1.1 Acquisition Functions in HEBO
- HEBO selects acquisition functions automatically by optimiser class or explicitly through configurable acquisition classes, including LCB, EI, and MACE.HEBO uses LCB by default in BO for minimisation, while HEBO defaults to MACE, which synthesises EI, PI, and LCB.Source: §12.1.1 · pp. 39–40
- HEBO offers exploration, exploitation, and combined acquisition strategies, including Mean, Sigma, EI, logEI, weighted EI variants, MES, MOMeanSigmaLCB, and MACE.All HEBO acquisition functions are implemented for minimisation; LCB uses µ(x) − κσ(x), while Mean and Sigma represent pure exploitation and exploration.Source: §12.1.1 · pp. 39–40
12.1.2 Acquisition Functions in Bgolearn
- Bgolearn provides a unified materials-discovery framework where acquisition functions such as EI, Knowledge Gradient, and PI are invoked by modifying method calls.Source: §12.1.2 · pp. 40–41
12.2.1 Acquisition Functions for Scikit-Learn Gaussian Process
- Common EI, PI, and UCB functions can be implemented from Gaussian-process surrogates using Scikit-Learn posterior means and standard deviations.For minimisation, y_best is the lowest observed value; xi controls EI/PI improvement thresholds, and beta controls UCB exploration–exploitation.Source: §12.2 · p. 41, §12.2.1 · p. 41
12.2.2 Acquisition Functions for GPyTorch Gaussian Process
- The analogous GPyTorch workflow computes predictive mean and variance in evaluation mode, accepts candidate points as PyTorch tensors, and supports acquisition-based selection or visualisation.Source: §12.2.2 · p. 42
Algorithmic Workflow and Implementation · 13 Bayesian Optimisation Algorithm
This section presents Bayesian optimisation as an iterative workflow that updates surrogate models, maximises acquisition functions, evaluates candidates, and recommends solutions, while addressing implementation choices and practical extensions. It also provides theoretical, software, and application-oriented coverage spanning core principles, scientific challenges, and four discovery tasks.
Algorithmic Workflow and Implementation
- The section progresses from core Bayesian optimisation principles to GP-UCB guarantees, scientific extensions, library and custom implementations, and validation across four discovery tasks.The applications span catalysis, materials science, and organic synthesis.Source: Algorithmic Workflow and Implementation · p. 43
13 Bayesian Optimisation Algorithm
- Bayesian optimisation receives a design space and objective evaluator, then returns the best solution found through an iterative, data-driven search.The evaluator may be manual experimentation or an external interface.Source: §13 · p. 43
13.1 Algorithmic Workflow
- The core loop initializes observations, fits a surrogate, constructs and maximises an acquisition function, evaluates the selected candidate, updates the dataset, and stops when criteria are satisfied.The final recommendation is based on accumulated data and/or the surrogate model; Figure 9 illustrates this loop.Source: §13.1 · p. 43, Figure 9 · p. 44
- Practical extensions modify the basic workflow through batched or parallel acquisition, human guidance, and more sophisticated surrogate or acquisition strategies.These extensions are intended to improve Bayesian optimisation’s efficiency and flexibility across applications.Source: §13.1 · pp. 43–44
13.2 Consideration of Sub-Modules
- Initial observations provide the data needed to build the surrogate and can come from random sampling, space-filling designs such as Latin hypercube sampling, or expert suggestions.These choices help avoid poor early decisions and can incorporate prior knowledge about promising regions.Source: §13.2 · p. 44
- Acquisition maximisation methods should match the design space, ranging from exhaustive search and grids to gradient-based optimisation, evolutionary algorithms, or random search.Gradient-based methods can use multiple restarts, while heuristic methods suit complex, mixed-variable, or multi-objective settings.Source: §13.2 · pp. 44–45
- Stopping can use fixed evaluation budgets or adaptive data-, model-, acquisition-, and Bayesian-decision-theoretic criteria that signal convergence, confidence, or diminishing returns.Examples include monitoring recent empirical improvement, surrogate uncertainty, or the acquisition maximum.Source: §13.2 · p. 45
- The final recommendation may select the best observed point or the surrogate-predicted optimum, with prediction potentially advantageous under noisy or sparse observations.The choice depends on whether observed objective values or model predictions provide the more useful estimate.Source: §13.2 · p. 45
14 The GP-UCB Algorithm and Theoretical Guarantees · 15 Review of Technical Extensions for Scientific Discovery
The paper presents GP-UCB as a principled, theoretically justified BO baseline and reviews extensions that address parallel experiments, nonstandard noise, contextual variables, and human expertise in scientific discovery.
14.1 GP-UCB Algorithm
- GP-UCB combines a Gaussian-process surrogate with an upper-confidence-bound acquisition function that balances exploitation of high predicted means and exploration of uncertain regions.The exploration coefficient β_t must support sufficient exploration for theoretical guarantees, although practitioners may tune it heuristically or by cross-validation.Source: §14 · p. 45, §14.1 · p. 45, §14.2 · p. 46
14.2 Theoretical Guarantee: Regret Bounds
- The regret guarantees rely on information-theoretic analysis for finite and compact design spaces under Gaussian-process assumptions, with bounds governed by β_T and maximum information gain γ_T.The compact-space result assumes a compact convex domain and a kernel with continuous fourth-order derivatives; the finite-space result holds for finite X with high probability.Source: §14.2 · p. 46
- GP-UCB achieves sublinear cumulative regret, so average regret vanishes and near-optimal solutions are identified increasingly efficiently as evaluations grow.With high probability, the regret scales as O(√Tβ_Tγ_T); for commonly used kernels such as the squared exponential, γ_T grows sublinearly.Source: §14.2 · p. 46
15 Review of Technical Extensions for Scientific Discovery
- Scientific BO extensions address diverse practical challenges, including batched decisions, heteroscedasticity and non-stationarity, contextual variables, and human expertise.These extensions adapt BO to settings where standard sequential, stationary, homoscedastic, and fully automated assumptions are inadequate.Source: §15 · p. 47
15.1 Batched Decision Making for High-Throughput Experiments
- Batched BO evaluates q candidates in parallel to use high-throughput resources efficiently, while acquisition methods seek complementary points balancing exploitation, exploration, and nonredundancy.q-EI uses the joint posterior but becomes intractable for q > 2 and typically requires approximate inference; parallel knowledge gradient and batched entropy search are alternatives.Source: §15.1 · p. 47
15.2 Heteroscedasticity and Non-Stationarity
- HEBO addresses scientific violations of homoscedasticity and stationarity using warped Gaussian-process ideas and Box-Cox, Yeo-Johnson, and Kumaraswamy transformations.These violations can produce inaccurate uncertainty estimates and suboptimal decisions when noise or system behavior varies across the input space.Source: §15.2 · pp. 47–48
15.3 Contextual Decision Making
- Contextual BO selects controllable designs conditional on observed environmental or experimental contexts, using contextual surrogates and acquisition functions such as CGP-UCB.Models may fit a Gaussian process over joint design-context pairs or aggregate multi-output Gaussian-process predictions with context-dependent neural-network weights.Source: §15.3 · p. 48
15.4 Integrating Human Expertise in the Optimisation Loop
- Human-in-the-loop BO lets experts select, reject, or override algorithmic candidates, preserving scientific trust while flexibly incorporating tacit, context-dependent knowledge.Intervention can occur at every iteration, under high uncertainty, or when several candidates have similarly valued acquisitions; preference learning and expert belief modelling are related approaches [1] [113].Source: §15.4 · pp. 48–49
16 Coding BO Workflows
This section presents code-level Bayesian optimisation workflows using established libraries and custom Gaussian-process implementations. It covers complete iterative workflows, acquisition-based point selection, surrogate updating and training, human selection, and considerations for production-scale scientific applications.
16.1 Coding the Workflow with HEBO
- HEBO implements mixed-variable Bayesian optimisation with parallel suggestions, transformations for heteroscedasticity and non-stationarity, and support for standard and human-in-the-loop workflows [18].The workflow defines a design space and evaluation function, reverses objective signs because HEBO minimises, and returns the best observed design after a fixed budget.Source: §16.1 · p. 49, §16.1.1 · p. 50
16.1.1 General Workflow Using HEBO
- The standard HEBO loop performs initial random exploration, refits a Gaussian-process surrogate, constructs an acquisition function such as MACE, and suggests candidates until the iteration budget is exhausted.The number of initial random samples is controlled by rand_sample and defaults to 1 + number of parameters when unspecified.Source: §16.1.1 · pp. 49–50
16.1.2 HumanintheLoop Workflow Using HEBO
- The human-in-the-loop HEBO variant proposes a batch of candidates, lets an expert select one with validated input, evaluates that point, and feeds it back to the optimiser.This preserves BO’s data-driven guidance while allowing domain knowledge to override or refine candidate selection; the loop ends with the best observed point.Source: §16.1.2 · pp. 50–51
16.2 BO Workflow with Bgolearn
- Bgolearn [12] provides a lightweight, science-oriented workflow that lowers the barrier to deploying BO by fitting a surrogate, maximising Expected Improvement, evaluating the selected point, and updating observations.The example maximises a synthetic two-dimensional black-box function over a dense virtual sampling grid and follows the elementary BO workflow.Source: §16.2 · pp. 51–52
16.3 Coding the Workflow from a Customised Surrogate and Acquisition Function
- A custom workflow combines a Matérn-kernel Gaussian process with UCB using β = 2.0, grid-search acquisition maximisation, true-objective evaluation, fixed-budget termination, and best-observation recommendation.The same loop can use EI or PI and is demonstrated on a two-dimensional design space X = [0, 1]^2 with a synthetic multimodal objective.Source: §16.3 · pp. 52–53
- The custom implementation is intentionally minimal: real applications would replace the synthetic objective and 2D grid, while production BO requires batching, mixed-space support, advanced acquisition optimisation, and robust noise handling.The section recommends established libraries such as HEBO [18], BoTorch [3], or BayesOpt/GPy for these complexities.Source: §16.3 · p. 53
16.3.1 BO Workflow with Scikit-Learn
- The Scikit-Learn workflow uses GaussianProcessRegressor with a Matérn-based kernel, automatically optimised hyperparameters, a 100-by-100 acquisition grid, and 20 fixed BO iterations.It implements the same GP-UCB loop on the synthetic two-dimensional objective.Source: §16.3.1 · pp. 53–54
- The Scikit-Learn workflow updates the surrogate each iteration, constructs UCB from its predictions, selects the next point by grid-based acquisition maximisation, and reports the final recommendation.The discretised grid guarantees the global optimum of the acquisition over that grid, while higher-dimensional problems require more sophisticated optimisers.Source: §16.3.1 · p. 54
16.3.2 BO Workflow with GPyTorch
- The GPyTorch workflow instantiates a GP model and likelihood, trains hyperparameters by maximising marginal likelihood, then uses a tensor grid and UCB within a 20-iteration BO loop.The implementation uses a previously defined GPModel and acq_ucb_torch, with an inner training loop before acquisition maximisation.Source: §16.3.2 · pp. 54–55
- The GPyTorch implementation follows the Scikit-Learn pattern but adds PyTorch autograd and possible GPU support, retraining the model from scratch at each iteration and using dense-grid acquisition search in 2D.Warmstarting hyperparameters is identified as a practical alternative, but the example keeps the loop simple for clarity.Source: §16.3.1 · p. 54, §16.3.2 · p. 55
17 Integrating BO with Scientific Tools
Bayesian Optimisation can address scientific search spaces such as molecules by mapping structured objects into descriptor vectors for surrogate modelling. The molecular QED example implements this approach with RDKit descriptors, a GPyTorch GP, UCB-based candidate selection, and batched experimentation.
17 Integrating BO with Scientific Tools
- BO handles non-conventional scientific spaces by mapping molecules, proteins, or graphs into vector representations suitable for surrogate models and acquisition functions.Standard BO components are designed for vector spaces, whereas molecules may be represented by SMILES strings.Source: §17 · p. 55
17.1 Example: Molecular Descriptors for QED Optimisation
- The QED optimisation example searches a finite set of nearly 250,000 ZINC molecules represented by SMILES strings, using QED as the black-box objective.The benchmark follows Practical Molecule Optimisation [26].Source: §17.1 · pp. 55–56
- RDKit descriptors convert each SMILES string into chemically meaningful features, allowing a GP surrogate to operate in continuous descriptor space while retaining chemical information.Features include molecular weight, logP, hydrogen-bond donors and acceptors, and topological polar surface area.Source: §17.1 · p. 56, §17.2 · p. 56
17.2 Coding Implementation with GPyTorch and RDKit Descriptors
- The implementation uses GPyTorch with a Matérn-kernel GP on descriptor features, while the descriptor layer handles invalid SMILES inputs.Invalid SMILES are assigned a fixed low score and zero uncertainty.Source: §17.2 · pp. 56–57
- Because exhaustive search over ZINC is infeasible, each iteration samples candidate molecules, scores them with UCB = μ + βσ, selects the top-k, and supports batched evaluation.The loop fits the surrogate, evaluates a sampled batch, tracks the best molecule, and uses beta = 2.0 in the illustrated acquisition call.Source: §17.2 · p. 58
Demonstrative Experiments and Conclusion
This section empirically validates Bayesian optimisation across diverse scientific discovery tasks, showing its practical advantages, design dependencies, limitations, and alignment with the scientific method. It concludes by outlining future development and adoption to accelerate research.
Demonstrative Experiments
- BO consistently outperforms blind random search in resource-constrained optimisation tasks spanning catalysis, materials science, organic synthesis, and molecular design.The experiments are described as robust, reproducible, systematic, and empirically grounded.Source: Demonstrative Experiments and Conclusion · p. 59
- Task characteristics—including constraints, mixed variables, high dimensionality, and discrete structure—shape optimisation behaviour and performance differences among BO implementations, including HEBO.The section examines algorithmic design features driving these differences.Source: Demonstrative Experiments and Conclusion · p. 59
Conclusion
- The discussion identifies practical limitations and implementation barriers that complicate BO deployment in real laboratory settings.These limitations are considered alongside BO’s broader relevance to scientific inquiry.Source: Demonstrative Experiments and Conclusion · p. 59
- The conclusion emphasizes BO’s fundamental alignment with the scientific method and presents a structured vision for its future development and adoption.This vision contextualizes how researchers can apply BO to accelerate research as the field evolves.Source: Demonstrative Experiments and Conclusion · p. 59
18 Experimental Settings
The experiments evaluate Bayesian optimisation across mathematical design spaces and structured molecular spaces under protocols designed for comparability and statistical robustness. They use mock oracles, defined optimisation metrics, and comparisons against established BO methods and random search.
Experimental scope
- The study covers four mathematical design problems—HER catalyst design, HEA nanozyme formulation, OER electrocatalyst design, and BH synthesis yield optimisation—and one molecular optimisation problem.The mathematical spaces mix bounded real-valued and categorical variables, while the molecular task searches discrete drug-like molecules.Source: §18 · p. 59
Mathematical design-space problems
- Mathematical experiments use mock-oracle predictive models trained on empirical datasets, compare HEBO [18], GP-based LCB BO, and random search, and run 200 iterations after 20 random initial samples.Each strategy is repeated across 16 random seeds, with mean cumulative best values and standard-error shading reported.Source: §18 · p. 59
Evaluation metrics
- Performance is measured by regret for HER, HEA, and BH maximisation tasks, whereas OER is evaluated by directly plotted overpotential to minimise.Faster declines in the corresponding curves indicate better optimisation performance.Source: §18 · p. 59
Chemical molecule optimisation
- The molecular task maximises RDKit QED over 250,000 discrete drug-like molecules using RDKit descriptors with GPyTorch-based BO.The setup uses a 100-evaluation budget, 20 initial samples, batch size 10, 20,000 acquisition candidates, 50 gradient steps, and an invalid-molecule score of -1.Source: §18 · pp. 59–60
- Molecular BO uses a GP surrogate with UCB and is compared with random search under the fixed evaluation budget across 16 random seeds.The parameters control evaluations, initialisation, batching, acquisition-candidate generation, GP training, and invalid-molecule penalties.Source: §18 · p. 60
19 Experimental Results
Advanced Bayesian optimisation frameworks consistently outperform random search, while standard BO is robust on many tasks but can fail in challenging mixed-variable spaces. Across catalyst, alloy, reaction, and molecular design problems, adaptive surrogates and tailored acquisition strategies improve convergence and final performance.
19 Experimental Results
- HEBO consistently outperforms random search across mathematical design problems, while BO-LCB underperforms random search only on the mixed-variable OER task.HEBO also achieves lower regret or overpotential than BO-LCB and converges faster, using non-stationary modelling, heteroscedastic-noise handling, and dynamic multi-objective acquisition.Source: Figure 10 · p. 60, §19 · p. 60
19.1 Photocatalytic HER Catalyst Design
- HEBO reduces HER catalyst-design regret from approximately 24 to below 15 within 50 iterations and reaches 9.2 after 200, versus BO-LCB near 12 and random search at 21.8.HEBO matches random search’s final performance within 30 iterations, corresponding to an 85% reduction in experimental effort.Source: §19.1 · pp. 60–61
19.2 High-Entropy Alloy Nanozyme Formulation
- HEBO reduces constrained HEA nanozyme regret from around 290 to 153 after 200 iterations, outperforming BO-LCB at around 238 and random search at 244.Its non-stationary modelling and multi-objective acquisition efficiently navigate the narrow feasible simplex, where random samples often fall outside feasible conditions.Source: §19.2 · p. 61
19.3 OER Electrocatalyst Design
- HEBO lowers OER overpotential from around 320 mV to 219 mV after 200 iterations, while BO-LCB reaches approximately 252 mV and random search 245 mV.HEBO reaches below 250 mV within 50 iterations; BO-LCB’s stationary surrogate and fixed acquisition over-explore misleading regions in the mixed-variable space.Source: §19.3 · p. 61
19.4 Buchwald-Hartwig Reaction Yield Optimisation
- HEBO reduces Buchwald-Hartwig reaction regret from around 70 to 9.9 after 200 iterations, compared with BO-LCB at around 25 and random search at 47.Conventional selection of the top 20 features from 530 DFT-derived features makes BO effective despite the remaining high-dimensional, non-stationary search space.Source: §19.4 · p. 62
19.5 Molecular QED Optimisation
- Descriptor-based GP-UCB reaches a final mean QED score of 0.918 after 100 iterations, versus 0.881 for random search, maintaining an advantage throughout.RDKit descriptors map discrete SMILES structures into a chemically meaningful continuous space for Gaussian-process generalisation.Source: Figure 11 · p. 62, §19.5 · p. 62
20 Discussion · 21 Conclusion
Across five case studies, Bayesian optimisation consistently improves scientific discovery, reducing experiments by 60%–85%, while HEBO offers robustness for complex real-world optimisation. The tutorial also identifies implementation barriers, algorithmic limitations, and a roadmap toward accessible, integrated, and increasingly autonomous scientific experimentation.
20 Discussion
- BO’s iterative surrogate–acquisition–evaluation–update workflow computationally realises the Bayesian hypothetico-deductive scientific method, supporting broad applicability across scientific discovery tasks.The surrogate represents evolving scientific beliefs, the acquisition function selects experiments, and new data updates those beliefs.Source: §20 · p. 63
- Existing BO software often requires manual simplex reparameterisation, dimensionality reduction, or molecular feature engineering, creating adoption barriers for experimental scientists.The examples include HEA nanozyme formulation, Buchwald–Hartwig reactions, and molecular QED optimisation.Source: §20 · p. 63
- HEBO consistently outperforms random search and standard BO across tasks, using mixed-variable kernels, noise and non-stationarity handling, and MACE acquisition to improve robustness.Standard GP-UCB can underperform random search early in high-dimensional problems when stationarity and homoscedasticity assumptions fail.Source: §20 · p. 63
21 Conclusion
- The tutorial validates BO across catalysis, materials science, organic synthesis, and molecular design, reducing required experiments by 60%–85% across all cases.It presents BO as a principled alternative to intuitive trial-and-error and highlights HEBO’s robustness to real-world scientific complexity.Source: §21 · p. 63
- BO augments rather than replaces scientists by automating experimental design and trial-and-error, enabling researchers to focus on high-level reasoning while accelerating discovery.The framework acts as a probabilistic digital twin whose beliefs are refined through iterative experimentation.Source: §21 · p. 64
21.1 Limitations
- The tutorial broadens access through tiered conceptual, coding, and mathematical content, while acknowledging that standard GPs scale poorly beyond n ≲10^3 because exact inference costs O(n^3).It also notes limited coverage of scalable surrogates and advanced extensions, and that alternatives may be preferable when evaluations are cheap or gradients and mechanistic information are available.Source: §21 · p. 64, §21.1 · pp. 64–65
21.2 Future Vision
- Near-term priorities include domain-specialised toolkits, laboratory automation, closed-loop experimentation, and user-friendly multi-objective BO for competing scientific objectives.These tools aim to remove manual feature engineering and integrate BO with flow chemistry, robotic synthesis, and high-throughput characterisation.Source: §21.2 · p. 65
- Longer-term plans integrate physical knowledge, human expertise, robust handling of experimental imperfections, autonomous scientific AI agents, meta-learning, shared datasets, and expanded tutorial coverage.The vision includes LLM-assisted literature reasoning, robotic execution, knowledge transfer across domains, and future topics such as multi-fidelity and multi-task BO.Source: §21.2 · p. 65