Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a...

48
Synthesizing Synthesizing Stochasticity in Stochasticity in Biochemical Systems Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc Riedel

Transcript of Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a...

Page 1: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Synthesizing Stochasticity in Synthesizing Stochasticity in Biochemical SystemsBiochemical Systems

In partial fulfillment of the requirements for a master of electrical engineering degree

Brian FettMarc Riedel

Page 2: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Computation and BiologyComputation and Biology

• Cell Chemistry modeled with reaction sets• Cell assumed to have a starting set of concentrations

– Given the size of a cell, this implies quantities• Modeling can be done in two ways

– ODEs – quick, deterministic, approximate– Gillespie – Monte Carlo, Markov chain, exact

Page 3: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Design ScenarioDesign Scenario

• Anderson/Arkin• Engineering Bacteria that will seek/destroy cancer• Multi-stage system

– Inactive, detect cancer, protection from host– Active, attack cancer, vulnerable

• The inactive form will be carried by blood stream– What if there is a cancer downstream?

Page 4: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Two Cancers DeterministicTwo Cancers Deterministic

Blood flow

Page 5: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Two Cancers StochasticTwo Cancers Stochastic

Blood flow

Page 6: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Discrete KineticsDiscrete Kinetics

“States”

A B C

4 7 5

2 6 8

22 0 997

S1

S2

S3

A reaction transforms one state into another:

21 1SS

Re.g.,

BCA

ACB

CBA

2

3

2 3

2

k1

k2

k3

R1

R2

R3

Track discrete (i.e., integer) quantities of molecular types.

Page 7: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

S1 = [5, 5, 5]

S2 = [4, 7, 4]R1 R2 R3

S3 = [2, 6, 7]

S4 = [1, 8, 6]

Discrete KineticsDiscrete Kinetics

State [A, B, C]

Page 8: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Stochastic KineticsStochastic Kinetics

The probability that a given reaction is the next to fire is proportional to:

• Its rate constant (i.e., its ki).

• The quantities of its reactants.BCA

ACB

CBA

2

3

2 3

2

k1

k2

k3

R1

R2

R3

See D. Gillespie, “Stochastic Chemical Kinetics”, 2006.

Page 9: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Stochastic KineticsStochastic Kinetics

Choose the next reaction according to:

jj

iiR

)Pr(

Ri kXnXn 2211

let

2

2

1

1

n

X

n

Xki

For each reaction

Page 10: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Stochastic KineticsStochastic Kinetics

[1, 1, 9] [1, 5, 4] [4, 4, 0] [4, 0, 5]

[2, 2, 6] [2, 6, 1] [5, 1, 2]

p1p2

p3

p4p5

p6p7 p8 p9

[3, 3, 3]start

[1, 1, 9] [1, 5, 4] [4, 4, 0] [4, 0, 5]

[2, 2, 6] [2, 6, 1] [5, 1, 2]

p1p2

p3

p4p5

p6p7 p8 p9

[3, 3, 3]start

[4, 0, 5]

Probabilistic Lattice

Page 11: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Designing SystemsDesigning Systems

Stochastic and Deterministic

Page 12: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Modular SchemeModular Scheme

Module

inputs outputs

QuantitiesQuantities/

Probabilities

Page 13: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Modular SchemeModular Scheme

Module Module

Module

Module

Page 14: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

DeterministicDeterministic

Module

inputs outputs

Quantities Quantities

Page 15: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction

Subtraction

y

xy

Page 16: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out

Fan-outx

y2

y1

yn

Page 17: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling

Linearx y

Page 18: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling• Multiplication Multiply

z

xy

Page 19: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling• Multiplication• Exponentiation

Expx y

Page 20: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling• Multiplication• Exponentiation• Logarithmic

Logx y

Page 21: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling• Multiplication• Exponentiation• Logarithmic• Power

Power

p

xy

Page 22: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ModulesFunctional Modules

• Subtraction• Fan-out• Linear Scaling• Multiplication• Exponentiation• Logarithmic• Power• Isolation

Isolationy

Page 23: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Composing ModulesComposing Modules

• Leading module must complete– Modules starting prematurely yield poor results– Rate separation between modules– Rate separation multiplies as modules are chained

• Module Locking– All modules can operate at similar pace– Subsequent modules locked– Key is generated when a module finishes– Key is required by ‘leading’ reaction of module

Page 24: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Module LockingModule Locking

Mult

Mult

Linear

Page 25: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locking within a ModuleLocking within a Module

• Multi-reaction modules often loop• Most loops have 4 stages

– Initiate– Calculate– Terminate– Reset

• Keys must be destroyed at end of stage• Initiate creates Loop type

– very much like a key– Terminate destroys

Page 26: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locking within a ModuleLocking within a Module

Log

Initiate Calculate

Reset Terminate

Page 27: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locking within a ModuleLocking within a Module

Log

Initiate Calculate

Reset Terminate

Page 28: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locking within a ModuleLocking within a Module

Log

Initiate Calculate

Reset Terminate

Page 29: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locking within a ModuleLocking within a Module

Log

Initially 4 2 = Log2(4)

Page 30: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Stochastic ModuleStochastic Module

StochasticModule

Prob. 0.2 Prob. 0.8 Choose between multiple outcomes

Functions:• Choice is made in one reaction• Choice is quickly reinforced• Outputs are produced

Features:• PDF set by quantities of types• Any number of outcomes• Arbitrarily low error

Page 31: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Basic DesignBasic Design

• Initialize – Make the choice• Reinforce – Push forward with choice• Stabilize – Remove possibility of ‘contamination’

– Prevent subsequent ‘choices’• Purify – Remove contamination• Work – Do what was ‘chosen’

Page 32: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Initializing Reactions

Reinforcing Reactions

Stabilizing

Purifying

Working Reactions

where

Inside the Stochastic ModuleInside the Stochastic Module

ik

i dei i :

ik

ii dedi i 2:'

ik

ji dedij i''

:

iik

ii odfdi i ''''

:

''''''''''ijijiii kkkkk

'''

: ikji ddij

Page 33: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Initializing Reactions

Inside the Stochastic ModuleInside the Stochastic Module

For all i, to obtain di with probability pi, select E1, E2,…, En

according to:

j jj

iii kE

kEp

Use as appropriate in working reactions:

(where Ei is quantity of ei)

iik

ii odfdi i ''''

:

ik

i dei i :

Page 34: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Error AnalysisError Analysis

Let

for three outcomes (i.e., i, j = 1,2,3).

Require

Performed 100,000 trials of Monte Carlo.

2'''''''''' ,,1 ijijiii kkkkk

''''''''''ijijiii kkkkk

Page 35: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locked Stochastic ModuleLocked Stochastic Module

• Lock Initializing reactions– All require the same key– Key generated by keysmith– Keysmith generated slowly

• Replace Purifying reactions– Destroy keysmith in presence of d– Preventative reactions instead– Linear growth rather than quadratic

Page 36: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Locked Stochastic ModuleLocked Stochastic Module

An ounce of prevention…

…worth a pound of cure.

Page 37: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Functional ProbabilitiesFunctional Probabilities

Make choices based on inputs

StochasticModule

Prob. 0.2 Prob. 0.8

DeterministicModule

Page 38: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Using IP/LPUsing IP/LP

• IP and LP solvers require– Set of constraints (inequalities)– An expression

• Solve for set of inputs– Meets constraints– Minimizes or maximizes expression

• Rewrite our problems in the form required

Page 39: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

LP/IP TricksLP/IP Tricks

• Replace equality statements– Rounding errors break equality– Add error term– Minimize the error term

• Require a at least one molecule– Prevents solutions from devolving to zero

Page 40: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Sample the Input SpaceSample the Input Space

• Number/location arbitrary• More points

– More accurate fit– More time calculating

• User defines desired IO– Table of points– Set of inputs– Desired output PDF at

inputs

X1

X2

Page 41: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Solve each pointSolve each point

• Space is quantities of e• Solution is a ray• Solve minimal magnitude• Outside unit hyper-sphere

e2

e3

e1

Page 42: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Bringing Points TogetherBringing Points Together

• Pick a function– Solve for coefficients

• Scale point solutions• Minimize difference• Minimize coefficients

x

e

Page 43: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

IP/LP ComputationIP/LP Computation

• Value space is whole number sets, requires IP• IP is NP-hard, LP is in P• Scales solutions are also solutions• Tricks

– Solve points with LP, bring together with IP– Solve coefficients with LP, scale solution

• Use IP to scale optimally (weigh scaling, error)• Scale by hand

Page 44: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Past Future workPast Future work

• 2 year Hiatus• Jiang / Riedel DSP• Builds on this work

– Fan-out– Addition– Linear Scaling

• Adds Clock and Delay Module

Page 45: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Asynchronous ClockAsynchronous Clock

• Clock– 3 phase– Asynchronous– Uses a locking mechanism

• Delay– Each delay locks clock– Keeps clock in a phase– Allows clock to proceed when phase completes

Page 46: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Clock Delay MechanismClock Delay Mechanism

Page 47: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Delay ElementDelay Element

• Extension of system– Shows strength of modular design

• Elegant asynchronous clock design• Possible improvement for intra-module locking

– Previous design – modified inter-module lock– Likely need more than 3 phases

• 4 phases – two calculating, two resetting• 6 phases – three of each

– Local/global clock

Page 48: Synthesizing Stochasticity in Biochemical Systems In partial fulfillment of the requirements for a master of electrical engineering degree Brian Fett Marc.

Questions?Questions?