On the Properties of the Reaction Counts Chemical Master Equation

The reaction counts chemical master equation (CME) is a high-dimensional variant of the classical population counts CME. In the reaction counts CME setting, we count the reactions which have fired over time rather than monitoring the population state over time. Since a reaction either fires or not, the reaction counts CME transitions are only forward stepping. Typically there are more reactions in a system than species, this results in the reaction counts CME being higher in dimension, but simpler in dynamics. In this work, we revisit the reaction counts CME framework and its key theoretical results. Then we will extend the theory by exploiting the reactions counts’ forward stepping feature, by decomposing the state space into independent continuous-time Markov chains (CTMC). We extend the reaction counts CME theory to derive analytical forms and estimates for the CTMC decomposition of the CME. This new theory gives new insights into solving hitting times-, rare events-, and a priori domain construction problems.


Introduction
Continuous-time Markov chains (CTMC) accurately capture the dynamics of a broad range of biochemical reaction systems. The CTMCs come in two flavours: The discrete state space, the chain transitions from one state to another, or the continuous state space, the state transitions are smooth yet non-differentiable. Each type has an intuitive interpretation. Discrete state spaces describe the population or counts of chemicals in a system, while continuous states spaces describe concentrations of chemicals in a system [1,2]. It is tempting to generalise concentrations to be simply scaled populations, which would mean that all systems could be mapped into the continuous setting and solved there. However, this is not the case mathematically. It was shown that for large populations, the discrete CTMC and continuous CTMC were equivalent [3,4]. If the large population assumption is not satisfied, mathematically, the discrete state space system has to be studied in its own right.
The probability distribution of a CTMC over the discrete state space in the biochemical context is found by solving the chemical master equation (CME). We first present the CME and then describe its components. The formula of the CME is written as follows, ∂p(Z(t) = z) ∂t = N r ∑ n=1 a n (z − ν n ) p(Z(t) = z − ν n ) − N r ∑ n=1 a n (z) p(Z(t) = z).
In the equation above, Z(t) is a CTMC over the state space Ω ⊂ N N s 0 . Each state is a vector of N s ∈ N non-negative integers describing the population of the species at time t ≥ 0. Starting from the left-hand side, the equation states that the change in probability of being in a state z ∈ Ω at time t is given by the sum of two terms. The first term describes the probability flowing into the state z and the second term describes the probability flowing out of the state z. There are N r ∈ N reactions perturbing the population; the terms ν n are referred to as stoichiometric vectors, they capture the net change in population if the nth reaction fires. Hence, subtracting the stoichiometric vectors ν n from z gives us the set of all previous states which might transition into z and "contribute" probability. The last piece of information in the equation are the rates at which reactions fire, these are encapsulated in the propensity functions {a n : Ω → R + , for n = 1, . . . , N r }. In summary, the CME describes the change in probability of observing a CTMC in a certain state, which is equal to the sum of probability transitioning into the state, minus the sum of probability leaving the state.
Even though the dynamics of the derivative are fairly simple, solving the CME is a hard problem [5][6][7][8][9][10][11][12]. A special case of the CME which is truly unyielding to approximation is when a system is close to its population boundary (for example, close to zero). In this scenario, none of the state transitions around a state near the boundary can be summarised by the average transitions out of the state. This impedes most approximation methods, and even if a method was successful, its computational effort would be equivalent to that of solving the Finite State Projection for the same error. An approach which was proposed in various different contexts to simplify dynamics, was to study the number of reactions fired rather than the population counts [6,[13][14][15][16][17]. Because reactions cannot "un-fire", the state transitions are only moving forward. Furthermore, given that the system's starting population is known, the species count in any state can be reconstructed from the reaction counts.
In this work, we will reintroduce the reaction counts variant of the CME. We will then explore the theoretical and structural results which emerge from its forward stepping process. Then, we will show how the reaction counts CME can be used to construct solutions to the classical CME. Lastly, we decompose the state space of the CME into independent CTMCs and give analytical forms and estimates to calculate their probabilities. The purpose of this work is to gain intuition and explore structural properties of the CME, hence, the motivation is more theory rather than the application of the CME. In light of that, we omit a discussion of numerical methods in this paper and envisage this aspect in future research.

Formulation
We denote the state space of the reaction counts CME by Λ ⊂ N N r 0 . Each state is a vector of non-negative integers of length N r . Each element of the vector represents the number of times its corresponding reaction has fired. In the CME setting, the change in state after a reaction fires is given by the stoichiometric vector, which we denoted earlier by v n , for n = {1, . . . , N r }. This vector quantifies the net change in populations after the reaction has fired. Analogously, in the reaction counts CME setting, a change in state indicates that a reaction has fired, and its corresponding reaction count is incremented by one. Therefore, the stoichiometric vector for the nth reaction is simply the identity vector 1 n ; the vector is zero in all but the nth position, where it is one.
We bridge the species counts CME and the reaction counts CME with the mapping Γ : The mapping above links the reaction counts CME to the species counts CME by stating that, given the starting state x 0 and the reactions which have fired are known, then the current state in the species counts is the starting species state plus the sum of stochiometries of all the reactions which have fired.
It is important to note that the map Γ is injective into the species state space Ω. In most cases, Λ is of higher dimension than Ω, hence, Γ is seldom bijective. For our purpose, we only need the pull back map of Γ. We denote the pull back map as Γ −1 : Ω × Ω → P (Λ), where for (x 0 , x) ∈ Ω × Ω, With the mapping between Λ and Ω established, we can now inherit the propensity function from the species counts over to the reaction counts. For n = 1, . . . , N r , the reaction counts propensity of the nth reaction is given by, With the state space, stoichiometry, and the propensities established in the reaction counts setting, we are ready to formulate the reaction counts based Kurtz process. For x 0 ∈ Ω, let (R x 0 (t)) t≥0 be the reaction counts Kurtz process, The corresponding reaction counts CME for the process above is given by, for all r ∈ Λ. The initial condition for the reaction counts CME is a points mass on the origin, Upon first glance, the CME of the reaction counts is simpler in its complexity compared to its species counter part. In the reaction case, the processes only move forward, which gives rise to simple forward propagating dynamics. Furthermore, given solutions to the reaction counts CME exist, with the simple application of the push forward measure, we would obtain: The relationship given above is the critical motivation for studying the reaction counts CME. In principle, if structures and results could be attained in the reaction counts setting, then by using Γ, these results can be mapped into species setting. The simplest example of this is the proof for the existence of solutions of the CME for finite time. We now show that the reaction counts CME has analytical solutions, then using the push forward measure in Equation (8), we prove that the solutions of the CME exist for a broad range of propensity functions.

Analytical Solutions of the Reaction Counts CME
Firstly, we will establish the notations and assumptions needed to present the results. For brevity, we denote the sum of all propensities α n as: The reaction counts CME in Equation (6) is a difference differential equation, hence, by arranging the probability states in a vector u(t) := (p(R x 0 (t) = r)) r∈Λ , we reduce solving the reaction counts CME to solving the ODE, For r, l ∈ Λ, the matrix A * has the properties: [A * ] r,r ≤ 0, [A * ] r,l ≥ 0, with ∑ l∈Λ [A * ] l,r = 0. We will prove that A * is a generator of a one-parameter semigroup. Before this, let us consider a simple two reaction system to gain some intuition into the different components of the reaction counts setting.

Example 1.
Let us consider the birth-death process in the context of the reaction counts CME. The birth-death process in the species count is given by, where x 0 ∈ N 0 is the starting population, and the birth and death rates are denoted by c b and c d , respectively. We can translate this process into the reaction counts setting using the mapping, We restrict the reaction counts state space Λ ⊂ N 0 × N 0 to only contain states which yield non-negative values by applying Γ x 0 . Substituting the mapping Γ x 0 and the process Z(t) into Equations (2) to (5) leads to the reaction counts birth-death process formulation: The relationship between the reaction count state space and the species count state space is visualised in Figure 1A. The colours in the figure show how the species count state space partitions the reaction count state space. To demonstrate the forward moving structure of the reaction counts CME, we derive the generator for the first nine states of its state space: where, The initial condition is the identity vector with the total probability mass on state (0, 0). We can observe that due to the forward moving nature of the reaction counts setting, A * is a lower diagonal matrix. In Figure 1B,C, we present a birth-death process with initial state x 0 = 0, birth rate c b = 1.0, and death rate c d = 0.1. Specifically, we show the probability distributions of the first three states of that process which correspond to state 1 in the species count setting. In Figure 1B, it is shown that the probability distribution of being in state 1 in the species count CME setting bounds the corresponding reaction counts CME distributions. In Figure 1C, we progressively add the first three reaction counts states corresponding to the state 1, showing that the reaction counts CME approximates the species counts CME from below.
x 0   3)). The distribution of the species count chemical master equation (CME) in state 1 at t is approached from below by the sum of the probabilities of the reactions firing which result in being in state 1.
Theorem 1 (Sunkara 09 ([15])). Given a system with N s species and N r reactions at a starting state x 0 ∈ Ω. If A r is the generator for the reaction counts CME (6), then: There exists a permutation matrix P such that P T A * P is lower triangular; 2.
The spectrum of A * is the set: The property of the reaction counts setting, that the process only moves forward, aids in showing that the generator could be rewritten as a lower triangular matrix. We know that the spectrum of a lower triangular matrix are the diagonal elements of the matrix. In our case, the diagonal elements are simply the negative sum of the outgoing propensities. This then reveals that the spectrum of the generator A * is in the negative real numbers. Then by the spectral mapping theorem, solutions to the reaction counts CME exist. We can further exploit this "forward stepping" structure to write the analytical solutions for the probability at each state in Λ.
Combining Proposition 1 with the push forward measure in Equation (8), we see that at finite time t the solutions to the CME (1) exist. Unfortunately, since the reaction counts CME cannot reach a stationary state (in cases where the state space Λ is not finite), the proof for the existence of stationary solutions for a generalised CME is still an open problem. Now that the solutions of the reaction counts CME have been established, we can probe further into its properties. Firstly, we explore how the state space of the reaction count CME has a naturally hierarchical partitioning, and how this partitioning can be used to build a sequence of approximate sub-processes.

Partitioning the State Space
to be the set of all states which are reachable by m steps from the origin 0. The state space Λ naturally partitions into non-intersecting subsets, If we consider truncating the state space progressively, we find that this is equivalent to the Finite State Projection with an N-step domain expander [9,18]. Lemma 1. For x 0 ∈ Ω, let (R x 0 (t)) t≥0 be the reaction counts Kurtz process (5). Then for any m ∈ N, Proof. Fix m ∈ N. Let (R x 0 ,∇ m (t)) t≥0 be the same process as (R x 0 (t)) t≥0 , but with the restriction that all propensities of states r ∈ ∪ ∞ m=m+1 ∇m are zero. Since in the reaction counts case, states only transition forward, we have that, That is, the probability of both processes are the same for states leading up to the states in ∇ m . However, since the process R x 0 ,∇ m (t) does not evolve past ∇ m , by the conservation of probability we have that, Substituting in Equation (15) for states which appear before ∇ m+1 reduces the above expression to, By the conservation of probability, hence, substituting this into the right-hand side of Equation (17) and subtracting the like terms gives, Lemma 1 is an alternative formulation of the principle behind the Finite State Projection method. We extend on this result and can show that for a desired error ε ∈ (0, 1), there exists a subset of the state space Λ which will produce an approximation with the desired error.
Theorem 2. For x 0 ∈ Ω, let (R x 0 (t)) t≥0 be the reaction counts Kurtz process (5). For ε > 0 there exists m ∈ N such that, Proof. The proof is an extension of Lemma 1. We define, and, the left-and right-hand terms of Equation (14). Then for m ∈ N, Lemma 1 can be reformulated to state, separating the ∇ m+1 states from ψ m+1 gives us, Combining the last and first term in the equalities gives us, Rearranging the equality reduces to, ψ m+2 − ψ m+1 < 0. We have shown that ψ • is monotonically decreasing. By definition, ψ • has the properties that ψ 1 = 1.0 − p(R x 0 (t) = 0) and lim m→∞ ψ m = 0. Hence, there exists an m such that ψ m < ε.
Theorem 2 is an alternative proof for the fact that, when studying transient dynamics (finite time) of the CME for an arbitrary precision, one can always find a finite state space to project the CME onto.
The key structure that we used to prove this is that the state space of reaction counts has a natural partitioning and that the probability only flows forward. This gave us the monotonicity needed to prove that state space truncation of the CME is well-posed. In the next section, we further decompose each state in the reaction counts state space into paths over the state space.

Path Chains
We define a Markov chain over a path in the reaction counts state space. The chain must be such that it mimics a "realisation" over the reaction state space. Using Proposition 1, we define a path chain over an admissible path in the reaction state space. It is important to note that a path chain is a continuous-time Markov chain (CTMC) [19], where all reactions which transition the state off the path of the chain are accrued into a sink state. For brevity, we simply remove this component and only describe the states of interest (see Figure 2). Also, given all chains are from the same reaction counts setting, we omit explicitly stating x 0 in the propensity functions. We now define a path chain. Figure 2. The cartoon above depicts the generator of a path chain. With α(·) being the total outward propensity and β(·, ·) the propensity to transition to the next state in the chain. All reactions leading away from the chain are directed into the sink state.

Definition 5.
For m ∈ N, g ∈ γ m , and C ∈ (0, 1], we define a path chain to be the stochastic process (X g,C (t)) t≥0 , with state space {g ∪ {sink}} and the probability distribution given by, for k ∈ {2, . . . , m}. Then to conserve probability, The propensity function α is inherited from Equation (9) and β(g k , g k+1 ) := α n (g k ), where n is the reaction index which transitions the state g i to g i+1 .
Before stating the new proposition, let us recall the decompositions performed so far. Firstly, we showed that every state in the species state space can be decomposed into multiple reaction states in the reaction count setting. That is, a population state can be decomposed into all the different ways in which it can be visited. We then ventured further and showed that a path on the species counts state space corresponds to a path with only forward stepping transitions in the reaction counts state space. Now, we extend this further by showing that any state in the reaction counts state space can be decomposed into the sum of all independent path chains which start at the origin and end in that state. Proposition 2. For x 0 ∈ Ω, let (R x 0 (t)) t≥0 be the Reaction counts Kurtz process (5).
For r ∈ Λ\0, let G(r) := {g ∈ γ r 1 +1 : g 1 = 0 and g r 1 +1 = r}, be the set of all admissible paths of length r 1 + 1 which start at 0 and ending at r (Definition 4). Then, Proof. The Proposition will be proved using mathematical induction. Firstly, we show the base case; that every state which is reachable by one step from the origin satisfies Equation (20). Let r = I n , with n ∈ {1, . . . , N r }. Applying Proposition 1 we know that, Now we consider the path chains leading to I n . The state can only be reached in one way, hence, we have that G(I n ) = {g = (0, I n )}. Now calculating the probability of the evolution of a path chain (Definition 5) over g ∈ G(I n ) gives us, Given the two equations above match, we can conclude that for r ∈ ∇ 1 , p(R(t) = r) = ∑ g∈G(r) p(X g,1 (t) = r).
Now we perform the inductive step. Fix m > 1. Assume that forř ∈ ∇ m , Then for r ∈ ∇ m+1 , Proposition 1 states that, using the inductive assumption Equation (23) on the right-hand side inside the integral, Rewriting the propensities in the path propensity notation gives, p(X g,1 (s) = r − I n )ds, Since all paths in G(r) are paths from the set ∪ N r n=1 G(r − I n ), with r as the last state, the two summations reduce to give, By Definition 5, the term above captures all the paths in G(r), therefore, = ∑ g∈G(r) p(Xĝ ,1 (s) = r) ds.
We have shown that each state in the reaction counts CME can be decomposed into the framework of "path chains" that we have defined. In essence, we have shown that the path chains are trajectories of the reaction counts Kurtz process. Even though at first glance the result is not a startling revelation, the real novelty lies in how we derived the probability distributions for these trajectories. By carefully decomposing the state space and concurrently deriving the corresponding probability distributions, we were able to give an analytical form for the probability of individual trajectories of the Kurtz process. Using the probability distribution given over the path chains in Definition 5, we can derive the classical stochastic simulation algorithm [20]. Using the path chains framework we have introduced so far, we can build realisations for applications such as: Hitting time problems, rare event problems, observable problems, etc. In the following section, we further build on the properties of path chains by proposing a method for estimating the path probabilities of trajectories.

Gated-and Un-Gated Path Chains
Given a path or trajectory, we define the path probability to be the probability distribution of the last state in the chain. We can use Definition 5 to analytically compute the probability of any path. However, we can exploit the properties of the path chains further and derive some simple estimates for the path probability. We borrow the notion of gating and un-gating introduced by Sunkara (2013) [21], and show how these can be used to calculate estimates for the path probabilities.
The concept of gating is mathematically tedious to prove, however, the concept is fairly simple. Given a chain g of length m, gating this chain at position j < m means that we set the propensity of leaving state g j to zero. Hence, the probability will simply flow into state g j and remain there (hence, the term "gating"). Then we can "un-gate" the state g j , which means that we reset the time to zero, set the initial probability at state g j to the accumulated probability from the gating, and then allow the process to continue. The reason we are interested in this notion of gating and un-gating is that for path chains, it happens so that gating and un-gating the chains gives an upper bound for the original path probability. We will now prove that this is indeed the case.

Definition 6.
For an admissible path g ∈ γ m , we define a truncated path g j := (g j , g j+1 , . . . , g m ), where the first j − 1 terms of the path are ignored. Definition 7. Fix ∆t < ∞ and x 0 ∈ Ω. Let g ∈ γ m be a path of length m + 1. We define (X g,C (t)) t∈[0,∆t] to be a path chain over g in the time interval [0, ∆t]. Then for j ∈ {2, . . . , m} we define an un-gated path chain over g j to be given by: for k ∈ {j + 1, . . . , m} and, p(X g j ,C (t) = g j ) := e −α(g j ) t C j where, To conserve probability, p(X g j ,C (t) = g k ) = sink) := 1.0 − ∑ g k ∈g j p(X g,C (t) = g k ).
We see that the un-gated path chain is a normal path chain with the initial probability reset to the total probability which has flown into the gated state (see Figure 3). We now show that gating and un-gating over a path gives an upper bound for the path probability. First we consider the case of a single gating and un-gating at the position g 2 .
Un-gated Gated X X X X X Figure 3. The cartoon above depicts the cascade of gating being performed on a path chain. When a state is gated, the propensities leaving the state are set to zero (depicted with a red cross). When the state is un-gated, the propensities are reintroduced.
Proof. We break down the proof into two steps. First we investigate the bounds formed by gating at the second step, and then we prove the bound over the remaining states in the chain. We begin by showing that for t ∈ [0, ∆t], t 0 p(X g,C (s) = 2) dt ≤ t 0 p(X g 2 ,C 2 (s) = 2) dt.
From the definition of the path chain (Definition 5), the solution for the probability of being in state g 2 at time t is given by, Using the solution above, we can calculate the probability which would accumulate in g 2 if the chain was gated at g 2 , Substituting the above terms into the definition of the probability of being is state g 2 at time t in the un-gated path chain (X g 2 ,C 2 (t)) t∈[0,∆t] gives us, p(X g 2 ,C 2 (t) = g 2 ) = C β(g 1 , g 2 ) Taking the integral of Equations (26) and (28) over the interval [0, t] ⊆ [0, ∆t] gives us, To simplify notation, let us define, Then the difference betweenφ(t) and φ(t) reduces to, Since e −α(g 1 )∆t ≤ e −α(g 1 )t for all t ∈ [0, ∆t], we attain the lower bound, We show that the right-hand side of the equation above is always positive. We define the right hand-side of Equation (32) as a function, Ψ(g 1 , g 2 , t) := C β(g 1 , g 2 ) e −α(g 2 )t α(g 2 ) − e −α(g 1 )t α(g 1 ) + e −(α(g 1 )+α(g 2 ))t (α(g 1 ) − α(g 2 )) We notice that the function Ψ has the property, Ψ(g 1 , g 2 , t) = Ψ(g 2 , g 1 , t).
We have shown that the outflow of probability in the un-gated chain is more than in the original path chain. We now show that this phenomenon continues all the way down the chain. We prove this using mathematical induction. First, let us consider the base case j = 3. By the definition of path chains, applying condition (25) gives us that, We now build the inductive step. Fix k ∈ {4, . . . , m}, assume that, for all t ∈ [0, ∆t], Then by the definition of path chains, p(X g,C (t) = g k+1 ) − p(X g 2 ,C 2 (t) = g k+1 ) = β(g k , g k+1 ) t 0 e −α(g k+1 )(t−s) p(X g,C (s) = g k ) − p(X g 2 ,C 2 (s) = g k ) ds, ≤ β(g k , g k+1 ) t 0 p(X g,C (s) = g k ) − p(X g 2 ,C 2 (s) = g k ) ds, applying the inductive assumption Equation (34) gives us that, Hence, by mathematical induction, for j ∈ {3, . . . , m} and t ∈ [0, ∆t], the probabilities of the un-gated chain bound the probability on the original path chain, that is, The intuition behind Lemma 2 is that once we gate and un-gate a state, the un-gated chain has more probability in it than the regular path chain beyond the gated state. Since the dynamics of the path chain beyond the gated state are not changed, we would expect that the un-gated chain (having more probability) would be an upper bound for the original path chain. The proof, as seen above, is sadly tedious. We now consider a cascade of gating and un-gating, that is, we gate and un-gate as we transition through the path chain. We prove that this gives an upper bound for the path probabilities.

Cascade of Gating and Un-Gating
We now set up a cascade of gating and un-gating at ever state of the path chain. We achieve this by defining the starting probability of the un-gating. Previously, an un-gated path chain at position j had a initial probability of, We now introduce a recurrent initial probability, for j ∈ {2, . . . , m − 1}. Using this new recursive initial probability, we will build a sequence of path chains and using the idea of gating and un-gating at each transition of the path chain, we can construct an upper bound for the path probability.
Theorem 3. Fix g ∈ γ m and ∆t > 0. Let (X g,C (t)) t∈[0,∆t] be a path chain over g. We recursively define a set of un-gated chains, {(X g j ,C j (t)) t∈[0,∆t] : j ∈ {2, . . . , m − 2}}. Then for k ∈ {3, . . . , m − 1}, Proof. We prove this result by repeatedly applying Lemma 2. Fix k ∈ {3, . . . , m − 1}, then by the first clause of Lemma 2 we have that, ∆t 0 p(X g k−1 ,C k−1 (s) = g k ) ds ≥ ∆t 0 p(X g k−2 ,C k−2 (s) = g k ) ds, since g k is the third state of the chain g k−2 , we can apply the second clause of Lemma 2 to get, stepping backward in the chain using Lemma 2, we reduce down to, In summary, by gating and un-gating along a path chain we can easily construct estimates for the probability of the trajectories of interest. We now consider an example where we build a path chain of the birth-death process introduced in Example 1, to show how to compute the gating and un-gating steps.
The generator for this path chain is given by, We can solve for p(X g , 1(t) = (1, 3)) by simply taking the matrix exponential at time t and applying it to the respective initial probability. Now we will construct the gating and un-gating approximation. This approximation is calculated using the following recursive equation: Let m be the number of states in the chain g, then, u n (t) = β(g n−1 , g n ) α(g n−1 ) 1.0 − e −α(g n−1 ) t u n−1 (t), for n = 2, . . . , m with u 1 = 1.0. The functions α and β are as given in Definition 5. Hence, u 5 (t) is the gated and un-gated estimate for the probability p(X g,1 (t) = (1, 3)). In Figure 4A, we plot the true path probability, p(X g,1 (t) = (1, 3)), and the upper bound for the path probability, u 5 (t), for time interval t ∈ [0, 10] seconds. The graph shows that u 5 (t) is an upper bound for p(X g , 1(t) = (1, 3)) at any time point. It is interesting to observe that the error between the two functions decreases over time, however it is not clear whether the difference will converge to zero as time goes to infinity. To test whether this behaviour can be observed in other parameter settings, we plot the analytical path probability and its upper bound for three different parameter settings in Figure 4B. We observe the same effect in all three presented cases. This raises the question whether this observation is a structural property or only an artefact of the specific model which is considered here.
A. B.

Conclusions
We began by formulating the reaction counts CME and showing that its forward stepping characteristic yields analytical solutions. Then, with a simple application of the push forward measure, we could prove the existence of solutions of the CME for finite time. We further decomposed the reaction counts state space into independent CTMCs and gave analytical forms and estimates for their path probabilities. Hence, we have derived analytical theory for trajectories which arise from the solutions of the CME. This theory can be used for computing observable estimates of the underlying CTMCs. We can also use the paths to estimate the hitting times and rare event probabilities. A natural future direction would be to investigate if the current framework of the time independent propensities can be translated to the time dependent propensities. An even more challenging task would be, in the context of parameter inference, to reverse time on the trajectories and to cascade probability backwards.