Controlled Generative Diffusions for Rare Event Simulation
Image adapted from Domingo-Enrich et al, "Adjoint matching: fine-tuning flow and diffusion generative models with memoryless stochastic optimal control" (2025).Summary
We propose adapting a controlled generative diffusion model for applications in rare event simulation. Building on Domingo-Enrich et al. (2025), we detail our theoretical formulation for solving for the optimal control via adjoint matching. We demonstrate results using our formulation toward challenges in rare event simulation: first, we incorporate subset simulation of sequentially estimating intermediate event probabilities to drive samples toward the failure threshold. Then, we introduce importance sampling to minimize the computational cost of many evaluations of the gradient of the reward function. Below, we summarize the problem statement and relevant techniques.
Intro
In many generative modeling applications, fine-tuning methods have been used to improve the sample quality of diffusion models based on a specified reward function. For a base generative model which samples a distribution , one can generate samples from a tilted target distribution based on an appropriate reweighting by the reward function , e.g.,
This perspective has close ties to Bayesian inference, where encodes a log likelihood function, and has been used to align the output of generative models with human preferences using human feedback data, such as with large language models (Ziegler et al, 2019) and image generators (Domingo-Enrich et al, 2025).
Controlled generative diffusions
Let denote the state of a generative diffusion process at diffusion time . The baseline generative diffusion is a reverse-time stochastic differential equation (SDE) written schematically as
where denotes the base drift, denotes the diffusion coefficient, and denotes -dimensional standard Brownian motion. In the reverse-time SDE, the base drift incorporates the score of the time-marginal distribution , such that the law of the state at the terminal time, , corresponds to . One can interpret the SDE as transporting samples from a tractable reference distribution, such as a standard Gaussian, to the base distribution .
Suppose we define a reward function, , which assigns high values to desired terminal samples. Given a controlled process
the fine-tuning problem corresponds to solving for the control function for which the law of is the tilted distribution weighted by the reward.
Fine-tuning via stochastic optimal control
Stochastic optimal control (SOC) defines the appropriate objective to solve for the optimal control function. A common instantiation is the quadratic cost control-affine problem formulation,
where is the law of , e.g. a path measure, are the running costs, is the terminal cost, and is a suitable choice of Hilbert space of control functions. We define the cost functional as the expected future cost starting from a state at time ,
The value function is the optimal value of the cost functional and can be expressed in terms of the law of the uncontrolled base process, , as
Setting and , we can arrive at an expression for the distribution induced by the optimal control as
Note that the above distribution is not equal to the target tilted distribution due to the dependency on the initial value function, . One could try to formulate different costs and to correct for this bias, though it may be analytically or computationally difficult. Instead, it can be shown that it is possible to remove the value function bias by choosing a particular memoryless noise schedule during the fine-tuning procedure. A generative process is memoryless if and are independent, such that . This implies one can marginalize out the variable to obtain
Therefore, solving the SOC problem with a memoryless base model will result in a fine-tuned model that generates samples according to the tilted distribution. A generative process is memoryless if the diffusion coefficient is chosen as
where , , and . A key contribution of Domingo et al. (2025) is adjoint matching, an efficient method of solving the SOC problem using a memoryless noise schedule without expensive reinforcement learning techniques.
Rare event estimation
One practical application of sampling from a tilted distribution is rare event estimation, where the objective is to estimate the probability of events that are extremely unlikely under the target distribution. For an event domain , the probability is given by . In literature, the boundary of the failure domain is referred to as the failure threshold. In this setting, standard Monte Carlo estimators are computationally inefficient due to the prohibitively large number of samples from which would be required to observe the rare event and estimate its statistics. Importance sampling addresses this challenge by biasing the sampling toward rare-event regions and then correcting the bias with appropriate weights. Exponential tilting is common in importance sampling; unfortunately, it is usually confined to regimes where both and come from well-understood parametric exponential families.
In the context of rare event estimation, solving for an optimal proposal distribution , e.g. by cross-entropy methods, is increasingly more challenging when the probability of the rare event becomes extremely small. Au and Beck (2001) introduced subset simulation as a computationally tractable technique in this setting, which decomposes a rare event into a sequence of more frequent intermediate events. This is achieved by expressing the rare event probability, , as a product of conditional probabilities corresponding to nested intermediate events which satisfy , with :
The failure threshold corresponding to each intermediate event for is defined in terms of a performance function , such that . The thresholds are chosen adaptively such that the conditional probabilities are neither too small or too large to ensure efficient sampling. Subset simulation then samples from the conditional distribution corresponding to each probability, allowing the method to focus computational effort on progressively rarer regions of the input space. This sequential framework greatly improves the efficiency and robustness of rare event estimation, particularly in high-dimensional and nonlinear systems.
Related Papers
D. Sharp, E. Williams, J. Zou (equal contribution). “Controlled Generative Diffusion Models for Rare-Event Simulation.” Project report for MIT 6.S982: Diffusion Models: From Theory to Practice. 2025.
Paper distributed by request.