Skip to main content
Springer logoLink to Springer
. 2018 Apr 11;81(8):2873–2901. doi: 10.1007/s11538-018-0428-0

The Linear Noise Approximation for Spatially Dependent Biochemical Networks

Per Lötstedt 1,
PMCID: PMC6677697  PMID: 29644520

Abstract

An algorithm for computing the linear noise approximation (LNA) of the reaction–diffusion master equation (RDME) is developed and tested. The RDME is often used as a model for biochemical reaction networks. The LNA is derived for a general discretization of the spatial domain of the problem. If M is the number of chemical species in the network and N is the number of nodes in the discretization in space, then the computational work to determine approximations of the mean and the covariances of the probability distributions is proportional to M2N2 in a straightforward implementation. In our LNA algorithm, the work is proportional to M2N. Since N usually is larger than M, this is a significant reduction. The accuracy of the approximation in the algorithm is estimated analytically and evaluated in numerical experiments.

Keywords: Linear noise approximation, Spatially dependent, Fast algorithm

Introduction

Many biochemical networks are modeled by ordinary or partial differential equations at a macroscopic level of fidelity. Such continuous models may not be sufficiently accurate when the number of molecules involved in the chemical reactions is small. This is often the case in molecular cell biology (Elowitz et al. 2002; McAdams and Arkin 1997; Raj and van Oudenaarden 2008; Tsimring 2014). Chemical reactions are then best described as random events, and the discrete number of molecules is important when the copy numbers are low at a mesoscopic level of modeling. The macroscopic equation for the mean values is often satisfactory when the number of molecules is large. Analytical solutions to the governing macroscopic or mesoscopic equations can be obtained only for special systems. Computational methods are needed for quantitative information about the behavior of the systems.

The master equation (ME) or Kolmogorov forward equation is an equation for the time evolution of the probability density function (PDF) for the copy numbers of different species in systems with an intrinsic noise (Gardiner 2004; Gillespie 1992; van Kampen 2004). The systems are modeled as Markov processes with discrete states defined by the copy numbers of the chemical species in continuous time. The particular ME for spatially homogeneous, well-stirred problems in chemistry is the chemical master equation (CME) where reactions between two molecules occur with a propensity that depends on the copy numbers of the species. The ME is generalized in the reaction–diffusion master equation (RDME) to spatially heterogeneous chemical systems by introducing a discretization of the reaction volume into compartments or voxels (Gillespie et al. 2014; Gillespie and Seitaridou 2013). The state is then given by the copy numbers in each one of the voxels.

The computational work and the storage requirements to solve the RDME grows exponentially in the number of species and the number of voxels making the simulation of biochemical systems with the ME prohibitive except for very small systems. Analytical solutions are known only for limited classes of problems such as those with linear propensities. Instead, sample trajectories of well-stirred systems are generated by Gillespie’s stochastic simulation algorithm (SSA) (Gillespie 1976, 1977). The original algorithm has been improved in many ways, e.g., for efficiency (Cao et al. 2006; Gibson and Bruck 2000; Gillespie 2001) and for systems with slow and fast reactions (Cao et al. 2005; E et al. 2007). The Gillespie algorithm is generalized to problems with spatial variation due to diffusion in Elf and Ehrenberg (2004), Engblom et al. (2009), Isaacson and Peskin (2006), Lampoudi et al. (2009) and implemented in software (Drawert et al. 2012, 2016; Hattne et al. 2005). The computational effort may be quite large to simulate a system with many chemical species, many molecules, and many voxels, since many realizations of the process are required in a Monte Carlo method like SSA due to slow convergence to the mean and other moments of the distribution. An introduction and an overview of Markov models of chemical reactions are found in Goutsias and Jenkinson (2013). Recent reviews of computational methods at different levels of modeling are Engblom et al. (2017), Gillespie et al. (2013), Mahmutovic et al. (2012) and Sokolowski et al. (2017).

There are ways to approximate the solutions to the CME with deterministic equations. The linear noise approximation (LNA) is obtained from the CME by deriving the equations for the moments and then expanding the solution in a large parameter Ω, representing the size of the chemical system (van Kampen 1976, 2004). The means and covariances in LNA are exact for chemical systems with at most first-order reactions where the propensities are constants or linear in the copy numbers. The first and second moments are exact also for other systems with a special structure (Grima 2015). Different modifications have been proposed to improve the accuracy of LNA, see, e.g., Ferm et al. (2008), Grima (2012). Some of the improvements are compared experimentally in examples in Schnoerr et al. (2015). The LNA and similar approximations are used to quickly study biochemical networks in, e.g., Elf and Ehrenberg (2003), Thomas et al. (2013), Ullah and Wolkenhauer (2009) and more recently as a surrogate model to infer parameters in biochemical models from data in Fearnhead et al. (2014), Fröhlich et al. (2016), Ruttor and Opper (2009), Stathopoulos and Girolami (2013). A review of LNA and related methods and their use for inference are found in Schnoerr et al. (2017).

An alternative to the LNA is the EMRE approximation in Grima (2010) extended to spatial problems in Smith et al. (2017). The covariances satisfy the same Lyapunov equation as we derive here. The spatial EMRE algorithm is applied to gene regulation in a cell and to reactions in a aggregation of cells in two space dimensions in Smith et al. (2017). More compartments than one are also found in Challenger et al. (2012). The equations of LNA with spatial variation are derived in Scott et al. (2010) and applied to the modeling of spatial patterns. The equation for the covariances is replaced by an equation for the factorial cumulant. Equations similar to the LNA for spatial problems are used in Butler and Goldenfeld (2009), Anna et al. (2010) to investigate oscillatory systems. Turing patterns are studied in Asllani et al. (2013), Biancalani et al. (2010), McKane et al. (2014), Woolley et al. (2011) with a spatially extended LNA.

Diffusive effects are important for the fidelity of models when the chemical reactions are localized in space in a cell and when the molecular transport is slow compared to the reactions. Some examples where the spatial effects are crucial are found in Fange and Elf (2006), Sturrock et al. (2013), Takahashi et al. (2010). The LNA is a level of modeling suitable for such systems, e.g., to infer parameters for the diffusion and the reactions from measurements, at least in the beginning of the iterative search process for the parameters, thanks to the relative simplicity of LNA.

In this paper, we develop a fast algorithm for computing approximations of the mean and the covariance of the PDF solving the RDME based on the LNA for spatial problems with reactions and diffusion. The equation for the expected values is a system of reaction–diffusion equations, and the equation for the covariances is a time-dependent Lyapunov equation with a source term localized in space. Let M be the number of chemical species and N the number of voxels. The structure of the covariance equations is utilized to compute an approximation of the covariance and to reduce the computational work and the memory requirements from being proportional to M2N2 in a straightforward implementation to M2N in our algorithm. Since N usually is larger than M, this is a substantial reduction. A bound on the deviation of the true covariance from our approximation is proved in a theorem. The accuracy of the covariance approximation is demonstrated in numerical examples in one, two, and three dimensions (1D, 2D, and 3D).

In the next section, the RDME is given and a splitting of the operator is introduced. The equations of the LNA for spatially heterogeneous chemical systems are derived for general shapes of the voxels in Sect. 3. A continuous approximation of the equation for the covariances is analyzed in Sect. 4. The algorithm is presented in Sect. 5 for computation of the mean and the covariance. Numerical results are found in Sect. 6. Finally, some conclusions are drawn.

The notation in the paper is as follows. The ith element of a vector v is denoted by vi. The jth column of an array x with elements xij is written as x·j, and xi· is the ith row. The derivative of vi(x) with respect to xj is denoted by vi,j. The time derivative p/t of p(x,t) is written as tp, and q˙ is a shorter notation for dq/dt. The Euclidean vector norm is denoted by v=ivi2 and the subordinate spectral norm for a matrix A is A. The set of integer numbers is written as Z, and Z+ denotes the nonnegative integer numbers. In the same manner, R denotes the real numbers and R+ is the nonnegative real numbers.

The Master Equation

Consider a biochemical system with M chemically active species. The system evolves on a line (1D), in an area (2D), or a volume (3D) V which is partitioned into N voxels (or compartments) Vj such that they cover V, V=j=1NVj, and are non-overlapping, VjVk=,jk. The voxels are defined by a computational mesh constructed for numerical discretization of partial differential equations, see Fig. 1. The size of a voxel is Vi=|Vi|, and the diagonal matrix V has the elements Vi in the diagonal. Each voxel has a node in the center with coordinates xRd,d=1,2,3 and the nodes are connected by edges. The molecular copy number of species i in voxel j is a random integer Yij. The state of the system is time dependent and is given by y(t) which is an array of nonnegative integers, yZ+M×N. The state changes randomly with reactions between the species in a voxel and with diffusive jumps of the molecules between the voxels.

Fig. 1.

Fig. 1

Meshes with edges (solid), nodes jk,  and l, and voxel Vj (dashed). The nodes j and k are connected by edge ejk. a An unstructured mesh, b a structured Cartesian mesh

The CME is a Kolmogorov forward equation for the PDF p(y,t) for a system to be in the state y at time t (Gardiner 2004; van Kampen 2004). The state changes at discrete time points after a chemical reaction in a voxel. If y~ is the state before the reaction and y is the state immediately after the reaction r, then the change in state in Vj can be written as

y~·jwr(y~·j)y·j,nr=y·j-y~·j. 1

The reaction occurs with the propensity wr, i.e., with probability wrΔt in a short time interval Δt. The state change vector nrZM tells how the state is updated after a reaction. Most entries of nr are zero and nri0 only for those species involved in the reaction. In a system with R different reactions, the CME for p(y,t) is

tp(y,t)=j=1Nr=1Rwr(y·j-nr,t)p(y·1,y·2,,y·j-nr,,y·N,t)-j=1Nr=1Rwr(y·j,t)p(y,t)Mp(y,t), 2

defining the master operator M.

Diffusion of the molecules is modeled as jumps between voxels with a common boundary. Suppose that Vj and Vk share a point in 1D, an edge in 2D, or a facet in 3D. Then, a molecule of species i in Vj jumps to Vk with propensity qjky~ij

y~ijqjky~ijxik,njk=yi·-y~i·. 3

The probability for a molecule to jump is given by the jump coefficient qjk. The state change vector has two nonzero components: njk,j=-1,njk,k=1. The diffusion master equation (DME) in a chemical system without reactions is

tp(y,t)=i=1Mj=1Nk=1Nqjk(yij+1)p(y1·,y2·,,yi·-njk,,yM·,t)-i=1Mj=1Nk=1Nqjkyijp(y,t)Dp(y,t), 4

defining the diffusion operator D. The RDME for the PDF of the state of a system with reactions and diffusion is then

tp(y,t)=(M+D)p(y,t). 5

The jump coefficients qjk are determined by the geometry of V and the voxels Vj and the diffusion coefficient γ. If V is a rectangle in 2D or a rectangular hexahedron in 3D and the voxels are squares or cubes, then the mesh partitioning V is Cartesian as in Fig. 1b. When Vj and Vk share a boundary and the size of an edge in the mesh is Δx, we have qjk=γ/Δx2. If VjVk=, then qjk=0. For a general shape of V, the voxels are defined by an unstructured mesh consisting of triangles (2D) as in Fig. 1a or tetrahedra (3D) in Engblom et al. (2009). If there is an edge eij between node j in Vj and node k in Vk, then qjk>0.

The diffusion equation for u(x,t) with Neumann boundary conditions in d dimensions is

tu=γi=1d2uxi2,xV,n·u=0,xV, 6

where V is the boundary of V and n is the normal of V. The equation is discretized in space by a finite element method in Engblom et al. (2009) to derive qkj. Let uij be the concentration of yij in Vj such that uij=yij/Vj. Then, ui· for one species i satisfies after discretization

u˙ij=kJ(j)Djkuik+Djjuij, 7

where J(j) is the set of nodes connected to node j by an edge. It is shown in Engblom et al. (2009) that

Djk=SjkVj,Djj=-k,kjDjk=kJ(j)Djk,Sjk=Skj,Sjj=-k,kjSjk. 8

With a mesh of good quality, Sjk0 for jk, see Meinecke et al. (2016). The relation between the jump coefficients in (3) and the diffusion coefficients in (7) is

qkj=VjVkDjk=SjkVk. 9

To simplify the notation, the assumption here is that the diffusion speed is equal for all species. Otherwise, qkj,Djk, and Sjk in (9) would be scaled by γi/γ to account for the different diffusion coefficients γi of the different species i.

A numerical solution of (5) is seldom computationally feasible due to the high dimension of yZ+MN. Suppose that the lattice for y has L points in each coordinate direction, i.e., yij[0,1,,L]. Then, the lattice size for y is LMN. A simplification is possible by first splitting the operator M+D into two parts (Hellander et al. 2014; MacNamara and Strang 2016; Strang 1968). Suppose that the solution is known at tn. A timestep Δt is chosen, and then, the reaction part (2) is integrated from tn to tn+1=tn+Δt followed by integration of the diffusion part (4) in

1.tp1(y,t)=Mp1(y,t),t[tn,tn+1],p1(y,tn)=p(y,tn),2.tp(y,t)=Dp(y,t),t[tn,tn+1],p(y,tn)=p1(y,tn+1). 10

The splitting error in p at tn+1 is of O(Δt) in (10). Second-order accuracy is obtained by evaluating the reaction equation at half the step at tn+1/2=tn+0.5Δt, then solving the diffusion Eq. (4) for a full step, and finally taking half a step with (2) (Strang 1968)

1.tp1(y,t)=Mp1(y,t),t[tn,tn+1/2],p1(y,tn)=p(y,tn),2.tp2(y,t)=Dp2(y,t),t[tn,tn+1],p2(y,tn)=p1(y,tn+1/2),3.tp(y,t)=Mp(y,t),t[tn+1/2,tn+1],p(y,tn+1/2)=p2(y,tn+1). 11

The solution has been advanced from tn to tn+1. The error in p(y,tn+1) is of O(Δt2).

In (2), the reactions occur independently in every voxel without being influenced by the species in the other voxels. Introduce the ansatz

p(y·1,y·2,,y·N,t)=j=1Np(y·j,t) 12

into (2) to arrive at

0=tp(y,t)-j=1Nr=1Rwr(y·j-nr)p(y·1,y·2,,y·j-nr,y·N,t)-j=1Nr=1Rwr(y·j)p(y,t)=j=1Nk=1,kjNp(y·k,t)tp(y·j,t)-r=1Rwr(y·j-nr)p(y·j-nr,t)-r=1Rwr(y·j,t)p(y·j,t). 13

Hence, for ttn and p(y·j,tn) given, N separate solutions of the CME can be computed

tp(y·j,t)=r=1Rwr(y·j-mr)p(y·j-mr,t)-r=1Rwr(y·j)p(y·j,t),j=1,,N, 14

and then combined in (12) in the first step of (10) (or the first and third steps in (11)). The solution is computed N times on a lattice of size LM. This is smaller than the lattice for the full problem but may still be prohibitively large for numerical solution.

In the same manner, the species diffuse independently of each other in the second step in (10) and (11). Insert

p(y1·,y2·,,yM·,t)=i=1Mp(yi·,t) 15

into (4) and rearrange the terms as in (13) to arrive at M separate equations for the diffusion of the species when ttn and p(yi·,tn) is known

tp(yi·,t)=j=1Nk=1Nqjk(yij+1)p(yi·-njk,t)-j=1Nk=1Nqjkyijp(yi·,t),i=1,,M. 16

Since the propensity is linear in y in (16), there exist analytical solutions to the subproblems with multinomial and Poisson distributions for p, see Jahnke and Huisinga (2007), but in practice they are not so useful due to the size LN of the lattice.

Linear Noise Approximation

The biochemical systems are assumed to have a scaling with a size parameter Ω as in van Kampen (2004), Kurtz (1970), Kurtz (1971) where Ω1. In chemical applications, Ω can denote a volume or a typical copy number of the species. Then, the copy numbers are rescaled by Ω, z=Ω-1y, and the propensities can be written as

wr(y)=Ωvr(Ω-1y)=Ωvr(z),r=1,,R. 17

Equations for approximation of the PDF of a system are derived below. The computational complexity of their solution is polynomial in M and N instead of exponential as in (5), (14), and (16).

The Mean Value Equation

Let mij be the expected value E[Yij] of the copy number Yij of species i in voxel j with a PDF satisfying the master Eq. (2). Multiply (2) by yij and sum over Z+N. Then, mij satisfies the equation (Ferm et al. 2008; van Kampen 2004)

m˙ij=r=1RnriE[wr(Y·j)]. 18

Suppose that every wr is linear in y. Then,

E[wr(Y·j)]=wr(E[Y·j])=wr(m·j).

and Eq. (18) are exact for the mean values. If wr is nonlinear in y·j, then an approximation is

E[wr(Y·j)]wr(m·j).

With this approximation, we obtain the reaction rate equations

m˙ij=r=1Rnriwr(m·j). 19

The mean value equations scaled by the size parameter μij=mij/Ω are

μ˙ij=r=1Rnrivr(μ·j)νi(μ·j). 20

The mean concentration uij=μij/Vj satisfies

u˙ij=Vj-1r=1Rnrivr((uV)·j)=Vj-1νi(Vju·j). 21

The Linear Noise Approximation

The scaled state variable z·k in voxel k is split into a deterministic part μ·k and a random part η by van Kampen in van Kampen (1976, 2004) for the chemical reactions. The random term is assumed to be proportional to Ω-1/2. The relation between the copy numbers y·k, the scaled copy numbers z·k, the fluctuations η, and the fluctuations in the concentrations ψ=Vk-1η in Vk is

y·k=Ωz·k=Ω(μ·k+Ω-1/2η)=ΩVk(u·k+Ω-1/2ψ). 22

This expansion is inserted into master Eq. (2) with the propensities vr in (17)

tp(Ωz·k,t)=rΩ(vr(z·k-Ω-1nr)p(Ω(z·k-Ω-1nr),t)-vr(z·k)p(Ωz·k,t)). 23

Replace p in (23) by Π in

Π(η,t)=p(Ωμ·k+Ω1/2η,t)=p(y·k,t), 24

and expand the right-hand side of (23) in a Taylor series around μ·k. Terms proportional to Ω1/2 vanish since μ·k satisfies (20). If Π is the solution to

Πt=r=1Ri=1MΠvr,inri+j=1MΠ,inrivr,jηj+0.5i=1Mj=1MWijΠ,ij,Wij(μ·k)=rnrinrjvr(μ·k), 25

then terms of O(1) cancel out. Terms of O(Ω-1/2) and smaller are ignored in the expansion. This is the linear noise approximation (LNA) for the scaled copy numbers subject to chemical reactions in Vk.

The solution to (25) is the PDF of a normal distribution

Π(η,t)=1(2π)M/2detΣexp-0.5i=1Mj=1Mηi(Σ-1)ijηj, 26

see Ferm et al. (2008), van Kampen (2004) and (Risken 1996, p. 156). The dimension of η is M in the CMEs (14) for all N voxels. The matrix Σ for the covariance between the species i and j in Vk is the solution of

Σ˙ij=l=1Mνi,lΣlj+l=1Mνj,lΣli+Wij(μ·k). 27

Since η is normally distributed with 0 mean and covariance Σ, ηN(0,Σ), it follows from (22) that Y·k,Z·k, and the concentration U·k=Vk-1Z·k also have normal distributions

Y·kN(Ωμ·k,ΩΣ),Z·kN(μ·k,Ω-1Σ),U·kNVk-1μ·k,Ω-1Vk-2Σ. 28

The covariance of U·k in (28) is denoted by Ω-1Ξ=Ω-1Vk-2Σ. Then, the differential equation satisfied by Ξ follows from (27)

Ξ˙ij=l=1Mνi,lΞlj+l=1Mνj,lΞli+Vk-2Wij(Vku·k). 29

There are M nonlinear ODEs to solve in (20) for μ·k in every voxel Vk. The covariance matrix Σ is symmetric, and we have to solve (M+1)M/2 linear ODEs in (27) and (29). The structure of this equation is the same also for other approximations of the CME, e.g., EMRE in Smith et al. (2017). The accuracy of mean value Eq. (20) is improved in Ferm et al. (2008) by adding a term which is linear in the covariance.

The Diffusion Equation

The notation is simplified if we assume here that there is only one species, M=1, but many voxels, N>1. If M>1, then the diffusion of the other species is treated separately in the same manner, see (16). In diffusion master Eq. (16), the propensity to jump from voxel k to j is linear in yZ+N with wr(y)=qkjyk and vr(z)=qkjzk. The linearity implies that there are explicit expressions for the mean value equations, νi,k in (27), and Wij in (25).

The equations for the scaled mean values are obtained from (8), (9), and (20)

μ˙j=k=1NSjkμk/Vk,j=1,,N. 30

The diffusion equation for the mean concentration is derived from (21)

u˙j=Vj-1l=1NqljVlul=l=1NSjlul/Vj=l=1NDjlul,j=1,,N, 31

cf. (7).

The equation for the covariance Σ (27) between voxels i and j depends on νj,k and Wij in (25). The derivative νi,k in (27) and (29) is by (8) and (9)

νi,k=r=1Rnriwr,k(y)=qki=Sik/Vk,ki,νi,i=r=1Rnriwr,i(y)=jJ(i)-qij=-jJ(i)Sji/Vi=Sii/Vi, 32

since nri=1 for the jump from k to i and nri=-1 for all jumps from i to every j connected to node i by an edge eij. Let E be the set of all edges in the mesh. The state change vector on edge eij for a jump from i to j is nij with the nonzero components nij;i=-1 and nij;j=1. The contribution to W in (27) from eij jumps in two directions: ij and ji. Hence, for all edges

W=eijESijVjμjnjinjiT+SjiViμinijnijT=eijESijμjVj+μiVinijnijT. 33

The nonzero elements of Nij=nijnijT are Nij;ii=Nij;jj=1 and Nij;ij=Nij;ji=-1. Therefore, the elements of the symmetric W are

Wij=-SijμjVj+μiVi,ji,Wii=jJ(i)SijμjVj+μiVi. 34

The random component of the concentrations ψ=V-1η is normally distributed N(0,V-1ΣV-1). The equation for Ξ=V-1ΣV-1 is derived from (27)

Ξ˙ij=l=1MVi-1νi,lVlΞlj+l=1MVj-1νj,lVlΞli+Vi-1Wij(Vu)Vj-1. 35

The coefficients in (35) multiplying Ξ are

Vi-1νi,lVl=Sil/Vi=Dil,li,Vi-1νi,iVi=Sii/Vi=Dii. 36

In (35), W is scaled by V

Vi-1WijVj-1=-Vi-1SijVj-1(ui+uj)=-DijVj-1(ui+uj),ji,Vi-1WiiVi-1=2jJ(i)Vi-1SijVi-1ui=-2Vi-1SiiVi-1ui=-2DiiVi-1ui. 37

Then, the scaled W-term in (37) can be written in a symmetric form

Vi-1WijVj-1=-DijVj-1(ui+uj)=-SijVi-1Vj-1(ui+uj)=-uiDijVj-1+ujDjiVi-1. 38

The covariance equation corresponding to (29) for diffusion is by (35), (36), and (38)

Ξ˙ij=l=1NDilΞlj+l=1NDjlΞli-fij,fij=uiDijVj-1+ujDjiVi-1,i,j=1,,N. 39

The copy numbers Yk· and Zk· are normally distributed as in (28). The covariance of the concentrations in space of a species k, Uk·, is Ω-1Ξ and Uk·N(uk·,Ω-1Ξ).

In the stationary equation, Ξ˙ij=0 in (39) and it is a Lyapunov equation. A stationary solution of (31) is ui=const. and of (39) is

Ξij=uiVi-1δij, 40

where δij is the Kronecker delta. If the initial data Ξij(0) are symmetric, then the solution to (39) is symmetric for all t>0. At the stationary solution of (40)

Σ=VΞV=diag(Vu),μ=Vu,

where diag(x) is a diagonal matrix with xi in the diagonal. Thus, the stationary distribution of the copy numbers in the voxels Yk· for species k follows from (28)

Yk·N(ΩVu,Ωdiag(Vu)). 41

The stationary copy numbers in different voxels are uncorrelated, have a multivariate normal distribution and are therefore independent, and are approximately Poisson distributed since YkiN(ΩViui,ΩViui) with equal mean and variance. If Ξij(0)=0, then the time-dependent solutions to (39) will be proportional to ui/Vi and the mean and the covariance of Yij are both proportional to ΩViui. The distributions of the solution to the DME in (4) are discussed in Engblom et al. (2017) based on the theory for linear propensities in Jahnke and Huisinga (2007). Their distributions are either multinomial, Poisson, or a combination. The stationary distribution is multinomial according to Anderson et al. (2010) and approximately Poissonian (Engblom et al. 2017).

The components of the solution u of (31) are the node values of the finite element approximation of u(x,t) solving diffusion Eq. (6) for one species. Let Ξ(x1,x2,t) be the covariance between the solutions at the coordinates x1,x2Rd. Then, Ξij in (39) can be interpreted as the value of Ξ(x1,x2,t) at the nodes at x1i and x2j. The coefficient Dij in fij in (39) is negative when x1i=x2j, and positive when x1ix2j. When Dij is nonzero, the difference ξij=12(x1i-x2j) is small. On a regular mesh with a typical length of an edge equal to Δx, the positive weight Dij depends approximately only on rij=ξij and Vi varies smoothly with a typical size V. On such a mesh, DijΔx-2 and uiDijVj-1 is approximated here by a continuous function u(x1,t)φ(rij) with

φ(r)=-γΔx2Vexp-r2σ2cos(πωr), 42

and the solution u(x,t) to (6). The scalings σ and ω are chosen such that σΔx and ω=Δx-1. When r=0 then DiiViφ(0)=-γ/Δx2V and when r=Δx we have

DijVj-1φ(Δx)=γΔx2Vexp-Δxσ2<|φ(0)|.

Then, the continuous equation corresponding to discrete Eq. (39) is

tΞ=γi=1d2Ξx1i2+2Ξx2i2-(u(x1,t)+u(x2,t))φ(r). 43

If exact initial conditions of the distribution of molecules are known, then Ξ(x1,x2,0)=0.

Let u(x) be the stationary solution to the diffusion equation. Then, one can show that an approximate stationary solution to (43) is

Ξ(x1,x2)=u(x1)Vexp-x1-x222σ2, 44

As Δx0, this solution approaches u(x1)δ(x1-x2) where δ is the Dirac measure. The solution in (40) to discrete Eq. (39) is similar to (44).

Analysis of the Covariance Equation

A property of the continuous approximation Ξ(x1,x2,t) of the covariance in (43) is derived in this section. We show that Ξ decays exponentially when x1-x2 grows, indicating that the discrete variance Ξij in (39) is small when x1i-x2j>Δx.

Consider (43) in free space x1,x2Rd and for t0 with initial data Ξ(x1,x2,0). The concentration u(x1,t) is nonnegative and is assumed to be bounded by Cu for all x1 and t0. Introduce a change of variables

ξ1jξ2j=121-111x1jx2j,j=1,,d. 45

The diffusion equation in (43) is in the new variables

tΞ=γj=1d2Ξξ1j2+2Ξξ2j2-f(ξ1,ξ2,t)φ(ξ1). 46

Here f(ξ1,ξ2,t)=u(x1,t)+u(x2,t) is nonnegative and bounded by 2Cu. The factor φ in the source term vanishes quickly when ξ1 increases.

With the fundamental solution of the diffusion equation in 2d dimensions (Evans 2010; Stakgold 2000), the solution of (46) can be written as a sum of two integrals depending on the initial data and the source term

Ξ(ξ1,ξ2,t)=Iini+Isrc, 47

where

Iini=RdRd1(4πγt)dexp-ξ1-ζ12+ξ2-ζ22/4γ(t)Ξ(ζ1,ζ2,0)dζ1dζ2, 48

and

Isrc=-0tRdRdγ(4πγ(t-s))dexp-ξ1-ζ12+ξ2-ζ22/(4γ(t-s))·f(ζ1,ζ2,t)Δx2Vcos(ωζ1)j=1dexp(-ζ1j2/σ2)dζ1dζ2ds. 49

The integral with the source term is bounded by

|Isrc|2CuγΔx2V0t1(4πγ(t-s))dRdexp-ξ2-ζ22/(4γ(t-s))dζ2·Rd|cos(ωζ1)|j=1dexp-(ξ1j-ζ1j)2/(4γ(t-s))×exp-ζ1j2/σ2dζ1ds. 50

The spatial integral Id2 over ζ2Rd in (50) is

Id2(t-s)=j=1dRexp(-(ξ2j-ζ)2/(4γ(t-s)))dζ=j=1d2πγ(t-s)=(4πγ(t-s))d/2. 51

The integral Id1 of the product over ζ1Rd in (50) is

Id1(t-s,σ)=Rdj=1dexp-(ξ1j-ζ1j)2/(4γ(t-s))exp-ζ1j2/σ2dζ1=j=1dRexp-(ξj-ζ)2/(4γ(t-s))exp-ζ2/σ2dζ=j=1dI1j(σ). 52

With τ=4γ(t-s) and α=τ-1+σ-2, we have

I1j(σ)=Rexp-(ξ1j-ζ)2/τ-ζ2/σ2dζ=exp-ξ1j2/τ+ξ1j2/ατ2Rexp-α(ζ-ξ1j/ατ)2dζ=exp-ξ1j2/(τ+σ2)αRexp(-z2)dz=σπττ+σ2exp-ξ1j2/(τ+σ2). 53

Using (53), (52), and (51), a bound on Isrc in (50) is

|Isrc|2CuΔx2V0tγ(4πγ(t-s))dId1(t-s,σ)Id2(t-s)ds=2CuΔx2V04γt(πτ)d/24(πτ)dj=1dI1j(σ)dτ=Cuσd2Δx2V04γtexp(-ξ12/(τ+σ2))(τ+σ2)d/2dτCuσd2Δx2Vexp-ξ12/(4γt+σ2)04γtdτ(τ+σ2)d/2=Cuσ22Δx2Vexp(-ξ12/(4γt+σ2))log1+4γtσ2,d=2,Cuσ2Δx2V(d-2)exp(-ξ12/(4γt+σ2))1-1/1+4γtσ2d/2-1,d=1d3. 54

Assume that the initial data are localized close to ξ1=0 such that |Ξ(x1,x2,0)|Ξ0exp(-ξ12/χ2) for some χ>0. A bound on the integral in (47) due to the initial data is then

|Iini|Ξ0(4πγt)dRdexp-ξ1-ζ12/4γt+ζ12/χ2dζ1·Rdexp-ξ2-ζ22/4γtdζ2=Ξ0(4πγt)dId1(t,χ)Id2(t)=Ξ0(4πγt)dj=1dI1j(χ)·(4πγt)d/2=Ξ0exp-ξ12/(4γt+χ2)/1+4γtχ2d/2. 55

Hence, a bound on the covariance solution in (47) is obtained by (54) and (55).

The assumptions and conclusions are summarized in a theorem:

Theorem 1

Assume that |u(x,t)|Cu and that the initial data satisfy

|Ξ(x1,x2,0)|Ξ0exp(-ξ12/χ2).

The relations between the x and ξ coordinates are ξ1=12(x1-x2),ξ2=12(x1+x2). Then, the solution of (46) with φ defined by (42) for t>0 is bounded by

|Ξ(x1,x2,t)|Cuσ2Δx2Vfd1+4γtσ2exp-(ξ1/σ)2/(1+4γt/σ2)+Ξ0(1+4γt/χ2)d/2exp-(ξ1/χ)2/(1+4γt/χ2), 56

where

fd(ζ)=12log(ζ),d=2,fd(ζ)=1d-21-1ζd/2-1,d=1,d3. 57

The function fd depends on the dimension d and is 0 at t=0. The first term in (56) is proportional to Cu/V=supu/V since σΔx. The solution in (56) decays exponentially in ξ1=12x1-x2 for a fixed t in all dimensions and is small when ξ1>σΔx. For a given ξ1, the first term in (56) increases slowly with t in 1 and 2 dimensions and is bounded by Cuσ2/Δx2V(d-2) when d3. The second term in (56) decreases when t0.5ξ12-0.25χ2 for d=1 and for all t0 when d2.

Our bounded domain V for x1 and x2 has a boundary that is not taken into account in (56). The bound on Ξ is a good estimate when the main part of the solution is away from the boundary, e.g., when t is not too large and u(x,t) is nonzero only in the middle of V.

Since (43) is a continuous approximation of (39) we expect the discrete variance Ξij to behave in a similar way and be negligible when the nodes i and j are not neighbors and not directly connected by an edge in the mesh. This property will be exploited in the algorithm in the next section.

Algorithm

The algorithm to compute the solution to the LNA for both reactions and diffusion is based on the operator splitting in Sect. 2, the derivations in Sects. 3.2 and 3.3, and Theorem 1 in Sect. 4.

The mean value equation in (21) is added to the diffusion equation in (31) to obtain the reaction–diffusion equation for the concentration uik of species i in voxel k with MN components

u˙ik=Vk-1νi(Vku·k)+β=1NDkβuiβ,i=1,,M,j=1,,N. 58

The covariance between the concentrations of the species i and j in voxels k and l is written as Ξij;kl and has M2N2 components. The equation satisfied by the covariance is obtained from (29) and (39)

Ξ˙ij;kl=α=1Mνi,αΞαj;kl+α=1Mνj,αΞαi;kl+δklVk-2Wij(Vku·k)+β=1NDkβΞij;βl+β=1NDlβΞij;βk-δijuikDklVl-1+ujlDlkVk-1,i,j=1,,M,k,l=1,,N. 59

The reaction source term vanishes if the concentrations are from different voxels, since there is no reaction between molecules in separate voxels. The diffusion source term is zero if the species are different since a diffusion event occurs when the same species changes location between adjacent voxels by a jump.

The equations for the mean and the covariance (58) and (59) are solved by splitting the operator on the right-hand side and advancing the solution one timestep from tn to tn+1=tn+Δt as in (10) with uik(tn) and Ξij;kl(tn) as initial data, cf. (10). The algorithm is

Algorithm 1

  1. u~˙ik=Vk-1νi(Vku~·k),t[tn,tn+1],u~ik(tn)=uik(tn) 60
  2. Ξ~˙ij;kk=α=1Mνi,αΞ~αj;kk+α=1Mνj,αΞ~αi;kk+Vk-2Wij(Vku~·k),t[tn,tn+1],Ξ~ij;kk(tn)=Ξij;kk(tn) 61
  3. Ξ~˙ij;kl=α=1Mνi,αΞ~αj;kl+α=1Mνj,αΞ~αi;kl,kl,t[tn,tn+1],Ξ~ij;kl(tn)=Ξij;kl(tn) 62
  4. u˙ik=β=1NDkβuiβ,t[tn,tn+1],uik(tn)=u~ik(tn+1) 63
  5. Ξ˙ii;kl=β=1NDkβΞii;βl+β=1NDlβΞii;βk-uikDklVl-1+uilDlkVk-1,t[tn,tn+1],Ξii;kl(tn)=Ξ~ii;kl(tn+1) 64
  6. Ξ˙ij;kl=β=1NDkβΞij;βl+β=1NDlβΞij;βk,ij,t[tn,tn+1],Ξij;kl(tn)=Ξ~ij;kl(tn+1) 65

The discretization error in uik(tn+1) and Ξij;kl(tn+1) will be of O(Δt). The ODEs in steps 1, 2 and 3 update u and Ξ in a voxel (steps 1, 2) and Ξ between two adjacent voxels (step 3) due to the reactions as in step 1 of (10) and (14). In the ODEs in steps 4, 5 and 6, u and Ξ change due to diffusion between voxels without any influence of the other species as in step 2 of (10) and (16). A more accurate splitting than in Algorithm 1 with an error of O(Δt2) is possible in the same manner as in (11).

It follows from Theorem 1 that if Ξij;kl(tn) decays rapidly when the nodes xk and xl are separated then this property is preserved in Ξ~ij;kl(tn+1) where Cu>0 in (56) in step 2 and Cu=0 without the source term in step 3. Using the same arguments in steps 5 and 6, we find that if Ξij;kl(tn) decays rapidly when xk-xl increases, then after one timestep Ξij;kl(tn+1) also decays rapidly in xk-xl.

Supported by the analysis in Sect. 4, we assume that Ξij;kl is negligible when node l and node k are not neighbors, lJ(k), and we let Ξ^ij;kl=0 in a sparse approximation of Ξij;kl. Then, only elements of Ξij;kl when k=l and lJ(k) need to be stored and updated in Ξ^ij;kl by Algorithm 1. The sparsity (or nonzero) pattern of Ξ^ij;kl for each pair ij is the same as that of S and D in (8) since Skl and Dkl are nonzero only on the diagonal and if nodes the k and l are neighbors connected by an edge in the mesh and lJ(k). Moreover, Ξij;kl is symmetric in both i and j and k and l. With M different species and N voxels, Ξij;kl in general has 12MN(MN+1) different elements but Ξ^ij;kl has only CdM2N nonzero elements that are necessary to store taking the symmetry into account. The coefficient Cd depends on the dimension and the structure of the mesh. In a Cartesian mesh, Cd=2(1D),3(2D), or 4(3D) and in an unstructured mesh Cd=2 in 1D but Cd depends on the particular mesh in 2D and 3D. The mean value vectors u and u~ have the dimension MN.

In order to estimate the computational work in the steps of the algorithm, we assume that νi depends on a limited number of ujk independent of M. Then, there are also a limited number of derivatives νi,j different from zero and independent of M. Thus, the work to compute the right-hand side (RHS) in step 1 in (60) is independent of M and N and it is computed once for every species i and voxel k, i.e., MN times. Since there are a limited number of nonzeros in νi,α, the sums and W in step 2 in (61) are computed independently of M and N. Hence, the work is proportional to M2N for the covariances between the species in every voxel. In step 3 in (62), M2 covariances are computed for every combination of voxels k and l where Ξ~ is nonzero. This is the case when k and l are neighbors and each k has a limited number of neighbors. This number is independent of N. Therefore, the work to compute the full RHS in step 3 is of O(M2N). The number of Dkβ0 in the RHS in step 4 in (63) is independent of N according to the previous paragraph. The work to determine all derivatives of uik is then proportional to MN. For Ξii;kl to be nonzero in step 5 in (64), voxels k and l are neighbors, lJ(k). Furthermore, the products in the sums are nonzero only if βJ(k)J(l). The work to calculate the sums is independent of N, and the RHS is computed O(MN) times. In the same manner, the RHS in step 6 in (65) is computed O(M2N) times. The conclusion is that the work to determine the RHS in the ODEs for uik and Ξ^ij;kl in the algorithm has linear complexity in N and is proportional to M2N.

Since there are additional administrative costs in Algorithm 1, the straightforward algorithm ignoring the sparsity of Ξ will be faster when N<N for some small N which is problem dependent. However, for N>N Algorithm 1 will be the winner and its advantage is greater, the greater the N is.

If the diffusion coefficient is different for different species i, then Dkβ and Dlβ in steps 4, 5 and 6 would depend on i but the algorithm and its properties remain the same.

In summary, the algorithm in words is for one timestep Δt from tn to tn+1=tn+Δt:

  1. Solve the ODE in (60) numerically for the mean values with initial data u(tn) to obtain u~(t)

  2. Solve the ODE in (61) numerically for the covariances between the species in the same voxel k with u~ from step 1 and initial data Ξ(tn) to determine Ξ~··;kk(t)

  3. Solve the ODE in (62) numerically for the covariances between the species in different voxels k and l satisfying lJ(k) with u~ from step 1 and initial data Ξ(tn) to determine Ξ~··;kl(t)

  4. Solve the ODE in (63) numerically for the mean values with initial data u~(tn+1) from (60) to obtain u(t) and u(tn+1)

  5. Solve the ODE in (64) numerically for the covariances between voxels k and l satisfying lJ(k) for the same species i with u from step 4 and initial data Ξ~(tn+1) from steps 2 and 3 to determine Ξii;··(tn+1)

  6. Solve the ODE in (65) numerically for the covariances between voxels k and l satisfying lJ(k) for different species i and j with u from step 4 and initial data Ξ~(tn+1) from steps 2 and 3 to determine Ξij;··(tn+1)

In the first three steps, the mean values and the covariances change due to the reactions and in the last three steps due to the diffusion.

Theorem 1 and numerical experiments in Sect. 6.1 indicate that the accuracy in Ξ^ increases when the dimension grows. By storing and updating only the sparse approximation in steps 3, 5 and 6 in Algorithm 1, considerable savings are possible in computing time and computer memory when N is large, e.g., in 3D.

Example

Consider the reversible reaction for association and dissociation of the species AB,  and C

A+BkdkaC, 66

with copy numbers μ·jT=(aj,bj,cj) in voxel j and propensities and state change vectors

v1=kaajbj,n1T=(-1,-1,1),v2=kdcj,n2T=(1,1,-1). 67

The macroscopic reaction coefficients are ka=Vkka and kd=kd. Then, Eq. (21) for the concentrations in step 1 of the above algorithm in Vk is

u˙·k=-kau1ku2k+kdu3k-kau1ku2k+kdu3kkau1ku2k-kdu3k,k=1,,N. 68

Order the means and the covariances such that

u=u1·u2·u3·,Ξ=Ξ11;··Ξ12;··Ξ13;··Ξ21;··Ξ22;··Ξ23;··Ξ31;··Ξ32;··Ξ33;··. 69

The Jacobian J of the propensities with Jij=νi,j in (31) and the source term in step 2 in Vk are

J=-kau2k-kau1kkd-kau2k-kau1kkdkau2kkau1k-kd,gk(u)=Vk-1(kau1ku2k+kdu3k),Vk-2W=gk(u)n1n1T, 70

since n1n1T=n2n2T. Introduce K and G using the identity matrix IN of size N, J, and W in (70)

K=-kadiag(u2·)-kadiag(u1·)kdIN-kadiag(u2·)-kadiag(u1·)kdINkadiag(u2·)kadiag(u1·)-kdIN=-1-11(kadiag(u2·)kadiag(u1·)-kdIN),G(u)=n1n1Tdiag(g(u)), 71

where denotes the Kronecker product. Then, the equation in steps 2 and 3 in matrix form is

Ξ~˙=KΞ~+(KΞ~)T+G(u~). 72

Define the matrices D3 and H by

D3=D000D000D=I3D,H(u)=H1;··000H2;··000H3;··,Hi;kl=DklVl-1(uik+uil). 73

The submatrix D is the approximation of the Laplacian in (31) and (39). If the diffusion varies between the species, then D in (73) would be replaced by γi/γD,i=1,2,3, on the diagonal. The sparsity or nonzero pattern in Hi;·· is the same as in D. The diffusion equation for the mean values in step 4 in Algorithm 1 is as in (31)

u˙=D3u. 74

The matrix form of steps 5 and 6 in Algorithm 1 is (cf. (38) and (39))

Ξ˙=D3Ξ+(D3Ξ)T-H(u). 75

In 1D, D is a tridiagonal matrix and if V=Δx is constant then

Dαk=Dkα=γ/Δx2,α=k+1,k=1,,N-1,Dkk=-2γ/Δx2,k=2,,N-1,D11=DNN=-γ/Δx2.

Numerical Results

The algorithm is tested for computing the mean and the approximation of the covariance in the LNA of systems with diffusion in 1D, 2D, and 3D and a system in 2D with the reversible reaction (66).

Diffusion

A Cartesian grid in d dimensions is generated with a constant step size Δx and a diffusion coefficient γ=0.01. The number of dimensions is d=1,2,3, and the domain is the unit cube [0,1]d. The number of grid points is n=1/Δx+1 in each dimension yielding N=nd components in u. A straightforward implementation of Algorithm 1 in steps 5 and 6 will generate N2 elements in Ξ. By updating only those elements of Ξ that correspond to nonzeros in D and S, the number of nonzero elements in the approximation Ξ^ will be of O(N).

The initial data u(0) are sampled from a uniform distribution uk(0)U[0,1] and Ξ=0. The ODEs in (74) and (75) are solved numerically for t0 by the forward Euler method for simplicity. Then, the RHS in each step of Algorithm 1 is evaluated once requiring a computational work proportional to M2N in every timestep from tn to tn+1. Better numerical accuracy is achieved by splitting the computations according to Strang (1968) as in (11) and by using a higher-order method. Better numerical stability is obtained by an implicit method.

1D

The covariance Ξ(x1,x2,t) is computed in 1D on a grid with Δx=0.025 and N=n=41 using the full Ξ without zeros, the sparse Ξ^ with the same nonzero pattern as S, i.e., the diagonal, the subdiagonal, and the superdiagonal are nonzero in a tridiagonal matrix as proposed in Sect. 6.1, and the sparse Ξˇ where another two diagonals below and above the diagonal are nonzero in a pentadiagonal matrix. One row of the three matrices is shown in Fig. 2. The approximations Ξ^(0.5,x2,t) and Ξˇ(0.5,x2,t) agree fairly well with Ξ(0.5,x2,t) in particular for larger t in Fig. 2.

Fig. 2.

Fig. 2

Comparison of the covariance Ξ(0.5,x2,t) for diffusion in 1D with x2[0,1] on the abscissa at different time points and different approximations: without sparse approximation (blue), with two extra diagonals in Ξ^(0.5,x2) (red), and with four extra diagonals in Ξˇ(0.5,x2) (yellow). The time is t=8 (left), t=20 (middle), and t=40 (right)

The PDF of the multivariate normal distribution N(u,Ξ) is

p(η,t)=1(2π)N/2detΞexp-12(η-u)TΞ-1(η-u). 76

The covariance matrix is factorized by Ξ=QΛQT where Q is orthogonal and Λ has the positive eigenvalues of Ξ on the diagonal. The expression in (76) in the exponential defines surfaces of ellipsoids in RN with equal probability, and the eigenvalues of Ξ are the lengths of the principal axes of the ellipsoids. Another way of comparing Ξ and its approximations is then to compare the eigenvalues to see the difference between the lengths of these axes.

The eigenvalues of Ξ,Ξ^, and Ξˇ are displayed in Fig. 3. They also agree well except for the one or two smallest ones in the figure. Using five diagonals and four neighbors in Ξˇ improves the approximation somewhat compared to Ξ^. Including more than the nearest neighbors in 2D and 3D with an unstructured mesh is possible but makes the algorithm more complicated.

Fig. 3.

Fig. 3

Comparison of the N eigenvalues of the covariance Ξ(0.5,x2,t) for diffusion in 1D at different time points and different approximations: without sparse approximation (solid blue), with two extra diagonals in Ξ^ (dashed red), and with four extra diagonals in Ξˇ (dash-dotted yellow). The time is t=8 (left), t=20 (middle), and t=40 (right). The curves for Ξ^ and Ξˇ at t=40 are indistinguishable with the precision in the figure

2D and 3D

In 2D, Ξ(x1,x2,t) is computed with the full Ξ matrix and with the approximation Ξ^ that has the same sparsity pattern as S on a grid with Δx=0.05 and N=n2=441. One row of Ξ corresponds to one coordinate x1k and its covariance with the 2D x2. The variance is high at Ξ(x1,x1,t), and the covariance Ξ(x1,x2,t) is very low when x1x2. This is depicted in the left panel of Fig. 4 where x1 and x22 are fixed and x21 varies in x2T=(x21,x22). The differences in covariance between Ξ and Ξ^ are very small and not visible in the figure. Since Ξ is symmetric, the result is similar in other directions in x2 and for other x1. The steady-state solution (40) with u=0.5 and V=1/400 is here 200.

Fig. 4.

Fig. 4

The covariances Ξ(x1,x2,t) for diffusion computed with the full matrix Ξ and its sparse approximation Ξ^ in 2D (left) and 3D (right). The coordinate x1 chosen in the middle of the domain and with one degree of freedom in x2 on the abscissa at t=2.5 with Δx2=1/20 (left) and t=0.2 with Δx2=1/12 (right). The difference between Ξ and Ξ^ is not discernible in the figures

One section of the 3D covariances Ξ and Ξ^ is shown in the right panel of Fig. 4. As in 2D, x1, x22, and x23 in x2T=(x21,x22,x23) are fixed and Ξ(x1,x2,t) is plotted as a function of x21. The step size in the grid is Δx=0.0833 and N=n3=2197. After a short time, the covariances of Ξ and Ξ^ agree very well as in 2D. The stationary solution in (40) with the data here is 864.

The scaled difference ΔΞ between the covariances Ξ and Ξ^ is defined by

Ξ=Ξ^(IN+ΔΞ),ΔΞ=Ξ^-1(Ξ-Ξ^). 77

The dominant elements in Ξ^ are the variances on the diagonal. With small elements in ΔΞ compared to 1, the difference between the covariances in Ξ and Ξ^ is small relative to the variances in Ξ^. In Fig. 5, ΔΞ for the 2D example is shown at two time points. The values of ΔΞ are low in blue color in most parts of the matrix. The peaks in the left panel are at 0.035 in isolated points. In the right panel, maxΔΞij<0.02.

Fig. 5.

Fig. 5

Scaled difference ΔΞij of the covariance matrices Ξ and Ξ^ in (77) when i,j=1,,N for diffusion in 2D at t=2.5 (left) and t=5 (right)

The eigenvalues of Ξ and Ξ^ in 2D and 3D are compared in Fig. 6. The sparse approximation captures all the eigenvalues except for one or two of the smallest ones.

Fig. 6.

Fig. 6

Comparison of the N eigenvalues of the covariance matrices Ξ and Ξ^ for diffusion in 2D at t=2.5 (left) and 3D at t=0.2 (right) and different approximations: with sparse approximation (dashed red) and without (solid blue)

The covariance of the fluctuations in concentration between different parts of the domain is well approximated by the sparse Ξ^, especially in 2D and 3D in Figs. 4 and 6. This is expected from Theorem 1 in Sect. 4 where the decay of Ξ(x1,x2,t) is slower in 1D than in 2D and 3D when ξ1=12(x1-x2) is growing.

Reactions and Diffusion in 2D

The time evolution of the chemical reaction (66) on the Cartesian mesh in 2D in Sect. 6.1.2 is computed with the LNA as in the example in Sect. 5.1. The parameters are ka=kd=0.1, and the diffusion is low with γ=0.01. The dimension of u is MN=Mn2=1323, and the initial values in u(0) are uniformly distributed between 0 and 1 and Ξ(0)=0.

The eigenvalues of the covariances with the full matrix Ξ and with the sparse matrix Ξ^ are compared at different t in Fig. 7. An approximate stationary solution u is determined at t=20. The convergence of the three subvectors u1·,u2·, and u3· in (69) corresponding to the concentrations of AB,  and C is displayed in the lower right panel in the figure. The difference between u and u is measured in · for the species. In the resolution of the figure, it is not possible to distinguish between the differences in convergence between the species. The balance equation kaa¯b¯=kdc¯ is satisfied with a relative error less than 0.008 by the mean values a¯,b¯, and c¯ of the components in ui·(20),i=1,2,3. At , u1·,u2·, and u3· are constant in space.

Fig. 7.

Fig. 7

Comparison of the MN eigenvalues of the covariance matrices Ξ and Ξ^ for the reaction (66) and diffusion in 2D at t=0.25 (upper left), t=0.5 (upper middle), t=1 (upper right), t=3 (lower left), t=6 (lower middle) and different approximations: with sparse approximation (solid blue) and without (dashed red). The convergence of the solution to the steady state for the species AB,  and C as a function of t (lower right)

The convergence plot in Fig. 7 shows that the variation in the solution is larger for small t and decreases with t. The covariances Ξ and Ξ^ agree well for large eigenvalues for small t and they agree well for all eigenvalues when t grows. The off-diagonal submatrices Ξij;··,ij, in (69) are comparable in size to the diagonal submatrices Ξii;·· when t is small but as t grows Ξii;··,i=1,2,3, will dominate and be closer and closer to diagonal matrices. There is a jump in the spectrum for larger t, e.g., at t=6. This is explained by the difference in the size of the stationary values a¯,b¯, and c¯ where a¯b¯, and c¯/a¯0.6. The approximation in the covariance equation behaves in the same way with reactions as in Sect. 6.1.2 without the reactions.

Conclusions

The master equation is a model for biochemical reactions and diffusion but the numerical solution of it is impossible except for simple, well-stirred systems with special properties. An alternative for large systems with spatial variation is to use the linear noise approximation (LNA). We have derived the equations for the LNA for diffusion and chemical reactions on general meshes. The reactions involve M species, and the mesh consists of N voxels. The covariance of the concentrations is approximated by a sparse representation in an algorithm such that the computational complexity is reduced from O(M2N2) in a straightforward implementation to O(M2N) here. Also the memory to store the solution is reduced in the same way. The approximation is supported by analytical expressions showing that the higher the dimension is, the better the approximation is. Consequently, the quality of the approximation and the savings in work and storage are more prominent in 3D when N is large. The accuracy of the approximation is evaluated by comparing the elements and the eigenvalues of the full covariance matrix and its sparse approximation in numerical examples with only diffusion in 1D, 2D, and 3D and an example in 2D with a reversible reaction and slow diffusion.

References

  1. Anderson DF, Craciun G, Kurtz TG. Product-form stationary distributions for deficiency zero chemical reaction networks. Bull Math Biol. 2010;72:1947–1970. doi: 10.1007/s11538-010-9517-4. [DOI] [PubMed] [Google Scholar]
  2. Asllani M, Biancalani T, Fanelli D, McKane AJ. The linear noise approximation for reaction–diffusion systems on networks. Eur Phys J B. 2013;86:476. doi: 10.1140/epjb/e2013-40570-8. [DOI] [Google Scholar]
  3. Biancalani T, Fanelli D, Patti FD. Stochastic Turing patterns in the Brusselator model. Phys Rev E. 2010;86:046215. doi: 10.1103/PhysRevE.81.046215. [DOI] [PubMed] [Google Scholar]
  4. Butler T, Goldenfeld N. Robust ecological pattern formation induced by demographic noise. Phys Rev E. 2009;80:030902(R). doi: 10.1103/PhysRevE.80.030902. [DOI] [PubMed] [Google Scholar]
  5. Cao Y, Gillespie D, Petzold L. Multiscale stochastic simulation algorithm with stochastic partial equilibrium assumption for chemically reacting systems. J Comput Phys. 2005;206:395–411. doi: 10.1016/j.jcp.2004.12.014. [DOI] [Google Scholar]
  6. Cao Y, Gillespie D, Petzold L. Efficient step size selection for the tau-leaping simulation method. J Chem Phys. 2006;124:044109. doi: 10.1063/1.2159468. [DOI] [PubMed] [Google Scholar]
  7. Challenger JD, McKane AJ, Pahle J. Multi-compartment linear noise approximation. J Stat Mech. 2012;2012(11):P11010. doi: 10.1088/1742-5468/2012/11/P11010. [DOI] [Google Scholar]
  8. de Anna P, Di Patti F, Fanelli D, McKane AJ, Dauxios T. Spatial model of autocatalytic reactions. Phys Rev E. 2010;81:056110. doi: 10.1103/PhysRevE.81.056110. [DOI] [PubMed] [Google Scholar]
  9. Drawert B, Engblom S, Hellander A. URDME: a modular framework for stochastic simulation of reaction-transport processes in complex geometries. BMC Syst Biol. 2012;6:76. doi: 10.1186/1752-0509-6-76. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Drawert B, Hellander A, Bales B, Banerjee D, Bellesia G, Daigle B, Douglas G, Gu M, Gupta A, Hellander S, Horuk C, Narayanasamy G, Nath D, Wu S, Lötstedt P, Krintz C, Petzold L. Stochastic simulation service: bridging the gap between the computational expert and the biologist. PLoS Comput Biol. 2016;12:e1005220. doi: 10.1371/journal.pcbi.1005220. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. E W, Liu D, Vanden-Eijnden E. Nested stochastic simulation algorithm for chemical kinetic systems with disparate rates. J Comput Phys. 2007;221:158–180. doi: 10.1016/j.jcp.2006.06.019. [DOI] [PubMed] [Google Scholar]
  12. Elf J, Ehrenberg M. Fast evaluation of fluctuations in biochemical networks with the linear noise approximation. Genome Res. 2003;13:2475–2484. doi: 10.1101/gr.1196503. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Elf J, Ehrenberg M. Spontaneous separation of bi-stable biochemical systems into spatial domains of opposite phases. Syst Biol. 2004;1:230–236. doi: 10.1049/sb:20045021. [DOI] [PubMed] [Google Scholar]
  14. Elowitz MB, Levine AJ, Siggia ED, Swain PS. Stochastic gene expression in a single cell. Science. 2002;297:1183–1186. doi: 10.1126/science.1070919. [DOI] [PubMed] [Google Scholar]
  15. Engblom S, Ferm L, Hellander A, Lötstedt P. Simulation of stochastic reaction–diffusion processes on unstructured meshes. SIAM J Sci Comput. 2009;31:1774–1797. doi: 10.1137/080721388. [DOI] [Google Scholar]
  16. Engblom S, Hellander A, Lötstedt P. Multiscale simulation of stochastic reaction–diffusion networks. In: Holcman D, editor. Stochastic dynamical systems, multiscale modeling, asymptotics and numerical methods for computational cellular biology. Cham: Springer; 2017. pp. 55–79. [Google Scholar]
  17. Engblom S, Lötstedt P, Meinecke L (2017)Mesoscopic modeling of random walk and reactions in crowded media. In: Technical report, Department of Information Technology, Uppsala University, Uppsala. arXiv:1707.05998
  18. Evans LC. Partial differential equations, Graduate studies in mathematics. 2. Providence, RI: American Mathematical Society; 2010. [Google Scholar]
  19. Fange D, Elf J. Noise-induced min phenotypes in E. coli. PLoS Comput Biol. 2006;2:637–648. doi: 10.1371/journal.pcbi.0020080. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Fearnhead P, Giagos V, Sherlock C. Inference for reaction networks using the linear noise approximation. Biometrics. 2014;70:457–466. doi: 10.1111/biom.12152. [DOI] [PubMed] [Google Scholar]
  21. Ferm L, Lötstedt P, Hellander A. A hierarchy of approximations of the master equation scaled by a size parameter. J Sci Comput. 2008;34:127–151. doi: 10.1007/s10915-007-9179-z. [DOI] [Google Scholar]
  22. Fröhlich F, Thomas P, Kazeroonian A, Thies FJ, Grima R, Hasenauer J. Inference for stochastic chemical kinetics using moment equations and systems size expansion. PLoS Comput Biol. 2016;12:e1005030. doi: 10.1371/journal.pcbi.1005030. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Gardiner CW. Handbook of stochastic methods, Springer series in synergetics. 3. Berlin: Springer; 2004. [Google Scholar]
  24. Gibson MA, Bruck J. Efficient exact stochastic simulation of chemical systems with many species and many channels. J Phys Chem. 2000;104(9):1876–1889. doi: 10.1021/jp993732q. [DOI] [Google Scholar]
  25. Gillespie DT. A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. J Comput Phys. 1976;22(4):403–434. doi: 10.1016/0021-9991(76)90041-3. [DOI] [Google Scholar]
  26. Gillespie DT. Exact stochastic simulation of coupled chemical reactions. J Phys Chem. 1977;81:2340–2361. doi: 10.1021/j100540a008. [DOI] [Google Scholar]
  27. Gillespie DT. A rigorous derivation of the chemical master equation. Phys A. 1992;188:404–425. doi: 10.1016/0378-4371(92)90283-V. [DOI] [Google Scholar]
  28. Gillespie DT. Approximate accelerated stochastic simulation of chemically reacting systems. J Chem Phys. 2001;115(4):1716–1733. doi: 10.1063/1.1378322. [DOI] [Google Scholar]
  29. Gillespie DT, Seitaridou E. Simple Brownian diffusion. Oxford: Oxford University Press; 2013. [Google Scholar]
  30. Gillespie DT, Hellander A, Petzold LR. Perspective: stochastic algorithms for chemical kinetics. J Chem Phys. 2013;138:170901. doi: 10.1063/1.4801941. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Gillespie DT, Petzold LR, Seitaridou E. Validity conditions for stochastic chemical kinetics in diffusion-limited systems. J Chem Phys. 2014;140:054111. doi: 10.1063/1.4863990. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Goutsias J, Jenkinson G. Markovian dynamics on complex reaction networks. Phys Rep. 2013;529:199–264. doi: 10.1016/j.physrep.2013.03.004. [DOI] [Google Scholar]
  33. Grima R. An effective rate equation approach to reaction kinetics in small volumes: theory and application to biochemical reactions in nonequilibrium steady-state conditions. J Chem Phys. 2010;133:035101. doi: 10.1063/1.3454685. [DOI] [PubMed] [Google Scholar]
  34. Grima R. A study of the moment-closure approximations for stochastic chemical kinetics. J Chem Phys. 2012;136:154105. doi: 10.1063/1.3702848. [DOI] [PubMed] [Google Scholar]
  35. Grima R. Linear-noise approximation and the chemical master equation agree up to second-order moments for a class of chemical systems. Phys Rev E. 2015;92:042124. doi: 10.1103/PhysRevE.92.042124. [DOI] [PubMed] [Google Scholar]
  36. Hattne J, Fange D, Elf J. Stochastic reaction-diffusion simulation with MesoRD. Bioinformatics. 2005;21:2923–2924. doi: 10.1093/bioinformatics/bti431. [DOI] [PubMed] [Google Scholar]
  37. Hellander A, Lawson MJ, Drawert B, Petzold L. Local error estimates for adaptive simulation of the reaction–diffusion master equation via operator splitting. J Comput Phys. 2014;266:89–100. doi: 10.1016/j.jcp.2014.02.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Isaacson SA, Peskin CS. Incorporating diffusion in complex geometries into stochastic chemical kinetics simulations. SIAM J Sci Comput. 2006;28:47–74. doi: 10.1137/040605060. [DOI] [Google Scholar]
  39. Jahnke T, Huisinga W. Solving the chemical master equation for monomolecular reaction systems analytically. J Math Biol. 2007;54:1–26. doi: 10.1007/s00285-006-0034-x. [DOI] [PubMed] [Google Scholar]
  40. Kurtz TG. Solutions of ordinary differential equations as limits of pure jump Markov processes. J Appl Prob. 1970;7:49–58. doi: 10.2307/3212147. [DOI] [Google Scholar]
  41. Kurtz TG. Limit theorems for sequences of jump Markov processes approximating ordinary differential processes. J Appl Prob. 1971;8:344–356. doi: 10.2307/3211904. [DOI] [Google Scholar]
  42. Lampoudi S, Gillespie D, Petzold L. The multinomial simulation algorithm for discrete stochastic simulation of reaction–diffusion systems. J Chem Phys. 2009;130:094104. doi: 10.1063/1.3074302. [DOI] [PMC free article] [PubMed] [Google Scholar]
  43. MacNamara S, Strang G. Operator splitting. In: Glowinski R, Osher S, Yin W, editors. Splitting methods in communication, imaging, science, and engineering. Cham: Springer; 2016. pp. 95–114. [Google Scholar]
  44. Mahmutovic A, Fange D, Berg OG, Elf J. Lost in presumption: stochastic reactions in spatial models. Nat Meth. 2012;9(12):1–4. doi: 10.1038/nmeth.2253. [DOI] [PubMed] [Google Scholar]
  45. McAdams HH, Arkin A. Stochastic mechanisms in gene expression. Proc Natl Acad Sci USA. 1997;94:814–819. doi: 10.1073/pnas.94.3.814. [DOI] [PMC free article] [PubMed] [Google Scholar]
  46. McKane AJ, Biancalani T, Rogers T. Stochastic pattern formation and spontaneous polarisation: the linear noise approximation and beyond. Bull Math Biol. 2014;76:895–921. doi: 10.1007/s11538-013-9827-4. [DOI] [PubMed] [Google Scholar]
  47. Meinecke L, Engblom S, Hellander A, Lötstedt P. Analysis and design of jump coefficients in discrete stochastic diffusion models. SIAM J Sci Comput. 2016;38:A55–A83. doi: 10.1137/15M101110X. [DOI] [PMC free article] [PubMed] [Google Scholar]
  48. Raj A, van Oudenaarden A. Nature, nurture, or chance: stochastic gene expression and its consequences. Cell. 2008;135(2):216–226. doi: 10.1016/j.cell.2008.09.050. [DOI] [PMC free article] [PubMed] [Google Scholar]
  49. Risken H. The Fokker–Planck equation. Berlin: Springer; 1996. [Google Scholar]
  50. Ruttor A, Opper M. Efficient statistical inference for stochastic reaction processes. Phys Rev Lett. 2009;103:230601. doi: 10.1103/PhysRevLett.103.230601. [DOI] [PubMed] [Google Scholar]
  51. Schnoerr D, Sanguinetti G, Grima R. Comparison of different moment-closure approximations for stochastic chemical kinetics. J Chem Phys. 2015;143:185101. doi: 10.1063/1.4934990. [DOI] [PubMed] [Google Scholar]
  52. Schnoerr D, Sanguinetti G, Grima R. Approximation and inference methods for stochastic biochemical kinetics—a tutorial review. J Phys A Math Theor. 2017;50:093001. doi: 10.1088/1751-8121/aa54d9. [DOI] [Google Scholar]
  53. Scott M, Poulin FJ, Tang H. Approximating intrinsic noise in continuous multispecies models. Proc R Soc A. 2010;467:718–737. doi: 10.1098/rspa.2010.0275. [DOI] [Google Scholar]
  54. Smith S, Cianci C, Grima R. Analytical approximations for spatial stochastic gene expression in single cells and tissues. J R Soc Interface. 2017;13:20151051. doi: 10.1098/rsif.2015.1051. [DOI] [PMC free article] [PubMed] [Google Scholar]
  55. Sokolowski TR, ten Wolde PR (2017)Spatial-stochastic simulation of reaction–diffusion systems. Technical report arXiv:1705.08669v1
  56. Stakgold I. Boundary value problems of mathematical physics. Philadelphia: SIAM; 2000. [Google Scholar]
  57. Stathopoulos V, Girolami MA. Markov chain Monte Carlo inference for Markov jump processes via the linear noise approximation. Philos Trans R Soc A. 2013;371:20110541. doi: 10.1098/rsta.2011.0541. [DOI] [PubMed] [Google Scholar]
  58. Strang G. On the construction and comparison of difference schemes. SIAM J Numer Anal. 1968;5:506–517. doi: 10.1137/0705041. [DOI] [Google Scholar]
  59. Sturrock M, Hellander A, Matzavinos A, Chaplain MA. Spatial stochastic modelling of the Hes1 gene regulatory network: intrinsic noise can explain heterogeneity in embryonic stem cell differentiation. J R Soc Interface. 2013;10:20120988. doi: 10.1098/rsif.2012.0988. [DOI] [PMC free article] [PubMed] [Google Scholar]
  60. Takahashi K, Tănase-Nicola S, ten Wolde PR. Spatio-temporal correlations can drastically change the response of a MAPK pathway. Proc Natl Acad Sci USA. 2010;107(6):2473–2478. doi: 10.1073/pnas.0906885107. [DOI] [PMC free article] [PubMed] [Google Scholar]
  61. Thomas P, Straube AV, Timmer J, Fleck C, Grima R. Signatures of nonlinearity in single cell noise-induced oscillations. J Theor Biol. 2013;335:222–234. doi: 10.1016/j.jtbi.2013.06.021. [DOI] [PubMed] [Google Scholar]
  62. Tsimring LS. Noise in biology. Rep Prog Phys. 2014;77:026601. doi: 10.1088/0034-4885/77/2/026601. [DOI] [PMC free article] [PubMed] [Google Scholar]
  63. Ullah M, Wolkenhauer O. Investigating the two-moment characterisation of subcellular biochemical networks. J Theor Biol. 2009;260:340–352. doi: 10.1016/j.jtbi.2009.05.022. [DOI] [PubMed] [Google Scholar]
  64. van Kampen NG. The expansion of the master equation. Adv Chem Phys. 1976;34:245–309. [Google Scholar]
  65. van Kampen NG. Stochastic processes in physics and chemistry. 5. Amsterdam: Elsevier; 2004. [Google Scholar]
  66. Woolley TE, Baker RE, Gaffney EA, Maini PK. Stochastic reaction and diffusion on growing domains: understanding the breakdown of robust pattern formation. Phys Rev E. 2011;84:046216. doi: 10.1103/PhysRevE.84.046216. [DOI] [PubMed] [Google Scholar]

Articles from Bulletin of Mathematical Biology are provided here courtesy of Springer

RESOURCES