Tau-leaping

From testwiki
Jump to navigation Jump to search

Template:Short description In probability theory, tau-leaping, or Ο„-leaping, is an approximate method for the simulation of a stochastic system.[1] It is based on the Gillespie algorithm, performing all reactions for an interval of length tau before updating the propensity functions.[2] By updating the rates less often this sometimes allows for more efficient simulation and thus the consideration of larger systems.

Many variants of the basic algorithm have been considered.[3][4][5][6][7]

Algorithm

The algorithm is analogous to the Euler method for deterministic systems, but instead of making a fixed change

x(t+τ)=x(t)+τx(t)

the change is

x(t+τ)=x(t)+P(τx(t))

where P(τx(t)) is a Poisson distributed random variable with mean τx(t).

Given a state 𝐱(t)={Xi(t)} with events Ej occurring at rate Rj(𝐱(t)) and with state change vectors 𝐯ij (where i indexes the state variables, and j indexes the events), the method is as follows:

  1. Initialise the model with initial conditions 𝐱(t0)={Xi(t0)}.
  2. Calculate the event rates Rj(𝐱(t)).
  3. Choose a time step τ. This may be fixed, or by some algorithm dependent on the various event rates.
  4. For each event Ej generate KjPoisson(Rjτ), which is the number of times each event occurs during the time interval [t,t+τ).
  5. Update the state by
    𝐱(t+τ)=𝐱(t)+jKjvij
    where vij is the change on state variable Xi due to event Ej. At this point it may be necessary to check that no populations have reached unrealistic values (such as a population becoming negative due to the unbounded nature of the Poisson variable Kj).
  6. Repeat from Step 2 onwards until some desired condition is met (e.g. a particular state variable reaches 0, or time t1 is reached).

Algorithm for efficient step size selection

This algorithm is described by Cao et al.[4] The idea is to bound the relative change in each event rate Rj by a specified tolerance ϵ (Cao et al. recommend ϵ=0.03, although it may depend on model specifics). This is achieved by bounding the relative change in each state variable Xi by ϵ/gi, where gi depends on the rate that changes the most for a given change in Xi. Typically gi is equal the highest order event rate, but this may be more complex in different situations (especially epidemiological models with non-linear event rates).

This algorithm typically requires computing 2N auxiliary values (where N is the number of state variables Xi), and should only require reusing previously calculated values Rj(𝐱). An important factor in this is that since Xi is an integer value, there is a minimum value by which it can change, preventing the relative change in Rj being bounded by 0, which would result in τ also tending to 0.

  1. For each state variable Xi, calculate the auxiliary values
    μi(𝐱)=jvijRj(𝐱)
    σi2(𝐱)=jvij2Rj(𝐱)
  2. For each state variable Xi, determine the highest order event in which it is involved, and obtain gi
  3. Calculate time step τ as
    τ=mini{max{ϵXi/gi,1}|μi(𝐱)|,max{ϵXi/gi,1}2σi2(𝐱)}

This computed τ is then used in Step 3 of the τ leaping algorithm.

References

Template:Reflist