embedding machine learning in formal stochastic models of...

134
Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions Embedding Machine Learning in Formal Stochastic Models of Biological Processes Jane Hillston School of Informatics, University of Edinburgh 28th November 2017 quanƟcol . . ......... ... ... ... ... ... ...

Upload: others

Post on 23-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Embedding Machine Learning inFormal Stochastic Models of Biological Processes

Jane Hillston

School of Informatics, University of Edinburgh

28th November 2017

quan col. . ...............................

Page 2: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The PEPA project

The PEPA project started in Edinburgh in 1991.

It was motivated by problems encountered when carrying outperformance analysis of large computer and communicationsystems, based on numerical analysis of Markov chains.

Process algebras offered a compositional description techniquesupported by apparatus for formal reasoning.

Performance Evaluation Process Algebra (PEPA) sought toaddress these problems by the introduction of a suitableprocess algebra.

We have sought to investigate and exploit the interplaybetween the process algebra and the continuous time Markovchain (CTMC)

Page 3: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The PEPA project

The PEPA project started in Edinburgh in 1991.

It was motivated by problems encountered when carrying outperformance analysis of large computer and communicationsystems, based on numerical analysis of Markov chains.

Process algebras offered a compositional description techniquesupported by apparatus for formal reasoning.

Performance Evaluation Process Algebra (PEPA) sought toaddress these problems by the introduction of a suitableprocess algebra.

We have sought to investigate and exploit the interplaybetween the process algebra and the continuous time Markovchain (CTMC)

Page 4: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The PEPA project

The PEPA project started in Edinburgh in 1991.

It was motivated by problems encountered when carrying outperformance analysis of large computer and communicationsystems, based on numerical analysis of Markov chains.

Process algebras offered a compositional description techniquesupported by apparatus for formal reasoning.

Performance Evaluation Process Algebra (PEPA) sought toaddress these problems by the introduction of a suitableprocess algebra.

We have sought to investigate and exploit the interplaybetween the process algebra and the continuous time Markovchain (CTMC)

Page 5: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The PEPA project

The PEPA project started in Edinburgh in 1991.

It was motivated by problems encountered when carrying outperformance analysis of large computer and communicationsystems, based on numerical analysis of Markov chains.

Process algebras offered a compositional description techniquesupported by apparatus for formal reasoning.

Performance Evaluation Process Algebra (PEPA) sought toaddress these problems by the introduction of a suitableprocess algebra.

We have sought to investigate and exploit the interplaybetween the process algebra and the continuous time Markovchain (CTMC)

Page 6: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The PEPA project

The PEPA project started in Edinburgh in 1991.

It was motivated by problems encountered when carrying outperformance analysis of large computer and communicationsystems, based on numerical analysis of Markov chains.

Process algebras offered a compositional description techniquesupported by apparatus for formal reasoning.

Performance Evaluation Process Algebra (PEPA) sought toaddress these problems by the introduction of a suitableprocess algebra.

We have sought to investigate and exploit the interplaybetween the process algebra and the continuous time Markovchain (CTMC)

Page 7: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 8: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 9: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebra model Labelled transition system-SOS rules

Page 10: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebra model Labelled transition system-SOS rules

Page 11: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic process algebras

Stochastic process algebra

Process algebras where models are decorated with quantitativeinformation used to generate a stochastic process are stochasticprocess algebras (SPA).

Page 12: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P

���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

SPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

The CTMC can be analysed numerically (linear algebra) or bystochastic simulation.

Page 13: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P

���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

SPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

The CTMC can be analysed numerically (linear algebra) or bystochastic simulation.

Page 14: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P

���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

SPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

The CTMC can be analysed numerically (linear algebra) or bystochastic simulation.

Page 15: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysisSpecification matchingModel checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���With what probabilitydoes system behaviourmatch its specification?

ee e e

e-

6

-

?

����

∼=?

e ee e e eee e- - -

?����

���

-

���Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 16: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysis

Specification matchingModel checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���

With what probabilitydoes system behaviourmatch its specification?

ee e e

e-

6

-

?

����

∼=?

e ee e e eee e- - -

?����

���

-

���Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 17: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysis

Specification matching

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���

With what probabilitydoes system behaviourmatch its specification?

ee e e

e-

6

-

?

����

∼=?

e ee e e eee e- - -

?����

���

-

���

Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 18: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysisSpecification matching

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���With what probabilitydoes system behaviourmatch its specification?

ee e e

e-

6

-

?

����

∼=?

e ee e e eee e- - -

?����

���

-

���

Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?

φ ���

�����

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 19: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysisSpecification matching

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���With what probabilitydoes system behaviourmatch its specification?

ee e e

e-

6

-

?

����

∼=?

e ee e e eee e- - -

?����

���

-

���Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 20: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Benefits of integration

Properties of the underlying mathematical structure may bededuced by the construction at the process algebra level.

Compositionality can be exploited both for model constructionand (in some cases) for model analysis.

Formal reasoning techniques such as equivalence relations andmodel checking can be used to manipulate or interrogatemodels.

For example the congruence Markovian bisimulation, allowsexact model reduction to be carried out compositionally.

Stochastic model checking based on the ContinuousStochastic Logic (CSL) allows automatic evaluation ofquantified properties of the behaviour of the system.

Page 21: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Benefits of integration

Properties of the underlying mathematical structure may bededuced by the construction at the process algebra level.

Compositionality can be exploited both for model constructionand (in some cases) for model analysis.

Formal reasoning techniques such as equivalence relations andmodel checking can be used to manipulate or interrogatemodels.

For example the congruence Markovian bisimulation, allowsexact model reduction to be carried out compositionally.

Stochastic model checking based on the ContinuousStochastic Logic (CSL) allows automatic evaluation ofquantified properties of the behaviour of the system.

Page 22: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Benefits of integration

Properties of the underlying mathematical structure may bededuced by the construction at the process algebra level.

Compositionality can be exploited both for model constructionand (in some cases) for model analysis.

Formal reasoning techniques such as equivalence relations andmodel checking can be used to manipulate or interrogatemodels.

For example the congruence Markovian bisimulation, allowsexact model reduction to be carried out compositionally.

Stochastic model checking based on the ContinuousStochastic Logic (CSL) allows automatic evaluation ofquantified properties of the behaviour of the system.

Page 23: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Benefits of integration

Properties of the underlying mathematical structure may bededuced by the construction at the process algebra level.

Compositionality can be exploited both for model constructionand (in some cases) for model analysis.

Formal reasoning techniques such as equivalence relations andmodel checking can be used to manipulate or interrogatemodels.

For example the congruence Markovian bisimulation, allowsexact model reduction to be carried out compositionally.

Stochastic model checking based on the ContinuousStochastic Logic (CSL) allows automatic evaluation ofquantified properties of the behaviour of the system.

Page 24: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Benefits of integration

Properties of the underlying mathematical structure may bededuced by the construction at the process algebra level.

Compositionality can be exploited both for model constructionand (in some cases) for model analysis.

Formal reasoning techniques such as equivalence relations andmodel checking can be used to manipulate or interrogatemodels.

For example the congruence Markovian bisimulation, allowsexact model reduction to be carried out compositionally.

Stochastic model checking based on the ContinuousStochastic Logic (CSL) allows automatic evaluation ofquantified properties of the behaviour of the system.

Page 25: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 26: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic process algebras

Over the last two decades stochastic process algebras (mostly withMarkovian semantics) have been applied to a wide range ofapplication domains.

In some case there have been new languages developed to supportparticular features of the application domain. These have includedstochastic process algebras for modelling hybrid systems(e.g. HYPE, HyPA), spatial temporal systems (e.g. PALOMA,CARMA) and ecological processes (e.g. PALPS, MELA).

This is most noticeable in the arena of systems biology, which isoften focussed on biomolecular processing systems, for exampleBio-PEPA.

Page 27: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic process algebras

Over the last two decades stochastic process algebras (mostly withMarkovian semantics) have been applied to a wide range ofapplication domains.

In some case there have been new languages developed to supportparticular features of the application domain. These have includedstochastic process algebras for modelling hybrid systems(e.g. HYPE, HyPA), spatial temporal systems (e.g. PALOMA,CARMA) and ecological processes (e.g. PALPS, MELA).

This is most noticeable in the arena of systems biology, which isoften focussed on biomolecular processing systems, for exampleBio-PEPA.

Page 28: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Stochastic process algebras

Over the last two decades stochastic process algebras (mostly withMarkovian semantics) have been applied to a wide range ofapplication domains.

In some case there have been new languages developed to supportparticular features of the application domain. These have includedstochastic process algebras for modelling hybrid systems(e.g. HYPE, HyPA), spatial temporal systems (e.g. PALOMA,CARMA) and ecological processes (e.g. PALPS, MELA).

This is most noticeable in the arena of systems biology, which isoften focussed on biomolecular processing systems, for exampleBio-PEPA.

Page 29: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Molecular processes as concurrent computations

ConcurrencyMolecularBiology

Metabolism SignalTransduction

Concurrentcomputational processes

Molecules Enzymes andmetabolites

Interactingproteins

Synchronous communication Molecularinteraction

Binding andcatalysis

Binding andcatalysis

Transition or mobilityBiochemicalmodification orrelocation

Metabolitesynthesis

Protein binding,modification orsequestration

A. Regev and E. Shapiro Cells as computation, Nature 419, 2002.

Page 30: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The Bio-PEPA abstraction

Each “species” (biochemical component) i is described by aspecies component Ci

Each reaction j is associated with an action type αj and itsdynamics is described by a specific function fαj

The species components are then composed together to describethe behaviour of the system.

Page 31: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The Bio-PEPA abstraction

Each “species” (biochemical component) i is described by aspecies component Ci

Each reaction j is associated with an action type αj and itsdynamics is described by a specific function fαj

The species components are then composed together to describethe behaviour of the system.

Page 32: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The Bio-PEPA abstraction

Each “species” (biochemical component) i is described by aspecies component Ci

Each reaction j is associated with an action type αj and itsdynamics is described by a specific function fαj

The species components are then composed together to describethe behaviour of the system.

Page 33: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bio-PEPA modelling

The state of the system at any time consists of the localstates of each of its sequential/species components.

The local states of components are quantitative rather thanfunctional, i.e. biological changes to species are represented asdistinct components.

A component varying its state corresponds to it varying itsamount.

This is captured by an integer parameter associated with thespecies and the effect of a reaction is to vary that parameterby a number corresponding to the stoichiometry of thisspecies in the reaction.

Page 34: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bio-PEPA modelling

The state of the system at any time consists of the localstates of each of its sequential/species components.

The local states of components are quantitative rather thanfunctional, i.e. biological changes to species are represented asdistinct components.

A component varying its state corresponds to it varying itsamount.

This is captured by an integer parameter associated with thespecies and the effect of a reaction is to vary that parameterby a number corresponding to the stoichiometry of thisspecies in the reaction.

Page 35: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bio-PEPA modelling

The state of the system at any time consists of the localstates of each of its sequential/species components.

The local states of components are quantitative rather thanfunctional, i.e. biological changes to species are represented asdistinct components.

A component varying its state corresponds to it varying itsamount.

This is captured by an integer parameter associated with thespecies and the effect of a reaction is to vary that parameterby a number corresponding to the stoichiometry of thisspecies in the reaction.

Page 36: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bio-PEPA modelling

The state of the system at any time consists of the localstates of each of its sequential/species components.

The local states of components are quantitative rather thanfunctional, i.e. biological changes to species are represented asdistinct components.

A component varying its state corresponds to it varying itsamount.

This is captured by an integer parameter associated with thespecies and the effect of a reaction is to vary that parameterby a number corresponding to the stoichiometry of thisspecies in the reaction.

Page 37: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 38: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 39: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 40: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 41: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 42: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 43: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 44: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 45: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The syntax

Sequential component (species component)

S ::= (α, κ) op S | S + S | C where op = ↓ | ↑ | ⊕ | | �

Model component

P ::= P BCLP | S(l)

Each action αj is associated with a rate fαj

Page 46: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

The semantics

The semantics is defined by two transition relations:

First, a capability relation — is a transition possible?;

Second, a stochastic relation — gives rate of a transition,derived from the parameters of the model.

Page 47: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Example

I RSIS S

Rspread

stop1stop2

k_s = 0.5;

k_r = 0.1;

kineticLawOf spread : k_s * I * S;

kineticLawOf stop1 : k_r * S * S;

kineticLawOf stop2 : k_r * S * R;

I = (spread,1) ↓ ;

S = (spread,1) ↑ + (stop1,1) ↓ + (stop2,1) ↓ ;

R = (stop1,1) ↑ + (stop2,1) ↑ ;

I[10] BC∗

S[5] BC∗

R[0]

Page 48: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Example

I RSIS S

Rspread

stop1stop2

k_s = 0.5;

k_r = 0.1;

kineticLawOf spread : k_s * I * S;

kineticLawOf stop1 : k_r * S * S;

kineticLawOf stop2 : k_r * S * R;

I = (spread,1) ↓ ;

S = (spread,1) ↑ + (stop1,1) ↓ + (stop2,1) ↓ ;

R = (stop1,1) ↑ + (stop2,1) ↑ ;

I[10] BC∗

S[5] BC∗

R[0]

Page 49: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Formal modelling in systems biology

Formal languages like Bio-PEPA provide a convenientinterface for describing complex systems, reflecting what isknow about the biological components and their behaviour.

High-level abstraction eases writing and manipulating models.

They are compiled into executable models which can be runto deepen understanding of the model.

Formal nature lends itself to automatic, rigorous methods foranalysis and verification.

Executing the model generates data that can be comparedwith biological data.

. . . but what if parts of the system are unknown?

Jasmin Fisher, Thomas A. Henzinger: Executable cell biology. Nature Biotechnology 2007

Page 50: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Optimizing models

Usual process of parameterising a model is iterative and manual.

model

data

simulate/analyse

update

Page 51: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Alternative perspective

?

?

Model creation is data-driven

Page 52: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Machine Learning: Bayesian statistics

prior

posterior

data

inference

Represent belief and uncertainty as probability distributions(prior, posterior).

Treat parameters and unobserved variables similarly.

Bayes’ Theorem:

P(θ | D) =P(θ) · P(D | θ)

P(D)

posterior ∝ prior · likelihood

Page 53: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Machine Learning: Bayesian statistics

prior

posterior

data

inference

Represent belief and uncertainty as probability distributions(prior, posterior).

Treat parameters and unobserved variables similarly.

Bayes’ Theorem:

P(θ | D) =P(θ) · P(D | θ)

P(D)

posterior ∝ prior · likelihood

Page 54: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bayesian statistics

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Prior distribution (no data)

Page 55: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bayesian statistics

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

After 20 data points

Page 56: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bayesian statistics

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

After 40 data points

Page 57: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Bayesian statistics

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

After 60 data points

Page 58: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Modelling

Thus there are two approaches to model construction:

Machine Learning: extracting a model from the data generated bythe system, or refining a model based on systembehaviour using statistical techniques.

Mechanistic Modelling: starting from a description or hypothesis,construct a formal model that algorithmically mimicsthe behaviour of the system, validated against data.

Page 59: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Comparing the techniques

Data-driven modelling:

+ rigorous handling of parameter uncertainty- limited or no treatment of stochasticity- in many cases bespoke solutions are required

which can limit the size of system which can behandled

Mechanistic modelling:

+ general execution ”engine” (deterministic orstochastic) can be reused for many models

+ models can be used speculatively to investigateroles of parameters, or alternative hypotheses

- parameters are assumed to be known and fixed,or costly approaches must be used to seekappropriate parameterisation

Page 60: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Comparing the techniques

Data-driven modelling:

+ rigorous handling of parameter uncertainty- limited or no treatment of stochasticity- in many cases bespoke solutions are required

which can limit the size of system which can behandled

Mechanistic modelling:

+ general execution ”engine” (deterministic orstochastic) can be reused for many models

+ models can be used speculatively to investigateroles of parameters, or alternative hypotheses

- parameters are assumed to be known and fixed,or costly approaches must be used to seekappropriate parameterisation

Page 61: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Developing a probabilistic programming approach

What if we could...

include information about uncertainty in the model?

automatically use observations to refine this uncertainty?

do all this in a formal context?

Starting from the existing process algebra (Bio-PEPA), we havedeveloped a new language ProPPA that addresses these issues.

A.Georgoulas, J.Hillston, D.Milios, G.Sanguinetti: Probabilistic Programming Process Algebra. QEST 2014.

Page 62: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 63: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic programming

A programming paradigm for describing incomplete knowledgescenarios, and resolving the uncertainty.

Programs probabilistic models in a high level language, likesoftware code.

Offers automated inference without the need to write bespokesolutions.

Platforms: IBAL, Church, Infer.NET, Fun, Anglican,WebPPL,....

Key actions: specify a distribution, specify observations, inferposterior distribution.

Page 64: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic programming workflow

Describe how the data is generated in syntax like aconventional programming language, but leaving somevariables uncertain.

Specify observations, which impose constraints on acceptableoutputs of the program.

Run program forwards: Generate data consistent withobservations.

Run program backwards: Find values for the uncertainvariables which make the output match the observations.

Page 65: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic programming workflow

Describe how the data is generated in syntax like aconventional programming language, but leaving somevariables uncertain.

Specify observations, which impose constraints on acceptableoutputs of the program.

Run program forwards: Generate data consistent withobservations.

Run program backwards: Find values for the uncertainvariables which make the output match the observations.

Page 66: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic programming workflow

Describe how the data is generated in syntax like aconventional programming language, but leaving somevariables uncertain.

Specify observations, which impose constraints on acceptableoutputs of the program.

Run program forwards: Generate data consistent withobservations.

Run program backwards: Find values for the uncertainvariables which make the output match the observations.

Page 67: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic programming workflow

Describe how the data is generated in syntax like aconventional programming language, but leaving somevariables uncertain.

Specify observations, which impose constraints on acceptableoutputs of the program.

Run program forwards: Generate data consistent withobservations.

Run program backwards: Find values for the uncertainvariables which make the output match the observations.

Page 68: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

A Probabilistic Programming Process Algebra: ProPPA

The objective of ProPPA is to retain the features of the stochasticprocess algebra:

simple model description in terms of components

rigorous semantics giving an executable version of the model...

... whilst also incorporating features of a probabilistic programminglanguage:

recording uncertainty in the parameters

ability to incorporate observations into models

access to inference to update uncertainty based onobservations

Page 69: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

A Probabilistic Programming Process Algebra: ProPPA

The objective of ProPPA is to retain the features of the stochasticprocess algebra:

simple model description in terms of components

rigorous semantics giving an executable version of the model...

... whilst also incorporating features of a probabilistic programminglanguage:

recording uncertainty in the parameters

ability to incorporate observations into models

access to inference to update uncertainty based onobservations

Page 70: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Example Revisited

I RSIS S

Rspread

stop1stop2

k_s = 0.5;

k_r = 0.1;

kineticLawOf spread : k_s * I * S;

kineticLawOf stop1 : k_r * S * S;

kineticLawOf stop2 : k_r * S * R;

I = (spread,1) ↓ ;

S = (spread,1) ↑ + (stop1,1) ↓ + (stop2,1) ↓ ;

R = (stop1,1) ↑ + (stop2,1) ↑ ;

I[10] BC∗

S[5] BC∗

R[0]

Page 71: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Additions

Declaring uncertain parameters:

k s = Uniform(0,1);

k t = Uniform(0,1);

Providing observations:

observe(’trace’)

Specifying inference approach:

infer(’ABC’)

Page 72: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Additions

I RSIS S

Rspread

stop1stop2

k_s = Uniform(0,1);

k_r = Uniform(0,1);

kineticLawOf spread : k_s * I * S;

kineticLawOf stop1 : k_r * S * S;

kineticLawOf stop2 : k_r * S * R;

I = (spread,1) ↓ ;

S = (spread,1) ↑ + (stop1,1) ↓ + (stop2,1) ↓ ;

R = (stop1,1) ↑ + (stop2,1) ↑ ;

I[10] BC∗

S[5] BC∗

R[0]

observe(’trace’)

infer(’ABC’) //Approximate Bayesian Computation

Page 73: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Semantics

A Bio-PEPA model can be interpreted as a CTMC; however,CTMCs cannot capture uncertainty in the rates (everytransition must have a concrete rate).

ProPPA models include uncertainty in the parameters, whichtranslates into uncertainty in the transition rates.

A ProPPA model should be mapped to something like adistribution over CTMCs.

Page 74: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

parameter

model

k = 2

CTMC

Page 75: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

parameter

model

k ∈ [0,5]

set of CTMCs

Page 76: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

parameter

model

k ∼ p

distributionover CTMCs

μ

Page 77: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Constraint Markov Chains

Constraint Markov Chains (CMCs) are a generalization of DTMCs,in which the transition probabilities are not concrete, but can takeany value satisfying some constraints.

Constraint Markov Chain

A CMC is a tuple 〈S , o,A,V , φ〉, where:

S is the set of states, of cardinality k.

o ∈ S is the initial state.

A is a set of atomic propositions.

V : S → 22A

gives a set of acceptable labellings for each state.

φ : S × [0, 1]k → {0, 1} is the constraint function.

Caillaud et al., Constraint Markov Chains, Theoretical Computer Science, 2011

Page 78: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Constraint Markov Chains

In a CMC, arbitrary constraints are permitted, expressed throughthe function φ: φ(s, ~p) = 1 iff ~p is an acceptable vector oftransition probabilities from state s.

However,

CMCs are defined only for the discrete-time case, and

this does not say anything about how likely a value is to bechosen, only about whether it is acceptable.

To address these shortcomings, we define ProbabilisticConstraint Markov Chains.

Page 79: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Page 80: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Probabilistic CMCs

A Probabilistic Constraint Markov Chain is a tuple 〈S , o,A,V , φ〉,where:

S is the set of states, of cardinality k.

o ∈ S is the initial state.

A is a set of atomic propositions.

V : S → 22A

gives a set of acceptable labellings for each state.

φ : S × [0,∞)k → [0,∞) is the constraint function.

This is applicable to continuous-time systems.

φ(s, ·) is now a probability density function on the transitionrates from state s.

Page 81: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Semantics of ProPPA

The semantics definition follows that of Bio-PEPA, which isdefined using two transition relations:

Capability relation — is a transition possible?

Stochastic relation — gives distribution of the rate of atransition

The distribution over the parameter values induces a distributionover transition rates.

Rules are expressed as state-to-function transition systems(FuTS1).

This gives rise the underlying PCMC.

1De Nicola et al., A Uniform Definition of Stochastic Process Calculi, ACM Computing Surveys, 2013

Page 82: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Semantics of ProPPA

The semantics definition follows that of Bio-PEPA, which isdefined using two transition relations:

Capability relation — is a transition possible?

Stochastic relation — gives distribution of the rate of atransition

The distribution over the parameter values induces a distributionover transition rates.

Rules are expressed as state-to-function transition systems(FuTS1).

This gives rise the underlying PCMC.

1De Nicola et al., A Uniform Definition of Stochastic Process Calculi, ACM Computing Surveys, 2013

Page 83: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Simulating Probabilistic Constraint Markov Chains

Probabilistic Constraint Markov Chains are open to two alternativedynamic interpretations:

1 Uncertain Markov Chains: For each trajectory, for eachuncertain transition rate, sample once at the start of the runand use that value throughout;

2 Imprecise Markov Chains: During each trajectory, each time atransition with an uncertain rate is encountered, sample avalue but then discard it and re-sample whenever thistransition is visited again.

Our current work is focused on the Uncertain Markov Chain case.

Page 84: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Simulating Probabilistic Constraint Markov Chains

Probabilistic Constraint Markov Chains are open to two alternativedynamic interpretations:

1 Uncertain Markov Chains: For each trajectory, for eachuncertain transition rate, sample once at the start of the runand use that value throughout;

2 Imprecise Markov Chains: During each trajectory, each time atransition with an uncertain rate is encountered, sample avalue but then discard it and re-sample whenever thistransition is visited again.

Our current work is focused on the Uncertain Markov Chain case.

Page 85: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 86: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inference

parameter

model

k ∼ p

distributionover CTMCs

μ

Page 87: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inference

parameter

model

k ∼ p

distributionover CTMCs

μobservations

inference

posteriordistribution

μ*

Page 88: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inference

P(θ | D) ∝ P(θ)P(D | θ)

Exact inference is impossible, as we cannot calculate thelikelihood.

We must use approximate algorithms or approximations of thesystem.

The ProPPA semantics does not define a single inferencealgorithm, allowing for a modular approach.

Different algorithms can act on different input (time-series vsproperties), return different results or in different forms.

Page 89: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inferring likelihood in uncertain CTMCs

Transient state probabilities can be expressed as:

dpi (t)

dt=

∑j 6=i

pj(t) · qji − pi (t)∑j 6=i

qij

The probability of a single observation (y , t) can then be expressedas

p(y , t) =∑i∈S

pi (t)π(y | i)

where π(y | i) is the probability of observing y when in state i .

The likelihood can then be expressed as

P(D | θ) =N∏j=1

∑i∈S

p(i |θ)(tj)π(yj | i)

Page 90: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inferring likelihood in uncertain CTMCs

Transient state probabilities can be expressed as:

dpi (t)

dt=

∑j 6=i

pj(t) · qji − pi (t)∑j 6=i

qij

The probability of a single observation (y , t) can then be expressedas

p(y , t) =∑i∈S

pi (t)π(y | i)

where π(y | i) is the probability of observing y when in state i .

The likelihood can then be expressed as

P(D | θ) =N∏j=1

∑i∈S

p(i |θ)(tj)π(yj | i)

Page 91: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inferring likelihood in uncertain CTMCs

Transient state probabilities can be expressed as:

dpi (t)

dt=

∑j 6=i

pj(t) · qji − pi (t)∑j 6=i

qij

The probability of a single observation (y , t) can then be expressedas

p(y , t) =∑i∈S

pi (t)π(y | i)

where π(y | i) is the probability of observing y when in state i .

The likelihood can then be expressed as

P(D | θ) =N∏j=1

∑i∈S

p(i |θ)(tj)π(yj | i)

Page 92: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Calculating the transient probabilities

For finite state-spaces, the transient probabilities can, in principle,be computed as

p(t) = p(0)eQt .

Likelihood is hard to compute:

Computing eQt is expensive if the state space is large

Impossible directly in infinite state-spaces

Page 93: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

Page 94: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

x

xx x

t

X

Page 95: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

x

xx x

t

X

Page 96: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

x

xx x

t

X

Page 97: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

x

xx x

t

XΣ(xi-yi)

2 > εrejected

Page 98: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Basic Inference

Approximate Bayesian Computation is a simplesimulation-based solution:

Approximates posterior distribution over parameters as a set ofsamplesLikelihood of parameters is approximated with a notion ofdistance.

x

xx x

t

XΣ(xi-yi)

2 < εaccepted

Page 99: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Approximate Bayesian Computation

ABC algorithm

1 Sample a parameter set from the prior distribution.

2 Simulate the system using these parameters.

3 Compare the simulation trace obtained with the observations.

4 If distance < ε, accept, otherwise reject.

This results in an approximation to the posterior distribution.As ε→ 0, set of samples converges to true posterior.We use a more elaborate version based on Markov Chain MonteCarlo sampling.

Page 100: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Inference for infinite state spaces

Various methods become inefficient or inapplicable as thestate-space grows.

How to deal with unbounded systems?

Multiple simulation runs

Large population approximations (diffusion, Linear Noise,. . . )

Systematic truncation

Random truncations

Page 101: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Expanding the likelihood

The likelihood can be written as an infinite series:

p(x ′, t ′ | x , t) =∞∑

N=0

p(N)(x ′, t ′ | x , t)

=∞∑

N=0

[f (N)(x ′, t ′ | x , t)− f (N−1)(x ′, t ′ | x , t)

]where

x∗ = max{x , x ′}p(N)(x ′, t ′ | x , t) is the probability of going from state x attime t to state x ′ at time t ′ through a path with maximumstate x∗ + N

f (N) is the same, except the maximum state cannot exceedx∗ + N (but does not have to reach it)

Any finite number of terms can be computed — Can the infinitesum be computed or estimated?

Page 102: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Expanding the likelihood

The likelihood can be written as an infinite series:

p(x ′, t ′ | x , t) =∞∑

N=0

p(N)(x ′, t ′ | x , t)

=∞∑

N=0

[f (N)(x ′, t ′ | x , t)− f (N−1)(x ′, t ′ | x , t)

]where

x∗ = max{x , x ′}p(N)(x ′, t ′ | x , t) is the probability of going from state x attime t to state x ′ at time t ′ through a path with maximumstate x∗ + N

f (N) is the same, except the maximum state cannot exceedx∗ + N (but does not have to reach it)

Any finite number of terms can be computed — Can the infinitesum be computed or estimated?

Page 103: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

(0,0) (0,1) (0,3) (0,4)

(1,0) (1,3) (1,4)

(2,0) (2,1) (2,2) (2,3) (2,4)

(3,0) (3,1) (3,2) (3,3) (3,4)

(1,1)

(0,2)

(1,2)x

x'

Page 104: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

(0,0) (0,1) (0,3) (0,4)

(1,0) (1,3) (1,4)

(2,0) (2,1) (2,2) (2,3) (2,4)

(3,0) (3,1) (3,2) (3,3) (3,4)

(1,1)

(0,2)

(1,2)

S0

x

x'

x*

Page 105: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

(0,0) (0,1) (0,3) (0,4)

(1,0) (1,3) (1,4)

(2,0) (2,1) (2,2) (2,3) (2,4)

(3,0) (3,1) (3,2) (3,3) (3,4)

(1,1)

(0,2)

(1,2)

S0S1

x

x'

x*

Page 106: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Russian Roulette Truncation

We want to estimate the value of

f =∞∑n=0

fn

where the fn’s are computable.

Truncate the sum randomly: stop at term k with probabilityqk .

Form f̂ as a partial sum of the fn, n = 1, . . . , k , rescaledappropriately.

f̂ =k∑

n=0

fnk−1∏j=0

(1− qj)

Page 107: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Russian Roulette Truncation

We want to estimate the value of

f =∞∑n=0

fn

where the fn’s are computable.

Choose a single term fk with probability pk ; estimate f̂ = fkpk

f̂ is unbiased... but its variance can be high.

Truncate the sum randomly: stop at term k with probabilityqk .

Form f̂ as a partial sum of the fn, n = 1, . . . , k , rescaledappropriately.

f̂ =k∑

n=0

fnk−1∏j=0

(1− qj)

Page 108: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Russian Roulette Truncation

We want to estimate the value of

f =∞∑n=0

fn

where the fn’s are computable.

Truncate the sum randomly: stop at term k with probabilityqk .

Form f̂ as a partial sum of the fn, n = 1, . . . , k , rescaledappropriately.

f̂ =k∑

n=0

fnk−1∏j=0

(1− qj)

Page 109: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Russian Roulette

f̂ ← f0i ← 1p ← 1loop

Choose to stop with probability qiif stopping then

return f̂else

p ← p · (1− qi )f̂ ← f̂ + fi

pi ← i + 1

end ifend loop

Page 110: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Russian Roulette

f̂ =k∑

n=0

fn∏k−1j=0 (1− qj)

In our case, f is a probability that we wish to approximate.

Using f̂ instead of f leads to an error; however f̂ is unbiased:E [f̂ ] = f .

f̂ is also guaranteed to be positive.

Pseudo-marginal algorithms can use this and still drawsamples from the correct distribution.

We have developed both Metropolis-Hastings and Gibbs-likesampling algorithms based on this approach2.

2Unbiased Bayesian Inference for Population Markov Jump Processes via Random Truncations. A.Georgoulas,

J.Hillston and D.Sanguinetti, in Stats & Comp. 2017

Page 111: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

SSA samples

Page 112: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Posterior samples

Page 113: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 114: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Example model

I RSIS S

R

k_s = Uniform(0,1);

k_r = Uniform(0,1);

kineticLawOf spread : k_s * I * S;

kineticLawOf stop1 : k_r * S * S;

kineticLawOf stop2 : k_r * S * R;

I = (spread,1) ↓ ;

S = (spread,1) ↑ + (stop1,1) ↓ + (stop2,1) ↓ ;

R = (stop1,1) ↑ + (stop2,1) ↑ ;

I[10] BC∗

S[5] BC∗

R[0]

observe(’trace’)

infer(’ABC’) //Approximate Bayesian Computation

Page 115: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Results

Tested on the rumour-spreading example, giving the twoparameters uniform priors.

Approximate Bayesian Computation

Returns posterior as a set of points (samples)

Observations: time-series (single simulation)

Page 116: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Results: ABC

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ks

k r

Page 117: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Results: ABC

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ks

k r

Page 118: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Results: ABC

0 0.2 0.4 0.6 0.8 10

2000

4000

6000

8000

10000

12000

kr

Num

ber

of s

ampl

es

0 0.2 0.4 0.6 0.8 10

1000

2000

3000

4000

5000

6000

7000

ks

Num

ber

of s

ampl

es

Page 119: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Genetic Toggle Switch

Two mutually-repressing genes: promoters (unobserved) andtheir protein products

Bistable behaviour: switching induced by environmentalchanges

Synthesised in E. coli3

Stochastic variant4 where switching is induced by noise

3Gardner, Cantor & Collins, Construction of a genetic toggle switch in Escherichia coli, Nature, 2000

4Tian & Burrage, Stochastic models for regulatory networks of the genetic toggle switch, PNAS, 2006

Page 120: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Genetic Toggle Switch

P1

∅P2

G1,on

G1,off G2,on

G2,off

participates accelerates

Page 121: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Toggle switch model: species

G1 = activ1 ↑ + deact1 ↓ + expr1 ⊕;G2 = activ2 ↑ + deact2 ↓ + expr2 ⊕;

P1 = expr1 ↑ + degr1 ↓ + deact2 ⊕ ;

P2 = expr2 ↑ + degr2 ↓ + deact1 ⊕

G1[1] <*> G2[0] <*> P1[20] <*> P2[0]

observe(toggle_obs);

infer(rouletteGibbs);

Page 122: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

θ 1 = Gamma(3,5); //etc...

kineticLawOf expr1 : θ 1 * G1;

kineticLawOf expr2 : θ 2 * G2;

kineticLawOf degr1 : θ 3 * P1;

kineticLawOf degr2 : θ 4 * P2;

kineticLawOf activ1 : θ 5 * (1 - G1);

kineticLawOf activ2 : θ 6 * (1 - G2);

kineticLawOf deact1 : θ 7 * exp(r ∗ P2) * G1;

kineticLawOf deact2 : θ 8 * exp(r ∗ P1) * G2;

G1 = activ1 ↑ + deact1 ↓ + expr1 ⊕;G2 = activ2 ↑ + deact2 ↓ + expr2 ⊕;P1 = expr1 ↑ + degr1 ↓ + deact2 ⊕ ;

P2 = expr2 ↑ + degr2 ↓ + deact1 ⊕

G1[1] <*> G2[0] <*> P1[20] <*> P2[0]

observe(toggle_obs);

infer(rouletteGibbs);

Page 123: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Experiment

Simulated observations

Gamma priors on all parameters (required by algorithm)

Goal: learn posterior of 8 parameters

5000 samples taken using the Gibbs-like random truncationalgorithm

Page 124: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Genes

0 20 40 60 80 100

Page 125: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Proteins

0 20 40 60 80 1000

5

10

15

20

25

30

Page 126: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Observations used

0 20 40 60 80 1000

5

10

15

20

25

30

Page 127: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Results

Page 128: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Outline

1 Stochastic Process Algebras

2 Modelling Biological ProcessesBio-PEPAApproaches to system biology modelling

3 ProPPA

4 Inference

5 Results

6 Conclusions

Page 129: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Workflow

model

inference algorithm

low-level description

inference results

(samples)

statistics

plotting

prediction

...

infercompile

Page 130: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Summary

ProPPA is a process algebra that incorporates uncertainty andobservations directly in the model, influenced by probabilisticprogramming.

Syntax remains similar to Bio-PEPA.

Semantics defined in terms of an extension of ConstraintMarkov Chains.

Observations can be either time-series or logical properties.

Parameter inference based on random truncations (RussianRoulette) offers new possibilities for inference.

Page 131: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Challenges and Future Directions

The value of observations

Can we reason about the “distance” between µ and µ∗?

Page 132: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Challenges and Future Directions

Heterogeneous populations

What if we are seeking the “optimal mix” rather than the bestindividual representative?

Page 133: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Thanks

Bio-PEPA

FedericaCiocchetta

ProPPA

AnastasisGeorgoulas

GuidoSanguinetti

Funding from EPSRC, ERC, Microsoft Research and CECFET-Proactive Programme FoCAS.

Page 134: Embedding Machine Learning in Formal Stochastic Models of ...homepages.inf.ed.ac.uk/jeh/TALKS/OxWoCS2017.pdf · Stochastic Process Algebras Modelling Biological ProcessesProPPAInferenceResultsConclusions

Stochastic Process Algebras Modelling Biological Processes ProPPA Inference Results Conclusions

Thanks

Bio-PEPA

FedericaCiocchetta

ProPPA

AnastasisGeorgoulas

GuidoSanguinetti

Funding from EPSRC, ERC, Microsoft Research and CECFET-Proactive Programme FoCAS.