Exact solutions and bounds for network SIR and SEIR models using a rooted-tree approximation

In this paper, we develop a new node-based approximate model to describe contagion dynamics on networks. We prove that our approximate model is exact for Markovian SIR (susceptible-infectious-recovered) and SEIR (susceptible-exposed-infectious-recovered) dynamics on tree graphs with a single source of infection, and that the model otherwise gives upper bounds on the probabilities of each node being susceptible. Our analysis of SEIR contagion dynamics is general to SEIR models with arbitrarily many classes of exposed/latent state. In all cases of a tree graph with a single source of infection, our approach yields a system of linear differential equations that exactly describes the evolution of node-state probabilities; we use this to state explicit closed-form solutions for an SIR model on a tree. For more general networks, our approach yields a cooperative system of differential equations that can be used to bound the true solution.


Introduction
Network-based models have been used extensively to describe the spread of a contagious state through a population via the connections between individuals.Such models are particularly important in describing the spread of disease [8,17,20,22] but have also been used to study social contagion [14,29,30], financial contagion [11,18], and cascading failure in power systems [13,31].Network contagion is also a rich field for theoreticians; exact solutions to network contagion models are mostly unavailable and so both efficient numerical methods and good approximate models are valuable [22].
In many contagion models on networks, each node represents an individual and each edge represents a contact or connection that facilitates the spread of contagion between nodes.At any given time, each node has a state (e.g., susceptible, infectious,or recovered in the classic SIR model [21,22]) and the node states evolve over time according to the rules that constitute the contagion model.In many such models, node state evolution is probabilistic and occurs over continuous time; in these cases, the spread of contagion through the network is a continuoustime discrete-space stochastic process where the state space is the set of states for all nodes in the network.
One challenge with stochastic network contagion models is to determine the node state probabilities as functions of time.Even for very simple contagion models, this is difficult on large networks because the node states do not evolve independently.In the most general case, node state probabilities can only be determined exactly from network state probabilities, which in turn can only be determined exactly by solving the master equations for the stochastic process.Since the size of the state space increases geometrically with the number of nodes,this is not computationally feasible on any but the smallest networks.
Instead, various methods have been developed for estimating-and, in some cases, boundingnode state probabilities in network contagion models.The simplest of these is the node-based mean field approximation [22] (also called the first-order model [21], the individual-based model [17], or the N -intertwined mean field approximation [26,27]).In this approach, node state probabilities are assumed to be independent of each other, so that joint probabilities can be expressed as the product of individual node state probabilities.While this is a useful assumption that closes the evolution equations for node state probabilities, it is not perfectly accurate.In reality, the states of neighbouring nodes are positively correlated: e.g., the neighbours of a susceptible node are more likely to be susceptible than would be expected from assuming independence [10].As a result, the node-based mean field approximation applied to standard contagion models will typically overestimate rates of infection and hence underestimate the probability that a given node is susceptible.
Two other approaches used to estimate and bound node state probabilities are the pair-based approximation [5,22] and the message passing approximation [16].To develop the pair-based approximation, Cator and Van Mieghem [5] introduced variables for the joint probabilities of the states of neighbouring nodes and they derived evolution equations for these probabilities using a closure approximation to exclude the dependence on higher-order moments.To develop the message-passing approximation, Karrer and Newman [16] considered the directed edges of the network and developed expressions for the probabilities that infection has not yet been transmitted along each edge.
While these two approaches are conceptually very different, Wilkinson and Sharkey [28] showed that they are equivalent for Markovian SIR dynamics.Pair-based and message-passing approximations are more computationally demanding than node-based approximations but are generally more accurate than the node-based mean field approximation.When the underlying network is a tree, both approaches yield exact results for the SIR model [16,24].
In this paper, we develop and analyse a new approximate model of network contagion that can be applied to Markovian SIR and SEIR (susceptible-exposed-infectious-recovered) contagion models, including SEIR models with multiple distinct exposed states.The approximation we derive is a 'node-based' approximation; it takes the form of a closed system of differential equations for node state probabilities.As such, our approximation has a similar level of computational complexity to the node-based mean field approximation and is considerably simpler than the pair-based or message-passing approximations.
We refer to our approximation as the 'rooted-tree approximation' because it yields exact results on trees with a single initially-infectious node.This contrasts with both the node-based mean field model, which can never give exact results, and the pair-based and message-passing approximations, which give exact results on any tree regardless of the number of initially-infectious nodes [16,24].The exact differential equations obtained using our approximation are very simple and lead to explicit closed-form solutions for node state probabilities on rooted trees.We believe that these explicit solutions have not previously been reported.
On other networks (non-trees or trees with multiple initially-infectious nodes), we prove that the rooted-tree approximation gives upper bounds on the probabilities that nodes are susceptible.This contrasts with the other approximations described above, which give lower bounds on the probabilities that nodes are susceptible; this lower bound result is generally understood to hold for node-based mean field approximation of SIR models [4,6,10] and has been proved for node-based mean field approximation of SIS models [10,26] and for pair-based/message-passing approximation of SIR models [16,28] The development of our approximation exploits the fact that neither the SIR nor SEIR models permit the possibility of reinfection.In the case of an SIR model on a tree with a single initiallyinfectious node, this enables us to formulate an exact expression for the rate of infection in terms of the probabilities that nodes are susceptible.For other networks and initial conditions, a similar approach enables us to formulate a cooperative system of differential equations where the approximate rate of infection is a lower bound on the true rate of infection.This enables us to use Simon and Kiss's methods from [26] to prove that our approach yields upper bounds on the probablilities that nodes are susceptible.
Our main contribution in this paper can be summarised as the rooted-tree approximation systems given in ( 26) and (62) for SIR and SEIR models respectively.In Section 2, we develop (26) for SIR models and prove that it is exact on rooted trees and otherwise yields an upper bound on the probability of being susceptible.In Section 3, we repeat this analysis for SEIR models to develop (62).Finally, in Section 4, we discuss the merits and limitations of our approach and make comparisons with other theoretical approaches to network contagion.We conclude by offering avenues for further exploration and extension of the rooted-tree approximation.
2 Rooted-tree approximation for the SIR model

Preliminaries
Let {X(t)} represent the stochastic process for network contagion dynamics on a network of N nodes.Any realisation of this process can be represented as a time-dependent N -dimensional vector of node states, X(t), so that X k (t) gives the state of the kth node at time t.Following various other authors [24,25,26,28], we use angle brackets to indicate probabilities.Specifically, we define S k (t) = P [X k (t) = S] to be the probability that node k is susceptible at time t, we define I j S k (t) = P [X j (t) = I ∩ X k (t) = S] to be the probability that node j is infectious and node k is susceptible at time t, and we define other probabilities and joint probabilities similarly.
In this section, we focus on the standard network SIR model as described in [21] and elsewhere.At any time, each node can either be susceptible (S), infectious (I) or recovered (R) and node states change over time according to a Markovian process.Susceptible nodes in contact with infectious nodes become infected at rate λ; that is, the probability that a susceptible node in contact with an infectious node becomes infectious in the next ∆t is given by λ∆t + o(∆t).Infection rates are taken to be additive over neighbours, so that additional infectious neighbours will increase the probability that a susceptible node becomes infectious in a given ∆t.Infectious nodes recover at rate γ regardless of the states of their neighbours.
As a further generalisation, we assume that λ can depend on the associated directed edge, and that γ can depend on the associated node.Thus, we assume that the rate of infection can depend on the nodes involved and that the rate of recovery from infection can vary from node to node.We represent this using subscripts, so that λ k←j is the rate at which node k becomes infected given that node k is susceptible and node j is infectious, and γ k is the rate at which node k would recover given that it is currently infectious.
With this notation, the following is an exact description of node probability dynamics for an SIR model on a network: where N (k) represents the set of upstream neighbours of node k (i.e., the set of nodes j for which λ k←j is nonzero).

Exact SIR dynamics on a rooted tree
Consider the case where the underlying network is a tree and where a single node is infectious at t = 0 and all other nodes are susceptible.We assign the the label k = 0 to the initially-infectious node and identify it as the root of the tree.We will use the term 'rooted tree' throughout our analysis (including for SEIR models) to refer to a tree where there is a unique node that is not in a susceptible or recovered state at t = 0.For any other node k = 0, it is possible to identify a unique parent node p(k) as the neighbour of k that lies between node k and the root.Since all infection spreads from the root node it follows that node k can only be infected by node p(k).This enables us to simplify our notation and analysis in this section: we define λ k = λ k←p(k) as the rate at which node k is infected by its parent node, and we omit the sums in equations (1a) and (1b).
Thus, the evolution of node state probabilities on a rooted tree is given by These equations need to be solved subject to initial conditions This system of equations is not closed; in order to construct a node-based model of contagion dynamics, we need expressions for the pair probabilities I p(k) S k in terms of the node state probabilities.The analysis below shows how this can be achieved exactly.
Consider any node k = 0.The law of total probability gives Since infection can only spread from node p(k) to node k and not vice versa, we find that X p(k) = S implies X k = S (i.e., if the parent of node k is susceptible then node k must also be susceptible).Hence, S p(k) S k = S p(k) and ( 4) can be rearranged as This indicates that an expression for R p(k) S k in terms of node state probabilities could be used to obtain an expression for I p(k) S k in terms of node state probabilities.
We note that the only way to achieve a state where X p(k) = R and X k = S is for node p(k) to recover while node k is susceptible.Once such a state is achieved, it will persist permanently since node p(k) will remain recovered and node k cannot become infected except via node p(k).Expressed mathematically, this means that which can be rearranged using (2a) to yield Integrating (7) and applying the initial conditions R p(k) S k (0) = 0 and S k (0) = 1 for k = 0, we find that λ k S k .Substituting this into (5) then yields Equation ( 8) gives an expression for I p(k) S k purely in terms of the node state probabilities S k and S p(k) .Substituting into system (2), we obtain the following closed system for the node state probabilities: This system can be solved subject to the initial conditions in (3) to yield an exact representation of node state probabilities on a rooted tree.

Closed form solutions
The system in ( 9) is amenable to further analysis leading to explicit closed form solutions.We observe that the differential equations in ( 9) are all linear and have constant coefficients.Moreover, the system is partially decoupled: the equations for d S k dt are independent of I k and R k , the equations for d I k dt are independent of R k , and all equations for node state probabilities at a given node are independent of the states of the node's children and siblings.It follows that the differential equations in (9) can be solved sequentially using standard methods for first-order constant coefficients linear differential equations.
For example, consider the case where λ and γ are constant for all nodes.In this case, the symmetry of the system implies that node state probabilities will be identical for nodes of equal depth (i.e., equal distance from the root node).Thus, we can obtain all node state probabilities by considering a chain of nodes labelled 0, 1, 2, etc.where each node is connected to its ordinal neighbours.Rearranging (9) and exploiting the fact that S k + I k + R k = 1, the system to be solved for this 'chain' problem is subject to the initial conditions (3).
This system can be solved explicitly using a range of different methods (e.g., operator D methods or Laplace transforms).Applying any of these solution methods, we find that To the best of our knowledge, this is the first time that this simple, closed-form solution has been reported in the literature on contagion on networks.
Figure 1 shows comparisons of S k (t) and I k (t) from (11) with empirical node state probabilities based on averaging 10 5 Gillespie algorithm simulations of the underlying stochastic model.All calculations were performed in Matlab and code is provided at https://github.com/cameronlhall/rootedtreeapprox.These figures illustrate the fact that (11) are exact results; the theoretical results for S k (t) and I k (t) are virtually indistinguishable from results obtained using Gillespie simulations.
Figure 1 also illustrates some properties of SIR dynamics on a chain that can be derived from analysis of (11).For example, (11b) can be rearranged as Since the sum in ( 12) is the first k terms in the Maclaurin series of e λt , we see that I k (t) will initially be close to zero and will remain close to zero for longer for larger values of k.
Additionally, we observe that the term in brackets in (12) will asymptotically approach 1 as t → ∞, which implies that I k (t) ∼ e −γt as t → ∞.Both the early time behaviour where I k is close to zero and the late time behaviour where I k ∼ e −γt are visible in Figure 1b.
While (10) and ( 11) are simple and elegant results, they are of limited practical use because they are specific to rooted trees.Results that only hold on trees are not useful for describing contagion on contact networks or social networks because such networks tend to be highly clustered [21] and the clustering coefficient of a tree is necessarily zero.However, (10) can be adapted to obtain a node-based approximation of contagion dynamics that gives a bound on S k for all networks.

Bounds for SIR dynamics on a general network
In Section 2.2, we showed that the closed system ( 9) is equivalent to the system (2), which describes the evolution of node state probabilities for SIR dynamics on a rooted tree.In this section, we develop an analogue of (9) that can be applied to a general network.We show that this new formulation yields upper bounds on the functions S k (t).
We begin by assuming that no node is recovered at t = 0, and so we can specify initial conditions where S k (0) is given for each node and We make this assumption without loss of generality since the recovered state is permanent in the SIR model; SIR dynamics on a network with initially-recovered nodes will be equivalent to SIR dynamics on a network where those nodes and associated edges have been removed.
The analysis that follows is analogous to the derivation of the exact solution for rooted trees in Section 2.2, but we derive inequalities throughout.Let j and k be chosen so that j ∈ N (k).From the laws of probability, we note that S j S k + I j S k + R j S k = S k , and that S j S k ≤ S j .Combining these gives Now consider the dynamics of R j S k .We note that a state where X j = R and X k = S can only arise from a state where node X j = I and X k = S. Additionally, a state where X j = R and X k = S can change to another state only if node k becomes infected from one of its neighbours.
and, since all probabilities are nonnegative, it follows that Noting that the terms inside the summation in (1a) are all nonnegative, we observe that Combining ( 16) and ( 17) then gives Using the assumption that no nodes are recovered at t = 0, we recall that R j S k (0) = 0.This enables us to integrate (18 , and hence (14) becomes Since I j S k is also nonnegative, it follows that where [x] + is defined so that Substituting into (1a), we obtain The differential inequality (22) holds for the true node state probabilities S k (t).Based on this inequality, we now consider the relationship between the true solutions S k (t) and approximate solutions S * k (t) that satisfy the system subject to initial conditions We will show that S * k (t) ≥ S k (t) for all k and for all t.This follows from the application of Lemma 1 from Simon and Kiss [26].In order to use this result, we need to show that ( 23) is a cooperative system of differential equations.This can be done using the Kamke-Müller sufficient conditions [10,26], which state that an autonomous system dx dt = f (x), will be cooperative as long as f k is a nondecreasing function of x j for all j = k.In our case, we define x so that x k = S * k , and we define f (x) so that Since f k (x) is continuous and the constants λ k←j are nonnegative, it is clear that f k is a nondecreasing function of x j for all j.Hence, the Kamke-Müller conditions are satisfied and ( 23) is a cooperative system.Using this fact alongside the initial conditions in (24), we apply Lemma 1 from [26] to conclude that S * k (t) ≥ S k (t) for all k and for all t.To summarise this result, we can combine (23) with an equation for If we also introduce R * k = 1 − S * k − I * k , this gives a closed system of equations for the approximate dynamics of all node state probabilities.We refer to system (26) as the rooted-tree approximation for SIR dynamics.
If the underlying network is a rooted tree, we can show that ( 26) is equivalent to (9).To see this, we note that S * k (t) ≤ S * k (0) for all time and that S * j (t) ≥ S * k (t) for any j ∈ N (k) other than j = p(k).Hence, the terms inside the square brackets in (26) will be nonpositive for any j = p(k) and applying the positive part operator yields (9).If a network is known to be a rooted tree but the root is not identified, (26) will yield an exact solution without it being necessary to compute the parent of each node, as would be needed in order to use (9).
Figure 2 shows comparisons of the solution of (26) with results obtained from averaging 10 5 simulations using the Gillespie algorithm.As previously, Matlab code is available at https:// github.com/cameronlhall/rootedtreeapprox.Two different networks are shown: an Erdős-Rényi (ER) random graph (Figures 2a and 2b) and a network that is 'almost' a tree (Figures 2c  and 2d) in the sense that it was constructed from a random tree by adding some additional edges at random.
If we think of the Gillespie algorithm results as being the 'true' solution, we see from Figures 2a  and 2c that the rooted-tree approximation does indeed give an upper bound on S k for each individual node k.Throughout Figures 2a and 2c we see that the rooted-tree approximation deviates from the true solutions by different amounts at different times for different nodes, but the difference is typically substantial as time goes on.This deviation is observed for the 'almost tree' in Figure 2c as well as for the ER graph in Figure 2a, although we note that the difference between the approximation and the true solution grows faster and becomes larger in the case of the ER graph.
The overall differences between the rooted-tree approximation and the true solution are best seen in Figures 2b and 2d.These show S k (t), I k (t) and R k (t) averaged over all nodes in the network.As may be anticipated from Figures 2a and 2c, the rooted-tree approximation gives a overestimate of S k (including the equilibrium S k as t → ∞) and underestimates the peak in I k .Overall, we see that (26) does indeed give bounds on S k but that these bounds are not generally very tight.3 Rooted-tree approximation for a generalised SEIR model

Preliminaries
The Susceptible-Exposed-Infectious-Recovered (SEIR) model is a well-established compartment model in the epidemiological literature [3].The SEIR model differs from the SIR model by the introduction of an 'exposed' or 'latent' state representing individuals that have encountered the disease but are not yet infectious.Some SEIR models involve multiple classes of exposed state; such models have been analysed mathematically [1,9,12] and applied to modelling certain diseases [7].
As with the SIR model, the SEIR model has also been extended to networks [15,19,21,22].For the most part, network SEIR models in the published literature involve a single exposed state; however, they can be extended to multiple classes of exposed state in an analogous way to compartment models.Our analysis of SIR models in Section 2 can be extended to SEIR models, including in a general setting with arbitrarily many distinct exposed states.In this section, we replicate our analysis from the previous section but for generalised SEIR models: we construct a node-based approximation of SEIR contagion dynamics that is exact on rooted trees and that yields an upper bound on S k (t) on more general graphs.
In our generalised network SEIR model, each node represents an individual, so that at any time a node can either be susceptible (S), exposed of class u (E (u) ), infectious (I), or recovered (R).We assume that there are finitely many (N u ) different classes of exposed nodes.Susceptible nodes in contact with infectious nodes may become exposed (in any class) or infectious; we refer to the process of a susceptible node changing its state as 'infection' regardless of whether the node becomes exposed or infectious.Exposed nodes may change to a different class of exposed, become infectious, or recover; we assume that exposed nodes cannot become susceptible.Infectious nodes may recover, but cannot become exposed or susceptible.Once a node has recovered, it remains recovered for all time.
Each of these transitions is governed by a different rate parameter.The rate of infection (i.e., the total rate at which a susceptible node in contact with an infectious node becomes exposed or infectious) is given by λ.The probability that a susceptible node becomes exposed of class u when infection occurs is given by ϕ (u) ; hence, the probability that a susceptible node becomes infectious when infection occurs is 1 − u ϕ (u) .The rate at which an exposed node of class u becomes an exposed node of class v is given by b (v←u) .The rate at which an exposed node of class u becomes infectious is given by µ (u) .The rate at which an exposed node of class u recovers is given by ν (u) .The rate at which an infectious node recovers is given by γ.These different transitions are summarised below: S (with I) As in Section 2.1, we assume that the model parameters can depend on the relevant edge or node, and we represent this using subscripts.The most general approach would be to permit both λ and ϕ (u) to be edge-dependent; however, this level of generality in ϕ (u) would lead to a problem with the bounding argument in Section 3.3.To circumvent this, we permit ϕ (u) to depend on the recipient node but not on the infecting node; that is, we assume ϕ k .Physically, this would correspond to a situation where individual responses to infection (e.g., whether an individual immediately becomes infectious or whether they first enter an exposed state) may vary between individuals but do not depend on the source of infection.
To assist with the analysis of the N u different classes of exposed state, we introduce the N udimensional vectors E k (t), ϕ k , ν k , µ k , e, and 0 so that . . .
We note that 0 ≤ e • ϕ k ≤ 1 for all k, and that the rate at which a susceptible node k in contact with an infectious node j becomes infectious is given by Lastly, we define the N u -by-N u matrix B k so that With this notation, the dynamics of contagion on any network can be described using the following equations: which must be solved subject to suitable initial conditions.
Note that if ϕ were permitted to depend on the source of infection as well as on the node that becomes infected then the corresponding ϕ k←j terms would need to be included inside the summations in equations (31b) and (31c).
Note also that (31a) can be used to express (31b) and (31c) in the equivalent forms Given the length of the expressions that we obtain for λ k←j I j S k in our analysis, we will sometimes prefer (32b) and (32c) over (31b) and (31c) for concision.

Exact SEIR dynamics on a rooted tree
As in Section 2.2, we begin by considering contagion dynamics on a rooted tree, where there is a single node, k = 0, which is the source of infection.This node may either be exposed or infectious at t = 0. Introducing equivalent notation and following the same logic as for the derivation of ( 2), we find that the evolution equations for node state probabilities on a rooted tree are These equations need to be solved subject to initial conditions where and where E 0 (0) = E 0 init and I 0 (0) = I 0 init are specified, but S 0 (0) = R 0 (0) = 0. We note that ϕ 0 does not appear in system (33) or in the initial conditions.As we will see, it will be convenient to define ϕ 0 so that ϕ 0 = E 0 init , and hence System (33) is not closed because of the presence of I p(k) S k .As in Section 2.2, we exploit the properties of a rooted tree to find an expression for I p(k) S k in terms of the node state probabilities and hence obtain a closed system.Since the parent node of node 0 is not defined, we assume (unless otherwise specified) that k = 0 in all analysis below where p(k) is mentioned.
We begin by noting that the law of total probability gives The fact that infection can only spread from node p(k) to node k and not vice versa means that if either p(k) .Thus, (35) can be rearranged to give As previously, we now seek a differential equation for R p(k) S k that can be directly integrated to obtain R p(k) S k in terms of node state probabilities.The only way to achieve a state where X p(k) = R and X k = S is for node p(k) to recover (either form an exposed state or an infectious state) while node k is susceptible.Once node p(k) has recovered, this state will then be permanent.Since Using (33a), this rearranges to give The next step is to rewrite ν p(k) • E p(k) (t) in terms of the derivatives of node state probabilities.
For any node k (including k = 0), let M k be the block matrix defined by so that the block matrix inversion formula [23] gives Using M k , we can rewrite equations (33a) and (33b) together as If we assert that I p(0) S 0 (t) ≡ 0, then (41) also applies when k = 0.
We now use M p(k) to express ν p(k) • E p(k) in terms of derivatives as follows: Note that equation (43) applies even when p(k) = 0; even though the value of I p[p(k)] S p(k) would be undefined in (42), it is multiplied by zero and does not affect the final result.
and hence we find that where C k is a constant to be determined from the initial conditions.
In the case where p(k) = 0, the initial conditions in (34) yield In the case where p(k) = 0, the initial conditions yield As noted previously, this motivates us to define ϕ 0 = E 0 init so that (46) can be used to give the constant C k for all nodes k = 0.
Combining (45) and ( 46), we obtain an expression for R p(k) S k that can be substituted into (36) to yield We note that (30) implies that Nu u=1 and hence B T k e = µ k + ν k .This rearranges to yield B −T k µ k = e − B −T k ν k so that (48) becomes As an aside, we note from (30) that B T k is a strictly diagonally dominant matrix with positive diagonal entries.From [2], it follows that B T k is inverse-positive.Hence, the elements of B −T k µ k and B −T k ν k are all between 0 and 1 (inclusive) and we note that the coefficients of S p(k) and E (u) p(k) in (50) are all nonpositive.Using (50) and (32), system (33) can be rearranged to give As for the SIR model in Section 2.2, this is a partially-decoupled system.To see this, we observe that the dynamics of S k in (51b) are independent of E k ; instead, d S k dt depends only on S k and the node state probabilities at the parent node.Since equations (51b) and (51c) are both independent of I k (t) and R k (t), this implies that (51) can be solved from the root outwards, with S k solved before E k at each subsequent node.
Moreover, consider the case where exposed states are traversed in order-that is, where b (u←v) k is zero whenever u < v).This situation is physically plausible, since it corresponds to a case where a diseased individual can progress through different exposed "stages" before becoming infectious or recovering, but can never return to an earlier class of exposed state from a more advanced class.In this case, the matrix B k will be lower triangular and hence the scalar equations that constitute (51c) will also be partially decoupled.Since system (51) is linear, this implies that the full solution can be obtained exactly by the sequential solving of linear scalar ordinary differential equations; it is not even necessary to solve an eigenvalue problem in order to obtain the exact solution to SEIR dynamics on a rooted tree.While we do not present closed-form solutions here, it is theoretically possible to obtain results analogous to (51) using standard methods for nonhomogeneous constant-coefficients differential equations.
As in Section 2.3, we test the rooted-tree formulation in system (51) by considering SEIR dynamicson a chain.For simplicity, we consider the case where there is a single class of exposed state and so the vectors and matrices in (51) can be replaced by scalars.Noting that the equivalent of B k will be µ k + ν k , this leads to the system Figure 3 shows a comparison of S k (t) and I k (t) obtained from the numerical solution of (52) with the average of 10

Bounds for SEIR dynamics on a general network
We now replicate the argument in Section 2.4 to obtain bounds on the solution of generalised SEIR dynamics on a general network.In this case our starting point is system (31) and we assume without loss of generality that R k (0) = 0 for all nodes.
By analogous arguments to Section 2.4, we observe that We also replicate some of the analysis from Section 3.2.We define M k as in (39) and we observe that equations (31a) and (31b) can be rearranged to give Note that (56) is only valid because ϕ k depends only on k not on the possible sources of infection.If this were not the case, then it would not be possible to collect the summation terms in the vector on the right hand side of (56).
Repeating the manipulations from Section 3.2, we find that Combining (54), (55), and (57), we find that Integrating from t = 0 and using the fact that R j S k (0) = 0, we obtain an upper bound on R j S k that can be substituted into (53) and rearranged to obtain Since it is also true that I j S k ≥ 0, we can use [x] + as defined in (21) to obtain a bound on I j S k analogous to (20).Substituting into (31a) then yields We note that (60) depends only on the probabilities of nodes being susceptible or exposed.Hence, (60) can be coupled with (32b) to obtain a closed system.As in Section 2.4, we will use this closed system to show that In this case, however, we need to rearrange the system before we can apply the Kamke-Müller conditions.
Based on the forms of ( 60) and (32b), we define We note that all entries of B −1 k are nonnegative and so Q k is nonnegative.Rearranging to obtain System (61) is a system of differential inequalities and equations; as in Section 2.4, we now consider the relationship between the true solutions S k and Q k and the approximate solutions S * k and Q * k that satisfy the equivalent of (61) where the inequality in (61a) is replaced with an equation.Since the off-diagonal elements of B k are all nonpositive, since 1 − e • ϕ k ≥ 0, and since the elements of ϕ k and µ k are all nonnegative, this system will satisfy the Kamke-Müller conditions and be cooperative.Hence, we can again apply Lemma 1 from [26] for all k and for all t.While Q k is a useful theoretical construct, we will generally formulate and solve the SEIR rooted-tree approximation using E k rather than Q k .Using stars to indicate approximate solutions as previously, we use (60) and (32) to obtain the following system as the SEIR rootedtree approximation: Just as ( 26) is equivalent to (9) for a rooted tree, we can show that (62) is equivalent to (51) for a rooted tree.To see this, we again use the fact that S * j (t) ≥ S * k (t) for any j ∈ N (k) other than j = p(k), and we also use the fact that B −T k µ k + B −T k ν k = e.Given that S * k (t) is a decreasing function of t, it follows from these observations that and hence the term inside the square brackets in (62a) will be nonpositive whenever j = p(k).
As a result, (62) will yield exact solutions for rooted trees without it being necessary to compute the parent of each node.
Figure 4 is analogous to Figure 2 and it enables equivalent conclusions to be drawn.Figure 4 shows comparisons of the rooted-tree approximation (62) with estimates of the true solution obtained from averaging 10 5 simulations using the Gillespie algorithm for an ER random graph.
Code is available at https://github.com/cameronlhall/rootedtreeapproxand the ER graph used to generate Figure 4 is different from the ER graph used in Figure 2.
From Figure 4a we verify that the rooted-tree approximation gives an upper bound on S k for the nodes k illustrated.From Figure 4b, we see that there is a reasonably large difference between the true solution (dashed lines) and the rooted-tree approximation (continuous lines) and so once again the bounds provided by (62) are not generally very tight.

Discussion and conclusions
In this paper, we have developed and analysed a new approximation method, the rooted-tree approximation, that can be applied to SIR and generalised SEIR models on networks.In the case of a tree with a unique initially-infected node, our approximation is exact and leads to a partially-decoupled system of linear differential equations for the node-state probabilities.As demonstrated in Section 2.3, we can obtain explicit closed-form solutions for the node state probabilities for SIR models and, in theory, equivalent results can also be obtained for SEIR models.
Since the pair-based and message-passing approximations are both exact on all trees (not just rooted trees) but closed-form solutions for these are not well known, it is instructive to compare our system (9) with appropriate rooted tree simplifications of the pair-based SIR approximation in [24] and the message-passing SIR approximation in [16].For the pair-based approximation (e.g., system (3) in [24]), we find that we can use proof by induction from the leaves to the root to show that I k S p(k) = 0 on a rooted tree.Subsequently, we can use the fact that S p(k) S k = S k to convert the remaining equations of the pair-based approximation into a linear system equivalent to (9).
For the message-passing model in [16] applied to a rooted tree, we can work from the leaves to the root to show that H p(k)←k = 0 and then work back out from the root to the leaves to obtain expressions for H k←p(k) that are analogous to an integrated form of our system (9).As a result, we find that the explicit solutions in (11) could have been obtained from the pairbased or message-passing approximations; while we believe that this is the first time that these explicit solutions have been reported, they are consistent with-and theoretically obtainable from-established results in the existing literature.
One important feature of our rooted-tree approximation is that it provides upper bounds on S k at every node.This is an important strength of our method since it provides a contrast from other methods that yield lower bounds on S k .One promising avenue for further research is to combine the rooted-tree approximation with other approximations in order to obtain better estimates of node-state probabilities.Such hybrid approximations are likely to be more practical than the rooted-tree approximation because the bounds on S k are rarely very tight.As we see from Figures 2 and 4, there are often large differences between the node-state probabilities obtained from the rooted-tree approximation and estimates of the true node-state probabilities based on Gillespie algorithm simulations.
Another limitation of the rooted-tree approximation is that it is reliant on assumptions that there can be no return to a susceptible state and that there can only be one variety of infectious state.Both of these assumptions are necessary in order to express I p(k) S k , and hence the rate of infection, in terms of a linear combination of the node-state probabilities and R p(k) S k for rooted trees.One avenue for further research would be to explore whether the rootedtree approximation can be extended to SIRS and SEIRS models or SIR models with multiple infecious states.Perhaps this would involve developing new approximations that are not exact on rooted trees but would still provide a consistent upper bound on S k , analogous to the W (x, y) = min(x, y) approximation for SIS models introduced in [26].
Overall, the rooted-tree approximation presented in this paper is a new way of analysing SIR and SEIR dynamics on networks that has advantages and disadvantages over existing methods.The principal strengths of the rooted-tree approximation are that it is simple (leading to a cooperative, piecewise-linear system of equations for node-state probabilities), that it yields exact closed-form solutions in certain situations, and that it yields upper bounds on S k in contrast with the lower bounds provided by other approximations.The principal weakness of the rooted-tree approximation is that the bounds on S k are not very tight unless the underlying network is a tree with a single initially-infected node.Despite this limitation, the simplicity of the rooted-tree approximation means that it has the potential to be a useful tool in developing new computational methods for analysing contagion dynamics on networks.

Figure 1 :
Figure 1: Comparision of the rooted-tree solutions for S k and I k in (11) with simulation results from the average of 10 5 Gillespie algorithm simulations of the full stochastic SIR model.Subfigure (a) shows results for S k while subfigure (b) shows results for I k .In both cases, the rooted tree solutions are shown as continuous lines and the numerical results are shown as points marked +. Results are shown for the first ten nodes; results from k = 1 are indicated with a thicker blue line and subsequent nodes produce curves further to the right.Parameters used are λ = 1 and γ = 0.1.

Figure 2 : 5
Figure 2: Comparisions of the rooted-tree approximation in (26) with simulation results from the average of 10 5 Gillespie algorithm simulations of the full stochastic SIR model.Two different networks are illustrated: subfigures (a) and (b) show results from an Erdős-Rényi random graph of 100 nodes with probability of connection 0.05; subfigures (c) and (d) show results from a 30-node random tree (generated from a random Prüfer sequence) with 10 additional edges added at random.Subfigures (a) and (c) show S k for four different nodes: results from the rooted-tree approximation are shown as continuous lines and results from Gillespie simulations are shown as dashed lines; different nodes are distinguished using different colours and marker styles.Subfigures (b) and (d) show S k (thick black lines), I k (medium thickness blue lines) and R k (thin red lines) averaged over all nodes in the network: results from the rooted-tree approximation are shown as continuous lines and results from Gillespie simulations are shown as dashed lines.Parameters used are λ = 1 and γ = 0.1.There is a single node that is infectious at t = 0 and all other nodes are susceptible.

Figure 3 :
Figure 3: Comparision of the rooted-tree solutions for S k and I k based on numerical solution of (52) with simulation results from the average of 10 5 Gillespie algorithm simulations of the full stochastic model.Subfigure (a) shows results for S k while subfigure (b) shows results for I k .In both cases, the rooted tree solutions are shown as continuous lines and the numerical results are shown as points marked +. Results are shown for the first eleven nodes (from k = 0 to k = 10); results from k = 1 are indicated with a thicker blue line and subsequent nodes produce curves further to the right.Parameters used are λ = 1, ϕ = 0.8, µ = 1.2, ν = 0.05, and γ = 0.1.For consistency with the value of ϕ, the initial conditions are I 0 init = 0.2 and E 0 init = 0.8.

Figure 4 :
Figure 4: Comparisions of the rooted-tree approximation in (62) with simulation results from the average of 10 5 Gillespie algorithm simulations of the full stochastic SEIR model for an Erdős-Rényi random graph with 100 nodes and probability of connection 0.05.Subfigure (a) shows S k for four different nodes: results from the rooted-tree approximation are shown as continuous lines and results from Gillespie simulations are shown as dashed lines; different nodes are distinguished using different colours and marker styles.Subfigure (b) show S k (very thick black lines), E k (thick olive lines), I k (medium thickness blue lines) and R k (thin red lines) averaged over all nodes in the network: results from the rooted-tree approximation are shown as continuous lines and results from Gillespie simulations are shown as dashed lines.Parameters used are λ = 1, ϕ = 0.8, µ = 1.2, ν = 0.05, and γ = 0.1.There is a single node that is infectious at t = 0 and all other nodes are susceptible.

5
Gillespie algorithm simulations of the underlying stochastic model (code again available at https://github.com/cameronlhall/rootedtreeapprox).As in Figure1, this exemplifies the fact that system (52) is exact; the two sets of results are virtually indistinguishable.