Experiment DesignOpen Source🔓 open source

BayBE

Open-source Bayesian optimization library for closed-loop experimental design in chemistry and materials science — recommends which experiments to run next to reach a target property with fewer trials.

Last verified: July 2026

What it does

BayBE (Bayesian Adaptive Experimentation) is a Python library for running Bayesian optimization over experimental parameter spaces. You describe your experimental setup — the parameters you can vary, any constraints on valid combinations, and a target property to optimize — and BayBE recommends which experiments to run next. After you collect results, you feed them back in and it updates its model to recommend the next round. That loop continues until you’ve hit your target or exhausted your budget.

The core differentiator from general-purpose optimization libraries is chemistry-awareness: BayBE handles categorical and discrete parameters (solvent choice, catalyst identity, reaction step count) that don’t fit neatly into continuous optimization, and it supports molecular encodings — SMILES strings can be featurized directly using fingerprints or descriptors, letting the model learn structure-activity relationships without manual feature engineering.

Developed by Merck KGaA and the University of Toronto Acceleration Consortium. Source and documentation on GitHub.

Best for

Experimental optimization workflows where you want to reduce the number of trials needed to reach a target — synthesis condition optimization, formulation development, catalyst screening, or any setting where each experiment has real cost (time, materials, instrument time). Particularly well-suited to situations with mixed parameter types: a temperature range, a categorical solvent list, and a discrete number of reaction steps all in the same optimization problem.

Pricing

Free and open-source (MIT license). No usage limits, no account required.

Strengths

  • Handles mixed parameter types natively — continuous, discrete, and categorical in the same experiment, including SMILES-encoded molecules
  • Chemistry-specific encodings built in: molecular fingerprints and descriptors can featurize molecule identities without writing custom preprocessing
  • Constraint support: mark certain parameter combinations as invalid (incompatible reagents, physically impossible conditions) so recommendations never suggest them
  • Batch recommendations: suggest multiple experiments at once, useful for labs that can run several conditions in parallel
  • Well-documented API with worked examples for synthesis and formulation problems
  • Active development with institutional backing from Merck KGaA

Limitations

  • Requires Python and comfort with libraries — not a GUI tool; you write code to define your experimental space and call the API
  • Works best when you have a single scalar target (yield, purity, a measured property); multi-objective optimization is possible but more complex to set up
  • Like all Bayesian optimization, performance depends on how well your parameter space is specified — poorly defined constraints or missing parameters will lead to suboptimal suggestions
  • Designed for moderate-scale experiment spaces (tens to hundreds of parameter combinations), not high-throughput screening of millions of compounds

How it compares

vs. Key difference
Ax / BoTorch (Meta) BoTorch is more general-purpose and lower-level; BayBE adds chemistry-specific encodings and a higher-level API designed for experimental rather than ML hyperparameter use cases
Optuna Optuna is built for ML hyperparameter tuning, not lab experiments; lacks categorical chemistry encodings and physical-constraint support
EDBO EDBO is a similar chemistry-focused Bayesian optimization tool; BayBE has broader parameter type support and more active maintenance as of 2026
Design of Experiments (DoE) tools Classical DoE (factorial, response surface) selects all experiments up front; Bayesian optimization is adaptive — each round informs the next, making it more efficient when experiments are expensive
  • Field Guide: Materials Science — covers GNoME and the broader shift toward AI-driven materials discovery that BayBE fits into
  • Field Guide: Chemistry — retrosynthesis and molecular optimization context
  • Glossary: Active Learning — the broader machine learning strategy BayBE implements in an experimental setting