Manuscript Offprint
arXiv:2610.32514Amortized Thompson Sampling and Efficient Information-Directed Sampling for Simulator-Based Design
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Thompson sampling is a widely used strategy for sequential decision-making under uncertainty, offering a principled way to balance exploration and exploitation. This strategy involves maximizing a target objective under a single sample drawn from the current belief over unknown quantities. Conventionally, this optimization is performed once the belief has been inferred from data, and it becomes computationally burdensome when many Thompson samples are required, especially in continuous action spaces. In this work, we introduce an approach that amortizes this process ahead of time, before any data is collected, so that an approximation of the full Thompson sampling distribution is available immediately once observations arrive. We employ this approach to solve the multi-round setting, involving sequential data acquisition and Thompson-sample recommendation across rounds. Beyond accelerating Thompson sampling, our approach enables efficient estimation of expected information gain about the optimal action. This can be used to select more informative Thompson samples or to obtain maximally informative designs with optimization. Combining this estimate of expected information gain with immediate regret supports information-directed sampling (IDS), which can outperform Thompson sampling by explicitly balancing these two quantities. We demonstrate our approach on two simulator-based design problems in synthetic biology, where the simulators have intractable likelihoods.
1 INTRODUCTION
Thompson sampling is a widely used strategy for sequential decision-making under uncertainty. Given the observations collected so far, it samples a plausible value of the unknown quantities from their posterior distribution and selects an action that is optimal under that sample. This provides a principled mechanism for balancing exploration and exploitation and has strong theoretical guarantees under established assumptions. The strategy was first proposed in 1933 by Thompson et al. (1933), and later analyzed by Russo & Van Roy (2014b), who provided Bayesian regret bounds for this strategy. The method proved to be effective as decision making principle for multi-armed bandits (Chapelle & Li, 2011) and Bayesian optimization (Eriksson et al., 2019; Garnett, 2023). However, conventional Thompson sampling can be burdensome in continuous action domains because each posterior sample requires solving a separate optimization problem.
To illustrate how this computational cost recurs, consider a laboratory using a simulator to design experiments. First, generating multiple Thompson samples within a single experimental round requires solving a separate optimization problem for each posterior sample. Multiple samples may be needed to obtain a batch of recommendations or to characterize uncertainty over the optimal action, see (see e.g. Kobiela et al., 2026a). Second, after each experiment, the posterior changes as new data become available, requiring inference and optimization to be performed again. When delays between experiments incur costs, the next action should be available with minimal latency. Third, when the method is deployed under different conditions, for example, in another laboratory with different unknown experimental conditions, these steps must be repeated using observations from the new setting. These repeated computations are particularly expensive when the objective is evaluated using a costly, stochastic, or non-differentiable simulator with continuous action space.
In this work, we amortize the optimization underlying Thompson sampling before data collection. Our approach trains a parameterized policy to map values of the unknown model parameters to approximately reward-maximizing actions under those parameter values. We train this policy using policy gradient method, allowing the approach to handle stochastic and non-differentiable simulators. The trained policy is then combined with simulation-based inference (SBI): once experimental observations become available, SBI provides samples from the posterior over the unknown parameters, and passing these samples through the policy produces approximate Thompson samples. In this way, the costly optimization is performed during offline training rather than repeatedly for each posterior sample and experimental round.
We also develop a second amortized sampling route that bypasses explicit parameter inference. We train an action flow, implemented as a conditional normalizing flow, to represent a conditional distribution over approximate Thompson samples given an experimental history. Training targets are generated by applying the pretrained policy to parameter values sampled from the prior. Both approaches support sequential design through round-specific flows trained offline over a prescribed experimental horizon and conditioned at deployment on the evolving history of actions and observations. The pretrained models can be reused across experimental settings whose unknown conditions are represented by the simulator and training prior.
Efficient access to an approximate distribution over optimal actions, together with amortization across design rounds, provides capabilities beyond accelerating conventional Thompson sampling. Standard Thompson sampling balances exploration and exploitation implicitly through posterior randomization, without explicitly evaluating the information value of a recommendation. To enable more directed exploration, the key observation is that expected information gain about the optimal action is the expected reduction in the entropy of the Thompson-sampling distribution after observing the outcome of an experiment from predictive distribution. The tractable conditional density of the action flow enables efficient estimation of this quantity, allowing us to score and select Thompson-sampled candidates to avoid uninformative measurements and focus experimental effort on identifying the optimal action. The parameter flows additionally support one-step look-ahead regret estimation by conditioning on hypothetical observations. This also encourages exploration as the immediate action outcome is unimportant and only expected outcome of the future Thompson sample is used.
In contrast, selecting actions by minimizing expected immediate regret favors exploitation: these actions maximize expected reward under the current belief but may provide little information for future rounds. Together, these criteria allow explicit control over the exploration-exploitation trade-off beyond posterior randomization. For example, in the final round of experimental design, an exploitative action may be preferable, whereas earlier rounds may benefit from informative experiments that help identify the optimal action, but not necessarily yield good reward. Neither purely exploitative nor purely information-seeking actions are necessarily preferable throughout an experiment: exploitation can leave useful alternatives unexplored, while information-seeking actions may incur substantial immediate regret. Information-directed sampling offers a way to balance these competing objectives and can often outperform standard Thompson samples (Russo & Van Roy, 2014a). Thanks to efficient estimation of information gain our approach allows to acquire such acquisition samples.
Our method supports two approaches to action selection. First, we can generate multiple approximate Thompson samples and use decision-theoretic criteria to select a desirable candidate. These include expected information gain about the optimal action, expected immediate regret, one-step look-ahead regret, and an information-directed criterion that balances immediate regret against information gain. This approach avoids an additional acquisition-optimization step while allowing more explicit control over exploration and exploitation than selecting a Thompson sample.
Alternatively, we can optimize the chosen criterion directly over the admissible action space, using the flows to approximate the criterion rather than to generate candidate actions. A finite set of
Thompson samples may miss actions that optimize the acquisition criterion. Direct optimization can also identify revealing actions outside the support of the Thompson-sampling distribution: actions that are not plausible reward maximizers under the current belief but provide valuable information about which action is optimal. The flows make these criteria efficient to estimate by providing tractable conditional densities and rapid conditioning on hypothetical observations, although the acquisition criterion computation and optimization introduces additional latency, as compared to amortized Thompson samples which are available immediately, once the data is acquired.
We demonstrate the proposed framework on two model-based design problems from synthetic biology. The first concerns maximizing fluorescent-protein production using a host-aware simulator. The second concerns the design of a genetic oscillator represented by a highly stochastic and non-differentiable model. These applications provide challenging test cases involving intrinsic stochasticity, uncertain experimental conditions, and simulator-based optimization, while illustrating the broader applicability of the framework to scientific design problems.
Contributions. Our contributions fall into two groups: amortizing Thompson sampling and using the resulting models for decision-focused experimental design.
• Amortized Thompson sampling through parameter inference. We train a parameter-conditioned policy that maps unknown model parameters to approximately reward-maximizing actions. Combined with amortized simulation-based inference, this approach generates approximate Thompson samples without repeated online inference or reward optimization.
• Direct amortization with an action flow. We introduce a conditional normalizing flow that approximates the Thompson-sampling distribution directly from experimental histories, bypassing explicit parameter inference when generating actions. Its tractable conditional density also enables estimation of entropy and information gain about the optimal action.
• Decision-focused selection among Thompson samples. We combine the learned models to efficiently estimate expected immediate regret, expected information gain about the optimal action, one-step look-ahead regret, and information-directed criteria. These criteria enable selection among Thompson-sampled candidates, providing explicit control over exploration and exploitation beyond posterior randomization.
• Acquisition optimization beyond Thompson samples. We use the same models to estimate acquisition criteria during direct optimization over the admissible action space. This avoids restricting decisions to a finite set of Thompson samples and allows selection of informative experiments that need not themselves be plausible reward maximizers.
Related exploration–exploitation strategies arise in the bandit literature, which are also often used for BO (Garnett, 2023), such as Thompson sampling. Thompson sampling selects an action by sampling a plausible hypothesis from the current posterior and optimizes the objective under that hypothesis (Thompson et al., 1933; Russo et al., 2018). Its exploratory behaviour therefore arises implicitly through posterior randomisation. Information-directed sampling instead explicitly trades off expected regret against information gained about the optimal action (Russo & Van Roy, 2014a). Other approaches focus on the information gain alone. Entropy Search (Hennig & Schuler, 2012) and Predictive Entropy Search (Hernández-Lobato et al., 2014) select evaluations to gain information about the location of the maximum of a GP-modelled latent objective, while Max-value Entropy Search (Wang & Jegelka, 2017) targets its maximum value. In contrast, we use simulator models without a GP surrogate and amortize posterior inference and the mapping from latent parameters to optimal actions. Acquisition functions such as expected improvement (Jones et al., 1998) or knowledge gradient (Frazier et al., 2008) are based on one-step lookahead approach (Garnett, 2023). Inspired by these approaches, one of our selection strategies is the one-step look-ahead regret of a Thompson sample. A further alternative is to formulate the complete adaptive design process as a sequential reinforcement learning problem and learn a policy end-to-end, see e.g. Kobiela et al. (2026b).
Variants of Thompson (posterior) sampling Thompson sampling has sublinear cumulative-regret guarantees under established assumptions in a range of bandit settings (Russo et al., 2018). However, efficient reward accumulation does not imply efficient identification of the optimal action. As Russo (2020) observes, standard Thompson sampling eventually concentrates measurements on the estimated-best arm, potentially requiring many additional measurements to rule out competing alternatives. Top-two Thompson sampling (Russo, 2020) addresses this limitation in finite-armed best-arm identification by selecting a posterior-sampled optimal arm with a prescribed probability and otherwise resampling until a different arm is optimal. In continuous action spaces with a non-atomic distribution over optimal actions, independently sampled Thompson samples are almost surely distinct, so this rejection rule does not identify meaningfully competing alternatives. Our approach enables action selection based on expected information gain about the optimal action, either by ranking Thompson-sampled candidates or by optimizing this criterion directly. This can avoid uninformative measurements and focus experimental effort on identifying the optimal action.
Thompson sampling was also used in the context of Bayesian reinforcement learning (Strens, 2000; Osband et al., 2013) where the Markov Decision Process (MDP) is unknown and sampled from the belief state, and afterwards, the policy for that sampled MDP is deployed. In this context it is often known as Posterior Sampling for Reinforcement Learning (PSRL).
Bayesian optimal experimental design. Bayesian optimal experimental design (BOED) selects experiments by maximizing their expected utility, commonly defined as the expected information gain about unknown model parameters (Lindley, 1956; Chaloner & Verdinelli, 1995). Computing this utility typically involves nested expectations over parameters and possible observations, making it expensive to estimate and optimize (Foster et al., 2019; 2020; Kleinegesse & Gutmann, 2019; 2020). Amortized approaches, including Deep Adaptive Design and related methods, shift this cost to an offline training stage by learning a policy that maps experimental histories directly to subsequent designs (Foster et al., 2021; Ivanova et al., 2021). At deployment, the policy can therefore adapt to observations without solving a new optimization problem at every round. We adopt this amortisation principle but focus information acquisition on the downstream objective rather than on identifying the model parameters. In particular, we consider utilities defined in terms of the optimal action (rather than parameters ), so that experiments are valued according to downstream task. This objective-focused formulation can avoid acquiring information about parameters that is irrelevant to identifying high-performing actions. A recent approach Action-BED (Rossa et al., 2026) avoids using EIG in favor of future loss, often measuring the proximity of the policy output to the true parameters.
Simulation-based inference and normalising flows. When a simulator can generate observations but does not provide a tractable likelihood, simulation-based inference (SBI) can be used to perform inference using a machine learning model trained on simulated parameter–observation pairs (Thomas et al., 2022; Papamakarios & Murray, 2016). Neural posterior estimation uses conditional density estimators, often based on normalising flows (Rezende & Mohamed, 2015), to amortize inference across observations (Papamakarios & Murray, 2016). After training, posterior samples and density evaluations can be obtained rapidly for new observations. We learn an amortized posterior over latent parameters and map its samples to optimal actions using a separately trained policy.
2 METHOD
2.1 PROBLEM FORMULATION
Let denote unknown continuous simulator parameters, a continuous experimental design, and a discrete or continuous observation generated by
We assume that the parameter value is fixed throughout an experimental trajectory and that the conditional reward and observation distributions are stationary. Given a realised reward , we define
as the expected simulator reward.
For fixed parameters, an optimal action satisfies
We assume a fixed selection rule when the maximum is not unique. After observing the history , Thompson sampling draws
Thus, parameter sampling represents epistemic uncertainty, while reward optimization averages over aleatoric uncertainty. Conventional implementations require posterior inference as observations accumulate and a separate optimization for each posterior sample.
Our framework first amortizes these computations through a learned policy and conditional density models. It then uses the same models to select among Thompson-sampled candidates or to optimize decision-theoretic criteria directly over the action space.
2.2 AMORTIZED THOMPSON SAMPLING THROUGH PARAMETER INFERENCE
Learning the parameter-to-action mapping. We train a parameter-conditioned policy , parameterised by a feed-forward neural network, to maximize
(5)
We would like to optimize this objective using stochastic gradient descent. However, we assume that the simulator can be an implicit black-box model without available gradients. For this reason, we use the score-function gradient estimator, which takes the form
In practice, we use Proximal Policy Optimization (PPO) to stabilise policy-gradient updates. Training requires derivatives of the policy, but not of the simulator or reward. It therefore accommodates stochastic, non-differentiable simulators, including Markov jump processes.
At deployment, we use the conditional policy mean
as an approximation to .
Amortising parameter inference. For each experimental round t, we train a conditional normalising flow
on simulated parameter–history pairs. Once observations become available, approximate Thompson samples are generated by
This replaces per-history inference and per-sample reward optimization with evaluations of pre-trained models. Before the first experiment, parameters are sampled directly from the prior.
2.3 DIRECT AMORTISATION WITH AN ACTION FLOW
The parameter-flow–policy route generates actions through an explicit parameter posterior. Our second route learns the distribution over approximately optimal actions directly:
To construct training examples, we sample , simulate an experimental history under , as in Algorithm 1, and associate that history with the target . The action flow is fitted by conditional maximum likelihood.
At deployment, drawing
bypasses explicit parameter inference. In addition to sampling, the flow provides conditional log densities, which are used below to estimate uncertainty about the optimal action.
Both routes produce approximate Thompson samples. For action generation, either route can be used. In the present implementation, parameter flows additionally support regret estimation and posterior predictive simulation, while action flows provide the densities required by the information-based criteria.
Training across experimental rounds. We train round-specific flows sequentially over a prescribed horizon of T observations. Histories are generated using an equal mixture of uniformly sampled actions and approximate Thompson samples. At the first round, Thompson samples are generated from the prior and policy, while subsequent rounds use previously trained flows.
For each training trajectory, the ground-truth parameter value is held fixed. In contrast, parameters used to generate actions are drawn independently from the belief conditioned on the current history, to reflect the uncertainty that an experimenter unaware of ground truth would have. The parameter and action flows for a given round are trained on the same simulated dataset. The full pseudocode can be seen in Algorithm 1.
2.4 DECISION-FOCUSED SELECTION AMONG THOMPSON SAMPLES
Standard Thompson sampling executes one posterior-sampled optimal action. Instead, we generate a candidate set using either amortized sampling route and score its members with a decision criterion. This avoids additional acquisition optimization while allowing explicit control over exploration and exploitation.
Let denote the history obtained by appending a hypothetical pair , where is sampled from the predictive distribution using current belief. At , the parameter belief is the prior; otherwise, it is approximated by .
Expected immediate regret. We use the policy-based reward reference
The PPO value function can generally be used to approximate this quantity. The expected immediate regret is approximated by
Minimising this criterion is equivalent to maximizing posterior expected reward, since the reference does not depend on the candidate action.
One-step look-ahead regret. To assess the usefulness of an experiment for a subsequent decision, we simulate its outcome and evaluate the expected regret of a Thompson sample drawn from the updated belief:
(14)
Algorithm 1: Sequential training of parameter and action flows
Input: Prior ; simulator ; policy mean ; horizon T; training examples per round M
Output: Flows and for
for to T do
Initialise ; for to M do
Sample ; Set ; Initialise history ; for to n do
Sample ; if then
Sample uniformly from ; else
if then
Sample ; Set ; else
Generate using the round- parameter-flow-policy route or action flow, conditioned on ;
Sample ; Append to ;
Add to ;
Fit and by conditional maximum likelihood on ;
This criterion values the candidate through the quality of the subsequent recommendation, rather than its immediate reward. An experiment with substantial immediate regret can therefore be preferred if its observation improves future decisions.
Information gain about the optimal action. The EIG about optimal action is defined by:
This can be written as
where entropy is defined as . Thus, it is the expected reduction in uncertainty about the Thompson-sampling distribution.
The action flow approximates the distribution over policy-generated optimal actions. Its entropy can be estimated using
Predictive observations are generated by drawing parameters from the current belief and simulating . The next-round action flow then supplies the conditional entropy for each hypothetical outcome.
Information-directed selection. Information-directed sampling combines immediate regret and information gain through
We can estimate both of those quantities as before.
To improve comparisons between candidates, we reuse the same Monte Carlo samples of across all candidate actions. This common-random-numbers approach can reduce the variance of estimated loss differences, making candidate rankings more reliable.
2.5 CANDIDATE SELECTION
For each minimisation criterion , the selected action is
Restricting selection to approximate Thompson samples allows us to simply acquire candidates using previously trained flows, but may exclude actions which are informative, but not included in the support of Thompson sampling distribution.
2.6 DIRECT ACQUISITION OPTIMIZATION
Rather than restricting selection to a finite candidate set, we can optimize the same criteria over the full admissible action space:
with maximization used for information gain. Here, the flows only estimate the acquisition criterion rather than also generating the candidate actions.
This approach can recover promising actions missed by a finite Thompson-sampled set. It can also identify informative experiments that are not plausible reward maximizers under the current belief and therefore need not lie in the support of the Thompson-sampling distribution.
Further, optimization methods such as Bayesian optimization can potentially use lower-cost Monte Carlo estimates of these criteria based on fewer samples, reducing the time required per evaluation, as compared to selection strategies. This is justified as Bayesian optimization seeks a minimum of the mean despite noise (Garnett, 2023).
3 RESULTS
3.1 HOST-AWARE HETEROLOGOUS GENE EXPRESSION
In this section we focus on maximizing foreign gene expression using host-aware model. This case study is adopted from Kobiela et al. (2026b) and its detailed formulation can be found in the appendix. The simulator models the production of green fluorescent protein (GFP) in genetically modified Escherichia coli. It represents both GFP production and the host-cell processes that are required to support it, including nutrient uptake, energy generation, transcription, protein synthesis, degradation, and cell growth. The model therefore captures competition between GFP production and normal cellular functions for limited resources, particularly energy and ribosomes, which are the cellular machinery responsible for producing proteins. The model involves 22 coupled ordinary differential equations with nonlinear Hill-type regulatory functions.
The main experimental input is the GFP induction level, , which determines how strongly GFP production is activated. The primary simulator output is the steady-state GFP abundance. This value is obtained by solving the model's system of ordinary differential equations over a sufficiently long time horizon using the Rosenbrock23 method from the DifferentialEquations.jl library (Rackauckas & Nie, 2017). Although increasing induction initially promotes GFP production, excessive induction can overload the host cell and reduce the final protein yield. The resulting relationship between induction and GFP output can therefore be non-monotonic, see Figure 1.
Variation in the biological system is represented by three parameters: the nutrient efficiency , the rate at which ribosomes bind to GFP messenger RNA , and the rate at which they unbind . In principle, each of these parameters can be influenced experimentally, for example through the choice of growth medium or the design of the gene-expression construct. However, their exact values are

Figure 1: We model foreign gene insertion. The excessive gene induction (designable parameter) can lead to an overworked host. This can decrease the expression of the gene and slow down its growth. The model can be used to predict the behaviour of the system but a lack of knowledge results in uncertainty.
generally unknown because they are affected by unmodelled regulation, experimental variability, and limited biological knowledge. We therefore treated them as uncertain parameters with uniform prior:
Different values of these parameters alter both the maximum achievable GFP output and the induction level at which it occurs, see Figure 1. All remaining model parameters were fixed to the values reported by Nikolados et al. (2021), based on the host-aware model of Weiße et al. (2015). The initial conditions are randomized to represent variation in the starting state of the cells. Random initial conditions induce stochastic observations even though the underlying dynamics are deterministic. Evaluating the likelihood requires integrating over these initial conditions, making the likelihood difficult to evaluate explicitly. This is, however, not an issue as our method does not require explicit likelihoods.
We trained both the parameter and action flow for 4 steps. Figure 2 shows the regret over 1,000 rollouts for Thompson sampling, each using a different sample from the prior as the ground truth. It can be seen that, after two steps, the regret improves significantly, with the majority of the probability mass close to zero. However, there is still a large number of outliers. We will show that these outliers can be dramatically reduced using an appropriate Thompson sampling selection or optimization method.
Figure 2 also shows Thompson samples for the example history context . It can be seen that the approximate Thompson samples (crosses) generally maximize the predictive objective function, as desired. Secondly, the Thompson samples generated with both routes—posterior parameter inference followed by the policy, and action-flow—coincide in distribution.
The example context in Figure 2 was chosen because it illustrates several interesting properties. First, a single observation (black dot) is insufficient to reliably identify the optimal action, motivating the need for sequential design. Second, the action that maximizes posterior expected reward almost coincides with the action already observed. Acting purely exploitatively can therefore lead to selecting an action that provides little additional information. Although it has the highest expected reward at the current step, it may contribute little to identifying the true optimum.
Figure 3 shows the selection criteria introduced in Section 2.4 for this history context. The action that minimises expected immediate regret provides little information, as measured by EIG, and all the other criteria favour different, more informative actions. In Appendix Figure A1 and Table A1, we show that selecting such an exploitative action can negatively affect several subsequent decisions, despite yielding a high immediate reward. On the other hand, picking more informative action can yield better results for subsequent steps.


Figure 2: Left: Regret for each step for 1000 rollouts each for different sample of . Right: Thompson sample distributions for example context using both methods.

Figure 3: Selection objectives for example history context .
Figure 4 shows the results of Thompson-sample selection across the complete experimental trajectory, from the initial to the final step. At the final step, we always use the exploitative strategy based on expected immediate regret, while the strategy of interest is used in the preceding steps. Exploitation at the final step substantially reduces the outlier problem, even when the preceding steps follow vanilla (unfiltered) amortized Thompson sampling. However, using this exploitative selection at every step, rather than only last one, results in the worst final performance as shown in Table 1. Among the Thompson-sample selection strategies, EIG, IDS, and one-step lookahead regret achieved the best final performance. All three significantly outperformed the vanilla Thompson sampling baseline, with no statistically significant differences detected between them. These results highlight that carefully selecting Thompson samples can improve final performance and make experimental design more robust by producing fewer and less severe outliers.
When using optimization rather than selection among Thompson samples, the differences between decision criteria become even more pronounced, as seen in Figure 4b (bottom). One-step lookahead and EIG achieve very low final regret but incur substantial regret in earlier rounds. Searching beyond the Thompson-sampled candidate set allows the selection of more informative actions, but these can incur much higher immediate regret.
Figure 5 shows that IDS achieved the lowest cumulative regret for Thompson sample selection, whereas EIG and future-regret selection incurred substantial costs in the early rounds, resulting

(a) Selection strategies applied to Thompson samples over 1,000 rollouts.

(b) The same strategies optimized using grid search over the entire action space.
Figure 4: Comparison of action-selection strategies. Final denotes the last step, at which the immediate regret strategy was always used.

Figure 5: Cumulative regret for 1000 rollouts for GFP case study. The shading indicates standard deviation rescaled by to aid presentation.
in higher cumulative regret than vanilla Thompson sampling. Whether these strategies are preferable therefore depends on the experimenter's objective. If the priority is to minimise final regret and poorly performing designs can be tolerated during experimentation, EIG and one-step lookahead strategies may be desirable despite their higher cumulative cost. In contrast, IDS remains the strongest strategy when cumulative regret is the primary concern. Notably, it outperforms vanilla Thompson sampling in terms of both cumulative and final regret.
Table 1: Monte Carlo estimates of expected final and cumulative regret, reported as mean ± standard error (SEM). Actions are chosen using the specified strategy; the final action is selected by minimising expected immediate regret. Italics identify the best-performing methods within each selection group (Selection or Optimization), and bold identifies the best-performing methods overall. Highlighted methods include the lowest-mean method and those not significantly different from it under paired -tests with Holm correction ().
| Approach | Criterion | Final | Cumulative |
|---|---|---|---|
| Selection | Immediate regret | ||
| One-step lookahead | |||
| Information gain | |||
| IDS | |||
| Optimization | Immediate regret | ||
| One-step lookahead | |||
| Information gain | |||
| IDS | |||
| n/a | Random | ||
| Vanilla TS |

Figure 6: Insertion of three repressing genes (i.e. the repressilator) is modelled. Under suitable conditions this results in oscillatory expression. The model not only has uncertain parameters; even with fixed parameters returns highly stochastic prediction of the outcome due to the molecular noise.
3.2 REPRESSILATOR
In this case study, we design a repressilator, a synthetic genetic oscillator in which three genes repress one another in a cycle (Elowitz & Leibler, 2000), see Figure 6. We adopt the stochastic simulator of Kobiela et al. (2026b), based on Sequeiros et al. (2023), and observe the molecule-count trajectory of the first protein, , see modelling details in the appendix.
The action specifies the protein translation rate, maximum transcription rate, and repression threshold. We seek actions that produce regular oscillations at a target frequency , despite uncertainty in the biochemical parameters and intrinsic reaction noise. The reward is
where is estimated from the second peak of the normalized autocorrelation of , and is the peak height, used as a measure of oscillation regularity.
Our method treats the simulator as a black box, requiring only simulated observations and rewards, without simulator derivatives or access to the likelihood or its parameter score. Further simulator details, action bounds, and parameter priors are provided in the Appendix.
Figure 7 presents the results for Thompson samples generated using both amortization methods (summary statistics are provided in Table A3). Since rewards are estimated from a highly stochastic simulator and the optimal reward is approximated, estimated regret can be negative. Regret on average decreases across steps, approaching zero. Most of the improvement occurs by the second

Figure 7: Monte Carlo estimate of the regret across stages for unfiltered Thompson sampling in the repressilator case study.

Figure 8: Regret for each acquisition strategy: final regret (left) and cumulative regret (right).
step, after a single observation has been collected. Some further improvement is observed in the third and fourth step.
Next, we analyse the optimization of the selection criteria described in Section 2.6. As before, the final action is chosen by pure exploitation. We used 100 ground truth samples from the prior, used expected regret estimated over 100 random seeds to reduce variance. Figure 8 and Table 2 show that EIG achieved the lowest mean final regret, but the other strategies perform similarly in terms of final regret. Regarding cumulative regret, IDS achieves the best performance, followed by the exploitative immediate-regret strategy, both of them beating Thompson sampling. EIG, on the other hand, incurs substantial regret in earlier rounds.
Table 2: Estimated regret for the repressilator case study, reported as mean standard error. The specified strategy is used in Steps 1–3; the final action (Step 4) is selected by minimising expected immediate regret for all strategies.
| Criterion | Step 1 | Step 2 | Step 3 | Final | Cumulative |
|---|---|---|---|---|---|
| Thompson sampling | 0.685 ± 0.077 | 0.177 ± 0.038 | 0.181 ± 0.038 | 0.078 ± 0.024 | 1.112 ± 0.072 |
| Immediate regret | 0.479 ± 0.079 | 0.172 ± 0.030 | 0.103 ± 0.026 | 0.079 ± 0.023 | 0.854 ± 0.075 |
| Information gain | 0.716 ± 0.074 | 0.639 ± 0.072 | 0.552 ± 0.081 | 0.051 ± 0.018 | 2.048 ± 0.081 |
| IDS | 0.434 ± 0.067 | 0.151 ± 0.026 | 0.134 ± 0.031 | 0.090 ± 0.025 | 0.833 ± 0.075 |
To investigate whether differences between strategies become more pronounced in a more challenging setting, we considered a two-step scenario in which the acquisition strategy is used only once before the final exploitative action. Table 3 summarises the results. For both selection among Thompson samples and direct optimization, EIG achieved lower mean final regret than the other strategies. Its performance was also comparable to that of vanilla Thompson sampling at the third step in Table A3, suggesting that information gain selection may help achieve similar performance with fewer observations. Overall, the observed patterns are consistent with the previous case study: IDS was preferable when cumulative regret was the primary objective, whereas EIG performed best when the quality of the final recommendation was the main concern.
Table 3: Two-step case study: each strategy selects the first action, followed by an exploitative final action. Final regret is reported as mean SEM.
| Approach | Criterion | Final regret |
|---|---|---|
| Selection | Immediate regretInformation gainIDS | |
| Optimization | Immediate regretInformation gainIDS |
3.3 DISCUSSION
Our results demonstrate that amortising Thompson sampling is effective across simulators evaluated in this work. By moving inference and reward optimization to offline training, the framework enables rapid generation of approximate Thompson samples as experimental observations accumulate. The learned flows also make information-based and look-ahead criteria practical to estimate, allowing us to move beyond standard posterior randomisation when selecting experiments.
A useful direction for future work is to enforce consistency between the learned flows. The action flow and the parameter flow are trained separately, although the action distribution should correspond to mapping posterior parameter samples through the pretrained policy. Future training objectives could encourage agreement between these two representations.
Our results suggest that selecting among Thompson-sampled candidates using explicit decision criteria can improve the reward of the final recommendation relative to unfiltered Thompson sampling. This distinction matters when the objective is to identify a high-performing design after a limited experimental budget, rather than maximize reward accumulated during experimentation. Informative actions early in the experiment can reduce uncertainty about the optimal action and improve subsequent recommendations. Conversely, final round benefits from exploitation with immediate regret criterion. IDS remains the strongest strategy when cumulative regret is of interest.
The choice between selecting among Thompson-sampled candidates and directly optimizing an acquisition criterion introduces a further trade-off. A finite candidate set may miss actions that optimize the criterion, while direct optimization can search the full admissible action space. It can therefore identify revealing actions that are never reward-optimal under the current belief but are informative about which action is optimal. Such actions may incur substantial immediate regret, particularly when selected solely for information gain. Restricting selection to Thompson-sampled candidates provides an implicit preference for plausible reward maximizers and can make information-based selection more exploitative, at the cost of excluding most informative experiments.
4 CONCLUSION
We introduced an approach to amortizing Thompson sampling that shifts inference and reward optimization costs ahead of data acquisition. It accommodates simulator models with intractable likelihoods and unavailable gradients, including discrete-state Markov jump processes, and remained feasible for host-aware protein expression models with over 20 coupled ordinary differential equations. Both routes, parameter inference coupled with a pretrained policy and direct sampling from an action flow, were effective in our case studies.
Beyond efficient sampling, we used the learned models to guide experimental design in two ways: selecting among Thompson-sampled candidates using explicit decision criteria, and directly optimizing these criteria over the admissible action space. The action flow enables estimation of information gain about the optimal action, supporting decision-focused Thompson samples selection and direct acquisition optimization. Information-gain-based approach improved final regret relative to unfiltered Thompson sampling, while information-directed sampling improved cumulative regret in both case studies. In the first case study, direct optimization of information-gain and look-ahead criteria further improved final regret as compared to selection, but at the cost of greater regret during earlier experimentation. Our approach therefore allows for more tailored decision-making, accounting for the tolerance for failures during experimentation and the ultimate goal: maximizing final reward or minimizing cumulative regret.
Our approach reduces computational delays between data acquisitions with amortization and supports more efficient use of experimental budgets with decision criteria. It accommodates broad range of models including those with intractable likelihoods and unavailable gradients. Together, these advances enable more efficient design using simulator models, which are widely used in science and engineering.
Acknowledgements: This work was supported by the United Kingdom Research and Innovation (grant EP/S02431X/1), UKRI Centre for Doctoral Training in Biomedical AI at the University of Edinburgh, School of Informatics. For the purpose of open access, the authors have applied a creative commons attribution (CC BY) licence to any author accepted manuscript version arising.
During the preparation of this work the authors used ChatGPT in order to increase the readability of the text. After using this tool/service, the authors reviewed and edited the content as needed and take full responsibility for the content of the publication. The authors also used Claude AI (Opus 4.8) to aid the implementation of the method.
REFERENCES
Kathryn Chaloner and Isabella Verdinelli. Bayesian experimental design: A review. Statistical science, pp. 273–304, 1995.
Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. Advances in neural information processing systems, 24, 2011.
Michael B Elowitz and Stanislas Leibler. A synthetic oscillatory network of transcriptional regulators. Nature, 403(6767):335–338, 2000.
David Eriksson, Michael Pearce, Jacob Gardner, Ryan D Turner, and Matthias Poloczek. Scalable global optimization via local bayesian optimization. Advances in neural information processing systems, 32, 2019.
Adam Foster, Martin Jankowiak, Elias Bingham, Paul Horsfall, Yee Whye Teh, Thomas Rainforth, and Noah Goodman. Variational bayesian optimal experimental design. Advances in neural information processing systems, 32, 2019.
Adam Foster, Martin Jankowiak, Matthew O'Meara, Yee Whye Teh, and Tom Rainforth. A unified stochastic gradient approach to designing bayesian-optimal experiments. In International Conference on Artificial Intelligence and Statistics, pp. 2959–2969. PMLR, 2020.
Adam Foster, Desi R Ivanova, Ilyas Malik, and Tom Rainforth. Deep adaptive design: Amortizing sequential bayesian experimental design. In International conference on machine learning, pp. 3384–3395. PMLR, 2021.
Peter I Frazier, Warren B Powell, and Savas Dayanik. A knowledge-gradient policy for sequential information collection. SIAM Journal on Control and Optimization, 47(5):2410–2439, 2008.
Roman Garnett. Bayesian optimization. Cambridge University Press, 2023.
Philipp Hennig and Christian J Schuler. Entropy search for information-efficient global optimization. Journal of Machine Learning Research, 13(6), 2012.
José M Hernández-Lobato, Matthew W Hoffman, and Zoubin Ghahramani. Predictive entropy search for efficient global optimization of black-box functions. Advances in neural information processing systems, 27, 2014.
Desi R Ivanova, Adam Foster, Steven Kleinegesse, Michael U Gutmann, and Thomas Rainforth. Implicit deep adaptive design: Policy-based experimental design without likelihoods. Advances in neural information processing systems, 34:25785–25798, 2021.
Donald R Jones, Matthias Schonlau, and William J Welch. Efficient global optimization of expensive black-box functions. Journal of Global optimization, 13(4):455–492, 1998.
Steven Kleinegesse and Michael U Gutmann. Efficient bayesian experimental design for implicit models. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 476–485. PMLR, 2019.
Steven Kleinegesse and Michael U Gutmann. Bayesian experimental design for implicit models by mutual information neural estimation. In International conference on machine learning, pp. 5316–5326. PMLR, 2020.
Michal Kobiela, Diego A Oyarzún, and Michael U Gutmann. Risk-averse optimization of genetic circuits under uncertainty. Cell Systems, 17(1), 2026a.
Michal Kobiela, Diego A Oyarzún, and Michael U Gutmann. Sequential design of genetic circuits under uncertainty with reinforcement learning. arXiv preprint arXiv:2605.06552, 2026b.
Dennis V Lindley. On a measure of the information provided by an experiment. The Annals of Mathematical Statistics, 27(4):986–1005, 1956.
Torkel E. Loman, Yingbo Ma, Vasily Ilin, Shashi Gowda, Niklas Korsbo, Nikhil Yewale, Chris Rackauckas, and Samuel A. Isaacson. Catalyst: Fast and flexible modeling of reaction networks. PLOS Computational Biology, 19(10):1–19, 10 2023. doi: 10.1371/journal.pcbi.1011530. URL https://doi.org/10.1371/journal.pcbi.1011530.
Evangelos-Marios Nikolados, Andrea Y Weiße, and Diego A Oyarzún. Prediction of cellular burden with host–circuit models. In Synthetic Gene Circuits: Methods and Protocols, pp. 267–291. Springer, 2021.
Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Neural Information Processing Systems, 2013. URL https://api.semanticscholar.org/CorpusID:674335.
George Papamakarios and Iain Murray. Fast -free inference of simulation models with bayesian conditional density estimation. Advances in neural information processing systems, 29, 2016.
Christopher Rackauckas and Qing Nie. Differential equations.jl—a performant and feature-rich ecosystem for solving differential equations in julia. Journal of Open Research Software, 5(1):15, 2017.
Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning, pp. 1530–1538. PMLR, 2015.
Tom Rossa, Angus Phillips, and Tom Rainforth. Action-bed: Task-driven bayesian experimental design with singly intractable objectives, 2026. URL https://arxiv.org/abs/2606.23662.
Daniel Russo. Simple bayesian algorithms for best-arm identification. Operations Research, 68(6):1625–1647, 2020.
Daniel Russo and Benjamin Van Roy. Learning to optimize via information-directed sampling. Advances in neural information processing systems, 27, 2014a.
Daniel Russo and Benjamin Van Roy. Learning to optimize via posterior sampling. Mathematics of Operations Research, 39(4):1221–1243, 2014b.
Daniel Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen. A tutorial on thompson sampling. Foundations and trends in machine learning, 11(1):1–99, 2018.
Carlos Sequeiros, Carlos Vazquez, Julio R Banga, and Irene Otero-Muras. Automated design of synthetic gene circuits in the presence of molecular noise. ACS Synthetic Biology, 12(10):2865, 2023.
Niranjan Srinivas, Andreas Krause, Sham M Kakade, and Matthias Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. arXiv preprint arXiv:0912.3995, 2009.
Malcolm Strens. A bayesian framework for reinforcement learning. In ICML, volume 2000, pp. 943–950, 2000.
Owen Thomas, Ritabrata Dutta, Jukka Corander, Samuel Kaski, and Michael U Gutmann. Likelihood-free inference by ratio estimation. Bayesian Analysis, 17(1):1–31, 2022.
William R Thompson et al. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):285–294, 1933.
Zi Wang and Stefanie Jegelka. Max-value entropy search for efficient bayesian optimization. In International conference on machine learning, pp. 3627–3635. PMLR, 2017.
Andrea Y Weiße, Diego A Oyarzún, Vincent Danos, and Peter S Swain. Mechanistic links between cellular trade-offs, gene expression, and growth. Proceedings of the National Academy of Sciences, 112(9):E1038–E1047, 2015.
A APPENDIX
A.1 HOST-AWARE MODEL
This model is adopted from Weiße et al. (2015), and the setup is identical to that in Kobiela et al. (2026b). The chemical reaction network is as follows:
Import:
Catabolism:
Transcription:
Ribosome binding:
mRNA degradation:
Protein degradation:
(22)
Translation:
Energy dilution:
mRNA dilution:
Complex dilution:
Protein dilution:
for each protein .
The rates are defined:
The corresponding system of ODEs was derived and solved using Rosenbrock solver from Rackauckas & Nie (2017). The initial condition is set by solving a warm-up problem without GFP, and employing the steady state values with additional Gaussian noise. We used the default values from Weiße et al. (2015), except below, for uncertain and design parameters (actions).
Uncertain parameters priors: , , and
Design parameter admissible ranges: .
A.2 REPRESSILATOR MODEL
This model is adopted from Sequeiros et al. (2023), and the setup is identical as in Kobiela et al. (2026b). For each gene , the reactions are
Transcription:
Translation:
mRNA degradation:
Protein degradation:
where
Catalyst.jl Loman et al. (2023) was used to derive the MJP problem. Then stochastic simulation algorithm (SSA) from JumpProcesses.jl Rackauckas & Nie (2017) was used to simulate the problem.
Uncertain parameters priors: , , , and .
Design parameter admissible ranges: , , .
A.3 ROLLOUTS FOR EXAMPLE CONTEXT
| Step | Criterion | Mean SEM | Median |
|---|---|---|---|
| a2 (selection on) | Information gain | ||
| One-step lookahead | |||
| IDS | |||
| Immediate regret | |||
| vanilla | |||
| a3 (selection off) | Information gain | ||
| One-step lookahead | |||
| IDS | |||
| Immediate regret | |||
| vanilla | |||
| final (selection off) | Information gain | ||
| One-step lookahead | |||
| IDS | |||
| Immediate regret | |||
| vanilla |
Table A1: Regret by step and strategy (mean SEM and median) for example context.

Figure A1: Plot presenting the results in Table A1.
A.4 HOST STUDY - COMPLETE RESULTS
Table A2: Monte Carlo estimates of expected regret across trajectory stages, reported as mean ± standard error (SEM). Actions are chosen using the specified strategy; the final action is selected by minimising expected immediate regret. For final and cumulative regret, italics identify the best-performing methods within each selection group (Selection or Optimization), and bold identifies the best-performing methods overall. Highlighted methods include the lowest-mean method and those not significantly different from it under paired t-tests with Holm correction ().
| Approach | Criterion | Step 1 | Step 2 | Step 3 | Final | Cumulative |
|---|---|---|---|---|---|---|
| Selection | Immediate regret | |||||
| One-step lookahead | ||||||
| Information gain | ||||||
| IDS | ||||||
| Optimization | Immediate regret | |||||
| One-step lookahead | ||||||
| Information gain | ||||||
| IDS | ||||||
| n/a | Random | |||||
| Vanilla TS |
A.5 REPRESSILATOR - ADDITIONAL RESULTS
Table A3: Estimated (MC) expected regret across four stages, with standard error of the mean (SEM) and median regret.
| Step | Mean SEM | Median |
|---|---|---|
| First action (prior optimization) | ||
| 2nd (posterior flow) | ||
| 2nd (action flow) | ||
| 3rd (posterior flow) | ||
| 3rd (action flow) | ||
| 4th (posterior flow) | ||
| 4th (action flow) |