Tutorials › Stochastic Processes › Tau-Leaping as an Approximation to Gillespie Simulation

Simulation of Stochastic Processes · Tutorial 993 of 994

Tau-Leaping as an Approximation to Gillespie Simulation

Use independent Poisson reaction counts to approximate short intervals of a reaction network, and understand the accuracy and population constraints behind that approximation.

Intermediate 10 min read

What You'll Learn

  • Define a tau-leap update from reaction stoichiometry and propensities
  • Derive its conditional mean and covariance
  • Explain its first-order agreement with Gillespie simulation over short steps
  • Compare frozen propensities with changing reaction rates
  • Calculate when a leap can produce negative populations
  • Choose step sizes with accuracy and population constraints in mind

From Event-by-Event Simulation to Tau-Leaping

In Gillespie’s direct method, a simulation generates one reaction event at a time. After each event, it updates the state and recalculates the reaction propensities. This is exact for the specified continuous-time Markov chain, but can be computationally expensive when many reactions occur in a short interval. Tau-leaping speeds up the simulation by advancing a time step \(\tau\) at once: it approximates the number of times each reaction fires during that interval by a Poisson random variable, using propensities evaluated at the interval’s initial state.

Let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space, and let \((X_t)_{t\ge0}\) be a nonexplosive continuous-time Markov chain with state space \(S\subseteq\mathbb{Z}_{\ge0}^d\). There are \(R\) reaction channels. Reaction \(r\) changes the state by a stoichiometric vector \(\nu_r\in\mathbb{Z}^d\), and has propensity \(a_r(x)\ge0\) in state \(x\): conditional on the current state \(x\), the probability that reaction \(r\) fires in a short interval of length \(h\) is \(a_r(x)h+o(h)\). Write \(a_0(x)=\sum_{r=1}^R a_r(x)\). The process is considered with its natural filtration \((\mathcal{F}_t)_{t\ge0}\), generated by its history up to time \(t\).

Definition (Tau-leap update): Given \(X_t=x\) and a step size \(\tau>0\), draw conditionally independent counts \(K_r\sim\operatorname{Pois}(a_r(x)\tau)\), for \(r=1,\ldots,R\), and set \(X_{t+\tau}^{\mathrm{leap}}=x+\sum_{r=1}^R\nu_rK_r\). The propensities are frozen at \(x\) throughout the step. This update is an approximation to the continuous-time chain, not an exact Gillespie step.

The approximation treats reaction counts as if their rates remained fixed over the interval. In the actual chain, every reaction can change the state and therefore change all the propensities; Gillespie simulation accounts for those changes after each event. Tau-leaping is most plausible when a step is short enough that the propensities do not change much, and when the reactions expected to occur are numerous enough for batching to save work.

What the Frozen Poisson Counts Imply

For a Poisson random variable with mean \(m\), both its expectation and variance equal \(m\). Conditional independence therefore gives the following useful calculations for a tau-leap.

Result (Conditional moments of a leap): Given \(X_t=x\), the tau-leap increment has conditional mean \(\tau\sum_{r=1}^R\nu_ra_r(x)\) and conditional covariance matrix \(\tau\sum_{r=1}^R a_r(x)\nu_r\nu_r^{\mathsf T}\).

Proof. Write \(\Delta X=\sum_r\nu_rK_r\). Since \(\mathbb{E}[K_r\mid\mathcal{F}_t]=a_r(x)\tau\), linearity of conditional expectation gives \(\mathbb{E}[\Delta X\mid\mathcal{F}_t]=\sum_r\nu_ra_r(x)\tau\). For the covariance, independence conditional on \(\mathcal{F}_t\) makes every cross-covariance between distinct counts zero, and \(\operatorname{Var}(K_r\mid\mathcal{F}_t)=a_r(x)\tau\). Thus \(\operatorname{Cov}(\Delta X\mid\mathcal{F}_t)=\sum_r\nu_r\nu_r^{\mathsf T}a_r(x)\tau\). If a propensity is zero, its count is identically zero and contributes zero to both formulas, so the result also covers that case. \(\square\)

Worked Example: Two Consecutive Reactions

Consider \(A\to B\) with propensity \(a_1(A,B,C)=A/2\), and \(B\to C\) with propensity \(a_2(A,B,C)=B/2\). The state is \(x=(4,2,0)\), in the order \((A,B,C)\), and the step size is \(\tau=1/4\). The stoichiometric vectors are \(\nu_1=(-1,1,0)^{\mathsf T}\) and \(\nu_2=(0,-1,1)^{\mathsf T}\). The initial propensities are \(a_1(x)=4/2=2\) and \(a_2(x)=2/2=1\), so the frozen Poisson means are \(2(1/4)=1/2\) and \(1(1/4)=1/4\). Thus \(K_1\sim\operatorname{Pois}(1/2)\) and \(K_2\sim\operatorname{Pois}(1/4)\), independently conditional on the state.

The conditional expected increment is \((1/2)\nu_1+(1/4)\nu_2=(-1/2,1/4,1/4)^{\mathsf T}\). Adding it to the initial state gives expected leap state \((7/2,9/4,1/4)\). The conditional covariance is \((1/2)\nu_1\nu_1^{\mathsf T}+(1/4)\nu_2\nu_2^{\mathsf T}\), or

$$ \begin{pmatrix} 1/2&-1/2&0\\ -1/2&3/4&-1/4\\ 0&-1/4&1/4 \end{pmatrix}. $$

For instance, the middle diagonal entry is \((1/2)(1^2)+(1/4)((-1)^2)=3/4\). As one possible draw, if \(K_1=1\) and \(K_2=0\), the updated state is \((4,2,0)+(-1,1,0)=(3,3,0)\), which has no negative populations. Substituting the two Poisson means into the moment formula gives the expected state and covariance above.

Why the Approximation Is Locally Accurate

A small-step comparison explains what tau-leaping captures and what it neglects. The next result concerns reaction counts within a single step, not a claim that a large-step leap reproduces the full trajectory distribution. Assume the propensities are finite at the starting state and bounded by some finite \(\Lambda\) in the states considered during a sufficiently short interval. This bound ensures that the probability of two or more events is of order \(\tau^2\).

Result (First-order agreement over a short step): Under that local bounded-rate assumption, both the exact chain and the tau-leap have probability \(1-a_0(x)\tau+O(\tau^2)\) of no reaction, probability \(a_r(x)\tau+O(\tau^2)\) of exactly one reaction of type \(r\), and probability \(O(\tau^2)\) of two or more reaction events, as \(\tau\downarrow0\).

Proof. For the exact chain, before its first event the state remains \(x\), so the probability of no event by time \(\tau\) is \(e^{-a_0(x)\tau}=1-a_0(x)\tau+O(\tau^2)\). The density that the first event occurs at time \(s\) and is of type \(r\) is \(e^{-a_0(x)s}a_r(x)\). If that event occurs, the probability of a further event before time \(\tau\) is at most \(\Lambda(\tau-s)\): a rate bounded by \(\Lambda\) gives probability at most \(\Lambda u\) of an event in an interval of length \(u\). Consequently, the probability of exactly one event of type \(r\) is \(a_r(x)\tau+O(\tau^2)\): replacing \(e^{-a_0(x)s}\) by \(1\) in the first-event integral makes an error of order \(\tau^2\), and the chance of a further event contributes at most \(a_r(x)\Lambda\int_0^\tau(\tau-s)\,ds= a_r(x)\Lambda\tau^2/2\). The probability of at least two events is \(O(\tau^2)\), since after a first event the rate is bounded by \(\Lambda\), and integrating the bound on a second event over the possible first-event times gives at most \(\Lambda^2\tau^2/2\).

For the tau-leap, the probability all counts are zero is \(e^{-a_0(x)\tau}\), since the counts are independent and their means sum to \(a_0(x)\tau\). The probability that \(K_r=1\) and all other counts are zero is \(a_r(x)\tau e^{-a_0(x)\tau}=a_r(x)\tau+O(\tau^2)\). Finally, two or more total firings have probability \(O(\tau^2)\): the sum of independent Poisson counts is Poisson with mean \(a_0(x)\tau\), and its probability of at least two is \(1-e^{-a_0(x)\tau}(1+a_0(x)\tau)=O(\tau^2)\). These calculations prove the stated first-order agreement. They do not remove the error caused by freezing rates over a step of non-negligible size. \(\square\)

Step Size, Changing Rates, and Invalid States

A smaller \(\tau\) generally reduces the time during which frozen propensities can diverge from the actual rates. But it also requires more updates to cover a fixed time interval, reducing the computational advantage. A larger \(\tau\) batches more reactions, but can miss important changes in rates and can produce an invalid state. There is no universal step size that guarantees accuracy for every reaction network.

Worked Example: A Decay Reaction Can Produce a Negative Count

Consider \(A\to\varnothing\), with propensity \(a(A)=A\), starting from \(A=3\). For \(\tau=1/2\), tau-leaping draws \(K\sim\operatorname{Pois}(3/2)\) and proposes \(A_{\mathrm{new}}=3-K\). This is negative exactly when \(K\ge4\). Therefore

$$ \mathbb{P}(A_{\mathrm{new}}<0) =1-e^{-3/2}\left(1+\frac32+\frac{(3/2)^2}{2}+\frac{(3/2)^3}{6}\right) =1-\frac{67}{16}e^{-3/2}. $$

The sum inside the parentheses is \(1+3/2+9/8+9/16=67/16\). The proposed leap mean is \(\mathbb{E}[A_{\mathrm{new}}]=3-3/2=3/2\), but a negative proposed population cannot represent the reaction system’s state. For comparison, in the exact process each of the three initial molecules survives to time \(1/2\) with probability \(e^{-1/2}\), so the number of deaths has a binomial distribution with parameters \(3\) and \(1-e^{-1/2}\). It cannot exceed three. The Poisson leap’s unbounded count is the source of the negative-state possibility.

Check: For the exact process the expected number of deaths is \(3(1-e^{-1/2})\), whereas the leap’s expected count is \(3/2\). These are not the same: the exact mean is \(3-3e^{-1/2}\). This difference reflects the falling propensity as \(A\) decreases, which the frozen rate \(a(3)=3\) ignores.

Worked Example: A Pair Reaction and Step-Size Risk

Consider \(2A\to B\) with propensity \(a(A,B)=\frac13\binom{A}{2}\), starting from \((A,B)=(4,0)\). One firing changes the state by \((-2,1)\), and the initial propensity is \(\frac13\binom42=\frac13\cdot6=2\). At \(\tau=1/2\), the leap count is \(K\sim\operatorname{Pois}(1)\). The proposed state is \((4-2K,K)\), which has negative \(A\) exactly when \(K\ge3\). Thus

$$ \mathbb{P}(A_{\mathrm{new}}<0)=\mathbb{P}(K\ge3) =1-e^{-1}\left(1+1+\frac12\right) =1-\frac{5}{2e}. $$

If the step is reduced to \(\tau=1/4\), the frozen mean becomes \(2(1/4)=1/2\), so the negative-state probability becomes \(\mathbb{P}(\operatorname{Pois}(1/2)\ge3)=1-e^{-1/2}(1+1/2+1/8)=1-\frac{13}{8\sqrt e}\). The smaller step reduces this particular risk, though it does not make it zero. For either step, the expected state under the leap is \((4-2\mathbb{E}K,\mathbb{E}K)\): it is \((2,1)\) for \(\tau=1/2\), and \((3,1/2)\) for \(\tau=1/4\).

Check: After one actual firing the state is \((2,1)\), where the propensity is \(\frac13\binom22=1/3\), rather than the initial value \(2\). The leap’s frozen rate does not account for this decrease. This illustrates why a step that is long relative to the rate changes can be inaccurate even when its expected state is nonnegative.

Common pitfall: clipping negative counts. A tempting correction is to replace a Poisson count \(K\) by \(\min(K,2)\) in the pair-reaction example, so that \(A=4-2\min(K,2)\) cannot be negative. At \(\tau=1/2\), the original count has mean \(1\), but the clipped count has expectation \(\mathbb{E}[\min(K,2)]=\mathbb{P}(K\ge1)+\mathbb{P}(K\ge2)=(1-e^{-1})+(1-2e^{-1})=2-3/e\), not \(1\). Clipping therefore changes the count distribution and its mean; it is a different approximation, not a harmless implementation of the stated tau-leap. Better responses include reducing the step, using a method that respects population constraints, or using event-by-event simulation when the state is too close to a boundary for a leap.

In practice, step-size choices should consider both rate changes and the sizes of the populations involved. When a reaction is expected to change a critical, low-count species by a substantial fraction of its available population, a large leap is risky. When propensities vary substantially with state, freezing them for a long interval is also risky. Tau-leaping is valuable when batching meaningfully reduces computation while the step remains short relative to these changes; its Poisson counts are a modeling approximation, not a guarantee of valid states or exact trajectories.

Check Your Understanding

For each question, identify the frozen rates and state changes before computing.

  1. For a reaction with propensity \(a_r(x)=3\) and step size \(\tau=1/6\), what is the tau-leap count distribution and its mean?
  2. Why are the tau-leap reaction counts conditionally independent, and how does that assumption enter the covariance formula?
  3. For \(A\to\varnothing\) with propensity \(a(A)=A\), starting from \(A=2\), write the leap update and identify the event that makes the proposed state negative.
  4. In the pair-reaction example, calculate the propensity after one firing and explain why it differs from the frozen value.
  5. State one computational advantage and two limitations of using a larger step size.