Marc Riedel A Discourse on Cycles Assistant Professor, ECE, Univ. Minnesota (in circuits and in computational biology) “In a good system, even evil men cannot do evil. But without a good system, even good men cannot do good, but may be forced to do evil.” – Deng Xiao-Ping
Cycles: Good or Bad? Introducing cycles in the design of combinational circuits. Eliminating cycles in the stochastic simulation of chemical reactions. My Dissertation: Recent work: OR AND xxabcd
Cycles: Good or Bad? Introducing cycles in the design of combinational circuits. Eliminating cycles in the stochastic simulation of chemical reactions. My Dissertation: Recent work for Alpha Project: OR AND xxabcd
inputsoutputs The current outputs depend only on the current inputs. Combinational Circuits combinational logic
NAND OR AND NOR Acyclic (i.e., feed-forward) circuits are always combinational. Combinational Circuits
Acyclic (i.e., feed-forward) circuits are always combinational. Are combinational circuits always acyclic? “Combinational networks can never have feedback loops.” “A combinational circuit is a directed acyclic graph (DAG)...” Combinational Circuits NAND OR AND NOR
Acyclic (i.e., feed-forward) circuits are always combinational. Are combinational circuits always acyclic? “Combinational networks can never have feedback loops.” “A combinational circuit is a directed acyclic graph (DAG)...” Combinational Circuits Designers and EDA tools follow this practice.
Circuits with Cycles a b x c d x AND OR AND OR )))((( 1 fxcdxab 1 f
x a b c d AND OR AND OR x x 0 )))((( 1 fcdxab 1 f 0 Circuits with Cycles
x x x 0 0 a b c d AND OR AND OR 0 )))((( 1 fxcdab 1 f Circuits with Cycles
x 1 x 1 x x a b c d AND OR AND OR )))((( 1 fcdab 1 f Circuits with Cycles
1 1 x x x a b c d AND OR AND OR 1 ))((cdab 1 f )( 2 abxcdf Circuit is cyclic yet combinational; computes functions f 1 and f 2 with 6 gates. An acyclic circuit computing these functions requires 8 gates. Circuits with Cycles
A cyclic topology permits greater overlap in the computation of the two functions: x x a b c d AND OR AND OR There is no feedback in a functional sense. Circuit is cyclic yet combinational; computes functions f 1 and f 2 with 6 gates. An acyclic circuit computing these functions requires 8 gates. )( 2 abxcdf Circuits with Cycles x))((cdab 1 f
Computational Biology One-dimensional digital (quaternary) code of DNA. Information encoded in biological systems: Three-dimensional structure of proteins. Multi-dimensional intra-cellular biochemical networks. Vast complexity of multi-cellular biological organisms.
Biochemical Reactions inputsoutputs Quantities of Different Types of Molecules computation View intra-cellular biochemistry as a form of computing. Chemical Reactions
inputsoutputscomputation A = 1000 B = 333 C = 666 A = 0 B = 1334 C = 226 Chemical Reactions Biochemical Reactions View intra-cellular biochemistry as a form of computing. However, output is often stochastic.
inputsoutputscomputation A = 1000 B = 333 C = 666 Chemical Reactions Biochemical Reactions View intra-cellular biochemistry as a form of computing. C 1 : A 500 C 2 : B > 500 before A < 550 termination conditions Pr(C 1 ) = 0.61 Pr(C 2 ) = 0.39 A = 0 B = 1334 C = 226
Biochemical Reactions inputsoutputs Quantities of Different Types of Molecules Probability Distribution on terminal conditions computation View intra-cellular biochemistry as a form of computing. Chemical Reactions
Why? Helpful for the purposes of analysis. Suggests the possibility of synthesis. Expertise from ECE can be brought to bear: algorithms, data structures, abstractions... Engineer a form of “logical” control of biochemical processes: outputs that depend on specific combinations of inputs. Biochemical Reactions View intra-cellular biochemistry as a form of computing.
Track precise (integer) quantities of molecular species. “States” ABC S1S1 S2S2 S3S3 A reaction transforms one state into another: e.g., Gillespie’s Framework Reactions R1R1 R2R2 R3R3
S 1 = [5, 5, 5] 0 Choose the next reaction according to: Stochastic Simulation RiRi where R1R1 R2R2 R3R3
Stochastic Simulation RiRi R1R1 R2R2 R3R3 Choose the time of the next reaction according to: S 1 = [5, 5, 5] 0
Stochastic Simulation R1R1 R2R2 R3R3 See D. Gillespie, “Exact Stochastic Simulation of Coupled Chemical Reactions”, J. Phys. Chem S 1 = [5, 5, 5] 0
Stochastic Simulation S 1 = [5, 5, 5] 0 S 2 = [4, 7, 4] Choose R 3 and t = 3 seconds. R1R1 R2R2 R3R3 S 3 = [2, 6, 7] 4 Choose R 1 and t = 1 seconds. S 4 = [1, 8, 6] 6 Choose R 3 and t = 2 seconds. 3 Choose R 2 and t = 1 seconds.
Stochastic Simulation S 1 = [5, 5, 5] 0 S 2 = [4, 7, 4] Choose R 3 and t = 3 seconds. S 3 = [2, 6, 7] 4 Choose R 1 and t = 1 seconds. S 4 = [1, 8, 6] 6 Choose R 3 and t = 2 seconds. Choose R 2 and t = 1 seconds. 37
7 Stochastic Simulation S 1 = [5, 5, 5] 0 S 2 = [4, 7, 4] S 3 = [2, 6, 7] 4 S 4 = [1, 8, 6] 6 Stochastic simulation spends most of its time (e.g. 99%) looping
Is Looping Necessary? A + N B + N CA + 2N B C B C X Y Reactions If we begin with 1 molecule of A and 2 molecules of N : what is the probability that we get a molecule of X ? what is the probability that we get a molecule of Y ? (assuming that we wait as long as it takes)
Is Looping Necessary? A + N B + N CA + 2N B C B C X Y Reactions SASA SBSB SCSC SXSX SYSY Trial 1 Now repeat 500 times... Cycle 1000 times... Trial 2
Is Looping Necessary? A + N B + N CA + 2N B C B C X Y SASA SBSB SCSC SXSX SYSY Reactions Try computing probabilities!
Is Looping Necessary? SASA SBSB SCSC SXSX SYSY Conclude: Try computing probabilities!
Is Looping Necessary? SASA SBSB SCSC SXSX SYSY Conclude: Break the cycle
Breaking Cycles Compute the probability from the entry point to each exit point. Create new transitions to the exit points with these probabilities. Break the cycle at the entry point. Whenever a cycle is encountered during stochastic simulation:
Breaking Cycles Compute the probability from the entry point to each exit point. Create new transitions to the exit points with these probabilities. Break the cycle at the entry point. Whenever a cycle is encountered during stochastic simulation:
We must keep a history of states visited. Caveats: (However, we should be caching state information anyway...) We’ve lost the concept of time. (This can be rectified with a bit of math....) Breaking Cycles
Randomness Pseudo-random numbers needed: R1R1 R2R2 R3R3 R4R4 probabilities generate a random number: choose R 2
choose R 2 Randomness Pseudo-random numbers needed: R1R1 R2R2 R3R3 R4R4 probabilities 01 generate a random number: choose R 4
Randomness Pseudo-random numbers needed: Generating random numbers is time consuming. If variance in probabilities is large, accuracy is wasted. R1R1 R2R2 R3R3 R4R4 probabilities 01 generate a random number: choose R 4
Event Leaping Explore high probability events further Along each path, probabilities are multiplicative.
Event Leaping Explore high probability events further When paths merge, probabilities are additive Along each path, probabilities are multiplicative.
Event Leaping Based on a single random number, leap directly to the boundary of explored region Explore high probability events further. When paths merge, probabilities are additive.
We need far fewer random numbers (e.g., factor of 10 reduction). We cache probability calculations. If we return to any portion of the region already visited, we immediately jump to the boundary of it. Event Leaping
State Space Analysis Characterize Evolution [0, 0, 12] [1, 1, 9][1, 5, 4][4, 4, 0][4, 0, 5] [2, 2, 6][2, 6, 1][5, 1, 2] p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 p 9 p 10 p 11 p 12 p ppp )()(ppppppppppppp [3, 3, 3] start [3, 3, 3] e.g., identify articulation points
State Space Analysis Characterize Evolution [2, 2, 6][2, 6, 1][5, 1, 2] [3, 3, 3] start e.g., identify “articulation” points Pr(C 1 ) > 0.99Pr(C 2 ) > 0.99
If we seek probabilities, and we are computing probabilities, use these! Tailor the analysis to the questions, instead of seeking answers in raw simulation data. Discussion Analysis Computation is a powerful tool for understanding biology. Intriguing to also consider biochemical systems as a means of computation. Computation and Biology:
inputsoutput Large domain, small range. Analysis of Digital Circuits Digital Circuit
inputsoutput Large domain, small range. Analysis of Digital Circuits Digital Circuit 2 m possibilities 2 possibilities
Data Structures Example Truth Tables 8 rows 3 variables 4 rows 2 variables 2 m rows m variables 2 64 rows 64 variables x1x1 x2x2 x3x3 f
Data Structures Decision Diagrams Example x1x1 x2x2 x3x3 f 10 S x1x1 10 x3x3 10 x3x3 10 x3x3 10 x3x3 10 x2x2 10 x2x2
Data Structures Decision Diagrams 10 S x1x1 x3x3 x3x3 x3x x3x3 10 x2x2 10 x2x2 Optimize by merging nodes:
Data Structures Decision Diagrams 10 S x1x1 x3x3 x3x3 x3x3 1 x2x2 10 x2x2 Optimize by merging nodes: x3x3 0
Data Structures Decision Diagrams 10 S x1x1 x2x2 x2x2 Optimize by merging nodes: x3x3 x3x3 x3x x3x
Data Structures Decision Diagrams 0 S x1x1 x2x2 Optimize by merging nodes: 01 0 x3x x2x
Data Structures Logic Operations x3x3 S x1x x2x x2x2 x3x3 T x1x x2x2 x3x3 U x1x AND =
Introduced by Lee (1959), popularized by Bryant (1986) Used in logic design, verification, artificial intelligence, etc. Vibrant area of research: Canonical:unique up to variable ordering Compact:represent functions of up to 1000 variables Efficient:perform logic operations in linear-time Decision Diagrams Properties:
inputsoutput Large domain, small range? N m possibilities Yes/No possibilities Chemical Equations Yes/No For m species, each with max. quantity N : Initial States Analysis of Biochemical Reactions
inputsoutput Chemical Reactions Initial State “Traditional” Stochastic Simulation Produces the probability distribution (or expected value) of each species as a function of time (or at a fixed end time).
inputsoutput Chemical Reactions Initial State “Timeless” Stochastic Simulation Produces the probability that a state satisfying a specified condition is reached (within a bounded number of reactions).
inputsoutput Chemical Reactions Initial State e.g., for the lambda phage (Arkin et al., 1998), what is the probability that Cro 2 > 55 (lysogeny) before cII 2 > 145 (lysis)? “Timeless” Stochastic Simulation
Timing S 1 = [5, 5, 5] S 2 = [4, 7, 4] S 3 = [2, 6, 7] S 4 = [1, 8, 6] Computation of time steps does not affect the sequence of transitions: is orthogonal to
Yes/No Questions Decision Diagram Can ask (and answer) arbitrarily complicated yes/no questions pertaining to reachability: Yes if C 1 or not(C 2 ) C 1 : state S is reachable after 100 reactions C 2 : state T is reachable from state U or from state V but not from both C 3 : state X is never reachable Yes if not C 1 and (C 2 or C 3 )
Future Directions Decision Diagram Yes with Prob. > 0.5 Yes with Prob. > 0.99 after 60 seconds. Novel data structures that may allow us to ask (and answer) quantitative and probabilistic questions:
Research Themes Conceptual Problems in Logic Design: models, physical attributes, complexity. Computational Solutions: symbolic data structures, simulation, massively parallel computing. Application of Expertise to Computational Biology OR AND xxabcd