SlideShare a Scribd company logo
1 of 30
Download to read offline
An introduction to moment closure techniques

                    Colin Gillespie

            School of Mathematics & Statistics
                  Newcastle University


                     July 30, 2008




               Colin Gillespie   An introduction to moment closure techniques
Modelling


      Let’s start with a simple birth-death model.
  Birth-death model
                X −→ X − 1 and X −→ X + 1
  which has the propensity functions µX and λX .

      The deterministic model is
                          dX (t)
                                 = (λ − µ)X (t) ,
                           dt
      which can be solved to give X (t) = X (0) exp[(λ − µ)t].




                       Colin Gillespie   An introduction to moment closure techniques
Deterministic Solution: λ < µ


                 50



                 40
    Population




                 30



                 20



                 10



                 0

                      0    1                 2                 3                  4

                                            Time




                          Colin Gillespie    An introduction to moment closure techniques
Stochastic Simulation




     It’s very easy to simulate the birth-death process using
     Gillespie’s method:
       1   Update reaction clock;
       2   Choose a reaction to occur;
       3   Repeat.




                        Colin Gillespie   An introduction to moment closure techniques
Four Stochastic Simulations
                                   4 Simulations of a birth-death process
                                                           0     1        2         3   4

                                   Simulation 3                      Simulation 4
                                                                                            50


                                                                                            40


                                                                                            30


                                                                                            20


                                                                                            10
         Population




                                                                                            0
                                   Simulation 1                      Simulation 2
                      50


                      40


                      30


                      20


                      10


                      0

                           0   1        2         3    4

                                                       Time


                                     Colin Gillespie       An introduction to moment closure techniques
Stochastic Mean and Variance




     If we simulated the process a large number of times (say
     109 ), then we could calculate the population mean and
     variance.
     We could construct an approximate 95% tolerance interval
                                 √
                       Mean ± 2 Variance




                     Colin Gillespie   An introduction to moment closure techniques
Four Stochastic Simulations
Mean (Green), tolerance interval (red), simulation
(blue)
                                                           0     1        2         3   4

                                   Simulation 3                      Simulation 4
                                                                                            50


                                                                                            40


                                                                                            30


                                                                                            20


                                                                                            10
         Population




                                                                                            0
                                   Simulation 1                      Simulation 2
                      50


                      40


                      30


                      20


                      10


                      0

                           0   1       2        3      4
                                     Colin Gillespie       An introduction to moment closure techniques
Mean and Variance




     In this talk we will look at a quick method for estimating the
     mean and variance, without using stochastic simulation




                      Colin Gillespie   An introduction to moment closure techniques
Moment generating function

     Let pn (t) be the probability that the population is of size n
     at time t.
     The moment generating function is defined as
                                         ∞
                         M(θ; t) ≡             pn (t)enθ .
                                         n=0

     If we differentiate M(θ; t) w.r.t θ and set θ = 0, we get
     E[N(t)], i.e. the mean.
     If we differentiate M(θ; t) w.r.t θ twice, and set θ = 0, we
     get E[N(t)2 ] and hence

                   Var[N(t)] = E[N(t)2 ] − E[N(t)]2 .



                       Colin Gillespie    An introduction to moment closure techniques
General idea




     The birth-death process has the following CME:

         dpn
             = λ(n − 1)pn−1 + µ(n + 1)pn+1 − (λ + µ)npn
          dt
     After multiplying the CME by enθ and summing over n, we
     obtain
                  ∂M                              ∂M
                       = [λ(eθ − 1) + µ(e−θ − 1)]
                   ∂t                             ∂θ




                     Colin Gillespie   An introduction to moment closure techniques
Moment Equations

     If we differentiate this p.d.e. w.r.t θ and set θ = 0, we get:

                      dE[N(t)]
                               = (λ − µ)E[N(t)]
                        dt
     where E[N(t)] is the mean. This is a single ODE that we
     can solve to obtain a value for the mean.
     If we differentiate the p.d.e. w.r.t θ twice and set θ = 0, we
     get:

           dE[N(t)2 ]
                      = (λ − µ)E[N(t)] + 2(λ − µ)E[N(t)2 ]
              dt
     and hence the variance Var[N(t)] = E[N(t)2 ] − E[N(t)]2
     So instead of simulating the process 109 to estimate the
     mean and variance, we can simply solve two ODEs.

                       Colin Gillespie   An introduction to moment closure techniques
Moment Equations

     If we differentiate this p.d.e. w.r.t θ and set θ = 0, we get:

                      dE[N(t)]
                               = (λ − µ)E[N(t)]
                        dt
     where E[N(t)] is the mean. This is a single ODE that we
     can solve to obtain a value for the mean.
     If we differentiate the p.d.e. w.r.t θ twice and set θ = 0, we
     get:

           dE[N(t)2 ]
                      = (λ − µ)E[N(t)] + 2(λ − µ)E[N(t)2 ]
              dt
     and hence the variance Var[N(t)] = E[N(t)2 ] − E[N(t)]2
     So instead of simulating the process 109 to estimate the
     mean and variance, we can simply solve two ODEs.

                       Colin Gillespie   An introduction to moment closure techniques
Part I

      Examples




Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model
      The dimerisation model has the following biochemical
      reactions:
  Dimerisation
                  2X1 −→ X2           and X2 −→ 2X1

      We can formulate the dimer model in terms of moment
      equations, namely,
       dE[X1 ]              2
               = 0.5k1 (E[X1 ] − E[X1 ]) − k2 E[X1 ]
         dt
            2
       dE[X1 ]           2                              2
               = k1 (E[X1 X2 ] − E[X1 X2 ]) + 0.5k1 (E[X1 ] − E[X1 ])
         dt
                                        2
                   + k2 (E[X1 ] − 2E[X1 ])

      where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the
                                            2

      variance of X1 .
                        Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model
      The dimerisation model has the following biochemical
      reactions:
  Dimerisation
                  2X1 −→ X2           and X2 −→ 2X1

      We can formulate the dimer model in terms of moment
      equations, namely,
       dE[X1 ]              2
               = 0.5k1 (E[X1 ] − E[X1 ]) − k2 E[X1 ]
         dt
            2
       dE[X1 ]           2                              2
               = k1 (E[X1 X2 ] − E[X1 X2 ]) + 0.5k1 (E[X1 ] − E[X1 ])
         dt
                                        2
                   + k2 (E[X1 ] − 2E[X1 ])
      where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the
                                            2

      variance of X1 .
      The i th moment equation depends on the (i + 1)th
      equation.
                        Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model
      The dimerisation model has the following biochemical
      reactions:
  Dimerisation
                   2X1 −→ X2          and X2 −→ 2X1

      We can formulate the dimer model in terms of moment
      equations, namely,
       dE[X1 ]
               = 0.5k1 E[X1 ](E[X1 ] − 1) + 0.5k1 Var[X1 ] − k2 E[X1 ]
         dt



                                             2
      where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the
      variance of X1 .
      The deterministic equation is an approximation to the
      stochastic mean.
                        Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model

     To close the equations, we usually assume that the
     underlying distribution is Normal or Lognormal.
     The easiest option is to assume an underlying Normal
     distribution, i.e.

                  E[X1 ] = 3E[X1 ]E[X1 ] − 2E[X1 ]3
                     3         2




     But we could also use, the Poisson

                 E[X1 ] = E[X1 ] + 3E[X1 ]2 + E[X1 ]3
                    3


     or the Lognormal

                                            2        3
                             3           E[X1 ]
                          E[X1 ] =
                                         E[X1 ]

                     Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model

     To close the equations, we usually assume that the
     underlying distribution is Normal or Lognormal.
     The easiest option is to assume an underlying Normal
     distribution, i.e.

                  E[X1 ] = 3E[X1 ]E[X1 ] − 2E[X1 ]3
                     3         2




     But we could also use, the Poisson

                 E[X1 ] = E[X1 ] + 3E[X1 ]2 + E[X1 ]3
                    3


     or the Lognormal

                                            2        3
                             3           E[X1 ]
                          E[X1 ] =
                                         E[X1 ]

                     Colin Gillespie   An introduction to moment closure techniques
Simple Dimerisation model


                         300
    Protein Population




                         250



                         200



                         150




                               0   5             10          15            20            25

                                                      Time



                                   Colin Gillespie    An introduction to moment closure techniques
Heat Shock Model



     Proctor et al, 2005 - 23 reactions, 17 chemical species
     A single stochastic simulation up to t = 2000 takes about
     35 minutes.
     If we convert the model to moment equations, we get 139
     equations.
         A python script automatically generates the ODEs from an
         SBML file
     These can be solved in less than 5 minutes using Maple
         Hopefully I’ll start outputting in sundials, so this should be
         even quicker




                       Colin Gillespie   An introduction to moment closure techniques
Heat Shock Model



        1200
                                                                                 600




                                                     Native Protein (10,000’s)
        1000
                                                                                 590
        800
  ADP




        600                                                                      580


        400                                                                      570

        200
                                                                                 560


               0   500   1000    1500    2000                                          0   500   1000   1500   2000

                         Time                                                                    Time



                                Colin Gillespie   An introduction to moment closure techniques
Univariate Distributions


                                                           600      800       1000      1200      1400

                            Time t=200                                 Time t=2000


            0.006
  Density




            0.004



            0.002



            0.000

                    600   800    1000       1200    1400

                                                     ADP



                                Colin Gillespie    An introduction to moment closure techniques
Bivariate Distributions at time t = 2000

         7e+06
         6e+06
  NatP

         5e+06
         4e+06




                 800               900            1000              1100                1200

                                             ADP

                       Colin Gillespie   An introduction to moment closure techniques
P53-Mdm2 Oscillations model




     Proctor and Grey, 2008 - 16 chemical species and about a
     dozen reactions.
     The model contains two events.
     If we convert the model to moment equations, we get 139
     equations.
     However, in this case the moment closure approximation
     doesn’t do to well!




                     Colin Gillespie   An introduction to moment closure techniques
P53-Mdm2 Oscillations model




     Proctor and Grey, 2008 - 16 chemical species and about a
     dozen reactions.
     The model contains two events.
     If we convert the model to moment equations, we get 139
     equations.
     However, in this case the moment closure approximation
     doesn’t do to well!




                     Colin Gillespie   An introduction to moment closure techniques
P53 Mean
MC(black), True (red)

                          300




                          250




                          200
         P53 Population




                          150




                          100




                          50




                           0

                                0    5        10       15      20       25       30

                                                      Time

                                    Colin Gillespie    An introduction to moment closure techniques
P53 Mean
MC(black), True (red), Deterministic(green)

                           300




                           250




                           200
          P53 Population




                           150




                           100




                           50




                            0

                                 0    5        10       15      20       25       30

                                                       Time

                                     Colin Gillespie    An introduction to moment closure techniques
What went wrong?



     The Moment closure (tends) to fail when there is a large
     difference between the deterministic and stochastic
     formulations.
     I believe it failed because of strongly correlated species
     Typically when the MC approximation fails, it gives a
     negative variance
     The MC approximation does work well for other parameter
     values for the p53 model.




                      Colin Gillespie   An introduction to moment closure techniques
Software



     Python script that takes in a SBML file and outputs the
     moment equations.
     Currently outputs as a Maple file (University has a site
     licence)
     Hopefully it will soon output as a sundials/GSL C file
     (Sort of) supports events.
     Currently only handles polynomial rate laws, but could be
     upgrade to handle more complicated rate laws.




                      Colin Gillespie   An introduction to moment closure techniques
References




     For an introduction to Moment closure see papers by Matis
     et al over the last 20 years.
     Gillespie, C.S. Moment closure approximations for
     mass-action models. IET Systems Biology, in press




                     Colin Gillespie   An introduction to moment closure techniques

More Related Content

What's hot

Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical MethodsChristian Robert
 
Unbiased Hamiltonian Monte Carlo
Unbiased Hamiltonian Monte CarloUnbiased Hamiltonian Monte Carlo
Unbiased Hamiltonian Monte CarloJeremyHeng10
 
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithms
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithmsRao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithms
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithmsChristian Robert
 
Introduction to MCMC methods
Introduction to MCMC methodsIntroduction to MCMC methods
Introduction to MCMC methodsChristian Robert
 
Bachelor_Defense
Bachelor_DefenseBachelor_Defense
Bachelor_DefenseTeja Turk
 
Slides université Laval, Actuariat, Avril 2011
Slides université Laval, Actuariat, Avril 2011Slides université Laval, Actuariat, Avril 2011
Slides université Laval, Actuariat, Avril 2011Arthur Charpentier
 
MCMC and likelihood-free methods
MCMC and likelihood-free methodsMCMC and likelihood-free methods
MCMC and likelihood-free methodsChristian Robert
 
Speeding up the Gillespie algorithm
Speeding up the Gillespie algorithmSpeeding up the Gillespie algorithm
Speeding up the Gillespie algorithmColin Gillespie
 
Estimation of the score vector and observed information matrix in intractable...
Estimation of the score vector and observed information matrix in intractable...Estimation of the score vector and observed information matrix in intractable...
Estimation of the score vector and observed information matrix in intractable...Pierre Jacob
 
short course at CIRM, Bayesian Masterclass, October 2018
short course at CIRM, Bayesian Masterclass, October 2018short course at CIRM, Bayesian Masterclass, October 2018
short course at CIRM, Bayesian Masterclass, October 2018Christian Robert
 
Mark Girolami's Read Paper 2010
Mark Girolami's Read Paper 2010Mark Girolami's Read Paper 2010
Mark Girolami's Read Paper 2010Christian Robert
 
Poster for Bayesian Statistics in the Big Data Era conference
Poster for Bayesian Statistics in the Big Data Era conferencePoster for Bayesian Statistics in the Big Data Era conference
Poster for Bayesian Statistics in the Big Data Era conferenceChristian Robert
 

What's hot (20)

Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical Methods
 
Slides irisa
Slides irisaSlides irisa
Slides irisa
 
Slides euria-1
Slides euria-1Slides euria-1
Slides euria-1
 
Slides edf-1
Slides edf-1Slides edf-1
Slides edf-1
 
Unbiased Hamiltonian Monte Carlo
Unbiased Hamiltonian Monte CarloUnbiased Hamiltonian Monte Carlo
Unbiased Hamiltonian Monte Carlo
 
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithms
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithmsRao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithms
Rao-Blackwellisation schemes for accelerating Metropolis-Hastings algorithms
 
Slides rmetrics-1
Slides rmetrics-1Slides rmetrics-1
Slides rmetrics-1
 
Richard Everitt's slides
Richard Everitt's slidesRichard Everitt's slides
Richard Everitt's slides
 
Introduction to MCMC methods
Introduction to MCMC methodsIntroduction to MCMC methods
Introduction to MCMC methods
 
Bachelor_Defense
Bachelor_DefenseBachelor_Defense
Bachelor_Defense
 
Slides université Laval, Actuariat, Avril 2011
Slides université Laval, Actuariat, Avril 2011Slides université Laval, Actuariat, Avril 2011
Slides université Laval, Actuariat, Avril 2011
 
Slides angers-sfds
Slides angers-sfdsSlides angers-sfds
Slides angers-sfds
 
Slides ihp
Slides ihpSlides ihp
Slides ihp
 
MCMC and likelihood-free methods
MCMC and likelihood-free methodsMCMC and likelihood-free methods
MCMC and likelihood-free methods
 
Speeding up the Gillespie algorithm
Speeding up the Gillespie algorithmSpeeding up the Gillespie algorithm
Speeding up the Gillespie algorithm
 
Estimation of the score vector and observed information matrix in intractable...
Estimation of the score vector and observed information matrix in intractable...Estimation of the score vector and observed information matrix in intractable...
Estimation of the score vector and observed information matrix in intractable...
 
short course at CIRM, Bayesian Masterclass, October 2018
short course at CIRM, Bayesian Masterclass, October 2018short course at CIRM, Bayesian Masterclass, October 2018
short course at CIRM, Bayesian Masterclass, October 2018
 
Mark Girolami's Read Paper 2010
Mark Girolami's Read Paper 2010Mark Girolami's Read Paper 2010
Mark Girolami's Read Paper 2010
 
Slides euria-2
Slides euria-2Slides euria-2
Slides euria-2
 
Poster for Bayesian Statistics in the Big Data Era conference
Poster for Bayesian Statistics in the Big Data Era conferencePoster for Bayesian Statistics in the Big Data Era conference
Poster for Bayesian Statistics in the Big Data Era conference
 

Similar to An introduction to moment closure techniques

Wavelet transform and its applications in data analysis and signal and image ...
Wavelet transform and its applications in data analysis and signal and image ...Wavelet transform and its applications in data analysis and signal and image ...
Wavelet transform and its applications in data analysis and signal and image ...Sourjya Dutta
 
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions ManualApplied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manualtowojixi
 
Paris2012 session1
Paris2012 session1Paris2012 session1
Paris2012 session1Cdiscount
 
Class 30: Sex, Religion, and Politics
Class 30: Sex, Religion, and PoliticsClass 30: Sex, Religion, and Politics
Class 30: Sex, Religion, and PoliticsDavid Evans
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)asghar123456
 
Introduction to Bootstrap and elements of Markov Chains
Introduction to Bootstrap and elements of Markov ChainsIntroduction to Bootstrap and elements of Markov Chains
Introduction to Bootstrap and elements of Markov ChainsUniversity of Salerno
 
My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...Umberto Picchini
 
signal homework
signal homeworksignal homework
signal homeworksokok22867
 
From the Front LinesOur robotic equipment and its maintenanc.docx
From the Front LinesOur robotic equipment and its maintenanc.docxFrom the Front LinesOur robotic equipment and its maintenanc.docx
From the Front LinesOur robotic equipment and its maintenanc.docxhanneloremccaffery
 
Workshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisWorkshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisTim Reis
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmmnozomuhamada
 
Intro to Approximate Bayesian Computation (ABC)
Intro to Approximate Bayesian Computation (ABC)Intro to Approximate Bayesian Computation (ABC)
Intro to Approximate Bayesian Computation (ABC)Umberto Picchini
 

Similar to An introduction to moment closure techniques (20)

Talk 5
Talk 5Talk 5
Talk 5
 
Wavelet transform and its applications in data analysis and signal and image ...
Wavelet transform and its applications in data analysis and signal and image ...Wavelet transform and its applications in data analysis and signal and image ...
Wavelet transform and its applications in data analysis and signal and image ...
 
3_MLE_printable.pdf
3_MLE_printable.pdf3_MLE_printable.pdf
3_MLE_printable.pdf
 
Montecarlophd
MontecarlophdMontecarlophd
Montecarlophd
 
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions ManualApplied Digital Signal Processing 1st Edition Manolakis Solutions Manual
Applied Digital Signal Processing 1st Edition Manolakis Solutions Manual
 
Paris2012 session1
Paris2012 session1Paris2012 session1
Paris2012 session1
 
Class 30: Sex, Religion, and Politics
Class 30: Sex, Religion, and PoliticsClass 30: Sex, Religion, and Politics
Class 30: Sex, Religion, and Politics
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Introduction to Bootstrap and elements of Markov Chains
Introduction to Bootstrap and elements of Markov ChainsIntroduction to Bootstrap and elements of Markov Chains
Introduction to Bootstrap and elements of Markov Chains
 
Matlab II
Matlab IIMatlab II
Matlab II
 
My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...
 
signal homework
signal homeworksignal homework
signal homework
 
From the Front LinesOur robotic equipment and its maintenanc.docx
From the Front LinesOur robotic equipment and its maintenanc.docxFrom the Front LinesOur robotic equipment and its maintenanc.docx
From the Front LinesOur robotic equipment and its maintenanc.docx
 
Future CMB Experiments
Future CMB ExperimentsFuture CMB Experiments
Future CMB Experiments
 
Workshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisWorkshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reis
 
2012 mdsp pr06  hmm
2012 mdsp pr06  hmm2012 mdsp pr06  hmm
2012 mdsp pr06  hmm
 
What is the point of Boson sampling?
What is the point of Boson sampling?What is the point of Boson sampling?
What is the point of Boson sampling?
 
assignment_2
assignment_2assignment_2
assignment_2
 
intro
introintro
intro
 
Intro to Approximate Bayesian Computation (ABC)
Intro to Approximate Bayesian Computation (ABC)Intro to Approximate Bayesian Computation (ABC)
Intro to Approximate Bayesian Computation (ABC)
 

More from Colin Gillespie

The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsColin Gillespie
 
Poster for Information, probability and inference in systems biology (IPISB 2...
Poster for Information, probability and inference in systems biology (IPISB 2...Poster for Information, probability and inference in systems biology (IPISB 2...
Poster for Information, probability and inference in systems biology (IPISB 2...Colin Gillespie
 
Reference classes: a case study with the poweRlaw package
Reference classes: a case study with the poweRlaw packageReference classes: a case study with the poweRlaw package
Reference classes: a case study with the poweRlaw packageColin Gillespie
 
Introduction to power laws
Introduction to power lawsIntroduction to power laws
Introduction to power lawsColin Gillespie
 
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsMoment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsColin Gillespie
 
Moment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsMoment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsColin Gillespie
 
Bayesian inference for stochastic population models with application to aphids
Bayesian inference for stochastic population models with application to aphidsBayesian inference for stochastic population models with application to aphids
Bayesian inference for stochastic population models with application to aphidsColin Gillespie
 

More from Colin Gillespie (8)

The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic models
 
Poster for Information, probability and inference in systems biology (IPISB 2...
Poster for Information, probability and inference in systems biology (IPISB 2...Poster for Information, probability and inference in systems biology (IPISB 2...
Poster for Information, probability and inference in systems biology (IPISB 2...
 
Reference classes: a case study with the poweRlaw package
Reference classes: a case study with the poweRlaw packageReference classes: a case study with the poweRlaw package
Reference classes: a case study with the poweRlaw package
 
Introduction to power laws
Introduction to power lawsIntroduction to power laws
Introduction to power laws
 
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic ModelsMoment Closure Based Parameter Inference of Stochastic Kinetic Models
Moment Closure Based Parameter Inference of Stochastic Kinetic Models
 
Moment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic modelsMoment closure inference for stochastic kinetic models
Moment closure inference for stochastic kinetic models
 
WCSB 2012
WCSB 2012 WCSB 2012
WCSB 2012
 
Bayesian inference for stochastic population models with application to aphids
Bayesian inference for stochastic population models with application to aphidsBayesian inference for stochastic population models with application to aphids
Bayesian inference for stochastic population models with application to aphids
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

An introduction to moment closure techniques

  • 1. An introduction to moment closure techniques Colin Gillespie School of Mathematics & Statistics Newcastle University July 30, 2008 Colin Gillespie An introduction to moment closure techniques
  • 2. Modelling Let’s start with a simple birth-death model. Birth-death model X −→ X − 1 and X −→ X + 1 which has the propensity functions µX and λX . The deterministic model is dX (t) = (λ − µ)X (t) , dt which can be solved to give X (t) = X (0) exp[(λ − µ)t]. Colin Gillespie An introduction to moment closure techniques
  • 3. Deterministic Solution: λ < µ 50 40 Population 30 20 10 0 0 1 2 3 4 Time Colin Gillespie An introduction to moment closure techniques
  • 4. Stochastic Simulation It’s very easy to simulate the birth-death process using Gillespie’s method: 1 Update reaction clock; 2 Choose a reaction to occur; 3 Repeat. Colin Gillespie An introduction to moment closure techniques
  • 5. Four Stochastic Simulations 4 Simulations of a birth-death process 0 1 2 3 4 Simulation 3 Simulation 4 50 40 30 20 10 Population 0 Simulation 1 Simulation 2 50 40 30 20 10 0 0 1 2 3 4 Time Colin Gillespie An introduction to moment closure techniques
  • 6. Stochastic Mean and Variance If we simulated the process a large number of times (say 109 ), then we could calculate the population mean and variance. We could construct an approximate 95% tolerance interval √ Mean ± 2 Variance Colin Gillespie An introduction to moment closure techniques
  • 7. Four Stochastic Simulations Mean (Green), tolerance interval (red), simulation (blue) 0 1 2 3 4 Simulation 3 Simulation 4 50 40 30 20 10 Population 0 Simulation 1 Simulation 2 50 40 30 20 10 0 0 1 2 3 4 Colin Gillespie An introduction to moment closure techniques
  • 8. Mean and Variance In this talk we will look at a quick method for estimating the mean and variance, without using stochastic simulation Colin Gillespie An introduction to moment closure techniques
  • 9. Moment generating function Let pn (t) be the probability that the population is of size n at time t. The moment generating function is defined as ∞ M(θ; t) ≡ pn (t)enθ . n=0 If we differentiate M(θ; t) w.r.t θ and set θ = 0, we get E[N(t)], i.e. the mean. If we differentiate M(θ; t) w.r.t θ twice, and set θ = 0, we get E[N(t)2 ] and hence Var[N(t)] = E[N(t)2 ] − E[N(t)]2 . Colin Gillespie An introduction to moment closure techniques
  • 10. General idea The birth-death process has the following CME: dpn = λ(n − 1)pn−1 + µ(n + 1)pn+1 − (λ + µ)npn dt After multiplying the CME by enθ and summing over n, we obtain ∂M ∂M = [λ(eθ − 1) + µ(e−θ − 1)] ∂t ∂θ Colin Gillespie An introduction to moment closure techniques
  • 11. Moment Equations If we differentiate this p.d.e. w.r.t θ and set θ = 0, we get: dE[N(t)] = (λ − µ)E[N(t)] dt where E[N(t)] is the mean. This is a single ODE that we can solve to obtain a value for the mean. If we differentiate the p.d.e. w.r.t θ twice and set θ = 0, we get: dE[N(t)2 ] = (λ − µ)E[N(t)] + 2(λ − µ)E[N(t)2 ] dt and hence the variance Var[N(t)] = E[N(t)2 ] − E[N(t)]2 So instead of simulating the process 109 to estimate the mean and variance, we can simply solve two ODEs. Colin Gillespie An introduction to moment closure techniques
  • 12. Moment Equations If we differentiate this p.d.e. w.r.t θ and set θ = 0, we get: dE[N(t)] = (λ − µ)E[N(t)] dt where E[N(t)] is the mean. This is a single ODE that we can solve to obtain a value for the mean. If we differentiate the p.d.e. w.r.t θ twice and set θ = 0, we get: dE[N(t)2 ] = (λ − µ)E[N(t)] + 2(λ − µ)E[N(t)2 ] dt and hence the variance Var[N(t)] = E[N(t)2 ] − E[N(t)]2 So instead of simulating the process 109 to estimate the mean and variance, we can simply solve two ODEs. Colin Gillespie An introduction to moment closure techniques
  • 13. Part I Examples Colin Gillespie An introduction to moment closure techniques
  • 14. Simple Dimerisation model The dimerisation model has the following biochemical reactions: Dimerisation 2X1 −→ X2 and X2 −→ 2X1 We can formulate the dimer model in terms of moment equations, namely, dE[X1 ] 2 = 0.5k1 (E[X1 ] − E[X1 ]) − k2 E[X1 ] dt 2 dE[X1 ] 2 2 = k1 (E[X1 X2 ] − E[X1 X2 ]) + 0.5k1 (E[X1 ] − E[X1 ]) dt 2 + k2 (E[X1 ] − 2E[X1 ]) where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the 2 variance of X1 . Colin Gillespie An introduction to moment closure techniques
  • 15. Simple Dimerisation model The dimerisation model has the following biochemical reactions: Dimerisation 2X1 −→ X2 and X2 −→ 2X1 We can formulate the dimer model in terms of moment equations, namely, dE[X1 ] 2 = 0.5k1 (E[X1 ] − E[X1 ]) − k2 E[X1 ] dt 2 dE[X1 ] 2 2 = k1 (E[X1 X2 ] − E[X1 X2 ]) + 0.5k1 (E[X1 ] − E[X1 ]) dt 2 + k2 (E[X1 ] − 2E[X1 ]) where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the 2 variance of X1 . The i th moment equation depends on the (i + 1)th equation. Colin Gillespie An introduction to moment closure techniques
  • 16. Simple Dimerisation model The dimerisation model has the following biochemical reactions: Dimerisation 2X1 −→ X2 and X2 −→ 2X1 We can formulate the dimer model in terms of moment equations, namely, dE[X1 ] = 0.5k1 E[X1 ](E[X1 ] − 1) + 0.5k1 Var[X1 ] − k2 E[X1 ] dt 2 where E[X1 ] is the mean of X1 and E[X1 ] − E[X1 ]2 is the variance of X1 . The deterministic equation is an approximation to the stochastic mean. Colin Gillespie An introduction to moment closure techniques
  • 17. Simple Dimerisation model To close the equations, we usually assume that the underlying distribution is Normal or Lognormal. The easiest option is to assume an underlying Normal distribution, i.e. E[X1 ] = 3E[X1 ]E[X1 ] − 2E[X1 ]3 3 2 But we could also use, the Poisson E[X1 ] = E[X1 ] + 3E[X1 ]2 + E[X1 ]3 3 or the Lognormal 2 3 3 E[X1 ] E[X1 ] = E[X1 ] Colin Gillespie An introduction to moment closure techniques
  • 18. Simple Dimerisation model To close the equations, we usually assume that the underlying distribution is Normal or Lognormal. The easiest option is to assume an underlying Normal distribution, i.e. E[X1 ] = 3E[X1 ]E[X1 ] − 2E[X1 ]3 3 2 But we could also use, the Poisson E[X1 ] = E[X1 ] + 3E[X1 ]2 + E[X1 ]3 3 or the Lognormal 2 3 3 E[X1 ] E[X1 ] = E[X1 ] Colin Gillespie An introduction to moment closure techniques
  • 19. Simple Dimerisation model 300 Protein Population 250 200 150 0 5 10 15 20 25 Time Colin Gillespie An introduction to moment closure techniques
  • 20. Heat Shock Model Proctor et al, 2005 - 23 reactions, 17 chemical species A single stochastic simulation up to t = 2000 takes about 35 minutes. If we convert the model to moment equations, we get 139 equations. A python script automatically generates the ODEs from an SBML file These can be solved in less than 5 minutes using Maple Hopefully I’ll start outputting in sundials, so this should be even quicker Colin Gillespie An introduction to moment closure techniques
  • 21. Heat Shock Model 1200 600 Native Protein (10,000’s) 1000 590 800 ADP 600 580 400 570 200 560 0 500 1000 1500 2000 0 500 1000 1500 2000 Time Time Colin Gillespie An introduction to moment closure techniques
  • 22. Univariate Distributions 600 800 1000 1200 1400 Time t=200 Time t=2000 0.006 Density 0.004 0.002 0.000 600 800 1000 1200 1400 ADP Colin Gillespie An introduction to moment closure techniques
  • 23. Bivariate Distributions at time t = 2000 7e+06 6e+06 NatP 5e+06 4e+06 800 900 1000 1100 1200 ADP Colin Gillespie An introduction to moment closure techniques
  • 24. P53-Mdm2 Oscillations model Proctor and Grey, 2008 - 16 chemical species and about a dozen reactions. The model contains two events. If we convert the model to moment equations, we get 139 equations. However, in this case the moment closure approximation doesn’t do to well! Colin Gillespie An introduction to moment closure techniques
  • 25. P53-Mdm2 Oscillations model Proctor and Grey, 2008 - 16 chemical species and about a dozen reactions. The model contains two events. If we convert the model to moment equations, we get 139 equations. However, in this case the moment closure approximation doesn’t do to well! Colin Gillespie An introduction to moment closure techniques
  • 26. P53 Mean MC(black), True (red) 300 250 200 P53 Population 150 100 50 0 0 5 10 15 20 25 30 Time Colin Gillespie An introduction to moment closure techniques
  • 27. P53 Mean MC(black), True (red), Deterministic(green) 300 250 200 P53 Population 150 100 50 0 0 5 10 15 20 25 30 Time Colin Gillespie An introduction to moment closure techniques
  • 28. What went wrong? The Moment closure (tends) to fail when there is a large difference between the deterministic and stochastic formulations. I believe it failed because of strongly correlated species Typically when the MC approximation fails, it gives a negative variance The MC approximation does work well for other parameter values for the p53 model. Colin Gillespie An introduction to moment closure techniques
  • 29. Software Python script that takes in a SBML file and outputs the moment equations. Currently outputs as a Maple file (University has a site licence) Hopefully it will soon output as a sundials/GSL C file (Sort of) supports events. Currently only handles polynomial rate laws, but could be upgrade to handle more complicated rate laws. Colin Gillespie An introduction to moment closure techniques
  • 30. References For an introduction to Moment closure see papers by Matis et al over the last 20 years. Gillespie, C.S. Moment closure approximations for mass-action models. IET Systems Biology, in press Colin Gillespie An introduction to moment closure techniques