Markov Population Models (MPMs) are a special form of CTMCs where each CTMC state is a population vector over a set of species. We use \(\mathcal {Z}\) to denote the finite set of species (again, with an implicit enumeration) and \(\mathbf {y} \in \mathbb {Z}_{\ge 0}^{|\mathcal {Z}|}\) to denote the population vector. Hence, \(\mathbf {y}[z]\) identifies the number of entities of species z. The stochastic dynamics of MPMs is typically expressed as a set of reactions \(\mathcal {R}\), each reaction, \((\alpha , \mathbf {b}) \in \mathcal {R}\), is comprised of a propensity function \(\alpha : \mathbb {Z}_{\ge 0}^{|\mathcal {Z}|}\rightarrow \mathbb {R}_{\ge 0}\) and a change vector \(\mathbf {b} \in \mathbb {Z}^{|\mathcal {Z}|}\). When reaction \((\alpha , \mathbf {b})\) is applied, the system moves from state \(\mathbf {y}\) to state \(\mathbf {y}+\mathbf {b}\). The corresponding rate is given by the propensity function. Therefore, we can rewrite the transition matrix of the CTMC asFootnote 3:
Next, we show that our counting abstractions have a natural interpretation as MPMs.
5.1 Node-Based Abstraction
First, we define the set of species \(\mathcal {Z}\). Conceptually, species are node states which are aware of their partition:
$$\begin{aligned} \mathcal {Z} = \{ (s,P) \mid s \in \mathcal {S}, P \in \mathcal {P} \} \,. \end{aligned}$$
Again, we assume an implicit enumeration of \(\mathcal {Z}\). We use z.s and z.P to denote the components of a give species z.
We can now represent the lumped CTMC state as a single population vector \(\mathbf {y} \in \mathbb {Z}_{\ge 0}^{|\mathcal {Z}|}\), where \(\mathbf {y}[z]\) the number of nodes belonging to species z (i.e., which are in state z.s and partition z.P). The image of the lumping function \(\mathcal {L}\), i.e. the lumped state space \(\mathcal {Y}\), is now a subset of non-negative integer vectors: \(\mathcal {Y} \subset \mathbb {Z}_{\ge 0}^{|\mathcal {Z}|}\).
Next, we express the dynamics by a set of reactions. For each rule \(r = s_1 \xrightarrow {f} s_2 \) and each partition \(P \in \mathcal {P}\), we define a reaction \((\alpha _{r,P},\mathbf {b}_{r,P})\) with propensity function as:
$$\begin{aligned} \alpha _{r,P}:&\mathcal {Y} \rightarrow \mathbb {R}_{\ge 0} \\ \alpha _{r,P}(\mathbf {y}) =&\frac{1}{\mathcal {L}^{-1}(\mathbf {y})} \sum \limits _{x \in \mathcal {L}^{-1}(\mathbf {y})} \sum \limits _{n \in P} f(\mathbf {m}_{x,n}) \mathbb {1}_{x(n)=s_1} \,, \end{aligned}$$
where \(\mathbf {m}_{x,n}\) denotes the neighborhood vector of n in network state x. Note that this is just the instantiation of Eq. 1 to the MPM framework.
The change vector \(\mathbf {b}_{r,P} \in \mathbb {Z}^{|\mathcal {Z}|}\) is defined element-wise as:
Note that \(s_1, s_2\) refer to the current rule and z.s to the entry of \(\mathbf {b}_{r,P}\).
5.2 Edge-Based Counting Abstraction
We start by defining a species neighborhood. The species neighborhood of a node n is a vector \(\mathbf {v} \in \mathbb {Z}_{\ge 0}^{|\mathcal {Z}|}\), where \(\mathbf {v}[z]\) denotes the number of neighbors of species z. We define \(\mathcal {V}_n\) to be the set of possible species neighborhoods for a node n, given a fixed contact network and partitioning. Note that we still assume that a dummy node is used to encode the number of states in each partition.
Assuming an arbitrary ordering of pairs of states and partitions, we define
$$\begin{aligned} \mathcal {Z} = \big \{ (s_{source},P_{source},s_{target},P_{target}) \mid&s_{source},s_{target} \in \mathcal {S}, P_{source},P_{target} \in \mathcal {P}, \\&(s_{source},P_{source}) \le (s_{target},P_{target}) \big \} \,. \end{aligned}$$
Let us define \(\mathcal {V_P}\) to be the set of partition neighborhoods all nodes in P can have:
$$\begin{aligned} \mathcal {V}_P = \bigcup _{n \in P}\mathcal {V}_n \,. \end{aligned}$$
For each rule \(r = s_1 \xrightarrow {f} s_2 \), and each partition \(P \in \mathcal {P}\), and each \(\mathbf {v} \in \mathcal {V}_P\), we define a propensity function \(\alpha _{r,P,\mathbf {v}}\) with:
$$\begin{aligned} \alpha _{r,P,\mathbf {v}}:&\mathcal {Y} \rightarrow \mathbb {R}_{\ge 0} \\ \alpha _{r,P,\mathbf {v}}(\mathbf {y}) =&\frac{1}{\mathcal {L}^{-1}(\mathbf {y})} \sum \limits _{x \in \mathcal {L}^{-1}(\mathbf {y}) } \sum \limits _{n \in P} f(\mathbf {m}_{x,n}) \mathbb {1}_{x(n)=s_1, V(n)=\mathbf {v}} \,. \end{aligned}$$
Note that the propensity does not actually depend on \(\mathbf {v}\), it is simply individually defined for each \(\mathbf {v}\). The reason for this is that the change vector depends on the a node’s species neighborhood. To see this, consider a species \(z = (s_{source},P_{source},s_{target},P_{target})\), corresponding to edges connecting a node in state \(s_{source}\) and partition \(P_{source}\) to a node in state \(s_{target}\) and partition \(P_{target}\). There are two scenarios in which the corresponding counting variable has to change: (a) when the node changing state due to an application of rule r is the source node, and (b) when it is the target node. Consider case (a); we need to know how many edges are connecting the updated node (which was in state \(s_1\) and partition P) to a node in state \(s_{target}\) and partition \(P_{target}\). This information is stored in the vector \(\mathbf {v}\), specifically in position \(\mathbf {v}[s_{target},P_{target}]\). The case in which the updated node is the target one is treated symmetrically. This gives rise to the following definition:
The first two lines of the definition handle cases in which the node changing state is the source node, while the following two lines deal with the case in which the node changing state appears as target.
Figure 4 illustrates how a lumped network state is influenced by the application of an infection rule.
5.3 Direct Construction of the MPM
Approximating the solution of an \(\mathtt {SIS}\)-type process on a contact network by lumping the CTMC first, already reduces the computational costs by many orders of magnitude. However, this scheme is still only applicable when it is possible to construct the full CTMC in the first place. Recall that the number of network states is exponential in the number of nodes of the contact network, that is, \(|\mathcal {X}| = |\mathcal {S}|^{|\mathcal {N}|} \).
However, in recent years, substantial effort was dedicated to the analysis of very small networks [25, 32, 35, 37, 48]. One reason is that when the size of a network increases, the (macro-scale) dynamics becomes more deterministic because stochastic effects tend to cancel out. For small contact networks, however, methods which capture the full stochastic dynamics of the system, and not only the mean behavior, are of particular importance.
A substantial advantage of the reduction to MPM is the possibility of constructing the lumped CTMC without building the full CTMC first. In particular, this can be done exactly for the node counting abstraction. On the other hand, for the edge counting we need to introduce an extra approximation in the definition of the rate function, roughly speaking introducing an approximate probability distribution over neighboring vectors, as knowing how many nodes have a specific neighboring vector requires us full knowledge of the original CTMC. We present full details of such direct construction in the Appendix of [20].
5.4 Complexity of the MPM
The size of the lumped MPM is critical for our method, as it determines which solution techniques are computationally tractable and provides guidelines on how many partitions to choose. There are two notions of size to consider: (a) the number of population variables and (b) the number of states of the underlying CTMC. While the latter governs the applicability of numerical solutions for CTMCs, the former controls the complexity of a large number of approximate techniques for MPMs, like mean field or moment closure.
Node-Based Abstraction. In this abstraction, the population vector is of length \(|\mathcal {S}|\cdot |\mathcal {P}|\), i.e. there is a variable for each node state and each partition.
Note that the sum of the population variables for each partition P is |P|, the number of nodes in the partition. This allows us to count easily the number of states of the CTMC of the population model: for each partition, we need to subdivide |P| different nodes into \(|\mathcal {S}|\) different classes, which can be done in \(\left( {\begin{array}{c}|P|+|\mathcal {S}|-1\\ |\mathcal {S}|-1\end{array}}\right) \)ways, giving a number of CTMC states exponential in the number \(|\mathcal {S}|\) of node states and \(|\mathcal {P}|\) of partitions, but polynomial in the number of nodes:
$$\begin{aligned} |\mathcal {Y}| = {{\prod _{P \in \mathcal {P}}}} \left( {\begin{array}{c}|P|+|\mathcal {S}|-1\\ |\mathcal {S}|-1\end{array}}\right) \,. \end{aligned}$$
Edge-Based Abstraction. The number of population variables, in this case, is one for each edge connecting two different partitions, plus those counting the number of nodes in each partition and each node state, due to the presence of the dummy state. In total, we have \( \frac{q(q-1)}{2} + q\) population variables, with \(q=|\mathcal {S}| \cdot |\mathcal {P}|\).
In order to count the number of states of the CTMC in this abstraction, we start by observing that the sum of all variables for a given pair of partitions \(P', P''\) is the number of edges connecting such partitions in the graph. We use \(\epsilon (P',P'')\) to denote the number of edges between \(P', P''\) (resp. the number of edges inside \(P'\) if \(P'=P''\)). Thus,
$$\begin{aligned} |\mathcal {Y}| \le {{\prod _{\begin{array}{c} P',P'' \in \mathcal {P}^2 \\ P' \le P'' \end{array}}}} \left( {\begin{array}{c}\epsilon (P',P'')+\mathcal {S}^2 -1\\ \mathcal {S}^2-1\end{array}}\right) \cdot {{\prod _{P \in \mathcal {P}}}} \left( {\begin{array}{c}|P|+|\mathcal {S}|-1\\ |\mathcal {S}|-1\end{array}}\right) \,. \end{aligned}$$
This is an over-approximation, because not all combinations are consistent with the graph topology. For example, a high number of infected nodes in a partition might not be consistent with a small number of \(\texttt {I}-\texttt {I}\)-edges inside the partition. Note that also this upper bound is exponential in \(|\mathcal {S}|\) and \(|\mathcal {P}|\) but still polynomial in the number of nodes N, differently from the original network model, whose state space is exponential in N.
The exponential dependency on the number of species (i.e., dimensions of the population vector) makes the explicit construction of the lumped state space viable only for very small networks with a small number of node states. However, this is typically the case for spreading models like \(\texttt {SIS}\) or \(\texttt {SIR}\). Yet, also the number of partitions has to be kept small, particularly in realistic models. We expect that the partitioning is especially useful for networks showing a small number of large-scale homogeneous structures, as happens in many real-world networks [12].
An alternative strategy for analysis is to derive mean-field [5] or moment closure equations [41] for MPMs, which can be done without explicitly constructing the lumped (and the original) state space. These are sets of ordinary differential equation (ODE) describing the evolution of (moments of) the population variables. We refer the reader to [10] for a similar approach regarding the node-based abstraction.