arXiv:2611.06633stat.MLNov 2026

Manuscript Offprint

arXiv:2611.06633

TestBED: An Open-Source Toolkit for Bayesian Experimental Design

Gavin Kerrigan, Marcel Hedman, Sahel Iqbal, Tom Rainforth

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Bayesian experimental design (BED) is a principled framework for intelligent data acquisition with applications across a wide range of scientific and industrial domains. However, the development and adoption of BED remains hindered by a lack of standardised software and benchmarks. Existing methods are typically implemented in bespoke codebases and evaluated on a small subset of tasks, making methods difficult to apply, compare, or extend. To address this, we present TESTBED, a general-purpose, open-source toolkit for Bayesian experimental design. TESTBED decomposes the BED process into modular, reusable components spanning tasks, objectives, training mechanisms, policy architectures, and evaluation procedures, together with scalable implementations of core primitives such as expected information gain estimators. We provide a wide range of these components, which can be freely composed, allowing existing methods to be reproduced within a common framework, while also enabling previously unexplored configurations and new methodologies to be easily implemented and evaluated. Using TESTBED, we further conduct a large-scale benchmark of contemporary BED methods, including controlled studies of under-appreciated but surprisingly critical methodological choices, such as the importance of time embeddings in design policy architectures. By providing a modular, extensible software foundation and a reproducible benchmarking suite, we hope that TESTBED will accelerate methodological research in BED and lower the barrier to its real-world application.

1 INTRODUCTION

In recent years, Bayesian experimental design (BED, Lindley, 1956; 1972; DeGroot, 1962) methodology has developed rapidly, incorporating techniques from areas like amortised optimisation (Foster et al., 2021; Ivanova et al., 2021; Rossa et al., 2026), variational inference (Foster et al., 2019; Huang et al., 2025; Bracher et al., 2026; Phillips et al., 2026), reinforcement learning (Huan & Marzouk, 2016; Blau et al., 2022; 2023; Barlas & Salako, 2025), foundation models (Choudhury et al., 2026; Huang et al., 2026), and generative models (Iollo et al., 2025; Dong et al., 2025; Saravanan et al., 2026; Phillips et al., 2026), amongst others. Beyond the research community, BED has seen uptake in a wide range of applications, including psychology (Watson, 2017; Aushev et al., 2023; Keurulainen et al., 2023), quantum physics (Varona-Uriarte et al., 2025; Belliardo et al., 2026), drug discovery (Park et al., 2013; Chakraborty et al., 2025; Wang et al., 2026), and beyond.

However, many applications of BED have not leveraged these recent methodological advancements. A domain expert applying BED must often navigate multiple research codebases or re-implement methods from scratch, with little guidance as to which methods are best suited to a particular problem. This lack of standardisation also bottlenecks progress within BED itself. Researchers developing new methods frequently re-build much of the surrounding infrastructure, incurring significant engineering costs. This burden is amplified by the range of settings that experimental design must support, like discrete outcomes (Kirby & Maraković, 1996; Cook et al., 2008; Vincent & Rainforth, 2017; Valentin et al., 2024) and history-dependent models (Lim et al., 2022; Iqbal et al., 2024), which can require special care for each method. Furthermore, methods are often tested on different subsets or variants of benchmark problems, and details like experimental horizons, architectures, optimisation procedures,

*Correspondence to: Kerrigan@stats.ox.ac.uk. Code for TESTBED is available at https://github.com/testbed-benchmark/testbed.

Figure

Figure 1: Left: TESTBED workflow. A Task supplies the model and design space, a Designer produces a Rollout of designs and outcomes, and an Objective scores it. A fitting algorithm updates the designer's parameters. Hooks augment the rollout loop. Right: a complete DAD-style training loop (Foster et al., 2021), with each line shaded by the component it uses (imports omitted).

and others vary across papers. This makes results difficult to compare, and can obscure whether an apparent improvement is a result of methodological or implementation choices.

To address these challenges, we introduce TESTBED, an open-source Python toolkit for BED. Built on PyTorch (Paszke et al., 2019; Ansel et al., 2024), TESTBED is organised around two key design principles. The first is modularity: we decompose the BED pipeline into a task specifying the design problem to be solved, and three components which together define a BED methodology: a designer specifying the strategy for producing designs, an objective specifying what is optimised, and algorithms which specify how the objective is optimised. See Figure 1. Compatible components can be freely composed to obtain an end-to-end BED methodology for a given task. Beyond making existing methods easier to implement and compare, this decomposition enables new combinations not previously studied in the literature, several of which we study in our experiments, see Figure 2.

The second principle is extensibility: each of these components is defined by a small abstract interface, so that new tasks, objectives, designers, architectures and methods can be developed without reimplementing the necessary surrounding infrastructure. A new expected information gain (EIG) estimator (Ao & Li, 2024; Bartuska et al., 2024), for instance, can be immediately evaluated across the available task suite, while a new application can make use of all compatible methods already implemented in TESTBED. Thus, TESTBED is not merely a collection of methods but rather a foundation on which new BED methodology and applications can be easily developed and tested.

Building on these principles, TESTBED provides reference implementations of contemporary BED methods (Foster et al., 2020; 2021; Blau et al., 2022; Huang et al., 2025; Rossa et al., 2026; Phillips et al., 2026) in a common framework, together with reproducible evaluation protocols and recommended default configurations. We use TESTBED to conduct what is, to our knowledge, the largest controlled empirical comparison of BED methods to date, exploiting its modularity to isolate the effect of individual architectural and computational choices, which existing evaluations cannot do.

While no single method dominates across tasks, our study yields several insights. First, time embeddings in the design policy have a large effect: earlier approaches that lack them (Foster et al., 2021) improve substantially once they are added. Second, a well-tuned static design is surprisingly strong on several popular tasks (Iqbal et al., 2024; Phillips et al., 2026), suggesting these tasks have limited power to discriminate between strategies. Third, variational joint posteriors (Foster et al., 2020; Phillips et al., 2026), a method rarely included as a baseline, is highly competitive when paired with modern architectures and comparable compute. These results show implementation choices can matter as much as methodological ones, and underscore the need for controlled, reproducible comparisons. Overall, TESTBED provides the infrastructure needed to make Bayesian experimental design easier to use and improve. By providing a highly modular, extensible, and usable toolkit, TESTBED lowers the cost of applying BED in new domains and can accelerate the development of new methodology.

References (100)

Couldn't load all references. Reload the page to try again.