Error analysis of approximation methods for stochastically modeled

advertisement
Error analysis of approximation methods for stochastically
modeled chemical reaction systems
David F. Anderson∗
with Arnab Ganguly and Thomas Kurtz
∗
anderson@math.wisc.edu
Department of Mathematics
University of Wisconsin - Madison
SAMSI Program on Stochastic Dynamics
September 1st, 2009
Outline
1. Describe the model of interest: stochastically modeled population
processes.
2. Discuss possible numerical algorithms: exact and approximate.
3. Discuss error analysis and the importance of proper scalings.
Chemical reactions
• Standard notation for chemical reactions:
A+B →C
is interpreted as “a molecule of A combines with a molecule of B to give
a molecule of C.”
• Each instance of the reaction A + B → C changes the state of the
system by the vector:
2
3
−1
νk = 4 −1 5 .
1
The model and notation
• Have d chemical species {S1 , S2 , . . . , Sd } undergoing a series of
reactions, indexed by k .
• If reaction k occurs at time t, then the state of the system, X (t), is
updated via addition of the reaction vector νk ∈ Zd :
X (t) = X (t−) + νk .
• The waiting times for the reactions are exponentially distributed with
intensity (propensity) functions λk : Rd → R≥0 :
P( X (t + ∆t) = X (t) + νk | X (t) ) = λk (X (t))∆t + o(∆t).
The model
This model is a continuous time Markov chain in Zd≥0 with generator
X
(Af )(x) =
λk (x)(f (x + νk ) − f (x)).
k
Kolmogorov’s forward equation (“Chemical Master Equation”)
X
X
d
P(x, t) =
λk (x − νk )P(x − νk , t) −
λk (x)P(x, t).
dt
k
k
describes how the distribution of the process changes in time.
The model
This model is a continuous time Markov chain in Zd≥0 with generator
X
(Af )(x) =
λk (x)(f (x + νk ) − f (x)).
k
Kolmogorov’s forward equation (“Chemical Master Equation”)
X
X
d
P(x, t) =
λk (x − νk )P(x − νk , t) −
λk (x)P(x, t).
dt
k
k
describes how the distribution of the process changes in time.
One intuitive representation for path-wise solutions is given by a random
time-change
«
X „Z t
X (t) = X (0) +
Yk
λk (X (s))ds νk ,
k
0
where the Yk are independent, unit-rate Poisson processes.
Mass-action kinetics
The standard intensity function chosen is mass-action kinetics:
λk (x) = κk
d
Y
i=1
xi !
.
(xi − νkis )!
Example: If S1 → anything, then λk (x) = κk x1 .
Example: If S1 + S2 → anything, then λk (x) = κk x1 x2 .
Example: If S1 + 2S2 → anything, then λk (x) = κk x1 x2 (x2 − 1).
Mass-action kinetics
The standard intensity function chosen is mass-action kinetics:
λk (x) = κk
d
Y
i=1
xi !
.
(xi − νkis )!
Example: If S1 → anything, then λk (x) = κk x1 .
Example: If S1 + S2 → anything, then λk (x) = κk x1 x2 .
Example: If S1 + 2S2 → anything, then λk (x) = κk x1 x2 (x2 − 1).
• Recall pure birth process (X → 2X ) described in Mark Alber’s tutorial
lecture.
• This type of model is used ubiquitously for cellular biochemical
processes and is filling the pages of Science and PNAS.
• Typically referred to as a “chemical master equation” (Kolmogorov’s
forward equation) model in this literature.
• Models can be simple (single Gene-mRNA-Protein) or extremely
complicated (E. coli heat shock response)
Methods of investigation: numerical simulation
X (t) = X (0) +
X
k
t
„Z
Yk
«
λk (X (s))ds νk ,
0
(GOOD NEWS) There are a number of numerical methods that produce
statistically exact sample paths:
1. Gillespie’s algorithm.
2. The first reaction method.
3. The next reaction method.
For each step of these methods one must find :
(i) the amount of time that passes until the next reaction takes place: ∆n .
(the minimum of exponential RVs)
(ii) which reaction takes place at that time.
Methods of investigation: numerical simulation
X (t) = X (0) +
X
t
„Z
Yk
«
λk (X (s))ds νk ,
0
k
(GOOD NEWS) There are a number of numerical methods that produce
statistically exact sample paths:
1. Gillespie’s algorithm.
2. The first reaction method.
3. The next reaction method.
For each step of these methods one must find :
(i) the amount of time that passes until the next reaction takes place: ∆n .
(the minimum of exponential RVs)
(ii) which reaction takes place at that time.
(BAD NEWS) If
P
k
λk (X (t)) 0, then
1
1
λ
k k (X (t))
∆n ≈ P
and the time needed to produce a single exact sample path over an interval
[0, T ] can be prohibitive.
Tau-leaping
Standard “τ -leaping” 1 was developed by Dan Gillespie in an effort to
overcome the problem that ∆n may be prohibitively small.
Z t
Tau-leaping is essentially an Euler approximation of
λk (X (s))ds:
0
Z (h) = Z (0) +
X
≈ Z (0) +
X
d
X
„Z
Yk
h
«
λk (Z (s)) ds νk
0
k
„
«
Yk λk (Z (0)) h νk
k
= Z (0) +
„
«
Poisson λk (Z (0)) h νk .
k
1
D. T. Gillespie, J. Chem. Phys., 115, 1716 – 1733.
Tau-leaping
One “intuitive” representation for Z (t) generated by τ -leaping is
Z (t) = X (0) +
X
t
„Z
«
λk (Z ◦ η(s))ds νk ,
Yk
0
k
where
η(s) = tn ,
if
tn ≤ s < tn+1
is a step function giving left endpoints of time discretization.
Another algorithm: A midpoint method
For a time discretization 0 = t0 < t1 < · · · < tN = T , with h = tn − tn−1 , let
ρ(z) = z +
1 X
h
λk (z)νk ,
2
k
be a “deterministic” midpoint approximation
and let Z(t) solve:
Z(t) = X (0) +
X
„Z
Yk
k
where η(s) = tn , if tn ≤ s < tn+1 .
0
t
«
λk ◦ ρ(Z ◦ η(s))ds νk ,
Previous error analysis
Under the scaling h → 0:
1. Rathinam, Petzold, Cao, and Gillespie2 showed, among other things
(implicit methods, etc.), that tau-leaping is first order accurate in a weak
sense if the intensity functions λk are linear.
2. Li3 extended this result by showing that standard tau-leaping has a
strong error (in the L2 norm) of order 1/2 and a weak error of order one:
q
sup E |Z (tn ) − X (tn )|2 ≤ Ch1/2
n≤N
|Ef (Z (T )) − Ef (X (T ))| ≤ Ch,
where 0 = t0 < t1 < · · · < tN = T is a partition of [0, T ].
3. The midpoint method is no more accurate than standard tau-leaping
2
3
M. Rathinam et al., SIAM Multi. Model. Simul., 4, 2005, 867 – 895.
T. Li, SIAM Multi. Model. Simul., 6, 2007, 417 – 436.
An example that needs explaining: part I
Consider the simple example
1
X → 0,
X (0) = 106 .
Letting h = 1/102 and simulating 100,000 sample paths with each method
yields the following approximate distributions
Problem with the h → 0 scaling
Recall, tau-leaping methods are only useful if h ∆n , for otherwise an exact
method would be performed. Therefore, we should require that
1
≈ ∆n
k λk (X (t))
h P
or
h
X
λk (X (t)) 1.
k
So h → 0 does not seem to be an appropriate scaling to describe the
accuracy of these methods.
The “classical scaling”
Summary: τ -leaping is only useful if
h
X
λk (X (t)) 1
while
1
1.
λ
(X (t))
k
k
P
k
We will make the following natural assumptions on our model:
(i) Xi (0) = O(V ) for some V 1 (think of as the “volume”).
(ii) The rate constants of reactions of the form
S1 → ∗,
S1 + S2 → ∗,
S1 + S2 + S3 → ∗,
scale with V like:
„
κk = O(1),
1
κk = O
V
«
,
„
«
1
κk = O
.
V2
A key property of this scaling
For each k and x ∈ Rd
λk (Vx) = VAVk (x) = O(V ).
Example:
• For the reaction S1 + S2 → ∗,
λk (Vx) =
dk
(Vx1 )(Vx2 ) = V (dk x1 x2 ).
V
Time-step
Recall: τ -leaping is only useful if
h
X
λk (X (t)) 1
while
k
1
1.
λ
(X (t))
k
k
P
For β ∈ (0, 1), we let
h = 1/V β .
This scaling satisfies the above requirements:
X
h
λ(X (t)) = V −β O(V ) = O(V 1−β ) 1.
k
Error analysis on scaled processes
We consider the scaled processes
def
X V (t) =
X (t)
,
V
def
Z V (t) =
Z (t)
,
V
def
Z V (t) =
Z(t)
.
V
which satisfy
«
„ Z t
1 X
AVk (X V (s))ds νk
Yk V
V
0
k
„
«
Z
t
1 X
Z V (t) = X V (0) +
Yk V
AVk (Z V ◦ η(s))ds νk
V
0
k
„ Z t
«
X
1
Yk V
AVk ◦ ρV (Z V ◦ η(s))ds νk ,
Z V (t) = X V (0) +
V
0
X V (t) = X V (0) +
k
where
def
ρV (z) = z +
1 X V
h
Ak (z)νk ,
2
k
and prove theorems in this setting.
Strong error of standard tau-leaping
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) denote the scaled processes for t ∈ [0, T ] with h = V −β .
There exists a constant C = C(T ) > 0 such that
sup E|X V (t) − Z V (t)| ≤
t≤T
C
= Ch.
Vβ
A new coupling of X V (t) and Z V (t)
To sharpen the result, let
"
«
„ Z t
1 X
V
V
V
Yk ,1 V
X (t) = X (0) +
AV
k (X (s)) ∧ Ak (Z ◦ η(s)) ds
V
0
k
«–
„ Z t
V
V
V
V
V
νk
+ Yk,2 V
AV
k (X (s)) − Ak (X (s)) ∧ Ak (Z ◦ η(s)) ds
V
V
0
"
«
„ Z t
1 X
V
V
V
Yk ,1 V
(Z
◦
η(s))
ds
(X
(s))
∧
A
AV
k
k
V
0
k
„ Z t
«#
V
V
V
V
V
V
+ Yk,3 V
Ak (Z ◦ η(s)) − Ak (X (s)) ∧ Ak (Z ◦ η(s)) ds
νk ,
Z V (t) = X V (0) +
0
where the Yk ,i are mutually independent Poisson processes.
Note: distribution of the “marginal processes” X V (t) and Z V (t) are
unchanged.
Exact asymptotics for standard tau-leaping
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) satisfy the new coupling for t ∈ [0, T ]. Then as V → ∞
V β (X V − Z V ) → E,
where E(t) is deterministic and satisfies
Z t
Z
1 t
DF (x(s))E(s)ds +
E(t) =
DF (x(s))F (x(s))ds, E(0) = 0,
2 0
0
and where f V → f means either
lim P{sup |f V (t) − f (t)| > } = 0,
V →∞
t≤T
˛
˛
˛
˛
lim E sup ˛f V (t) − f (t)˛ = 0.
V →∞
t≤T
for all > 0
Idea of proof
Can show:
V
V
Z
V
t
X (t) − Z (t) ≈ M (t) +
DF V (Z V ◦ η(s))(X V (s) − Z V (s))ds
0
+V
−β
1
2
t
Z
DF (Z V ◦ η(s))F V (Z ◦ η(s))ds
0
where M V (t) is a martingale and V (1+β)/2 M V ⇒ M, where M is a mean-zero
Gaussian process.
• (1 + β)/2 > β, so done.
Weak error of standard tau-leaping
The following is now immediate.
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) be as before. Then, for any continuous differentiable
function f
“
”
lim V β Ef (X V (t)) − Ef (Z V (t)) = E(t) · ∇f (x(t)).
V →∞
Strong error of midpoint tau-leaping
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) denote the scaled processes for t ∈ [0, T ]. Then there
exists a constant C = C(T ) > 0 such that

ff
C
1+β
V
V
sup E|X (t) − Z (t)| ≤ κ(β) , where κ(β) = min 2β,
.
2
V
t≤T
A new coupling of X V (t) and Z V (t)
To sharpen the result, let
"
„ Z t
«
1 X
V
V V
V
Yk ,1 V
AV
k (X (s)) ∧ Ak (ρ ◦ Z ◦ η(s)) ds
V
0
k
«–
„ Z t
V
V
V V
V
V
(ρ
◦
Z
◦
η(s))
ds
νk
(X
(s))
∧
A
(X
(s))
−
A
+ Yk,2 V
AV
k
k
k
X V (t) = X V (0) +
0
"
„ Z t
«
1 X
V
V V
V
Z (t) = X (0) +
AV
Yk ,1 V
k (X (s)) ∧ Ak (ρ ◦ Z ◦ η(s)) ds
V
0
k
„ Z t
«#
V
V
V
V
V
V
+ Yk,3 V
AV
(ρ
◦
Z
◦
η(s))
−
A
(X
(s))
∧
A
(Z
◦
η(s))
ds
νk ,
k
k
k
V
V
0
where the Yk ,i are mutually independent Poisson processes.
Exact asymptotics for midpoint tau-leaping
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) satisfy the new coupling for t ∈ [0, T ]. Then as V → ∞
V 2β (X V − Z V ) → E1 ,
V
V
2β
(1+β)/2
if
β < 1/3.
V
V
if
β = 1/3.
V
V
if
β > 1/3.
(X − Z ) ⇒ E2 ,
(X − Z ) ⇒ E3 ,
Where E1 solves
t
Z
DF (x(s))E1 (s)ds + H(t),
E1 (t) =
0
E2 solves
t
Z
E2 (t) = M(t) +
DF (x(s))E2 (s)ds + H(t),
0
E3 solves
t
Z
E3 (t) = M(t) +
DF (x(s))E3 (s)ds.
0
Idea of proof
Can show:
X V (t) − Z V (t) ≈ M V (t) +
t
Z
DF V (Z V ◦ η(s))(X V (s) − Z V (s))ds + V −2β H(t)
0
where V (1+β)/2 M V ⇒ M(t).
For those who must know:
H(t) =
1
6
Z
0
t
DF (x(s))2 F (x(s))ds +
1
24
t
Z
0
F (x(s))T HF (x(s))F (x(s))ds.
Weak error of midpoint tau-leaping
Theorem (Anderson, Ganguly, Kurtz – 2009)
Let X V (t) and Z V (t) be as before. Then, for any C 3 function f , there exists a
constant C = C(f , T ) > 0 such that
˛
˛
˛
˛
V 2β sup ˛Ef (X V (t)) − Ef (Z V (t))˛ ≤ C.
t≤T
An example that needs explaining: part II
Consider the simple example
1
X → 0,
X (0) = 106 .
V = 106 . Letting h = 1/102 = 1/V 1/3 (so β = 1/3) and simulating 100,000
sample paths with each method yields the following approximate distributions
Take home messages
1. Scaling to get instructive error estimates is a tricky business and must be
handled with care.
2. Can be informative in that it tells you what algorithms do (and which
should be used).
Download