Bayesian optimization with known experimental and design constraints for chemistry applications

Riley J. Hickman, Matteo Aldeghi, Florian Häse, Alán Aspuru-GuzikarXiv 2022 · DOI

Abstract

In chemical research, optimization often occurs within complex, constrained spaces defined by physical limits, safety protocols, and synthetic feasibility. Standard Bayesian optimization (BO) tools frequently struggle with these "hard" constraints. This paper presents an extension to the Phoenics and Gryffin BO algorithms, utilizing genetic algorithm-based acquisition function optimization to navigate non-linear and interdependent constraint spaces effectively. The proposed approach achieves up to a 5x speedup in experiment planning while strictly adhering to known experimental boundaries.

Introduction: The Challenge of Real-World Constraints

In theoretical optimization, parameters are often assumed to exist within a simple hypercube. However, practical chemistry involves numerous "known constraints" that render large portions of the search space infeasible. These include safety limits (e.g., solvent boiling points), hardware capacities (e.g., pump flow rates), and chemical logic (e.g., avoiding explosive combinations). Traditional BO methods often ignore these constraints, leading to impractical suggestions, or require cumbersome mathematical reformulations. This work introduces a flexible framework to integrate these constraints directly into the optimization loop.

Methods: Constraining the Acquisition Function

The researchers integrated constraint-handling into Gryffin, a BO algorithm optimized for the mixed continuous-categorical spaces common in chemistry. The primary innovation involves the optimization of the acquisition function—the utility metric used to select the next experiment.

Two main strategies were implemented:

  1. Adam/Hill: A gradient-based (Adam) or hill-climbing approach. If a step enters an infeasible region, the search is terminated or redirected.
  2. Genetic Algorithm (GA): A derivative-free approach that evolves a population of candidates. This method proved particularly robust for complex boundaries.
Comparison of Adam and Genetic optimization strategies in unconstrained and constrained search spaces.

To maintain feasibility during GA mutations, a ProjectToFeasible subroutine uses binary search to map invalid points back to the nearest valid boundary. Additionally, Kernel Scaling adjusts the surrogate model's bandwidth based on the feasible region's volume, preventing underfitting in highly restricted spaces.

Benchmarking and Performance

The framework was evaluated across three domains: standard analytical functions (e.g., Branin, Schwefel), flow chemistry simulations, and redox-active molecule design using synthetic accessibility (RAscore) as a constraint.

Performance benchmarks of various optimization algorithms on standard analytical functions, showing regret over time.

Key results include:

  • Efficiency: The Genetic Algorithm approach was up to 5x faster than gradient-based methods because it avoids expensive numerical derivative calculations.
  • Robustness: The algorithms successfully navigated "non-compact" domains (islands of feasibility) in flow chemistry simulations.
  • Practical Impact: In a redox-active molecule case study, the system filtered out 32% of the search space as synthetically inaccessible, focusing resources on high-performing, makeable targets.

Conclusion and Future Directions

By treating a priori knowledge as a hard filter, this approach prevents the optimizer from wasting budget on infeasible experiments. While highly effective for inequality constraints, the current implementation requires manual re-parameterization for equality constraints. Future work may explore deep learning techniques, such as invertible neural networks, to map unconstrained spaces to complex constrained ones, further improving efficiency in cases with extremely small feasible regions.

Summary updated

BibTeX
@misc{hickman2022bayesian,
  author = {Riley J. Hickman and Matteo Aldeghi and Florian Häse and Alán Aspuru-Guzik},
  title = {{Bayesian optimization with known experimental and design constraints for chemistry applications}},
  year = {2022},
  eprint = {2203.17241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.17241},
}
Figure