1 Introduction

One of the earliest and most comprehensively analysed epidemic models is the susceptible-infected-recovered (SIR) model of Kermack and McKendrick (1927). In addition to providing insights into threshold behaviour and vaccination, it has also underpinned much subsequent work in applied mathematical epidemiology (Anderson and May 1992). A stochastic version, constructed from similar assumptions, was defined and analysed later (for example, Bailey 1975, Chapter 6) and it became of interest to understand the relationship between the two (Kurtz 1970, 1971; Barbour 1972, 1974).

More recently, various heterogeneities have been added to both deterministic and stochastic epidemic models. A particularly important one is the contact network which allows for specific relationships between pairs of individuals; see Danon et al. (2011) and Pastor-Satorras et al. (2015) for reviews. While it is straightforward to simulate stochastic epidemics on networks, deterministic approximations have also been developed to assist our understanding. Important examples of these include pair approximation (Keeling 1999; Sharkey 2008), message passing (Karrer and Newman 2010) and edge-based models (Miller et al. 2011).

The message passing approximation for stochastic epidemics was developed by Karrer and Newman (2010) and is central to the work that we present here. This approach allows one to exactly capture the marginal distributions for the health statuses of individuals (i.e whether they are susceptible, infected or recovered) when the contact network is a tree and provides useful rigorous bounds for these distributions otherwise. Notably, the message passing approach is also applicable to extremely general non-Markovian stochastic epidemics and the number of equations it requires scales linearly with the number of connected pairs of individuals; far fewer than the number of Kolmogorov forward equations for the Markovian case which scales exponentially with population size. Wilkinson and Sharkey (2014) showed that, when contact processes are assumed to be Poisson, a generalised version of the message passing equations is equivalent to a pairwise model that is defined at the level of individuals, thus unifying two major representations of epidemic dynamics. Their argument relies on the application of Leibniz’s integral rule, so here we take the opportunity to provide sufficient conditions for the applicability of that rule in this context (“Appendix 4”).

In Sect. 2 we define a more general stochastic model which allows for realistic correlations between contact times and infectious periods. Specifically, it allows all of an individual’s post-infection contact times (to each of its neighbours), and the negative of its infectious period, to be positively correlated. This could capture, for example, a scenario where infected individuals adopt some disease-combating behaviour such as taking antiviral medication, increasing the infectious contact times to all of their neighbours and decreasing their infectious period. We write down the message passing system for this stochastic model in Sect. 2.1 and then, for the first time, provide a non-restrictive sufficient condition for the message passing equations to have a unique feasible solution (Theorem 1). This is important because so far, the message passing construction of Karrer and Newman has not been shown to give rise to a unique epidemic. We then, in Sect. 2.2, extend the results found in Karrer and Newman (2010) and Wilkinson and Sharkey (2014) to this more general stochastic model; for example, the message passing system cannot underestimate the expected epidemic size at any time \(t>0\), i.e. the expected number of susceptibles infected during (0, t] (Theorem 2; Corollary 1). This is what led Karrer and Newman to describe the message passing system as providing a ‘worst case scenario’.

For all of Sect. 3, we focus on a special case of the above stochastic model which assumes a contact structure with a large amount of symmetry and that all individuals behave in the same way. We refer to this special case as the ‘homogeneous stochastic model’. The corresponding message passing system is written down in Sect. 3.1 and, after exploiting symmetries, this reduces to a system comprising of only four equations which we refer to as the ‘homogeneous message passing system’. This system is identical in form to a special case of the equations formulated by Karrer and Newman (2010, equations 26 and 27), although here it is related to a different stochastic model. We then obtain several epidemiologically relevant results in Sect. 3.2: the stochastic epidemic is shown to be inhibited by cycles in the contact network (Theorem 3), a simple relation for an upper bound on the final epidemic size in the stochastic model is proved and sufficient conditions for no major outbreak in the stochastic model are found (Theorem 4). The latter gives an upper bound on the critical vaccination coverage to prevent a major outbreak, assuming a perfect vaccination.

As a special case of the general correspondence shown in Wilkinson and Sharkey (2014), the homogeneous message passing system has an equivalent non-Markovian pairwise model when the contact processes are Poisson. In Sect. 3.3 we write down these equations explicitly (Theorem 5). This pairwise model provides exactly the same epidemic time course as the homogeneous message passing system and hence exactly the same upper bound on the epidemic size at time t (Corollary 2), and gives the same final epidemic size (Corollary 3). Pairwise models are known to give good approximations of stochastic epidemic dynamics on networks in a broad range of cases [see, for example, Keeling (1999) and Sharkey (2008)]. Thus the proof of equivalence when contact processes are Poisson suggests that message passing provides a good approximation as well as useful bounds.

In Sect. 3.4, we derive the classic Kermack–McKendrick epidemic model as an asymptotic special case of the homogeneous message passing system (Theorem 6). Notably, our derivation of such ‘deterministic’ epidemic models from the homogeneous message passing system allows us to relate them explicitly to the stochastic model [see also, for example, Trapman (2007) and Barbour and Reinert (2013)]. Thus, we are able to show that in the case where contact and recovery processes are independent and Poisson, the Kermack–McKendrick model bounds the expected epidemic size at time t in the homogeneous stochastic model (Corollary 4). However, the bound is coarser than that provided by the homogeneous message passing system and the pairwise system, which therefore give a better approximation than the Kermack–McKendrick model. The paper ends with a brief discussion in Sect. 4.

2 The stochastic model (non-Markovin network-based SIR dynamics)

We define a very general class of network-based stochastic epidemics which allow heterogeneous and non-Poisson individual-level processes, and heterogeneity in the initial states of individuals (including the case where the initial states of all individuals are non-random).

Let \(G=({\mathcal {V}},{\mathcal {E}})\) be an arbitrary (possibly countably infinite) simple, undirected graph, where \({\mathcal {V}}\) is the set of vertices (individuals) and \({\mathcal {E}}\) is the set of undirected edges between vertices (throughout the paper we will use the terms ‘graph’, ‘network’ and ‘contact network’ interchangeably). For \(i \in {\mathcal {V}}\), let \({\mathcal {N}}_i=\{ j \in {\mathcal {V}} : (i,j) \in {\mathcal {E}} \}\) be the set of neighbours of i and let \(|{\mathcal {N}}_i|<\infty \). We assume that two individuals are neighbours if and only if at least one can make direct contacts to the other. A particular realisation of the stochastic model is specified as follows. Each individual/vertex \(i \in {\mathcal {V}}\) is assigned a set of numbers \({\mathcal {X}}_i\) relevant to the behaviour of i and the spread of the epidemic:

$$\begin{aligned} {\mathcal {X}}_i = \{ Y_i, \mu _i, \omega _{ji}\,(j \in {\mathcal {N}}_i) \} , \end{aligned}$$

where \(Y_i\) is equal to 1, 2, or 3, according to whether i is instantaneously infected at \(t=0\), initially susceptible or initially recovered/vaccinated, these being mutually exclusive; \(\mu _i \in [0,\infty ]\) is i’s infectious period if i is ever infected; \(\omega _{ji} \in [0, \infty ]\) is the time elapsing between i first becoming infected and it making a contact to j, if i is ever infected. Therefore, for \(t \ge 0\), i makes an infectious contact to j at time t if and only if (i) i becomes infected at some time \(s \le t\), (ii) \(\omega _{ji}=t-s\), and (iii) \(\omega _{ji}< \mu _i\). Susceptible individuals become infected as soon as they receive an infectious contact, and infected individuals immediately become recovered when their infectious period terminates (initially recovered/vaccinated individuals never become infected). We let \({\mathcal {X}}= \cup _{i \in {\mathcal {V}}} {\mathcal {X}}_i\). Thus, the state of the population at time \(t \in [0, \infty )\), which takes values in \(\{S,I,R\}^{{\mathcal {V}}}\), is a function of \({\mathcal {X}}\).

The situation which we wish to consider is where \({\mathcal {X}}\) is a set of random variables, so from now on we refer to \(Y_i, \mu _i, \omega _{ji}\), where \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\), as random variables. We use \(r_i\) and \(h_{ij}\) to denote the (marginal) probability density functions (PDFs) for \(\mu _i\) and \(\omega _{ij}\) respectively, and \(z_i\) and \(y_i\) to denote \(\mathrm{P}(Y_i=2)\) and \(\mathrm{P}(Y_i=3)\) respectively. Thus, \(\mathrm{P}(Y_i=1)=1-y_i-z_i\). The probability that individual \(i \in {\mathcal {V}}\) is in state \(Z \in \{S,I,R\}\) at time \(t \ge 0\) is denoted by \(P_{Z_i}(t)\).

Importantly we assume that for every \(i \in {\mathcal {V}}\),

$$\begin{aligned} {\mathcal {X}}_i^*= \{ - \mu _i, \omega _{ji}\,(j \in {\mathcal {N}}_i) \} \end{aligned}$$

is a set of associated random variables, as defined by Esary et al. (1967) and discussed in this context by Donnelly (1993) and Ball et al. (2015). Additionally, we assume that the set of multivariate random variables \(\{ {\mathcal {X}}_i: i \in {\mathcal {V}}\}\) is mutually independent, and that \(Y_i\) and \({\mathcal {X}}_i^*\) are independent for all \(i \in {\mathcal {V}}\). A finite set of random variables, \(T_1, T_2,\dots ,T_n\) say, is associated (or positively correlated) if

$$\begin{aligned} \mathrm{E}[f(T_1, T_2,\dots ,T_n)g(T_1, T_2,\dots ,T_n)] \ge \mathrm{E}[f(T_1, T_2,\dots ,T_n)] \mathrm{E}[g(T_1, T_2,\dots ,T_n)] \end{aligned}$$
(1)

for all non-decreasing real-valued functions fg for which the expectations in (1) exist. Note that (1) implies that the correlation of any pair of these random variables is positive (i.e. \(\ge 0\)). Further, if \(T_1, T_2,\dots ,T_n\) are mutually independent, then they are associated; see Esary et al. (1967, Theorem 2.1).

The above assumptions of association and independence are made so as to obtain the maximum amount of generality while the message passing and pairwise systems, which we shall define, give rigorous bounds on the expected dynamics in the stochastic model, and exact correspondence when the graph is a tree or forest.

Our stochastic model represents a generalisation of that considered by Karrer and Newman (2010), and also generalises the model considered by Wilkinson and Sharkey (2014), which assumed that all of the elements of \({\mathcal {X}}\) are mutually independent. Here, we do not make this last assumption and allow all of an individual’s post-infection contact times (to each of its neighbours), and the negative of its infectious period, to be positively correlated. This could capture, for example, the scenario where infected individuals tend to adopt some disease-combating behaviour, increasing the contact times to all of their neighbours and decreasing their infectious period.

The model considered by Wilkinson and Sharkey (2014), which incorporates a directed graph, is equivalent to a special case of the above model. Directedness is still captured by the above model since, for any given \(i \in {\mathcal {V}}\) and \( j \in {\mathcal {N}}_i\), \(\omega _{ij}\) and \(\omega _{ji}\) are assigned independently.

2.1 The message passing system and its unique solution

Following Wilkinson and Sharkey (2014), we apply the message passing approach of Karrer and Newman (2010) to the stochastic model defined in Sect. 2. Recall that message passing relies on the concept of the cavity state in order to simplify calculations. An individual is placed into the cavity state by cancelling its ability to make contacts. This does not affect its own fate but it does affect the fates of others because it cannot pass on the infection.

For arbitrary \(i \in {\mathcal {V}}\) and neighbour \(j \in {\mathcal {N}}_i\), let \(H^{i \leftarrow j}(t)\) denote the probability that i, when in the cavity state, does not receive an infectious contact from j by time t. We can now write:

$$\begin{aligned} H^{i \leftarrow j}(t)=1- \int _0^t f_{ij}(\tau ) \big (1-y_j-z_j \varPhi _i^j(t-\tau ) \big ) \text{ d } \tau , \end{aligned}$$
(2)

where \(f_{ij}(\tau ) \varDelta \tau = h_{ij}(\tau ) P(\mu _j > \tau \mid \omega _{ij}= \tau ) \varDelta \tau \) is the probability (\(+o(\varDelta \tau )\)) that j makes an infectious contact to i during the time interval \([\tau ,\tau + \varDelta \tau )\) (for \(\varDelta \tau \rightarrow 0\)), where time \(\tau \) is measured from the moment j becomes infected, and \(\varPhi _i^j(t)\) is the probability that j does not receive any infectious contacts by time t when i and j are both in the cavity state. Note that although the stochastic model considered here is more general, \(H^{i \leftarrow j}(t)\) may still be expressed, as in (2), similarly to equation 1 in Wilkinson and Sharkey (2014), because \(\{{\mathcal {X}}_i: i \in {\mathcal {V}}\}\) is mutually independent and \(Y_i\) is independent from \({\mathcal {X}}_i^*\) for all \(i \in {\mathcal {V}}\).

To obtain a solvable system, the probability \(H^{i \leftarrow j}(t)\) is approximated by \(F^{i \leftarrow j}(t)\), where \(F^{i \leftarrow j}(t) \, \, (i \in {\mathcal {V}}, j \in {\mathcal {N}}_i)\) satisfies

$$\begin{aligned} F^{i \leftarrow j}(t) = 1- \int _0^t f_{ij} (\tau ) \left( 1-y_j-z_j \prod _{k \in {\mathcal {N}}_j \setminus i} F^{j \leftarrow k}(t-\tau ) \right) \text{ d } \tau . \end{aligned}$$
(3)

Any solution of (3) which gives \(F^{i \leftarrow j}(t) \in [0,1]\) for all \(t \ge 0\), and all \(i \in {\mathcal {V}} , j \in {\mathcal {N}}_i\), is called feasible. It was shown by Wilkinson and Sharkey (2014), following Karrer and Newman (2010), that a feasible solution exists as the limit of an iterative procedure.

The message passing system can now be defined (for \( i \in {\mathcal {V}}\)):

$$\begin{aligned} S_{\text {mes}}^{(i)}(t)= & {} z_i \prod _{j \in {\mathcal {N}}_i} F^{i \leftarrow j}(t), \end{aligned}$$
(4)
$$\begin{aligned} I_{\text {mes}}^{(i)}(t)= & {} 1 - S_{\text {mes}}^{(i)}(t) - R_{\text {mes}}^{(i)}(t), \end{aligned}$$
(5)
$$\begin{aligned} R_{\text {mes}}^{(i)}(t)= & {} y_i + \int _0^t r_i(\tau )[1-y_i-S_{\text {mes}}^{(i)}(t-\tau )] \text{ d } \tau , \end{aligned}$$
(6)

where the variables on the left-hand side approximate \(P_{S_i}(t)\), \(P_{I_i}(t)\) and \(P_{R_i}(t)\) respectively (recall that \(P_{S_i}(t)\), \(P_{I_i}(t)\) and \(P_{R_i}(t)\) are respectively the probability that individual i is susceptible, infective and recovered-or-vaccinated at time t). Numerical evidence for the effectiveness of the message passing system, in capturing the expected dynamics of the stochastic model, can be seen in Figures 1 and 2 of Wilkinson and Sharkey (2014).

Note that the dimension of the message passing system (3)-(6) is appreciably smaller than that of the Kolomogorov forward equations for the case where the dynamics are Markovian. Suppose that \(|{\mathcal {V}}|=N\). Then the forward equations have dimension \(3^N\) and the message passing system has dimension at most \(N(N-1)+3N\). In many cases, symmetries can be exploited to reduce the dimension of both the forward equations, see e.g. Simon et al. (2011), and the message passing system. However, the message passing system is still typically much smaller and can be very small, as in the model studied in Sect. 3.

Theorem 1

(Uniqueness of the feasible solution of the message passing system) Assume that

$$\begin{aligned} \sup _{i \in {\mathcal {V}}} |{\mathcal {N}}_i|< \infty \quad \text{ and } \quad \sup _{(i,j) \in {\mathcal {E}}} \left( \sup _{\tau \ge 0}f_{ij}(\tau ) \right) < \infty . \end{aligned}$$

Then there is a unique feasible solution of Eqs. (3)–(6) and the feasible \(F^{i \leftarrow j}(t)\) are continuous and non-increasing for all \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\).

Proof

See “Appendix 1”. \(\square \)

It was shown by Wilkinson and Sharkey (2014) that when the graph is finite and \(f_{ij}(\tau )=T_{ij} \mathrm{e}^{- T_{ij} \tau } \int _{\tau }^{\infty } r_j(\tau ') \text{ d } \tau ' \, \, (i \in {\mathcal {V}}, j \in {\mathcal {N}}_i)\), where \(T_{ij} \in (0, \infty )\), i.e. contact processes are Poisson and independent of recovery processes, then the message passing system (3)–(6) is equivalent to an individual-level pairwise system of integro-differential equations. It now follows that this pairwise system of equations also has a unique feasible solution.

The message passing system (3)–(6), which coincides with that given in Wilkinson and Sharkey (2014) although the underlying model here is more general, differs from the message passing system in Karrer and Newman (2010) in that the probability an individual is initially infected need not be the same for all individuals, and individuals may be initially recovered or vaccinated. The system (3)–(6) also accounts for heterogeneity in the recovery and contact processes. A key use of message passing equations is that they yield a rigorous upper bound for the mean spread in the underlying stochastic epidemic. In the next subsection, we show that this property extends to our more general model.

2.2 Bounding the expected epidemic size at time \(\varvec{t}\)

For \(t \ge 0\), let X(t) denote the number of susceptibles at time t. Thus, \(X(0)-X(t)\) is the total number of individuals infected by time t not counting those infected at \(t=0\). We refer to this quantity as the epidemic size at time t.

Theorem 2

(Message passing bounds the marginal distribution for the health status of an individual) For all \(t \ge 0\) and all \(i \in {\mathcal {V}}\),

$$\begin{aligned} P_{S_i}(t)\ge & {} S_{\text {mes}}^{(i)}(t), \end{aligned}$$
(7)
$$\begin{aligned} P_{R_i}(t)\le & {} R_{\text {mes}}^{(i)}(t) , \end{aligned}$$
(8)

with equality if G is a tree or forest.

Proof

In the case where \({\mathcal {X}}\) is mutually independent and \({\mathcal {V}}\) is finite, this is proved by Wilkinson and Sharkey (2014) and Ball et al. (2015) by generalising Karrer and Newman (2010). The proof for our current more general model is in “Appendix 2”. \(\square \)

For \(t \ge 0\), let Z(t) denote the number of recovered-or-vaccinated individuals at time t. The following corollary follows immediately from Theorem 2 on noting that, for \(t \ge 0\),

$$\begin{aligned} \mathrm{E}[X(t)]=\sum _i P_{S_i}(t) \qquad \text{ and } \qquad \mathrm{E}[Z(t)]=\sum _i P_{R_i}(t). \end{aligned}$$

Corollary 1

For all \(t \ge 0\), we have \(\mathrm{E}[X(t)] \ge \sum _{i}S^{(i)}_{\text {mes}}(t)\) and \(\mathrm{E}[Z(t)] \le \sum _{i}R^{(i)}_{\text {mes}}(t)\), with equality occurring when the graph is a tree or forest. The expected epidemic size at time t is given by \(E[X(0)-X(t)]=\sum _{i \in {\mathcal {V}}}z_i - E[X(t)]\). Thus, since we have a lower bound on E[X(t)] we also have an upper bound on the expected epidemic size at time t.

3 The homogeneous stochastic model

In this section we consider a special case of the stochastic model, and we refer to this special case as ‘the homogeneous stochastic model’. In the homogeneous stochastic model, the graph is symmetric and connected. Examples of symmetric connected graphs include complete graphs, ring lattices, infinite square lattices and Bethe lattices. In a symmetric graph, each individual has the same (finite) number n of neighbours, and we say that the graph is n-regular. To avoid triviality we assume \(n \ge 2\).

Definition 1

A graph \(G=({\mathcal {V}},{\mathcal {E}})\) is called symmetric if it is arc-transitive; i.e. for any two ordered pairs of neighbours ij, and \(i',j'\), there exists a graph-automorphism which maps i to \(i'\) and j to \(j'\) (Godsil and Royle 2001).

Additionally, in the homogeneous stochastic model, the joint distribution of \((Y_i, \mu _i , \omega _{j i}(j \in {\mathcal {N}}_i))\) is symmetric in its last n arguments and is the same for all \(i \in {\mathcal {V}}\). Thus, it is impossible to distinguish between any two individuals by their behaviour or by their position in the graph. Note that we have not precluded the variables in \({\mathcal {X}}_i^*\) from being non-trivially associated (for all \(i \in {\mathcal {V}}\)), i.e. i’s infectious period and the time it takes for it to contact each of its neighbours, after infection, may all be non-trivially correlated.

We use r and h to denote the (marginal) PDFs for \(\mu _i\) and \(\omega _{ij}\) respectively, and z and y to denote \(\mathrm{P}(Y_i=2)\) and \(\mathrm{P}(Y_i=3)\) respectively. Thus, \(\mathrm{P}(Y_i=1)=1-y-z\). To avoid triviality, we assume that \(0<z<1\) and \(0 \le y<1-z\).

Owing to symmetry (in this special case), the probability distribution for the health status of an individual is the same for all individuals, i.e. for all \(i,i' \in {\mathcal {V}}\) and all \(t \ge 0\), we have \(P_{S_i}(t)=P_{S_{i'}}(t), P_{I_i}(t)=P_{I_{i'}}(t)\) and \(P_{R_i}(t)=P_{R_{i'}}(t)\) (let \(P_S(t), P_I(t)\) and \(P_R(t)\) denote these quantities). Similarly, for all \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\) and all \(i' \in {\mathcal {V}}, j' \in {\mathcal {N}}_{i'}\), and all \(t \ge 0\), we have \(H^{i \leftarrow j}(t)= H^{i' \leftarrow j'}(t)\) (let \(H_{\text {sym}}(t)\) denote this quantity).

3.1 The homogeneous message passing system

For the homogeneous stochastic model, (3) becomes

$$\begin{aligned} F^{i \leftarrow j}(t) = 1- \int _0^t f(\tau ) \left( 1-y-z \prod _{k \in {\mathcal {N}}_j \setminus i} F^{j \leftarrow k}(t-\tau ) \right) \text{ d } \tau \quad (i \in {\mathcal {V}}, j \in {\mathcal {N}}_i), \end{aligned}$$
(9)

where we have used \(f_{ij}(\tau )=f_{i'j'}(\tau )\) for all \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\), and all \(i' \in {\mathcal {V}}, j \in {\mathcal {N}}_{i'}\), and all \(\tau \ge 0\), and we let \(f(\tau )\) denote this quantity.

The arc-transitivity of symmetric graphs and the symmetry in (9) allow us to simplify (3)–(6), and to write down the full homogeneous message passing system as:

$$\begin{aligned} S_{\text {mes}}(t)= & {} z F_{\text {sym}}(t)^{n}, \end{aligned}$$
(10)
$$\begin{aligned} I_{\text {mes}}(t)= & {} 1-S_{\text {mes}}(t)-R_{\text {mes}}(t), \end{aligned}$$
(11)
$$\begin{aligned} R_{\text {mes}}(t)= & {} y + \int _0^t r(\tau ) [1-y-S_{\text {mes}}(t-\tau )] \text{ d } \tau , \end{aligned}$$
(12)

where

$$\begin{aligned} F_{\text {sym}}(t)= & {} 1 - \int _0^t f(\tau ) \left[ 1 - y - zF_{\text {sym}}(t-\tau )^{n-1} \right] \text{ d } \tau . \end{aligned}$$
(13)

In deriving these equations, we have used \(F^{i \leftarrow j}(t)= F^{i' \leftarrow j'}(t)\) for all \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\) and all \(i' \in {\mathcal {V}}, j' \in {\mathcal {N}}_{i'}\), and all \(t \ge 0\), and we let \( F_{\text {sym}}(t)\) denote this quantity. Note that we have also made use of the fact that every individual has n neighbours. This system is identical in form (when vaccination is disallowed) to the message passing system for the configuration network model provided by Karrer and Newman (2010, equations 26 and 27, making use of equations 1, 4 and 5), in the case where every individual has n neighbours with probability 1. From Theorem 1, we know that if \(\sup _{\tau \ge 0} f(\tau ) < \infty \) then (13) has a unique feasible solution.

For clarity we write out these equations for the simplifying cases of Poisson transmission and recovery processes, and Poisson transmission and fixed (non-random) recovery.

Example 1

(Poisson transmission and recovery) For independent Poisson transmission and recovery processes (specifically, \({\tau }_i\) and \({\omega }_{ji}\) are independent and exponentially distributed with rates \(\gamma \) and \(\beta \) respectively), with \(f(\tau )=\beta \mathrm{e}^{-(\beta + \gamma ) \tau }\), the homogeneous message passing system can be solved via the following ordinary differential equations (ODEs):

$$\begin{aligned} \dot{F}_{\text {sym}}(t)= & {} \gamma \Big (1-F_{\text {sym}}(t) \Big ) - \beta \Big (F_{\text {sym}}(t) - y - z F_{\text {sym}}(t)^{n-1} \Big ), \end{aligned}$$
(14)
$$\begin{aligned} \dot{R}_{\text {mes}}(t)= & {} \gamma I_{\text {mes}}(t), \end{aligned}$$
(15)

with \(S_{\text {mes}}(t)\) and \(I_{\text {mes}}(t)\) given by (10) and (11).

Example 2

(Poisson transmission and fixed recovery) For Poisson transmission processes and a fixed recovery period (specifically, \(\tau _i\) is non-random with value \(R \in [0, \infty ]\) and \({\omega }_{ji}\) is exponentially distributed with rate \(\beta \)), with \(f(\tau )=\beta \mathrm{e}^{- \beta \tau }(1- \theta (t-R))\) where \(\theta \) is the Heaviside step function, the homogeneous message passing system can be solved using the following delay differential equation:

$$\begin{aligned} \dot{F}_{\text {sym}}(t)= & {} - \beta \Big (F_{\text {sym}}(t) - y - zF_{\text {sym}}(t)^{n-1} \nonumber \\&- \theta (t-R) \mathrm{e}^{- \beta R} \big ( 1 - y - z F_{\text {sym}}(t-R)^{n-1} \big ) \Big ) , \end{aligned}$$
(16)

with

$$\begin{aligned} R_{\text {mes}}(t)= & {} y + \theta (t-R) \big ( 1 - y - S_{\text {mes}}(t-R) \big ), \end{aligned}$$
(17)

and \(S_{\text {mes}}(t)\) and \(I_{\text {mes}}(t)\) given by (10) and (11).

Other choices of \(f(\tau )\) exist which allow the message passing system to be solved via (non-integro) differential equations, such as the top hat function (Karrer and Newman 2010, equation 33).

3.2 Epidemiological results

As well as bounding/approximating (or correctly computing in the case of an infinite regular tree) the expected fractional epidemic size at time \(t \ge 0\), the homogeneous message passing system generates other epidemiologically relevant results for the stochastic model, as demonstrated here.

Theorem 3

(Cycles in the network inhibit the stochastic epidemic) Suppose that \(\sup _{\tau \ge 0}f(\tau ) < \infty \). The probability of an arbitrary individual being susceptible at a given time, for the n-regular Bethe lattice (infinite tree), is less than or equal to this quantity for all other n-regular symmetric graphs (where the homogeneous stochastic model is otherwise unchanged). The same holds for the probability of an arbitrary individual being recovered except with the inequality reversed.

Proof

From Theorem 2, we know that system (10)–(13) cannot overestimate the probability of an arbitrary individual being susceptible at time t and cannot underestimate the probability of an arbitrary individual being recovered at time t. However, also from Theorem 2, the system is exact if the graph is a tree. \(\square \)

Theorem 3 suggests that, all other things being equal, an infection will have the greatest impact by time t when the contact structure is most tree-like. Indeed, it is known that clustering and the presence of cycles in the graph may slow down and limit the spread of an infection (see Miller (2009) and references therein).

Theorem 4

(Final epidemic size relation and sufficient conditions for no major outbreak) For all \(t \ge 0\),

$$\begin{aligned} S_{\text {mes}}(\infty ) \le P_{S}(t), \quad R_{\text {mes}}(\infty ) \ge P_{R}(t), \end{aligned}$$
(18)

where \(S_{\text {mes}}(\infty ) \equiv \lim _{t \rightarrow \infty }S_{\text {mes}}(t)\) may be computed as the unique solution in [0, z] of

$$\begin{aligned} \left( \frac{ S_{\text {mes}}(\infty )}{z} \right) ^{\frac{1}{n}}=1-p + py+ pz \left( \frac{ S_{\text {mes}}(\infty )}{z} \right) ^{\frac{n-1}{n}} , \end{aligned}$$
(19)

with \(p \equiv \int _0^{\infty } f(\tau ) \text{ d } \tau \), and \(R_{\text {mes}}(\infty )=1-S_{\text {mes}}(\infty )\).

Further, when the fraction initially infected is small, i.e. \(z \rightarrow 1 - y\) from below, then

$$\begin{aligned} P_S(\infty ) = P_S(0) \qquad \text{ if } \qquad y \ge 1 - \frac{1}{R_0} \quad \text {or} \quad R_0 \le 1, \end{aligned}$$
(20)

where \(R_0 \equiv (n-1)p\). (This means that if each individual is independently vaccinated with probability greater than or equal to \(1- 1/ R_0\), or if \(R_0 \le 1\), then a major outbreak of the disease is impossible.)

Proof

Equation (18) follows from Theorem 2 and the observation that \(P_S(t)\) and \(P_R(t)\) are non-increasing and non-decreasing respectively.

The feasible \(F_{\text {sym}}(t)\) is non-increasing (see Theorem 1), so it converges to some \(F_{\text {sym}}(\infty ) \in [0,1]\) as \(t \rightarrow \infty \). Note also that, by definition, \(\int _0^t f(\tau ) \text{ d } \tau \) converges to \(p \in [0,1]\) as \(t \rightarrow \infty \). Now, using (13), we can write \(F_{\text {sym}}(t)=1-\int _0^{\infty } f_t(\tau ) \text{ d } \tau \), where \(f_t(\tau )=f(\tau )(1-y-z F_{\text {sym}}(t-\tau )^{n-1})\) for \(\tau \in [0,t]\) and is equal to zero for \(\tau >t\). Note that \(f_t(\tau )\) converges pointwise to \(f(\tau )(1-y-z F_{\text {sym}}(\infty )^{n-1})\) as \(t \rightarrow \infty \). Thus, since \(0 \le f_t(\tau ) \le f(\tau )\) for all \(t, \tau \ge 0\), we can use the dominated convergence theorem to obtain, c.f. Karrer and Newman (2010, equations 23 and 24),

$$\begin{aligned} F_{\text {sym}}(\infty )=1-\int _0^{\infty } \lim _{t \rightarrow \infty } f_t(\tau ) \text{ d } \tau =1-p \left( 1 - y -z F_{\text {sym}}(\infty )^{n-1} \right) . \end{aligned}$$
(21)

Taking the limit as \(t \rightarrow \infty \) in (10), and making use of (21), proves equation (19). It is straightforward to show by graphical means that (19) has a unique solution in [0, z]. In the case where \(z \rightarrow 1-y\) from below, it is also straightforward to show by graphical means that, after setting \(z=1-y\) in (19), then \(S_{\text {mes}}(\infty )=z(=S_{\text {mes}}(0)=P_S(0))\) is the only solution in [0, z] if \(y \ge 1 - 1/R_0\) (\(R_0 \le 1\) implies this condition). Equation (20) is then proved by noting that \(P_S(t) \ge S_{\text {mes}}(t)\), and \(P_S(t)\) is non-increasing from \(P_S(0)=S_{\text {mes}}(0)\). \(\square \)

Equation 19 is consistent with the final size relation given by Diekmann et al. (1998) (equations 5.3 and 5.4) for a regular random graph in the limit of large population size.

Remark 1

Consider an infinite sequence of finite homogeneous stochastic models, indexed by m, where \(y_m=y \in [0,1)\) for all m, and where \(N_m \rightarrow \infty \), \(p_m(n_m-1)\rightarrow R_0 < \infty \), \(z_m \rightarrow 1-y\), as \(m \rightarrow \infty \) (here, \(N_m\) denotes the number of individuals in the mth model). This does not preclude the expected number of initial infectives from tending to some positive number, or even diverging, as \(m \rightarrow \infty \). It is straightforward that, in the limit of this sequence, the sufficient conditions for no major outbreak in Theorem 4 still hold. Note that if in addition we have \(n_m \rightarrow \infty \) as \(m \rightarrow \infty \), then the final size relation for the homogeneous message passing system (in this limit) becomes, using (19) with \(z=1-y\),

$$\begin{aligned} \frac{ S_{\text {mes}}(\infty )}{1-y} = \mathrm{e}^{-R_0(1-S_{\text {mes}}(\infty )-y)} . \end{aligned}$$

This is a well-known final size relation in the mean field literature, although usually vaccination is not included (see Miller (2012) for a discussion of derivations of this relation).

3.3 The homogeneous message passing system gives the same epidemic time course as a pairwise model

Here we show that a generalised pairwise SIR model, with well-known pairwise models as special cases, gives the same epidemic time course as the homogeneous message passing system. This allows us to prove epidemiological results for the generalised pairwise model. Since pairwise models are known to give good approximations of stochastic epidemic dynamics on networks [see, for example, Keeling (1999) and Sharkey (2008)], this also strengthens the case for the message passing system being a good approximation.

Theorem 5

(Equivalence of the message passing and pairwise models) For the homogeneous stochastic model, assume that the contact processes are Poisson with rate \(\beta \) and that they are independent from the recovery processes, such that \(f(\tau )=\beta \mathrm{e}^{- \beta \tau } \int _{\tau }^{\infty }r(\tau ') \text{ d } \tau '\). Assume also that \(r(\tau )\) is continuous. Then,

$$\begin{aligned} \dot{[S]}(t)= & {} - \beta [SI](t), \end{aligned}$$
(22)
$$\begin{aligned} \dot{[I]}(t)= & {} \beta [SI](t) - \int _0^t r(\tau ) \beta [SI](t- \tau ) \mathrm{d} \tau - r(t) N (1-y-z), \end{aligned}$$
(23)
$$\begin{aligned} \dot{[SS]}(t)= & {} - 2 \beta \frac{n-1}{n} \frac{[SS](t) [SI](t)}{[S](t)}, \end{aligned}$$
(24)
$$\begin{aligned} \dot{[SI]}(t)= & {} - \beta \left( \frac{n-1}{n} \right) \frac{[SI](t) [SI](t)}{[S](t)} \nonumber \\&- \beta [SI](t) \nonumber \\&+ \beta \left( \frac{n-1}{n} \right) \frac{[SS](t)[SI](t)}{[S](t)} \nonumber \\&- \int _0^t \mathrm{e}^{- \beta \tau } r(\tau ) \beta \left( \frac{n-1}{n} \right) \frac{[SS](t- \tau )[SI](t - \tau )}{[S](t - \tau )}\nonumber \\&\times \, \, \mathrm{exp}\Bigg ( -\int _{t - \tau }^{t} \beta \left( \frac{n-1}{n} \right) \frac{[SI](\tau ')}{[S](\tau ')} \mathrm{d} \tau ' \Bigg ) \mathrm{d} \tau \nonumber \\&-n N z \mathrm{e}^{- \beta t} r (t) (1-y-z) \, \mathrm{exp}\Bigg ( -\int _0^{t} \beta \left( \frac{n-1}{n} \right) \frac{[SI](\tau )}{[S](\tau )} \mathrm{d} \tau \Bigg ),\qquad \end{aligned}$$
(25)

where

$$\begin{aligned} \left[ S \right] (t)\equiv & {} N S_{\text {mes}}(t), \end{aligned}$$
(26)
$$\begin{aligned} \left[ I \right] (t)\equiv & {} N I_{\text {mes}}(t), \end{aligned}$$
(27)
$$\begin{aligned} \left[ SS \right] (t)\equiv & {} n N SS_{\text {mes}}(t) \equiv n N z^2 F_{\text {sym}}(t)^{2(n-1)}, \end{aligned}$$
(28)
$$\begin{aligned} \left[ SI \right] (t)\equiv & {} n N SI_{\text {mes}}(t) \equiv n N z F_{\text {sym}}(t)^{n-1} \Bigg ( \frac{- \dot{F}_{\text {sym}}(t)}{\beta } \Bigg ), \end{aligned}$$
(29)

and N is a positive number.

Proof

See “Appendix 3”. \(\square \)

Corollary 2

(At all time points the pairwise model cannot underestimate the expected epidemic size) If, in the homogeneous stochastic model, contact processes are Poisson with rate \(\beta \), i.e. the marginal distribution for \(\omega _{ji}\) is exponential with parameter \(\beta \) for all \(i \in {\mathcal {V}}, j \in {\mathcal {N}}_i\), and these are independent from the infectious periods, then

$$\begin{aligned}&[S](t)/N {\le } P_{S}(t), \quad [R](t)/N {\ge } P_{R}(t) \qquad (t \ge 0), \end{aligned}$$

where \(\ [R](t){=}N-[S](t)-[I](t)\).

Proof

This follows immediately from Theorems 2 and 5. \(\square \)

Corollary 3

(Final epidemic size equation for the pairwise model)

$$\begin{aligned} \left( \frac{ [S](\infty )}{Nz} \right) ^{\frac{1}{n}}=1-p + py+ pz \left( \frac{ [S](\infty )}{Nz} \right) ^{\frac{n-1}{n}} , \end{aligned}$$

where \([S](\infty ) \equiv \lim _{t \rightarrow \infty }[S](t)\) and \(p \equiv \int _0^{\infty } \beta \mathrm{e}^{- \beta \tau '} \int _{\tau '}^{\infty }r(\tau ) \text{ d } \tau \text{ d } \tau '\).

Proof

This follows immediately from Theorems 4 and 5. \(\square \)

Note that (22)–(25) constitute a closed system for the variables [S](t), [I](t), [SS](t) and [SI](t) (if \([S](t)=0\) then the right-hand sides of (24) and (25) are undefined, but in this case the left-hand sides are equal to zero). With reference to (28) and (29), the quantities \(SS_{\text {mes}}(t)\) and \(SI_{\text {mes}}(t)\) are constructed to capture/approximate, for any given pair of neighbours at time t, the probability that they are both susceptible and the probability that the first is susceptible while the second is infected respectively (see “Appendix 3”). The system (22)–(25) also follows directly from application of the individual-level pairwise equations in Wilkinson and Sharkey (2014, equations 8 and 9). In the case where the infectious period is exponentially distributed and letting N be the population size, (23) and (25) simplify to ODEs, and the pairwise (without clustering) model of Keeling (1999) is obtained. Similarly, after substituting \(r(\tau )=\delta (t-R)\), where \(\delta \) is the Dirac delta function, into (23) and (25), the pairwise model of Kiss et al. (2015) for a non-random infectious period of duration R is obtained (except that the last term in (23) and the last term in (25), which relate to the behaviour of the initial infectives, need to be neglected). However, it may be more efficient to solve the simpler message passing systems [via (14)–(15) and (16)–(17) respectively] and then, if pairwise quantities are required, these can be computed using (28) and (29).

As part of the proof of equivalence between message passing and pairwise models that we present here, we also close a gap in the arguments of Wilkinson and Sharkey (2014) by demonstrating sufficient conditions for the valid application of Leibniz’s integral rule (“Appendix 4”) in the derivation of the pairwise equations from the message passing equations (“Appendix 3”).

3.4 The homogeneous message passing system gives the same epidemic time course as the Kermack–McKendrick model (asymptotically)

Here, we consider a sequence of homogeneous stochastic models where the regular degree n tends to infinity. As \(n \rightarrow \infty \), an individual is able to make contacts to a number of neighbours which tends to infinity, so to obtain a finite limit we assume that the infection function \(f(\tau )\) depends on n (which we write \(f_n(\tau )\)) such that:

$$\begin{aligned} \lim _{n \rightarrow \infty }n f_n(\tau )= f^*(\tau )< \infty \qquad (\tau \ge 0). \end{aligned}$$

Note that, in the limit of large n, transmission is frequency dependent and the expected number of infectious contacts made by a given infected individual during the time interval \((t_1,t_2)\) is \(\int _{t_1}^{t_2} f^*(\tau )\text{ d } \tau \), where time is measured from the moment the individual first became infected.

The deterministic model proposed by Kermack and McKendrick (1927) is as follows:

$$\begin{aligned} \dot{S}(t)= & {} S(t) \left[ \int _0^t f^*(\tau ) \dot{S}(t- \tau ) \text{ d } \tau - I(0)f^*(t) \right] , \end{aligned}$$
(30)
$$\begin{aligned} I(t)= & {} 1-S(t)-R(t), \end{aligned}$$
(31)
$$\begin{aligned} R(t)= & {} R(0)+ \int _0^t r(\tau )[1-R(0)-S(t-\tau )] \text{ d } \tau . \end{aligned}$$
(32)

Equations 12–15 of Kermack and McKendrick (1927) may be obtained from (30) to (32) after multiplying through by the total population size N in their paper.

The following theorem shows that, under this limiting regime and mild further conditions, the homogeneous message passing system gives the same epidemic time course as the model of Kermack and McKendrick (1927). For \(n=1,2,\dots \), let \(S_{\text {mes}(n)}(t),I_{\text {mes}(n)}(t)\) and \(R_{\text {mes}(n)}(t)\) denote the message passing system given by (10)-(13), where \(F_{\text {sym}}(t)\) is replaced by \(F_{\text {sym}(n)}(t)\), which satisfies (13) with \(f(\tau )\) replaced by \(f_n(\tau )\).

Theorem 6

(Deriving the Kermack–McKendrick model from message passing) Suppose that for all \(T\ge 0\),

  1. (i)

    \(\epsilon _n(T)=\sup _{0 \le t \le T}|nf_n(t)-f^*(t)| \rightarrow 0\) as \(n \rightarrow \infty \),

  2. (ii)

    \(M_T=\sup _{0 \le t \le T} f^*(t) < \infty \),

and that, for all \(n=1,2,\dots ,\)

  1. (iii)

    \(f_n(t)\) is continuously differentiable,

  2. (iv)

    \(\left( S_{\text {mes}(n)}(0),I_{\text {mes}(n)}(0), R_{\text {mes}(n)}(0)\right) =(S(0),I(0),R(0))=(z,1-z-y,y)\).

Then, for all \(T>0\),

$$\begin{aligned} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T}\left| S_{\text {mes}(n)}(t)-S(t)\right|= & {} 0, \end{aligned}$$
(33)
$$\begin{aligned} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T}\left| I_{\text {mes}(n)}(t)-I(t)\right|= & {} 0, \end{aligned}$$
(34)
$$\begin{aligned} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T}\left| R_{\text {mes}(n)}(t)-R(t)\right|= & {} 0. \end{aligned}$$
(35)

Proof

Fix \(T>0\) and note first from (13) that, for feasible \(F_{\text {sym}(n)}(t)\) and all \(t \in [0,T]\),

$$\begin{aligned} 1 \ge F_{\text {sym}(n)}(t) \ge 1- \int _0^t f_n(\tau ) \text{ d }\tau \quad (n=1,2,\dots ). \end{aligned}$$

Now \(n\int _0^t f_n(\tau ) \text{ d }\tau \le T(M_T+\epsilon _n(T))\), for all \(t \in [0,T]\), so conditions (i) and (ii) imply that there exists \(\epsilon _n^{(1)}(T)\ge 0\) such that for all \(t \in [0,T]\),

$$\begin{aligned} 1 \ge F_{\text {sym}(n)}(t) \ge 1-\epsilon _n^{(1)}(T) \quad (n=1,2,\dots ), \end{aligned}$$
(36)

where \(\epsilon _n^{(1)}(T) \rightarrow 0\) as \(n \rightarrow \infty \). Thus, for all sufficiently large n, \( F_{\text {sym}(n)}(t)\) is non-zero for all \(t \in [0,T]\).

Differentiating (10) yields

$$\begin{aligned} \dot{S}_{\text {mes}(n)}(t)=nz F_{\text {sym}(n)}(t)^{n-1}\dot{F}_{\text {sym}(n)}(t), \end{aligned}$$
(37)

and differentiating (13), using Leibniz’s integral rule (see “Appendix 4”), gives

$$\begin{aligned} \dot{F}_{\text {sym}(n)}(t)= & {} -f_n(t)(1-y-z)\nonumber \\&+(n-1)z\int _0^t f_n(\tau ) F_{\text {sym}(n)}(t- \tau )^{n-2} \dot{F}_{\text {sym}(n)}(t-\tau ) \text{ d } \tau . \end{aligned}$$
(38)

Substituting (38) into (37), and using (10), gives

$$\begin{aligned} \dot{S}_{\text {mes}(n)}(t)= & {} \frac{ S_{\text {mes}(n)}(t)}{F_{\text {sym}(n)}(t)} \Bigg [ \frac{n-1}{n} \int _0^t n f_n(\tau ) \frac{\dot{S}_{\text {mes}(n)}(t- \tau )}{F_{\text {sym}(n)}(t-\tau )} \text{ d } \tau \nonumber \\&- n f_n(t)(1-y-z) \Bigg ]. \end{aligned}$$
(39)

It can be shown, using (30) and (39) that, for all \( t \in [0,T]\),

$$\begin{aligned} \left| \dot{S}_{\text {mes}(n)}(t)- \dot{S}(t)\right| \le A(n,T) \int _0^t \left| \dot{S}_{\text {mes}(n)}(u)-\dot{S}(u)\right| \text{ d } u + B(n,T), \end{aligned}$$
(40)

where \(B(n,T) \rightarrow 0\) as \(n \rightarrow \infty \) and \(0 \le A(n,T) \le 4M_T\) for all sufficiently large n (see “Appendix 5”). Application of Gronwall’s inequality (see “Appendix 4”) then yields that, for all \( t \in [0,T]\),

$$\begin{aligned} \left| \dot{S}_{\text {mes}(n)}(t)- \dot{S}(t)\right| \le B(n,T) \mathrm{e}^{A(n,T)t}. \end{aligned}$$
(41)

Thus

$$\begin{aligned} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T} \left| \dot{S}_{\text {mes}(n)}(t)- \dot{S}(t)\right| =0, \end{aligned}$$

whence

$$\begin{aligned} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T} \left| {S}_{\text {mes}(n)}(t)- {S}(t)\right|= & {} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T} \left| \int _0^t \dot{S}_{\text {mes}(n)}(u)- \dot{S}(u) \text{ d } u\right| \\\le & {} \lim _{n \rightarrow \infty } \sup _{0 \le t \le T} \int _0^t \left| \dot{S}_{\text {mes}(n)}(u)- \dot{S}(u)\right| \text{ d } u\\\le & {} \lim _{n \rightarrow \infty } T \sup _{0 \le t \le T} \left| \dot{S}_{\text {mes}(n)}(t)- \dot{S}(t)\right| \\= & {} 0, \end{aligned}$$

proving (33). Equation (35) now follows using a similar argument and (34) is then immediate. \(\square \)

It is straightforward that if \(f^*(\tau )= \beta k \mathrm{e}^{- \gamma \tau }\) and \(r(\tau )=\gamma \mathrm{e}^{- \gamma \tau }\) then the Kermack–McKendrick model reduces to a system of ODEs:

$$\begin{aligned} \dot{S}(t)= & {} -\beta k S(t) I(t), \end{aligned}$$
(42)
$$\begin{aligned} \dot{I}(t)= & {} \beta k S(t) I(t) - \gamma I(t), \end{aligned}$$
(43)
$$\begin{aligned} \dot{R}(t)= & {} \gamma I(t). \end{aligned}$$
(44)

For this special case, we state the following corollary to Theorem 6, see also Wilkinson et al. (2016), where it is proved that, for non-random initial conditions, the Kermack–McKendrick model bounds the so-called ‘general stochastic epidemic’.

Corollary 4

(In the Markovian case, message passing and pairwise models are better approximations than the Kermack–McKendrick model) Assume that, in the homogeneous stochastic model, contact and recovery processes are independent and Poisson with rates \(\beta \) and \(\gamma \) respectively. Specifically, \(h(\tau )=\beta \mathrm{e}^{-\beta \tau }\), \(r(\tau )=\gamma \mathrm{e}^{- \gamma \tau }\) and \(f(\tau )=\beta \mathrm{e}^{-(\beta + \gamma )\tau }\). Let k denote the regular degree of the symmetric graph (instead of n). For this special case,

$$\begin{aligned} S(t) < S_{\text {mes}}(t) \le P_{S}(t), \quad R(t)> R_{\text {mes}}(t) \ge P_{R}(t) \qquad (t > 0), \end{aligned}$$

where S(t) and R(t) are given by (42)–(44), with \(S(0)=z,I(0)=1-y-z\) and \(R(0)=y\), and \(S_{\text {mes}}(t)\) and \(R_{\text {mes}}(t)\) are given by (9)–(12) with n replaced by k.

Proof

See “Appendix 6”. \(\square \)

4 Discussion

The message passing equations of Karrer and Newman (2010) approximate the expected time course for non-Markovian SIR epidemic dynamics on networks. In a later paper, Wilkinson and Sharkey (2014) slightly generalised their equations in order to make them applicable to stochastic models with more individual level heterogeneity. Here, for the first time, we have shown that Karrer and Newman’s system of message passing equations, and its generalisation, have unique feasible solutions (Theorem 1).

An important feature of the message passing equations is that they produce an upper bound to the expected epidemic size (cumulative number of infection events) at every point in time. Thus, they give a ‘worst case scenario’. In addition, they exactly capture the expected epidemic when the contact network is a tree. Here, we extended these results to a further generalised stochastic model which includes realistic correlations between post-infection contact times and the infectious period (Theorem 2). This situation can occur when individuals may adopt disease-combating behaviour, such as taking antiviral medication, which acts both on the ability of an individual to pass on the infection as well as the duration of their infectivity.

Much of this paper was devoted to a special case of the stochastic model which we referred to as the ‘homogeneous stochastic model’, in which individuals are homogeneous and the contact network is a symmetric graph (correlations between post-infection contact times and the infectious period are still allowed). Examples of a symmetric graph include a finite complete graph, an infinite square lattice and an infinite Bethe lattice. Due to symmetry, the message passing system here reduces to just four equations which we refer to as the ‘homogeneous message passing system’. This system is equivalent in form to a special case of the system found by Karrer and Newman (2010) to describe epidemic dynamics on random configuration networks, but here it is applied to a different stochastic model. These equations were analysed, making use of Theorem 2, to obtain a result which shows that cycles in the contact network serve to inhibit the stochastic epidemic (Theorem 3). Following arguments from Karrer and Newman (2010), we also obtained a single equation which provides an upper bound on the final epidemic size (Theorem 4); for the Bethe lattice, the final epidemic size is captured exactly. This naturally provides sufficient conditions, in terms of an \(R_{0}\)-like quantity and the level of vaccination, for there to be no major outbreak (Theorem 4).

We found that the ‘limit’ of an appropriate sequence of homogeneous message passing systems gives the same epidemic time course as the Kermack and McKendrick (1927) epidemic model (Theorem 6) showing that it can be viewed as a special case of message passing. This also has the advantage of relating it to the underlying stochastic model (see also Barbour and Reinert (2013) who establish an exact correspondence). The final epidemic size result, and sufficient conditions for no major outbreak, described above for the homogeneous message passing system then translate directly.

From the homogeneous message passing system, we also constructed an equivalent population-level pairwise system which incorporates a general infectious period (Theorem 5). This can also be derived directly as a special case of the general individual-level pairwise system of Wilkinson and Sharkey (2014, equations 8 and 9) by applying the conditions of the homogeneous stochastic model. Here we filled a gap in the arguments of this paper by demonstrating sufficient conditions for the valid application of Leibniz’s integral rule (“Appendix 4”). This population-level pairwise system contains the Poisson pairwise model (without clustering) of Keeling (1999) as a special case. It also contains the delay differential equation model of Kiss et al. (2015) as a special case. We note that an entirely different derivation of (22)–(25) has been found independently and in parallel by Röst et al. (2016).

In general, we have emphasised the equivalence between several different types of SIR epidemic model. Specifically, we mention the derivation of the Kermack–McKendrick model as a special case of message passing and the equivalence (under Markovian transmission) of message passing and a class of pairwise models [see also Wilkinson and Sharkey (2014)]. We also note the recently submitted paper by Sherborne et al. (2016) which highlights the equivalence of message-passing and edge-based models (Miller et al. 2011), and that there is equivalence between edge-based models and the model of Volz (2008) [proved by Miller (2011)], and between the model of Volz and the binding site model of Leung and Diekmann (2017, Remark 1). While for SIR dynamics, message passing provides quite a general unifying framework, we note that for other dynamics such as SIS, it remains difficult to formulate a similar construction.

Unification of models is valuable in narrowing the lines of enquiry and simplifying ongoing research. In addition, owing to their different constructions, different types of results have been more forthcoming for some models than for others, and unification can allow results for one model to be automatically transferred to another. For example, here, by unification with message passing, we have been able to show that when contact and recovery processes are independent and Poisson, the Kermack–McKendrick model (which then reduces to a mass action ODE model) provides a rigorous upper bound on the expected epidemic size at time \(t>0\) in the homogeneous stochastic model (Corollary 4). However, the bound is coarser than that provided by the message passing and pairwise systems, so we now know that these are better approximations. This extends the result that, for non-random initial conditions, the Kermack–McKendrick model bounds the so-called ‘general stochastic epidemic’ (Wilkinson et al. 2016). An interesting development would be to show that the Kermack–McKendrick model (30)–(32) bounds the homogeneous stochastic model more generally. We observe that this could be achieved by showing that the message passing system for the stochastic model is the first in a sequence of message passing systems indexed by n, which satisfies the conditions for Theorem 6, and where \(S_{\text {mes}(n)}(t)\) is non-increasing with n; this is easy to do for Poisson transmission and recovery processes (“Appendix 6”). Another extension worthy of investigation is to multitype SIR epidemics.