Reverse-BSDE Monte Carlo

Jairon H. N. Batista, Yuri F. Saporito, Flávio B. Gonçalves, Rodrigo S. Targino · 2025

Read Reverse-BSDE Monte Carlo by Jairon H. N. Batista, Yuri F. Saporito, Flávio B. Gonçalves, Rodrigo S. Targino (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-06800.txt.

Introduction

Four authors recast a diffusion sampler as a coupled stochastic system in this 2025 paper. Diffusion models sample from complex distributions, and the standard setup first estimates a score function, then runs a reverse process driven by it.

The target density here is known only up to a constant. The authors rewrite the reverse sampler as a forward-backward stochastic differential equation, replacing the separate score estimate with one coupled system to solve. They prove the two forms agree and break the total error into parts from the starting guess, the time stepping, and the equation solve. Tests on mixture, banana, and ring shaped targets showed the method's promise.

Catalog record

CREATORJairon H. N. Batista, Yuri F. Saporito, Flávio B. Gonçalves, Rodrigo S. Targino
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE25 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-06800

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Reverse-BSDE Monte Carlo Jairon H. N. Batista, Yuri F. Saporito, Flávio B. Gonçalves, Rodrigo S. Targino Abstract Recently, there has been a growing interest in generative models based on diffusions driven by the empirical robustness of these methods in generating high-dimensional photorealistic images and the possibility of using the vast existing toolbox of stochastic differential equations. In this work, we offer a novel perspective on the approach introduced in [ 15 ] , shifting the focus from a “learning” problem to a “sampling” problem. To achieve this, we reformulate the equations governing diffusion-based generative models as a Forward-Backward Stochastic Differential Equation (FBSDE), which avoids the well-known issue of pre-estimating the gradient of the log target density. The solution of this FBSDE is proved to be unique using non-standard techniques. Additionally, we propose a numerical solution to this problem, leveraging on Deep Learning techniques. This reformulation opens new pathways for sampling multidimensional distributions with densities known up to a normalization constant, a problem frequently encountered in Bayesian statistics. 1 Introduction Generative models have emerged as powerful tools for learning complex data distributions, with applications spanning from image synthesis, natural language processing, to scientific modeling ( [ 15 ] , [ 3 ] ). Among the diverse approaches, diffusion-based generative models stand out due to their ability to generate high-dimensional, photorealistic data with remarkable fidelity. These models rely on stochastic processes to transform simple noise distributions into structured data, effectively capturing multimodal distributions that are challenging to represent with traditional methods. A foundational work in this domain is [ 15 ] , which established a framework for training diffusion models by solving stochastic differential equations (SDEs) to approximate the underlying data distribution. This approach reframes the problem as one of learning a “score function” – the gradient of the data distribution’s log density – using the reverse SDE studied in [ 1 ] . While highly successful, most research inspired by this work has focused on improving the learning process, leaving the potential of these models for tackling sampling problems underexplored. In this work, we take a different perspective by shifting the focus from “learning” the data distribution to “sampling” from it. Specifically, we reinterpret the generative process as a Forward-Backward Stochastic Differential Equation (FBSDE), a framework commonly used in fields like stochastic control and financial mathematics [ 16 ] . This reformulation allows us to directly address the problem of sampling from high-dimensional distributions where the density is only known up to a normalization constant—a scenario frequently encountered in Bayesian statistics and other probabilistic domains. To make this approach practical, we propose solving the FBSDE numerically using Deep Learning [ 6 ] . By parameterizing the forward and backward components of the equation with neural networks, we develop a method that efficiently approximates the sampling process for complex, multidimensional distributions. This approach not only broadens the applicability of diffusion-based generative models but also bridges the gap between generative modeling and statistical sampling techniques. There are a few works exploring the use of this framework for sampling, as, for instance, [ 10 ] and [ 13 ] . In both studies, the reverse SDE is employed to sample from a distribution known up to a normalization constant. The main challenge lies in estimating the score function. In [ 10 ] , the authors reformulate the score function as an expectation with respect to an appropriate distribution and then use Monte Carlo methods (such as Importance Sampling and Langevin Dynamics) to approximate this expectation. Meanwhile, in [ 13 ] , the author estimates the score function by solving the log-Fokker-Planck equation that the score satisfies, leveraging numerical methods for PDEs based on deep learning [ 12 ] . Our contributions can be summarized as providing a novel perspective on diffusion-based generative models by re-framing the generative process as an FBSDE for the sampling problem. Additionally, we investigate numerical methods based on Deep Learning to solve the FBSDE, and apply this method in some experiments. 2 Reverse-BSDE Monte Carlo method 2.1 Literature review In this section we review the methodology of [ 15 ] , which is based on the well-known result of Anderson [ 1 ] , when applied to the problem of sampling from p_{0}(\boldsymbol{x})=\pi(\boldsymbol{x})/c , when c is an unknown constant, but \pi is computable at any \boldsymbol{x}\in\mathbb{R}^{n} . Under suitable regularity conditions on p_{0} , the authors in [ 9 ] , stated that if \beta:[0,T]\to\mathbb{R}_{>0} is a continuous function and (\mathcal{X}_{t})_{t\geq 0} is the following diffusion process, \displaystyle\begin{cases}d\mathcal{X}_{t}=-\tfrac{1}{2}\beta^{2}(t)\mathcal{X}_{t}dt+\beta(t)dW_{t},\\ \mathcal{X}_{0}\sim p_{0},\end{cases} (1) where (W_{t})_{t\geq 0} is a n -dimensional Brownian motion independent of \mathcal{X}_{0} , then the reverse process \overline{\mathcal{X}}_{t}=\mathcal{X}_{T-t} is also a diffusion process, and satisfies \displaystyle d\overline{\mathcal{X}}_{t}=(\tfrac{1}{2}\bar{\beta}^{2}(t)\overline{\mathcal{X}}_{t}+\bar{\beta}^{2}(t)\nabla\log p(T-t,\overline{\mathcal{X}}_{t}))dt+\bar{\beta}(t)d\overline{W}_{t}, (2) where \bar{\beta}(t)=\beta(T-t) , p(t,\cdot) is the density of X_{t} , (\overline{W}_{t})_{t\geq 0} is another n -dimensional Brownian motion, and \overline{\mathcal{X}}_{0} is independent of (\overline{W}_{t})_{t\geq 0} . More complex dynamics could be considered, as state in Appendix B . Based on this result, the idea of the sampling algorithm in [ 15 ] is that, if we sample \overline{\mathcal{X}}_{0} from a standard Gaussian, then \overline{\mathcal{X}}_{T} will be approximately distributed as p_{0} , since the limiting distribution of \mathcal{X} is standard Gaussian. The main challenge in applying a numerical method in ( 2 ) is to estimate the value of the score function \nabla\log p . In [ 15 ] , under a different situation where one has iid samples from p_{0} , the authors rewrite the L^{2} -loss of estimating the score with a function s(t,x) so only samples of p_{0} are needed. For our setting, when p_{0} is computable up to a normalizing constant, one needs to consider a different approach. Note that, under regularity conditions, p is the unique smooth solution of the Fokker-Planck PDE: \displaystyle\partial_{t}p(t,\boldsymbol{x})-\frac{1}{2}\beta^{2}(t)\left[\boldsymbol{x}\cdot\nabla p(t,\boldsymbol{x})+n\,p(t,\boldsymbol{x})+\Delta p(t,\boldsymbol{x})\right]=0, (3) with p(0,\boldsymbol{x})=p_{0}(\boldsymbol{x}) . One could pursue a numerical solution of this Fokker-Planck PDE to estimate the score \nabla\log p . However, this could be challenging since we do not have access to p_{0} because of the unknown normalizing constant. Hence, we consider the following auxiliary function u(t,\boldsymbol{x})=\log p(T-t,\boldsymbol{x})-\frac{n}{2}\int_{0}^{T-t}\beta^{2}(s)ds+\log c. (4) One can directly verify that u solves the following semi-linear PDE: \displaystyle\partial_{t}u(t,\boldsymbol{x})+ \displaystyle\bar{\beta}^{2}(t)\left[\frac{1}{2}\boldsymbol{x}+\nabla u(t,\boldsymbol{x})\right]\cdot\nabla u(t,\boldsymbol{x}) \displaystyle+ \displaystyle\frac{1}{2}\bar{\beta}^{2}(t)\Delta u(t,\boldsymbol{x})-\frac{1}{2}\|\bar{\beta}(t)\nabla u(t,\boldsymbol{x})\|^{2}=0, (5) with u(T,\boldsymbol{x})=\log\pi(\boldsymbol{x}) . Numerically solving this PDE is an interesting approach to compute the score since the final condition is known. However, exploring this equation in high-dimensions can be hard, which suggests the use of methods based on deep learning, as in [ 14 ] and [ 12 ] . This precise strategy was followed in [ 13 ] . Another way to represent the value of the score was given in [ 10 ] . Assuming \beta^{2}\equiv 2 for simpler exposition: \displaystyle\nabla\log p(t,\boldsymbol{x}) \displaystyle=\frac{1}{\mathbb{E}_{\boldsymbol{x}_{0}\sim\rho_{t}(\cdot|\boldsymbol{x})}\left[\pi(\boldsymbol{x}_{0})\right]}\mathbb{E}_{\boldsymbol{x}_{0}\sim\rho_{t}(\cdot|\boldsymbol{x})}\left[\frac{e^{-t}\boldsymbol{x}_{0}-\boldsymbol{x}}{(1-e^{-2t})}\cdot\pi(\boldsymbol{x}_{0})\right], where \displaystyle\rho_{t}(\boldsymbol{x}_{0}|\boldsymbol{x}) \displaystyle\propto\exp\left(-\frac{\left\|\boldsymbol{x}-e^{-t}\boldsymbol{x}_{0}\right\|^{2}}{2\left(1-e^{-2t}\right)}\right). Then [ 10 ] uses Langevin Dynamics to estimate the first expected value or use self-normalized importance sampling to estimate the ratio of expected value in the second equality. 2.2 Our method Differently from the aforementioned references, we propose here a novel approach to explore the PDE in ( 2.1 ) by recasting it as a forward-backward stochastic differential equation (FBSDE) ; see Appendix A for a primer on BSDEs. Indeed, if we denote (\overline{\mathcal{X}}_{t},u(t,\overline{\mathcal{X}}_{t}),\bar{\beta}(t)\nabla u(t,\overline{\mathcal{X}}_{t})) by (X_{t},Y_{t},Z_{t}) , then using

Read the complete text