Trieste: Efficiently Exploring The Depths of Black-box Functions with TensorFlow

Henry Moss, Victor Picheny, Hrvoje Stojic, Sebastian W. Ober, Artem Artemev, Andrei Paleyes, Sattar Vakili, Stratis Markou, Jixiang Qing, Nasrulloh Ratu Bagus Satrio Loka, Ivo Couckuyt · DOI

Abstract

Trieste is a modular, open-source Python library designed to bring scalable Bayesian Optimization (BO) and active learning to the TensorFlow 2 ecosystem. By addressing the technical challenges of running sequential decision-making loops within a graph-based framework, Trieste enables researchers to leverage GPU acceleration and deep learning models to efficiently explore expensive black-box functions.

Introduction

Bayesian Optimization is the gold standard for optimizing "black-box" functions that are expensive to evaluate, such as tuning hyperparameters for massive neural networks or conducting physical laboratory experiments. While libraries like BoTorch exist for PyTorch, TensorFlow 2 previously lacked a dedicated, modern BO library.

The primary challenge is technical: TensorFlow is optimized for massive parallel tasks via computational graphs. Conversely, BO is inherently sequential—evaluating a point, updating a model, and deciding the next step. In TensorFlow, this evolving nature often triggers "retracing," where the framework constantly rebuilds the graph, leading to significant performance overhead. Trieste was developed to bridge this gap, providing a production-ready toolkit that manages these internal dynamics efficiently.

Methods and Architecture

Trieste is built on a modular "plug-and-play" philosophy consisting of four key building blocks:

  1. Interfaces: It offers two primary execution modes. The BayesianOptimizer provides a standard automated loop, while the AskTellOptimizer is tailored for real-world settings where the objective function is not a simple Python snippet (e.g., physical lab experiments where results are returned asynchronously).
  2. Probabilistic Models: Trieste interfaces directly with established libraries like GPflow (Gaussian Processes), GPflux (Deep GPs), and Keras (Neural Networks).
  3. Acquisition Rules: These define the strategy for selecting the next point, balancing exploration of uncertain regions with exploitation of known optima.
  4. Acquisition Functions: The library includes standard functions like Expected Improvement (EI) and advanced variants for multi-objective or constrained optimization.
Comparison of the AskTellOptimizer and BayesianOptimizer interfaces in Trieste.

Crucially, Trieste leverages TensorFlow’s automatic differentiation to calculate gradients for these acquisition functions, allowing for efficient optimization via a parallelized multi-start L-BFGS-B optimizer. Special care is taken to avoid expensive graph retracing, maintaining high performance throughout the sequential loop.

Applications and Utility

As a software framework, Trieste is evaluated through its utility across various research and industrial domains rather than a single benchmark dataset. It has been successfully deployed for:

  • Engineering Design: Optimizing the design of heat exchangers.
  • Manufacturing: Improving adhesive bonding processes.
  • Synthetic Benchmarks: Serving as the foundation for various BO research papers.

Key Results and Insights

Trieste stands out for its production-ready reliability and feature richness. Key highlights include:

  • Model Agnosticism: Users can swap a simple Gaussian Process for a Deep Ensemble or a Sparse Variational GP without altering the optimization pipeline, unlocking BO for datasets far larger than traditional methods can handle.
  • Robustness: The library features a comprehensive test suite with 97% code coverage, ensuring reliability for both academic and industrial use.
  • Advanced Optimization Support: Out-of-the-box support for multi-objective optimization (finding trade-offs), multi-fidelity optimization (leveraging cheap, low-quality data), and constrained optimization.
  • Monitoring: Seamless integration with TensorBoard allows real-time monitoring of model convergence and optimization statistics.

Limitations and Future Directions

While highly flexible, the authors identify several areas for future development. Standard BO continues to struggle with high-dimensional input variables; the team plans to integrate more robust methods for high-dimensional objective functions. Additionally, future versions aim to support non-Euclidean search spaces, such as categorical data or graph-structured inputs. As an open-source project, Trieste's roadmap remains community-driven, evolving with the needs of the broader TensorFlow ecosystem.

Summary updated

BibTeX
@misc{moss2023trieste,
  author = {Henry Moss and Victor Picheny and Hrvoje Stojic and Sebastian W. Ober and Artem Artemev and Andrei Paleyes and Sattar Vakili and Stratis Markou and Jixiang Qing and Nasrulloh Ratu Bagus Satrio Loka and Ivo Couckuyt},
  title = {{Trieste: Efficiently Exploring The Depths of Black-box Functions with TensorFlow}},
  year = {2023},
  eprint = {2302.08436},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.08436},
}
Figure