tensor train (QTT), or transposed quantized tensor train (QT3) formats. HTD works with Qn as a sum of Kronecker products of small matrices, whereas QTT/QT3 ...
A Software Tool for the Compact Solution of the Chemical Master Equation Tuˇgrul Dayar and M. Can Orhan Bilkent University and Kanava Technologies
Objective To solve the chemical master equation (CME):
as accurately
as fast
in as little of memory as possible in a sequential setting.
Chemical Master Equation !
)
Given CTMC S t , t ¥ 0 with H dimensions and state vector i i , . . . , i such that 1 H S t S1 t , . . . , SH t and Pr S t i Pr S1 t i1, . . . , SH t iH , let π0 be the initial probability distribution vector of the underlying infinitesimal generator matrix Q. Then transient probability distribution 1|R| vector πt P R¥0 of Q at time t P R¥0 satisfies dπt πtQ, πte 1, (1) dt where R is the reachable state space of the CTMC and e is a vector of 1’s. When the CTMC arises in the area of systems of stochastic chemical kinetics, (1) is referred to as the CME. For the CME, H and number of different transition classes, K, is finite, but R is almost always countably infinite.
Kronecker-based Model State space of dimension h is S phq Z¥0, and when H there are no unreachable states, R h1 S phq. For k 1, . . . , K, transition class k is represented by p kq αk i , v . Here, αk i P R¥0 is the transition rate function specifying the transition rate from p k q state i P R to state i v P R and v pkq P Z1H is the state change vector specifying the successor pkq state of the transition, with vh denoting the change in state variable ih P S phq due to a class k transition. A Kronecker-based model, which has separable state dependent transition rate functions
αk i φk
H ¹ h1
phq
αk ih ,
is used by letting the transition matrix of dimension h with state space S phq and transition class k be phq |S phq||S phq| denoted by Qk P R¥0 and given entrywise for ih, jh P S phq as [1] $ p hq p kq ' & αk ih if jh ih vh phq Qk ih, jh ' . % 0 otherwise Then Q QO QD with K K H H ¸ ¸ â â phq phq QO φk Qk , QD φk diag Qk e . h1 h1 k 1 k 1
Software Tool The solver [2] uses the implicit time stepping backward differentiation formulae (BDF) wellsuited for stiff ODEs. At time step n, BDF method of order o, BDFo, solves the linear system o 1 ¸ l ∇ pn ∆tpnQn with Qn Q Rn, Rn l1 l for the transient probability distribution vector pn, where ∆t is the step size, Rn is the truncated state space, Qn is part of Q incident on Rn, and backward difference vectors are defined as ∇ pn pn for n P Z¥0, l l1 l 1 ∇ pn ∇ pn ∇ pn1 for l 1, . . . , o, n P Z¡0 0
At the nth time step, Rn h1 Snphq is obtained through aggregation on the prediction vector o ¸ p 0q l pn pn1 ∇ pn1. l1 Solution vectors are stored in hierarchical Tucker decomposition (HTD), quantized tensor train (QTT), or transposed quantized tensor train (QT3) formats. HTD works with Qn as a sum of Kronecker products of small matrices, whereas QTT/QT3 works with a low-rank approximation of Qn in the same format [3]. H
At each time step, the linear system is solved by Jacobi (J) iteration using Newton-Schulz (NS) method to compute reciprocals of diagonal elements of the coefficient matrix for HTD and density matrix renormalization group method for QTT/QT3. Fixed and adaptive rank control strategies are available as HTDA, HTDM, and HTDF variants of the solver in which (adaptive, adaptive), (fixed, adaptive), and (fixed, fixed) rank bounds are used in (J, NS) methods.
Example A model with 5 molecules, a, b, c, µ P R¡0, and 10 transition classes in Table 1 is considered, where eh is the hth principal axis vector. The model is analyzed for a, b, c, µ 0.7, 1.0, 5.0, 0.07 using BDF5 with tolerance 109 starting from ( π0 10, 10, 10, 10, 10 1 for t P 1, . . . , 10 . Table 1:Transition classes of the cascade model k 1 2 3 4 5 6 7 8 9 10
p1 q p2q p3 q p4 q p5 q φk αk pi1q αk pi2q αk pi3q αk pi4q αk pi5q a 1 1 1 1 1 µ i1 1 1 1 1 1 1 1 1 b bi1i1 c µ 1 i2 1 1 1 i2 b 1 1 1 1 bi2 c µ 1 1 i3 1 1 i3 b 1 1 1 1 bi3 c µ 1 1 1 i4 1 i4 b 1 1 1 1 bi4 c µ 1 1 1 1 i5
v pk q eT1 eT1 eT2 eT2 eT3 eT3 eT4 eT4 eT5 eT5
Figure 2:Mean values with BDF5 using HTDA
Fig. 2 depicts the mean number of molecules when BDF5 with HTDA is used to analyze the cascade model starting from π0 0, 0, 0, 0, 0 1. All results are obtained in at most 3,783 s with relative er rors in 5 107, 103 using a maximum Rn size of 58,786,560 and a maximum of 2,301,678 nonzeros.
References [1] T. Dayar. Analyzing Markov Chains Using Kronecker Products. Springer, New York (2012) [2] CompactTransientSolver Software (2017) www.cs.bilkent.edu.tr/~tugrul/software.html.
(a) Truncated state space size
(b) Ranks of solution vectors
[3] T. Dayar and M.C. Orhan. On compact vector formats in the solution of the chemical master equation with backward differentiation. Numer. Linear Algebr. Appl., e2158 (2018)
Acknowledgements
(c) Time steps to solution
(d) Number of nonzeros
Important Result No need to compute low-rank approximation of Qn at each time step when HTD is used.
A maximum run time of 1,000 s is imposed on the experiments on an Intel Core i7 2.6 GHz with 16 GB main memory. Results in Fig. 1 indicate that max 7 5 imum relative errors of 10 and 10 are obtained respectively with QTT and adaptive rank controlled HTD formats within 1,000 s in all problems. Memory and time requirements of HTDA are at least an order of magnitude better than those with QTT.
Part of this work is supported by the AvH Foundation through the Research Group Linkage Programme. The research of M.C. Orhan is carried out during his PhD studies at Bilkent University and supported by TÜBİTAK under grant 2211-A.
Contact Information (e) Run time in seconds
(f) Relative accuracy of solution
Figure 1:Various measures associated with BDF5
www.cs.bilkent.edu.tr/~tugrul/tugrul.html