arXiv:2608.25421math.NAAug 2026

Manuscript Offprint

arXiv:2608.25421

Data-driven Effective Modeling of Stochastic Chemical Reaction Networks

Yuan Chen, Weize Mao, Dongbin Xiu

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

YUAN CHEN ∗^{*}, WEIZE MAO ∗^{*}, AND DONGBIN XIU ∗^{*}

Abstract. The Stochastic Simulation Algorithm (SSA), widely considered an exact algorithm for stochastic chemical reaction networks, suffers from high computational cost. In this work, we propose a data-driven effective model that operates on a user-defined coarse time step independent of the underlying microscopic reaction-event scale. This is accomplished by directly approximating the finite-time transition kernel of the continuous-time Markov chain induced by SSA, using a generative machine learning model trained on short bursts of SSA simulation data. The trained model constructs a stochastic propagator that recursively generates statistically consistent trajectories at the constant coarse time step, with significantly reduced computational cost. In this paper, we employ conditional normalizing flow as the stochastic propagator. A comprehensive set of numerical examples is presented to demonstrate the accuracy and efficiency of the proposed method.

Key words. Effective Modeling, Generative Model, Normalizing Flow, Stochastic Reaction Network, Stochastic Simulation Algorithm

MSC codes. 60J27, 60J28, 65C05, 65C40, 92C42

  1. Introduction. Stochastic chemical kinetics of well-mixed reacting systems are commonly modeled by the Chemical Master Equation (CME), which describes the evolution of the probability distribution of the underlying reaction network. The corresponding stochastic process is a continuous-time Markov jump process whose exact sample trajectories can be generated by the Stochastic Simulation Algorithm (SSA), also known as the Gillespie algorithm. Since its introduction in [22], SSA has become one of the most widely used computational tools for stochastic chemical reaction systems.

Despite its exactness, SSA suffers from high computational cost. The algorithm advances the system by simulating one reaction event at a time, and the corresponding firing times can become exceedingly small for systems with large populations or stiff reaction rates. Consequently, long-time simulations often require an extremely large number of reaction events. Numerous acceleration and approximation techniques have been developed to reduce this cost, including the next-reaction method [21], modified direct method [10], sorting direct method [35], moment closure approximations [25], and tau-leaping methods. Among these approaches, tau-leaping advances the system over a finite time interval by approximating the collective statistics of many reaction events [23]. This idea has led to extensive developments, including stability and error analysis [1, 29, 43], nonnegativity-preserving variants [7, 11], and adaptive or implicit schemes for stiff systems [9]. Related coarse-graining and reduction strategies for stochastic reaction systems have also been studied from both computational and mathematical perspectives [27, 28]. We refer to [2, 26, 44] for broader reviews and background. These methods are effective in many regimes, but they typically rely on assumptions regarding slowly varying propensity functions and can suffer from loss of accuracy or stability when these assumptions fail.

In this work, we pursue a different direction. Instead of approximating the individual reaction events or modifying the internal mechanics of SSA, we directly approximate the finite-time transition law of the Markov jump process induced by

*E-mail addresses: chen.11050@osu.edu, weizemao339@gmail.com, xiu.16@osu.edu. Department of Mathematics, The Ohio State University, Columbus, OH 43210, USA. Funding: This work was partially supported by AFOSR FA9550-24-1-0237.

YUAN CHEN WEIZE MAO AND DONGBIN XIU

SSA. More precisely, let X(t)X(t) denote the stochastic process generated by the reaction network. For any finite time lag Δ>0\Delta > 0, the process admits a transition kernel

(1.1)

PΔ(x,x′)=P(X(t+Δ)=x′∣X(t)=x),P_{\Delta}(x,x^{\prime})=\mathbb{P}(X(t+\Delta)=x^{\prime}\mid X(t)=x),

which defines the finite-time Markov semigroup associated with the CME. The objective of this work is to construct a data-driven approximation of PΔP_{\Delta} directly from short bursts of SSA simulation data.

This viewpoint leads naturally to a coarse stochastic propagator operating on a user-defined time step Δ\Delta, which can be substantially larger than the average SSA firing time. Unlike tau-leaping methods, which accelerate SSA by approximating the numbers of reaction firings over a finite interval under assumptions on the variation of propensity functions, the proposed approach does not approximate the reaction-event dynamics. Instead, it directly targets the finite-time transition kernel of the SSA-induced continuous-time Markov chain and learns this kernel from SSA data. Consequently, the learned model should be viewed as a data-driven numerical approximation of the exact Markov semigroup associated with the underlying continuous-time Markov chain, rather than as an approximation of the reaction-event dynamics.

The proposed method follows the framework of stochastic Flow Map Learning (sFML) [16], which extends deterministic flow map learning [40] to stochastic dynamical systems. In deterministic systems, flow map learning seeks to approximate the map between consecutive states over a finite time interval. In stochastic systems, however, the finite-time evolution is no longer deterministic and is instead characterized by a conditional probability distribution. Consequently, the stochastic flow map is interpreted as a stochastic realization operator whose generated samples follow the finite-time transition kernel.

To realize the stochastic flow map, we employ a conditional normalizing flow model. Normalizing flows (see, e.g., [38]) provide expressive generative models capable of representing highly non-Gaussian conditional distributions while maintaining tractable likelihood evaluation and efficient sampling. This property is particularly important for stochastic chemical reaction systems, whose finite-time transition distributions are frequently strongly non-Gaussian and highly state-dependent.

The resulting framework constructs a stochastic propagator directly from short bursts of SSA trajectory data. Once trained, the model can efficiently produce long-time trajectories at a prescribed coarse time step while preserving important statistical properties of the underlying stochastic dynamics. The main contributions of this work are summarized as follows:

  • We reinterpret stochastic flow map learning for chemical reaction systems as a data-driven approximation of the finite-time transition kernel associated with the SSA Markov process.

  • We construct a coarse stochastic propagator operating on a user-defined time step independent of the microscopic reaction-event scale.

  • We employ conditional normalizing flows to approximate non-Gaussian transition distributions arising from stochastic chemical kinetics.

  • We demonstrate through a comprehensive set of numerical examples that the learned propagator produces statistically consistent trajectories while significantly reducing the number of simulation steps compared with SSA.

  1. Preliminary. We first present the problem setup and our main objective.

2.1. Problem Setup. Consider a stochastic chemical reaction network with N species SiS_i, i=1,…,Ni = 1, \ldots, N, and M reaction channels

(2.1)

Rμ:∑i=1NriμSi→cμ∑i=1NpiμSi,μ=1,…,M,R_{\mu}:\qquad\sum_{i=1}^{N}r_{i\mu}S_{i}\xrightarrow{c_{\mu}}\sum_{i=1}^{N}p_{i\mu}S_{i},\qquad\mu=1,\ldots,M,

where cμc_{\mu} denotes the reaction rate constant, and riμ,piμr_{i\mu}, p_{i\mu} are nonnegative integers representing the stoichiometric coefficients.

Let N-dimensional vector

X(t)=[X1(t),…,XN(t)]T\mathbf{X}(t)=[X_{1}(t),\ldots,X_{N}(t)]^{T}

denote the vector of molecule numbers at time tt, in the state space Z≥0N\mathbb{Z}_{\geq 0}^N, the set of NN-dimensional vectors of non-negative integers. Under the well-mixed assumption, the evolution of X(t)\mathbf{X}(t) is modeled as a continuous-time Markov chain (CTMC). Each reaction channel RμR_\mu is characterized by:

  • the stoichiometric vector sμ=[p1μ−r1μ,…,pNμ−rNμ]T\mathbf{s}_{\mu} = [p_{1\mu} - r_{1\mu}, \ldots, p_{N\mu} - r_{N\mu}]^T, which specifies the state change caused by the reaction;

  • the propensity function aμ(x)=cμhμ(x)a_{\mu}(\mathbf{x}) = c_{\mu} h_{\mu}(\mathbf{x}), where hμ(x)h_{\mu}(\mathbf{x}) represents the number of available reactant combinations at state X(t)=x\mathbf{X}(t) = \mathbf{x}.

The stochastic process admits an infinitesimal generator

(2.2)

(Lf)(x)=∑μ=1Maμ(x)(f(x+sμ)−f(x)),(\mathcal{L}f)(\mathbf{x})=\sum_{\mu=1}^{M}a_{\mu}(\mathbf{x})\left(f(\mathbf{x}+\mathbf{s}_{\mu})-f(\mathbf{x})\right),

which defines the corresponding chemical master equation.

The SSA algorithm generates exact sample trajectories of this CTMC. Starting from state X(t)=x\mathbf{X}(t) = \mathbf{x}, SSA samples:

(1) a firing time

τ∼Exp(∑μ=1Maμ(x)),\tau\sim\mathrm{E x p}\left(\sum_{\mu=1}^{M}a_{\mu}(\mathbf{x})\right),

(2) a reaction index λ\lambda with probabilities

P(λ=μ)=aμ(x)∑ν=1Maν(x),\mathbb{P}(\lambda=\mu)=\frac{a_{\mu}(\mathbf{x})}{\sum_{\nu=1}^{M}a_{\nu}(\mathbf{x})},

and updates the state according to

X(t+τ)=X(t)+sλ.\mathbf{X}(t+\tau)=\mathbf{X}(t)+\mathbf{s}_{\lambda}.

Although SSA evolves through random microscopic firing events, the resulting process is globally characterized by a finite-time transition kernel. For any Δ>0\Delta > 0, define transition kernel PΔ:Z≥0N×Z≥0N→[0,1]P_{\Delta} : \mathbb{Z}_{\geq 0}^N \times \mathbb{Z}_{\geq 0}^N \to [0,1]

(2.3)

PΔ(x,x′)=P(X(t+Δ)=x′∣X(t)=x).P_{\Delta}(\mathbf{x},\mathbf{x}^{\prime})=\mathbb{P}(\mathbf{X}(t+\Delta)=\mathbf{x}^{\prime}|\mathbf{X}(t)=\mathbf{x}).

Equivalently, for any observable ϕ\phi,

(2.4)

(PΔϕ)(x)=E[ϕ(X(t+Δ))∣X(t)=x](\mathcal{P}_{\Delta}\phi)(\mathbf{x})=\mathbb{E}[\phi(\mathbf{X}(t+\Delta))|\mathbf{X}(t)=\mathbf{x}]

defines the Markov semigroup associated with the process.

For each fixed x\mathbf{x}, PΔ(x,⋅)P_{\Delta}(\mathbf{x}, \cdot) defines a (conditional) probability measure on Z≥0N\mathbb{Z}_{\geq 0}^N where PΔ(x,A)=P(X(t+Δ)∈A∣X(t)=x)P_{\Delta}(\mathbf{x}, A) = \mathbb{P}(\mathbf{X}(t + \Delta) \in A|\mathbf{X}(t) = \mathbf{x}) for any event set AA. Modeling this conditional distribution is the central goal of this paper.

YUAN CHEN WEIZE MAO AND DONGBIN XIU

2.2. Objective. The objective of this work is to construct a data-driven approximation of the finite-time transition kernel PΔP_{\Delta} (2.3) for a prescribed coarse time step Δ\Delta. More importantly, Δ\Delta is chosen according to the time scale of the macroscopic behavior of the system and is independent of the microscopic SSA firing times τ\tau. Therefore, Δ\Delta may be substantially larger than the average reaction-event scale, i.e., Δ≫E[τ]\Delta \gg \mathbb{E}[\tau].

2.3. Related Work. This work belongs to the broader area of learning dynamical systems from data, which has attracted growing attention due to the rapid development of machine learning. Most existing methods focus on deterministic systems, see, for example, [5, 12, 18, 30, 32, 37, 40, 41, 42].

For stochastic systems, most existing approaches are ‘model-based’, i.e., observational data is assumed to be sampled from a known model with unknown components, such as Itô stochastic differential equations which approximately admit Gaussian transition distributions with unknown drift and diffusion functions. These unknown functions are approximated by analyzing and matching statistical properties of data, such as moments, likelihoods, and densities. Such methods have been developed in conjunction with Gaussian processes [3,19,36,51] and deep neural networks (DNNs) [13,14,20,33,48,50,52].

For processes generated by SSA, and CTMCs more broadly, such methods are less capable since the transition distributions are non-Gaussian and the underlying mathematical structure does not conform to a standard parametric form. Some recent explorations using machine learning methods can be found in [6, 46, 47]. In this work, we adopt the sFML framework [16], which incorporates generative models to approximate the stochastic map between consecutive states in distribution. Many generative models are compatible with this framework, including GANs (generative adversarial networks) [16], autoencoders [49], normalizing flows [15, 17], and diffusion models [31, 45]. Recently, it was also extended to stochastic systems subjected to external excitation and multiscale systems [15, 17].

3. Main Method: Effective Stochastic Propagator

3.1. Finite-Time Stochastic Flow Map. Let tn=nΔt_n = n\Delta, n=0,1,⋯n = 0,1,\cdots be a sequence of discrete time points with constant time stepsize Δ\Delta and we denote X(tn)\mathbf{X}(t_n) by Xn\mathbf{X}_n for convenience. Then the transition from Xn\mathbf{X}_n to Xn+1\mathbf{X}_{n+1} is governed by the transition kernel

Xn+1∼PΔ(Xn,⋅).\mathbf{X}_{n+1}\sim P_{\Delta}(\mathbf{X}_{n},\cdot).

We therefore define the stochastic flow map as a stochastic realization operator

(3.1)

Xn+1=GΔ(Xn,ξn),\mathbf{X}_{n+1}=\mathbf{G}_{\Delta}(\mathbf{X}_{n},\boldsymbol{\xi}_{n}),

where ξn\xi_n is an auxiliary random variable independent of Xn\mathbf{X}_n and follows a prescribed distribution μξ\mu_\xi. The stochastic flow map is required to match the conditional distribution

(3.2)

GΔ(x,ξ)∼PΔ(x,⋅),asξ∼μξ.\mathbf{G}_{\Delta}(\mathbf{x},\boldsymbol{\xi})\sim P_{\Delta}(\mathbf{x},\cdot),\quad\mathrm{a s}\boldsymbol{\xi}\sim\mu_{\boldsymbol{\xi}}.

In other words, GΔ(x,ξ)\mathbf{G}_{\Delta}(\mathbf{x},\boldsymbol{\xi}) provides a sampling realization of the transition kernel PΔ(x,⋅)P_{\Delta}(\mathbf{x},\cdot).

In the following sections, we construct a numerical approximation GΘ\mathbf{G}_{\Theta} of the stochastic flow map, parameterized by Θ\Theta, such that the conditional distribution of GΘ(x,ξ)\mathbf{G}_{\Theta}(\mathbf{x}, \boldsymbol{\xi}) approximates the finite-time transition kernel PΔ(x,⋅)P_{\Delta}(\mathbf{x}, \cdot). Consequently, the learned model acts as a sampling realization of the finite-time transition kernel of the SSA Markov process. Once trained, repeated application of the stochastic flow map produces a discrete-time stochastic process

(3.3)

X~n+1=GΘ(X~n,ξn),\widetilde{\mathbf{X}}_{n+1}=\mathbf{G}_{\Theta}(\widetilde{\mathbf{X}}_{n},\boldsymbol{\xi}_{n}),

whose finite-time statistics approximate those of the original SSA process sampled at time interval Δ\Delta.

3.2. Short-Burst Data Generation. The training data are generated directly from SSA simulations. Let Δ>0\Delta > 0 denote the prescribed coarse time step and let

{X0(i)}i=1K\left\{\mathbf{X}_{0}^{(i)}\right\}_{i=1}^{K}

be randomly sampled initial conditions from a prescribed distribution with size of dataset K > 0.

For each initial condition X0(i)\mathbf{X}_{0}^{(i)}, we run SSA up to time Δ\Delta and obtain

X1(i)=X(i)(Δ).\mathbf{X}_{1}^{(i)}=\mathbf{X}^{(i)}(\Delta).

This produces a collection of independent sample pairs

(3.4)

(X0(i),X1(i)),i=1,…,K.\left(\mathbf{X}_{0}^{(i)},\mathbf{X}_{1}^{(i)}\right),\qquad i=1,\ldots,K.

Each sample pair represents one realization of the finite-time transition kernel

X1(i)∼PΔ(X0(i),⋅).\mathbf{X}_{1}^{(i)}\sim P_{\Delta}\left(\mathbf{X}_{0}^{(i)},\cdot\right).

An important feature of this construction is that only short independent trajectory bursts are required. The training process therefore avoids the need for extremely long SSA simulations and is naturally parallelizable.

3.3. Conditional Normalizing Flow Approximation. To approximate the stochastic flow map, we employ a conditional normalizing flow model. Let

z∼N(0,IN)\mathbf{z}\sim\mathcal{N}(0,\mathbf{I}_{N})

be an N-dimensional standard Gaussian random variable.

We seek a parameterized map

(3.5)

X1=GΘ(X0,z),\mathbf{X}_{1}=\mathbf{G}_{\Theta}(\mathbf{X}_{0},\mathbf{z}),

such that the conditional distribution of GΘ(X0,z)\mathbf{G}_{\Theta}(\mathbf{X}_{0},\mathbf{z}) approximates the finite-time transition kernel

PΔ(X0,⋅).P_{\Delta}(\mathbf{X}_{0},\cdot).

In this work, the map GΘ\mathbf{G}_{\Theta} is realized through a conditional normalizing flow. More specifically, we introduce an invertible transformation

Tθ:RN→RN,\mathbf{T}_{\theta}:\mathbb{R}^{N}\to\mathbb{R}^{N},

whose parameters depend on the conditioning variable X0\mathbf{X}_0 through a neural network with hyper-parameter Θ\Theta:

(3.6)

θ=NΘ(X0).\theta=\mathbf{N}_{\Theta}(\mathbf{X}_{0}).

YUAN CHEN WEIZE MAO AND DONGBIN XIU

The stochastic flow map is then defined as

(3.7)

X1=TNΘ(X0)(z).\mathbf{X}_{1}=\mathbf{T}_{\mathbf{N}_{\Theta}(X_{0})}(\mathbf{z}).

The invertibility of the map T enables tractable likelihood evaluation through the change-of-variable formula. Let

Sθ=Tθ−1.\mathbf{S}_{\theta}=\mathbf{T}_{\theta}^{-1}.

Then the conditional density is

(3.8)

p(X1∣X0;Θ)=pz(SNΘ(X0)(X1))∣det⁡DTNΘ(X0)∣−1,p(\mathbf{X}_{1}|\mathbf{X}_{0};\Theta)=p_{\mathbf{z}}\left(\mathbf{S}_{\mathbf{N}_{\Theta}(\mathbf{X}_{0})}(\mathbf{X}_{1})\right)\left|\det\mathbf{D}\mathbf{T}_{\mathbf{N}_{\Theta}(\mathbf{X}_{0})}\right|^{-1},

where pzp_{\mathbf{z}} denotes the standard Gaussian density function and DT(y)=∂T/∂y\mathbf{DT}(\mathbf{y}) = \partial \mathbf{T} / \partial \mathbf{y} denotes the Jacobian of the mapping T\mathbf{T}.

The model parameters Θ\Theta are obtained by maximizing the conditional likelihood over the training dataset, equivalently minimizing the empirical negative log-likelihood loss

(3.9)

L(Θ)=−1K∑i=1Klog⁡p(X1(i)∣X0(i);Θ).\mathcal{L}(\Theta)=-\frac{1}{K}\sum_{i=1}^{K}\log p\left(\mathbf{X}_{1}^{(i)}|\mathbf{X}_{0}^{(i)};\Theta\right).

An illustration of the proposed sFML model structure can be found in Figure 1. This is in direct correspondence of (3.7).

We emphasize that the conditional normalizing flow serves only as one realization strategy for the stochastic flow map. The proposed framework itself is independent of the particular generative architecture and may incorporate alternative conditional generative models.

3.4. Recursive System Prediction. Once the model is trained, long-time trajectories are generated recursively by

(3.10)

{X~0=X0,X~n+1=R(GΘ(X~n,zn)),n=0,1,2,...,\begin{cases}\widetilde{\mathbf{X}}_{0}=\mathbf{X}_{0},\\\widetilde{\mathbf{X}}_{n+1}=\mathbf{R}\left(\mathbf{G}_{\Theta}(\widetilde{\mathbf{X}}_{n},\mathbf{z}_{n})\right),\qquad n=0,1,2,...,\end{cases}

where zn\mathbf{z}_n are standard Gaussian random samples independent of X~n\tilde{\mathbf{X}}_n and R\mathbf{R} denotes an enforcing operator to satisfy the physical constraints such as nonnegativity and integer-valued molecule counts – see the Section 3.5 below.

The resulting process is designed to provide a weak approximation to the true stochastic dynamics at the discrete time points, i.e.,

(X~0,X~1,⋯ ,X~n)≈d(X0,X1,⋯ ,Xn),(\widetilde{\mathbf{X}}_{0},\widetilde{\mathbf{X}}_{1},\cdots,\widetilde{\mathbf{X}}_{n})\stackrel{d}{\approx}(\mathbf{X}_{0},\mathbf{X}_{1},\cdots,\mathbf{X}_{n}),

but operates only on a constant coarse time step Δ\Delta independent of the microscopic SSA firing times. Consequently, the learned stochastic propagator can significantly reduce the number of simulation steps required for long-time stochastic simulations.