Algorithm Search⌘K

Techniqueadvanced

Moment closure

Also called moment closure approximation.

Turn the infinite chain of moment equations of a stochastic network into a finite ODE system by writing high moments in terms of low ones.

Moment closure is a way to get approximate means and variances of a stochastic reaction network without solving the chemical master equation or simulating it. From the master equation, the time derivative of each moment of the counts is an expected value of a function of the state, and for mass action that function is a polynomial. If every reaction has order 0 or 1, the equations for the moments of order up to kk involve only those moments, and they close. If some reaction has order 2 or more, the equation for a moment of order kk involves moments of order k+1k + 1, and the system is an infinite chain. Moment closure cuts the chain: it assumes a form for the distribution (normal, Poisson, log-normal, or another) and writes the moments of order k+1k + 1 as functions of the lower ones. The result is a small system of nonlinear ODEs. It is fast and often accurate for unimodal distributions, but it is an uncontrolled approximation: there is no error bound, and it can give negative variances or spurious steady states.

In plain words

To know how a noisy system behaves on average, you would like an equation for the average count. But in a network where molecules meet in pairs, the average depends on how spread out the counts are. The spread depends on the lopsidedness. The lopsidedness depends on something finer still, and so on without end.

Moment closure stops this chain by a guess. It says: suppose the counts follow a familiar bell-like shape. For such a shape, the finer quantities are fixed by the average and the spread. Put that into the equations, and you get a few equations that you can solve on a computer in a moment.

The guess may be wrong, and nothing warns you when it is. So check it against an exact method on a small case first.

When it applies

  • Moments are the question. You want means, variances and covariances over time, not the full distribution or the probability of rare events.
  • Unimodal distributions. The distribution has one peak and moderate skew. The closures assume a shape with one peak.
  • Too many states for exact methods. The network has too many species or too large counts for finite state projection, and simulation is too slow, for example inside a parameter fit with many evaluations.
  • Mass action or polynomial propensities. The moment equations are then polynomial in the moments, so the closure is explicit. Other propensities need a Taylor expansion first, which adds another approximation.

The template

  1. Moment equations. For a function gg of the state, the master equation gives
ddtE[g(X)]=∑j=1mE[aj(X) (g(X+νj)−g(X))].\frac{d}{dt} \mathbb{E}[g(X)] = \sum_{j=1}^{m} \mathbb{E}\bigl[a_j(X)\, \bigl(g(X + \nu_j) - g(X)\bigr)\bigr].

With g(x)=xig(x) = x_i, xixkx_i x_k, and so on, this gives the equations for the means, the second moments, and higher moments. In particular ddtE[X]=S E[a(X)]\frac{d}{dt}\mathbb{E}[X] = S\, \mathbb{E}[a(X)]. 2. Find the order. Expand the right sides as polynomials in XX. If a reaction has order rr, the equation for moments of order kk involves moments up to order k+r−1k + r - 1. 3. Choose the order of closure. Keep the moments up to order KK (usually 2), and list the moments of order K+1K + 1 (and higher) that appear. 4. Choose a closure. Write each extra moment as a function of the kept ones:

  • normal: the cumulants of order 3 and more are 0, so for one species E[X3]=3μ1μ2−2μ13\mathbb{E}[X^3] = 3\mu_1\mu_2 - 2\mu_1^3, where μk=E[Xk]\mu_k = \mathbb{E}[X^k];
  • Poisson: the cumulants are all equal to the mean;
  • log-normal: E[X3]=μ23/μ13\mathbb{E}[X^3] = \mu_2^3/\mu_1^3 for one species, from the moments of a log-normal law;
  • cumulant neglect of order KK: the cumulants above order KK are 0, which is the normal closure for K=2K = 2.
  1. Solve. Integrate the closed ODE system from the start moments, or solve for its steady states with Newton's method, and keep only the solutions with positive means and variances that are stable.
  2. Check. Compare with exact simulation or with finite state projection on a small case, and change the closure or the order if they disagree.

Classic examples

First order networks close exactly. For immigration-death, ∅→X\emptyset \to X at rate kk and X→∅X \to \emptyset at rate γx\gamma x, the template gives μ˙1=k−γμ1\dot\mu_1 = k - \gamma\mu_1 and μ˙2=k(2μ1+1)+γ(μ1−2μ2)\dot\mu_2 = k(2\mu_1 + 1) + \gamma(\mu_1 - 2\mu_2), with no higher moments. At steady state, μ1=k/γ\mu_1 = k/\gamma and the variance is k/γk/\gamma, the moments of the exact Poisson law. No closure is needed.

Dimerization decay. ∅→A\emptyset \to A at rate k=10k = 10, and 2A→∅2A \to \emptyset with propensity c x(x−1)/2c\, x(x-1)/2, c=1c = 1 (the convention c=2k2/(NAV)c = 2k_2/(N_A V) for a molar rate constant k2k_2). The second reaction removes 2 molecules. The template gives

μ˙1=k−c(μ2−μ1),μ˙2=k(2μ1+1)−2c (μ3−2μ2+μ1),\dot\mu_1 = k - c(\mu_2 - \mu_1), \qquad \dot\mu_2 = k(2\mu_1 + 1) - 2c\,(\mu_3 - 2\mu_2 + \mu_1),

and μ3\mu_3 is not determined. At steady state the first equation gives μ2=μ1+k/c\mu_2 = \mu_1 + k/c. With the normal closure, the second equation becomes the cubic 4m3−6m2−38m+50=04m^3 - 6m^2 - 38m + 50 = 0 in m=μ1m = \mu_1, which has three real roots.

method stationary mean stationary variance
exact (master equation) 3.295346 2.436040
rate equation and LNA 3.162278 2.371708
normal closure 3.241154 2.736074
log-normal closure 3.377172 1.971881

The normal closure has a better mean than the rate equation and a worse variance (12 percent high). The log-normal closure errs the other way. Neither is always better. The other two roots of the normal closure are m=1.277575m = 1.277575 with variance 9.645, a saddle point, and m=−3.018729m = -3.018729 with variance −2.131-2.131, which has a negative mean and a negative variance. Integrating the closed ODEs from μ1=μ2=0\mu_1 = \mu_2 = 0 reaches the right root, but a solver for the steady state started elsewhere can return one of the others.

Epidemics. In the stochastic SIR model, the infection reaction S+I→2IS + I \to 2I has order 2, and the mean number of infected depends on E[SI]\mathbb{E}[SI]. The closure E[SI]≈E[S]E[I]\mathbb{E}[SI] \approx \mathbb{E}[S]\mathbb{E}[I], of order 1, gives the deterministic SIR equations. Closures of order 2 add the covariance and give the effect of noise on the mean of the epidemic, for example in the early phase when counts are small.

Variations

  • Higher order. Keep moments up to order 3 or 4 and close the next order. This can improve accuracy, but not always, and the number of moments grows as (n+KK)\binom{n + K}{K} for nn species.
  • Closures in cumulants or factorial moments. Writing the equations in cumulants, central moments or factorial moments changes the algebra and sometimes the result of the same closure assumption. Factorial moments make the equations simpler for mass action.
  • Derivative matching and other fitted closures. Choose the closure so that the closed system matches the time derivatives of the true moments at some point, or fit it to simulations.
  • Closure of the Langevin equation. The same template applied to the chemical Langevin equation gives other moment equations for nonlinear networks, because the CLE does not keep the higher order terms of the jumps.
  • Relation to the LNA. The linear noise approximation gives the same results as the normal closure for linear networks, and for nonlinear networks it decouples the mean from the variance, while moment closure keeps them coupled.

Pitfalls

  • Unphysical solutions. A closed system can have steady states with negative means or variances, as in the example, and its ODEs can diverge or oscillate in finite time. Check every solution for positivity and stability.
  • No error bound. The error of a closure is not known from the closure itself. Always check it against an exact method on a small case before using it in a parameter study.
  • Bimodal laws. For a bistable network, such as a genetic toggle switch, the mean of the two peaks is a value that the system rarely takes, and closures based on one peak give wrong moments.
  • Low counts. With counts near 0, the normal shape puts mass on negative counts, and the closure can give negative moments. The log-normal and Poisson closures avoid negative values, but they can still be wrong.
  • Conventions. For 2A2A, the propensity c x(x−1)/2c\, x(x-1)/2 and the change of 2 molecules must both appear in the moment equations. Using c x2/2c\, x^2/2 changes the equations by terms of lower order, which matter at low counts.
  • The order is not a guarantee. A closure of higher order is not always more accurate, and different closures of the same order can disagree with each other more than with the exact answer.

Exercises

  1. Derive the equation for μ˙2\dot\mu_2 of immigration-death from the template, and show that its steady state gives the variance k/γk/\gamma.
  2. For the dimerization decay example, derive the cubic 4m3−6m2−38m+50=04m^3 - 6m^2 - 38m + 50 = 0 from the normal closure.
  3. Show that the Poisson closure, applied to the first moment equation of the dimerization decay example with μ2=μ1+μ12\mu_2 = \mu_1 + \mu_1^2, gives the mean k/c\sqrt{k/c} of the rate equation.
  4. Show that for a log-normal law E[X3]=E[X2]3/E[X]3\mathbb{E}[X^3] = \mathbb{E}[X^2]^3/\mathbb{E}[X]^3.
  5. For a network with one species and one reaction 3A→∅3A \to \emptyset of order 3, find the highest moment that appears in the equation for E[X2]\mathbb{E}[X^2].

References

  1. Peter Whittle, On the use of the normal approximation in the treatment of stochastic processes, Journal of the Royal Statistical Society Series B 19(2), 1957, 268-281, the closure of the moment equations by setting the cumulants above order 2 to zero
  2. David Schnoerr, Guido Sanguinetti and Ramon Grima, Comparison of different moment-closure approximations for stochastic chemical kinetics, Journal of Chemical Physics 143(18), 2015, 185101, the normal, Poisson, log-normal and other closures compared on networks with known solutions, and their unphysical solutions
  3. David Schnoerr, Guido Sanguinetti and Ramon Grima, Approximation and inference methods for stochastic biochemical kinetics, a tutorial review, Journal of Physics A 50(9), 2017, 093001, the section on moment closure approximations
  4. Donald A. McQuarrie, Stochastic approach to chemical kinetics, Journal of Applied Probability 4(3), 1967, 413-478, the moment equations of the master equation and their exact solution for first order reactions

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples