--- abstract: 'Epidemic models are crucial to understand how an infectious disease spreads in a population, and to devise the best containment strategies. Compartmental models can provide a fine-grained description of the evolution of an epidemic when microscopic information on the network of contacts among individuals is available. However, coarser-grained descriptions prove also to be useful in many aspects. They allow to derive closed expressions for key parameters, such as the basic reproduction number, to understand the relationship between the model parameters, and also to derive fast and reliable predictions of macroscopic observables for a disease outbreak. The so-called *population models* can be developed at different levels of coarse-graining, so that it is crucial to determine: *i)* to which extent and how the existing correlations in the contact network have to be included in these models, and *ii)* what is their impact on the model ability to reproduce and predict the time evolution of the populations at the various stage of the disease. In this work, we address these questions through a systematic analysis of two discrete-time SEAIR (Susceptible-Exposed-Asymptomatic-Infected-Recovered) population models: the first one developed assuming statistical independence at the level of individuals, and the other one assuming independence at the level of pairs. We provide a detailed derivation and analysis of both models, focusing on their capability to reproduce an epidemic process on different synthetic networks, and then comparing their predictions under scenarios of increasing complexity. We find that, although both models can fit the time evolution of the compartment populations obtained through microscopic simulations, the epidemic parameters adopted by the individual-based model for this purpose may significantly differ from those of the microscopic simulations. However, pair-based model provides not only more reliable predictions of the dynamical evolution of the variables, but also a good estimation of the epidemic parameters. The difference between the two models is even more evident in the particularly challenging scenario when one or more variables are not measurable, and therefore are not available for model tuning. This occurs for instance with asymptomatic infectious individuals in the case of COVID-19, an issue that has become extremely relevant during the recent pandemic. Under these conditions, the pairwise model again proves to perform much better than the individual-based representation, provided that it is fed with adequate information which, for instance, to be collected, may require a more detailed contact tracing. Overall, our results thus hallmark the importance of acquiring the proper empirical data to fully unfold the potentialities of models incorporating more sophisticated assumptions on the correlations among nodes in the contact network.' author: - Federico Malizia - Luca Gallo - Mattia Frasca - Vito Latora - Giovanni Russo bibliography: - 'pairwise.bib' title: 'Individual- and pair-based models of epidemic spreading: master equations and analysis of their forecasting capabilities' --- Introduction ============ The last decades have witnessed the emergence of new infectious diseases and the resurgence of old ones @mcmichael2004environmental [@fauci2012perpetual; @morens2013emerging]. Examples include the outbreak of Ebola in West Africa @coltart2017ebola, the epidemic of Zika virus in North and South America @fauci2016zika, and the global spreading of respiratory diseases such as influenza A(H1N1) @novel2009emergence and, more recently, COVID-19 @estrada2020covid [@li2020early], all of which have risen international public health concern. In this context, mathematical modeling of disease spreading has played a fundamental role in the understanding, control and prevention of epidemic outbreaks, guiding the policy-making processes through quantitative analyses @keeling2011modeling [@pastor2015epidemic; @kiss2017mathematics]. As the spreading of an infectious disease within a population is heavily affected by the precise patterns of contacts among individuals and by their mobility habits, complex networks, which allow to represent the intricate structure of human interactions @newman2003structure [@boccaletti2006complex; @latora2017complex], are a fundamental tool for analyzing the dynamics of an epidemic. A variety of techniques exists to model the dynamics of a disease spreading on a network @pastor2015epidemic [@kiss2017mathematics], ranging from macroscopic compartmental models based on ordinary differential equations @kermack1927contribution [@anderson1992infectious], to more sophisticated data-driven agent-based microscopic simulations @eubank2004modelling [@longini2005containing; @ferguson2005strategies] and metapopulation structured models @colizza2008epidemic [@ajelli2010comparing]. In particular, deterministic representations of compartmental models can be formulated, aiming at describing the epidemic process in terms of the temporal evolution of the probabilities that a node is in a given state. To this purpose, one can adopt either a top-down approach, which consists in defining all the possible configurations of the network and the mechanisms ruling transitions from one network state to another, or a bottom-up approach, focusing instead on the state of single nodes @kiss2017mathematics. The latter approach leads to a hierarchy of coupled differential/master equations. Indeed, the dynamics of a node typically depends on the state of the node itself and of its neighbors, thus on the state of pairs of nodes, which in turns depends on triples, in a hierarchy of dynamical correlations and dependencies. Such hierarchies are very common in kinetic and statistical physics. For example, classical derivation of the Boltzmann equation of rarefied gas dynamics is based on the so-called BBGKY hierarchy, formally obtained by the integration of the Liouville equation of a system of $N$ particles undergoing binary collisions: the evolution equation for the $k$-particle distribution function depends on the $(k+1)$-particle distribution function @Cercignani. As another example, in Extended Thermodynamics, the evolution equations of moments of order $k$ of the distribution function depend on the moments of order $k+1$ @muller2013rational. In all cases, to be of practical use the hierarchies have to be truncated by introducing some approximation. For instance, in the case of the Boltzmann equation, the hierarchy is closed at the level of single particle distribution function by the so-called <span>*Stosszahlansatz*</span> and <span>*propagation of chaos*</span>, while in extended thermodynamics, the closure is usually based on the so-called maximum entropy principle @Cercignani [@muller2013rational]. In the context of mathematical epidemiology, similar bottom-up approaches have been adopted to develop individual and pair-based continuous-time models on networks, and applied, for instance, to the SIR process in the homogeneous @rogers2011maximum and heterogeneous @bell2021beyond mean-field approximation. Individual and pair-based approximations for the SIR process have also been analyzed in the discrete-time case where, unlike the standard continuous-time BBGKY-type hierarchy, the master equations describing the dynamics of the system are expressed in terms of joint probabilities, whose order is governed by the network structure itself via the degrees of individual nodes @frasca2016discrete, thus resulting in a richer although more complicated mathematical structure. A relevant question concerning these kinds of hierarchies is at which order one needs to truncate them in order to get accurate predictions about an epidemic process. Indeed, while it has been shown how to close the system of equations at various orders , it is less clear how the chosen approximation affects the features of the model, and, more specifically, its ability to forecast the dynamical evolution of the state variables. In particular, a systematic analysis of the reliability of the predictions obtained by different hierarchy closures and under different hypotheses on the quantity and quality of available data, is still lacking. Indeed, the problem of data availability is of utmost importance in the context of the COVID-19 pandemic, where the epidemic process has been proven difficult to characterize and the mechanisms at work have not yet been fully unveiled @vespignani2020modelling [@roda2020difficult; @gallo2020lack]. In this paper we address the issues above focusing on the SEAIR model, a compartmental model with five compartments. This is a generalization of the SIR model accounting for two critical features of infectious diseases such as the COVID-19, namely the existence of a latency period and the presence of asymptomatic carriers. While being rather simple, the SEAIR model allows to study the crucial case of two infectious population, namely the symptomatic and the asymptomatic, with the latter that, given the difficulties in its measurement, had a significant role in the COVID-19 pandemic @he2020temporal [@li2020early; @rothe2020transmission; @lavezzo2020suppression]. In more detail, first we derive the discrete-time master equations for the *SEAIR model* with two different orders of approximation, closing the system both at the level of individuals (individual-based population models) and at the level of pairs (pair-based population models), and deriving the corresponding set of master equations. We then compare these two approximations, analyzing to which extent they can capture the temporal evolution of the SEAIR epidemic process. To do so, we consider scenarios of increasing complexity, with the hypotheses on the amount of available data gradually becoming more strict from case to case. The paper is organized as follows. First, we describe the microscopic mechanisms underlying the epidemic process and discuss the mathematical modeling approaches to describe it in Sec. \[section:model\_introduction\]. We then derive an individual-based and a pair-based version of the SEAIR model in Sec. \[section:models\]. Assuming to know the epidemiological characteristics, in Sec. \[section:epidemic\_evolution\] we compare the ability of the models in reproducing the dynamics of an outbreak. In Sec. \[section:fitting\] we analyse the predictive capability of the models when parts of the information on the epidemic are not available. Finally, we summarize and discuss the main findings of the work in Sec. \[section:conclusion\] Modeling an epidemic process\[section:model\_introduction\] =========================================================== In compartmental models the population is partitioned into several states, namely the *compartments,* representing the different stages of the disease course. For instance, in the SIR model, which is one of the simplest compartmental models, an individual can either be susceptible (S), infected (I), or recovered/removed (R). To model the spreading of a disease within a population, the most important step is to characterize the processes governing the transitions of individuals from one disease stage, to another i.e. from a compartment to another @pastor2015epidemic. In the SIR model, the contagion is defined by two fundamental mechanisms. First, we have a two-body nonlinear process, representing the infection of a susceptible individual (S) by an infected one (I), which acts as a mediator of the transition. Second, we have a one-body linear process, describing the recovery (R) of an infected individual (I). The transitions from one compartment to another can be formally expressed with the following kinetic equations $$\begin{array}{rcl} S + I & \overset{\beta}{\rightarrow} & I + I \\ I & \overset{\mu}{\rightarrow} & R, \end{array} \label{eq:SIR_transitions}$$ where $\beta$ and $\mu$ represent, in the case of a continuous-time model, the transition rates for the infection and recovery processes, while they can be interpreted as transition probabilities in the case of a discrete-time model. These are two tunable control parameters of the model, which can be fixed based on the previous knowledge we have of the disease under study. For instance, the parameter regulating the recovery process, i.e. $\mu$, can be set from the knowledge of the typical infectious period of the disease, i.e. the average time during which an individual remains infectious before recovering. In a discrete time model, $\mu$ represents the probability that an infected individual recovers in a time unit $\Delta t$, typically one day. The expected number of time units for recovery is therefore $1/\mu$. The infectious period for influenza, for example, commonly lasts about 2-8 days, while, for smallpox, it can last over 20 days @kretzschmar2009mathematical, resulting in a smaller value of $\mu$ for smallpox, compared to the value characterizing influenza. From compartmental models the basic reproduction number, $\mathcal{R}_0$, of an infectious disease @diekmann1990definition can be evaluated. This parameter, which represents the average number of secondary infections produced by an infectious individual at an early stage of an epidemic, is of utmost relevance in mathematical biology, as it determines whether an infection can spread across the population. Quantitatively, when $\mathcal{R}_0<1$, i.e. when the number of new infections per infectious individual is less than one, the infection is not able to spread. Otherwise, when $\mathcal{R}_0>1$, an epidemic outbreak can occur @dietz1993estimation. In the simple case of the SIR model, $\mathcal{R}_0$ is given by the ratio between the infection and the recovery rates/probabilities, i.e. $\mathcal{R}_0 = \beta/\mu$. In this paper we consider a discrete-time compartmental model with five compartments, in which, at any time, an individual can be either susceptible (S), exposed to the disease but still unable to spread it (E), asymptomatic infectious (A), symptomatic infectious (I), or recovered/removed (R). We refer to this compartmental model as the SEAIR model @arenas2020modeling [@basnarkov2021seair]. This is a generalization of the SIR model, as it incorporates two additional states, i.e. the E and A compartments, which describe two essential aspects of several infectious diseases, namely the existence of a latency period and the presence of asymptomatic carriers @nelson2014infectious. In particular, the presence of infectious individuals with no symptoms of the disease (state A) may play a critical role in an epidemic outbreak, as it has been observed, for instance, in the recent COVID-19 pandemic @he2020temporal [@li2020early; @rothe2020transmission; @lavezzo2020suppression]. In the SEAIR model the progress of an individual through the disease stages is determined by the following kinetic equations $$\begin{array}{rcl} S + A & \overset{\beta_A}{\rightarrow} & E + A \\ S + I & \overset{\beta_I}{\rightarrow} & E + I \\ E & \overset{\alpha_{EA}}{\rightarrow} & A \\ A & \overset{\alpha_{AI}}{\rightarrow} & I \\ A & \overset{\mu_A}{\rightarrow} & R \\ I & \overset{\mu_I}{\rightarrow} & R. \end{array} \label{eq:SEAIR_transitions}$$ that are graphically illustrated in the flow diagram of Fig. \[fig:SEAIR\_model\]. At variance with the SIR model, the SEAIR model accounts for two different types of infection mechanisms, as a susceptible individual (in state S) may be infected upon a contact with either an asymptomatic (in state A) or a symptomatic (in state I) infectious individual. These processes are described by the first two kinetic equations, and are governed by two infection probabilities, $\beta_A$ and $\beta_I$ respectively, which may take different values. These probabilities depend on several factors. For relatively short time step $\Delta t$ of the discrete-time model, we can imagine that the probability $\beta_A$ that a susceptible individual gets infected by an asymptomatic one in such a time step can be expressed as $\beta_A = \nu_A \times p_A \times \Delta t$, where $\nu_A$ represents the rate of encounters of an asymptomatic individual with other individuals, and $p_A$ the probability that one such encounter transmits the infection. The contact frequency depends on the awareness of the health condition: susceptible individuals tend to avoid contacts with symptomatic people more than with other susceptible or asymptomatic individuals. Furthermore, the probability that one encounter transmits the infection, $p_A$, depends both on the intrinsic transmissibility of the disease, and on the preventive measures adopted, such as social distancing, use of masks and disinfectant, and so on [^1]. For example, in the case of COVID-19, it has been shown that the absence of symptoms, such as coughing and sneezing, applies a smaller a-priori transmissibility of the disease, and therefore a small value of $p_I$. It is therefore reasonable to assume $\beta_A < \beta_I$ @he2020relative [@byambasuren2020estimating]. However, as asymptomatic individuals can be unaware about their condition, there are high chances that they will maintain their habitual social behavior. Therefore, as asymptomatic individuals can spread the virus without knowing it, they constitute an important public-health risk. Indeed, it is reasonable to consider $\beta_A>\beta_I$, assuming that there is a higher chance of dangerous contacts with subjects with no symptoms, thus incorporating such increased contact rates in the value of the transmission probability $p_A$, and consequently on $\beta_A$ @giordano2020modelling. Hence, the possibility to tune separately the values of the two parameters $\beta_I$ and $\beta_A$, and to consider both the regime with $\beta_A>\beta_I$ and the one with $\beta_A<\beta_I$, is an important aspect of the SEAIR model. The other important feature, which makes the SEAIR different from the SIR model, is the addition of the $E$ compartment accounting for the presence of individuals exposed to the disease but still unable to spread it. Notice, from the flow diagram in Fig. \[fig:SEAIR\_model\], that in the SEIAR model the newly infected individuals first move to the $E$ state, meaning that they are not immediately able to spread the disease. Before becoming infectious, the exposed individuals undergo a latency period, after which they are able to spread the disease as asymptomatic carriers. The transition from $E$ to $A$ is governed by the probability $\alpha_{EA}$, which is the parameter controlling the average duration of the latency period $\tau = \Delta t / \alpha_{EA}$. Asymptomatic individuals can eventually develop symptoms, and this is taken into account by the transition from state A to state I, which takes place with probability $\alpha_{AI}$. Subsequently, the individuals recover, or are removed, either with or without having previously shown symptoms, with two different probabilities, $\mu_I$ and $\mu_A$ respectively. In conclusion, the SEAIR model is based on five compartments and is ruled by six different tunable parameters $\beta_A, \beta_I, \alpha_{EA}, \alpha_{AI}, \mu_A, \mu_I$. As the disease can only spread through encounters between infectious and susceptible individuals, the progress of an epidemic outbreak ultimately depends on the patterns of contacts among the individual themselves. These are strongly ruled not only by social habits, but also by the geographical distributions of the individuals and by the way these distributions change in time. Humans travel across a hierarchy of characteristic spatial scales, such as neighbourhoods, cities and countries, so that their highly heterogeneous mobility influences the way in which they interact @brockmann2006scaling [@gonzalez2008understanding; @song2010modelling; @arcaute20; @alessandretti20]. Therefore, a crucial aspect of any realistic modeling of epidemic spreading is how to model the contact patterns within a population. Large-scale agent-based simulations @ferguson2005strategies and structured metapopulation models based on data-driven mobility schemes at the interpopulation level @Chinazzi2020 are usually complemented by models amenable to mathematical analysis @gomez2018critical that capture the influence of human behaviour and the existence of complex social structures. In this context, complex networks @latora2017complex have revealed particularly useful as they allow to represent the physical contact patterns that result from real movements of individuals between specific locations @eubank2004modelling, and also to investigate in a controlled way how the social structure of a population affects the evolution and outcome of an epidemic. Here, we will focus on network modelling of disease spreading. Namely, we will implement the stochastic processes that describe the infectious disease on an undirected graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$, with $N=|\mathcal{V}|$ nodes and $K = |\mathcal{E}|$ links. In the following we will indicate as $G= \{ g_{ij}\}$ (with $g_{ij}=1$ if node $i$ and $j$ are connected, while $g_{ij}=0$ otherwise) the $N \times N$ adjacency matrix of such graph. In this framework, each node $i \in \mathcal{V}$ of the graph represents an individual of the population, and can be in one of the five different states of SEAIR model. Each edge $(i,j) \in \mathcal{E}$ represents a contact along which the infection can take place. Nodes change states according to Eqs. (\[eq:SEAIR\_transitions\]), where the first two kinetic equations are implemented over the links of the graph. Different graph topologies will be studied in this article. For simplicity, however, the graphs considered here will always be fixed in time, which means that the pattern of contacts is assumed not to change during the evolution of the disease. This is, however, a strong assumption, as humans tend to react to a disease by avoiding contacts with infected individuals. This leads to a rewiring of links depending on the states of the nodes that affects the dynamics of the disease, which in turn influences the rewiring process. Temporal networks and time-varying graphs are an important subfield of network science @Holme_rev12 [@holme2013temporal; @masuda_guide_temp_net], and simple epidemic models, such as the SIS, have been studied on temporal networks @buscarino2008 [@tang2010sw] and on adaptive networks, i.e. on networks whose structure is coevolving with the disease @gross_adaptive. Although the SEAIR model can be straightforwardly implemented on a time-varying graph, this is beyond the scope of this paper. The dynamics of the disease spreading on a network can be studied in several different ways @pastor2015epidemic [@kiss2017mathematics]. Focusing on probabilistic methods, one can decide to investigate a system numerically, performing extensive stochastic simulations of the epidemic process on the network, or, alternatively, one can develop a deterministic representation of the process, writing the evolution equations for the probability that the network is in a given state. In general, the deterministic equations can be derived at the level of each single node or at the population (mean-field) level. The first approach requires to consider a large number of evolution equations that can be impractical and computationally costly to integrate. Furthermore, empirical data on both the contact network and the state of the nodes may be limited or unavailable. For instance, the information on the state of the individuals is usually provided at a coarser grain, i.e. at a *population level* @giordano2020modelling [@pcdata]. Finally, from a microscopic stochastic simulation on a large network, it is more difficult to understand how the emerging collective behavior is related to the underlying parameters, which could be better interpreted by a mesoscopic coarse-grained modeling. For these reasons, it is common to assume that the individuals are homogeneously mixed and interact with each other yhernandez@example.org. Under this hypothesis, each node of the network can be considered statistically equivalent to any other, which permits to describe the system at a population level, drastically reducing the number of evolution equations. ![Graphical representation of the SEAIR model considered in this work. The model has five compartments, representing the susceptible (S), exposed (E), asymptomatic infectious (A), symptomatic infectious (I), and recovered/removed (R) state. Allowed transitions from one state to another are indicated by arrows, so that the flow diagram of the model can be represented as a directed graph with an associated adjacency matrix $\mathscr{A}_I$ (see Section \[sec:pair\_model\]). Transition probabilities are governed by the six parameters reported close to the arrows and in Eq. \[eq:SEAIR\_transitions\]. Edges in black represent linear transitions between states, while the edge in red refers to the nonlinear one.<span data-label="fig:SEAIR_model"></span>](seair_individual.png){width="\linewidth"} In Section \[section:models\], we develop two population-level models for the contact-based SEAIR epidemic process described in Eqs. (\[eq:SEAIR\_transitions\]). First, we assume statistical independence at the level of nodes, deriving a model we refer to as the *individual-based SEAIR model*. Next, we assume statistical independence at the level of node pairs, crucially incorporating the dynamical correlations within the network in a model we refer to as the *pair-based* (or *pairwise*) *SEAIR model*. Population-level models \[section:models\] ========================================== To begin with, here we discuss the dynamical variables characterizing the individual-based and the pairwise SEAIR models. For the individual-based model, the description of the system is carried out at the level of single individuals, i.e. the nodes, while for the pairwise, one has to express the dynamics at the level of pairs of individuals, i.e. the edges. Mathematically, this means to write a set of master equations governing the temporal evolution of either the probability that a node is in a given compartment, in the case of an individual-based model, or the probability that an edge is in a certain state, in the case of a pairwise model. Let us denote as $\Omega$ the set of possible compartments, i.e., $\Omega=\{S,E,A,I,R\}$ in the SEAIR model. Adopting a standard notation @kiss2017mathematics, we indicate as $\langle X_i \rangle_t$ the probability that a node $i$ belongs to the compartment $X \in \Omega$ at time $t$. For the sake of convenience, let us denote as U the state of a node which is not infectious, namely a node that belongs to either S, E or R. We denote with $\langle U_i \rangle_t$ the probability that a node $i$ is the state U at time $t$. Such a probability can be evaluated as $\langle U_i \rangle_t = \langle S_i \rangle_t + \langle E_i \rangle_t + \langle R_i \rangle_t$. Under the homogeneous mixing hypothesis, each node of the network is assumed to be statistically equivalent to any other, meaning that $\langle X_i \rangle_t = \langle X_j \rangle_t$ for $i,j=1,\ldots N$. Hence, for the population level model, we can drop the node index, as we have $$\langle X_i\rangle_t = \langle X\rangle_t = \frac{[X]_t}{N}, \quad \forall i=1,\ldots N, \quad \forall X \in \Omega, \label{eq:individual_variables}$$ where $[X]_t$ represents the expected number of individuals in the compartment $X$ at time $t$, and $N$ is the number of individuals in the population. Here, $\langle X\rangle_t$ is the probability that a generic node of the network is found in the state $X$ at time $t$, and represents the fundamental variable of the individual-based model. Analogously, the probability that a generic node is in a non-infectious state U at time $t$ is $\langle U \rangle_t = \langle S \rangle_t + \langle E \rangle_t + \langle R \rangle_t$. Similarly, we denote as $\langle X_i Y_j \rangle$ the probability that the edge $(i,j)$ is in state $(X_i,Y_j)$. Again, in a mean-field approximation, we can drop the indices as we have $$\langle X_iY_j\rangle_t = \langle XY\rangle_t = \frac{[XY]_t}{2K}, \forall i,j=1,\ldots N, \quad X,Y\in\Omega \label{eq:pair_variables}$$ where $[XY]_t$ represents the expected number of pairs in state $(X,Y)$ at time $t$, $K$ is the number of edges in the network, and $\langle XY\rangle_t$ represents the probability that a generic link of the network is found in the state $(X,Y)$ at time $t$. The quantities $\langle XY\rangle_t$, with $X,Y \in \Omega$, will be the fundamental variables of the pair-based model. Note that from Eq. (\[eq:pair\_variables\]) it follows that $\langle XY \rangle_t = \langle YX \rangle_t$. The individual (node) state probabilities in any compartment, $\langle X \rangle_t$, can be obtained as the marginal probabilities of the pair (edge) state probabilities as $$\label{eq:marginal} \langle X\rangle_t = \sum_{Y \in \Omega} \langle XY \rangle_t.$$ In the most general case, the notation $\langle X_{i_{1}}Y_{i_{2}} \ldots Z_{i_{n}} \rangle_t$ denotes the probability that a given connected subgraph induced by nodes $i_1$,$i_2$,$\ldots$,$i_n$ is found in the state $(X_{i_{1}}Y_{i_{2}} \ldots Z_{i_{n}})$ at time $t$. Once again, under the homogeneous mixing hypothesis, we can write such a quantity as $\langle X Y \ldots Z\rangle_t$. Now, in order to develop an <span>*individual-based model*</span> for the SEAIR dynamics, one has to write a set of equation describing how the individual state probabilities $\langle X \rangle_t$ in Eq. (\[eq:individual\_variables\]) evolve in time. To do so, however, it is necessary to introduce an hypothesis of statistical independence at the level of the individuals. Indeed, the infection processes described in Eq. (\[eq:SEAIR\_transitions\]) require to consider the joint probability that an individual is susceptible and that one of its contacts in the network is infectious, either asymptomatic or symptomatic, i.e. the probabilities $\langle SA\rangle_t$ and $\langle SI\rangle_t$, respectively. Therefore, to write a set of equations involving only the individual state probabilities, i.e. a closed-form expression, one has to express these higher-order probabilities in terms of the quantities $\langle X\rangle_t$. Mathematically, this is done by assuming statistical independence at the level of the nodes, i.e. writing $\langle XY\rangle_t \approx \langle X\rangle_t \langle Y\rangle_t$. However, this assumption overlooks the impact of dynamical correlations that indeed exist within the contact network, e.g. infected nodes are more likely to be in contact with other infected nodes @kiss2017mathematics. To take these correlations into account, one can develop a <span>*pair-based model*</span> of the SEAIR dynamics, describing how the pair state probabilities in Eq. (\[eq:pair\_variables\]) evolve in time @pastor2015epidemic. As we will see thereafter, even the pairwise model will require to express some high-order joint probabilities in terms of lower-order probabilities, in this case $\langle X\rangle_t$ and $\langle XY\rangle_t$. In the rest of this section, we formulate the master equations for both the individual-based and the pairwise models, and discuss under which hypotheses a closed set of equations can be obtained. Individual-based SEAIR model {#sub:ib} ---------------------------- Here we derive the individual-based population-level model of the SEAIR epidemic process. As previously discussed, under the hypothesis of homogeneous mixing, we can write a set of evolution equations at the population level for the probability $\langle X \rangle_t$ that a generic node in the network belongs to a given compartment $X$ at time $t$. Following the transition diagram in Fig. \[fig:SEAIR\_model\], we can write the master equations (also known as rate equations) of the system as $$\label{eq:individual} \begin{array}{lll} \langle S \rangle_{t+1} &=& \langle S \rangle_{t} - \Pi_{S \rightarrow E} \\ \langle E \rangle_{t+1} &=& \langle E \rangle_{t} + \Pi_{S \rightarrow E} - \Pi_{E \rightarrow A} \\ \langle A \rangle_{t+1} &=& \langle A \rangle_{t} + \Pi_{E \rightarrow A} - \Pi_{A \rightarrow I} - \Pi_{A \rightarrow R} \\ \langle I \rangle_{t+1} &=& \langle I \rangle_{t} + \Pi_{A \rightarrow I} - \Pi_{I \rightarrow R} \\ \langle R \rangle_{t+1} &=& \langle R \rangle_{t} + \Pi_{I \rightarrow R} + \Pi_{A \rightarrow R}, \end{array}$$ where the term $\Pi_{X \rightarrow Y}$ denotes the probability that at a generic node there is a transition from state $X$ at time $t$ to state $Y$ at time $t+1$. As we have seen, in the epidemic process defined by the kinetic equations in Eq. (\[eq:SEAIR\_transitions\]) we identify two classes of transitions. On the one hand, we have the class of two-body nonlinear processes, for which the transition of a given node from one compartment to another needs to be mediated by the interactions with other nodes, as the node can only be infected by one of its neighbors. On the other hand, we have the class of one-body linear processes, for which the transitions of an individual from a state to another does not depend on the state of its contacts. Consistently, we distinguish two kinds of transition probabilities, with the one-body processes being described by linear probability terms, whereas the two-body processes give rise to nonlinear terms. Let us first consider an example of linear transition. The probability of moving from state $I$ to state $R$, which corresponds to the recovery process of a symptomatic individual, can be written as $$\Pi_{I\rightarrow R} = \langle I \rangle_t\mu_I , \label{eq:individual_linear_trans}$$ where $\mu_I$ represents the recovery probability for the symptomatic individuals. As the recovery of a symptomatic individual does not depend on the state of the other individuals, the transition probability is only determined by the probability of being in state $I$ at time $t$, i.e. the term is linear in $\langle I \rangle_t$. Similarly, we can write the remaining linear transition probabilities as $$\begin{array}{lll} \Pi_{E \rightarrow A} &=& \langle E \rangle_{t}\alpha_{EA} \\ \Pi_{A \rightarrow I} &=& \langle A\rangle_{t}\alpha_{AI} \\ \Pi_{A \rightarrow R} &=&\langle A\rangle_{t}\mu_A, \end{array} \label{eq:all_individual_linear_trans}$$ where $\alpha_{EA}$, $\alpha_{AI}$ and $\mu_A$ represent the probability that an individual becomes infectious, develops symptoms and recovers while asymptomatic, respectively. As an example of nonlinear term, let us now consider the transition probability regulating the infection of a susceptible individual, i.e. the probability $\Pi_{S\rightarrow E}$. At variance with the recovery processes, an infection can only occur if a susceptible individual interacts with an infectious one. In other words, the transition probability of a node from state $S$ to state $E$ depends on the state of its nearest neighbors. Therefore, in order to express this term at a population level, we should first develop a node-level description, and thereafter introduce the homogeneous mixing hypothesis. ![Graphical representation of a node $i$ with its $k$ neighbors. Here, $n_A$ indicates the number of neighbors of $i$ in state A, and, similarly, $n_I$ those in state I.<span data-label="fig:sottografo_individual"></span>](sottografo_individual.pdf){width="0.7\linewidth"} To do this, let us denote the probability that a node $i$ moves from state $S$ to state $E$ at time $t$ as $\Pi_{S_i \rightarrow E_{i}}$. If we consider the simple case of a node $i$ of degree $k_i = 1$, i.e. connected to only one other node, say $j$, we can write the transition probability as $$\begin{array}{ll} \Pi_{S_i \rightarrow E_i} =& \langle S_i I_{j}\rangle_t \beta_I + \langle S_i A_{j}\rangle_t \beta_A. \end{array}$$ In the case where $k_i = 2$, we have instead $$\begin{array}{ll} \Pi_{S_i \rightarrow E_i} =& \langle S_iI_{j_1}U_{j_2}\rangle_t [1-(1-\beta_I)]\\%[3pt] &+ \langle S_iU_{j_1}I_{j_2}\rangle_t [1-(1-\beta_I)]\\%[3pt] &+ \langle S_iI_{j_1}I_{j_2}\rangle_t [1-(1-\beta_I)^2]\\%[3pt] &+ \langle S_iA_{j_1}U_{j_2}\rangle_t [1-(1-\beta_A)]\\%[3pt] &+ \langle S_iU_{j_1}A_{j_2}\rangle_t [1-(1-\beta_A)]\\%[3pt] &+ \langle S_iA_{j_1}A_{j_2}\rangle_t [1-(1-\beta_A)^2]\\%[3pt] &+ \langle S_iI_{j_1}A_{j_2}\rangle_t [1-(1-\beta_I)(1-\beta_A)]\\%[3pt] &+ \langle S_iA_{j_1}I_{j_2}\rangle_t [1-(1-\beta_I)(1-\beta_A)]. \end{array}$$ In the general case when node $i$ is connected to $k$ other nodes, i.e. $k_i=k$, as shown in Fig. \[fig:sottografo\_individual\], we can write the transition probability as $$\begin{array}{ll} \Pi_{S_i \rightarrow E_i} =& \langle S_iI_{j_1}U_{j_2}\ldots U_{j_k} \rangle_t [1-(1-\beta_I)] \\ &+ \langle S_iU_{j_1}I_{j_2}\ldots U_{j_k} \rangle_t [1-(1-\beta_I)]\\ & +\ldots\\ &+ \langle S_iU_{j_1}U_{j_2}\ldots I_{j_k} \rangle_t [1-(1-\beta_I)]\\ &+ \langle S_iA_{j_1}U_{j_2}\ldots U_{j_k} \rangle_t [1-(1-\beta_A)]\\ &+\ldots\\ &+ \langle S_iU_{j_1}U_{j_2}\ldots A_{j_k} \rangle_t [1-(1-\beta_A)]\\ &+ \langle S_iI_{j_1}I_{j_2}\ldots U_{j_k} \rangle_t [1-(1-\beta_I)^2]\\ &+\ldots\\ &+ \langle S_iI_{j_1}U_{j_2}\ldots I_{j_k} \rangle_t [1-(1-\beta_I)^2]\\ &+ \langle S_iI_{j_1}A_{j_2}\ldots U_{j_k} \rangle_t [1-(1-\beta_I)(1-\beta_A)]\\ &+\ldots\\ &+ \langle S_iA_{j_1}A_{j_2}\ldots A_{j_k} \rangle_t [1-(1-\beta_A)^k], \end{array} \label{eq:transition_individual}$$ where $\beta_A$ and $\beta_I$ are the infection probabilities for the asymptomatic and symptomatic, respectively. Each term on the right-hand side is the product of two terms, namely the joint probability that node $i$ belongs to the state $S$ and its neighborhood is in a certain state, multiplied by the conditional probability that $i$ gets infected over the next time step, given that particular state of its neighborhood. Now, going back to Eqs. (\[eq:individual\]), we note that they are exact but not closed, because Eq. (\[eq:transition\_individual\]) involves the joint probability of the $(k+1)$-uple formed by the node and its $k$ neighbors. Indeed, the evolution of such joint probability, in turn, would depend on the joint probability of larger set of nodes, giving rise to a hierarchy of coupled equations of increasing complexity. As mentioned in the Introduction, this type of hierarchies are very common in statistical physics. Examples are the BBGKY hierarchy in kinetic theory @Cercignani, and the moment hierarchy in extended thermodynamics @muller2013rational. As it would be unpractical or even impossible to deal with the full hierarchy of evolution equations, it is common to close the system by expressing the higher-order joint probabilities in terms of lower-order ones. In the context of epidemic models, various <span>*closure methods*</span> have been adopted to develop individual and pair based models of continuous-time stochastic systems, both in the homogeneous and heterogeneous mean field approximation @kiss2017mathematics [@rogers2011maximum; @bell2021beyond]. In this section, we close the system of equations (\[eq:individual\]) at the level of individual nodes by assuming statistical independence of their states. Under this hypothesis, we can approximate the $(k+1)$-body joint probabilities as: $$\langle S_i X_{j_1}Y_{j_2}\ldots Z_{j_k} \rangle_t \approx \langle S_i \rangle_t \langle X_{j_1}\rangle_t \langle Y_{j_2}\rangle_t \ldots \langle Z_{j_k} \rangle_t. \label{eq:individual_closure}$$ Given the expressions in Eq. (\[eq:individual\_closure\]) we can rewrite the joint probability terms appearing in Eq. (\[eq:transition\_individual\]). Then, by considering the individuals within the populations to be homogeneously mixed and by assuming that the number of contacts of each node is fixed and equal to $k$ (i.e. $k_i=k ~\forall i$), after some algebra (see Appendix A for details), we can express the population-level transition probability from state $S$ to state $E$ as $$\label{eq:PiSEchiusaInd} \Pi_{S \rightarrow E} \approx \langle S \rangle_t \left[1 - (1- \beta_A \langle A\rangle_t - \beta_I \langle I\rangle_t)^k\right].$$ To summarize, a closed-form, individual-based population-level SEAIR model is obtained by replacing in Eq. (\[eq:individual\]) the transition term $\Pi_{S \rightarrow E}$ as in Eq. (\[eq:PiSEchiusaInd\]), and the linear transition probabilities given by Eq. (\[eq:individual\_linear\_trans\]) and Eq. (\[eq:all\_individual\_linear\_trans\]). To conclude, hereafter we report the value of the basic reproduction number, i.e. $\mathcal{R}_0$, which permits to determine whether the infectious disease is able to spread across the population. We compute it by using the next-generation matrix (NGM) approach @diekmann1990definition [@diekmann2010construction], developed for discrete-time epidemic models @allen2008basic (more details on the method are reported in Appendix D). We have $$\label{eq:R0_individual} \mathcal{R}_0 = \dfrac{k\left(\alpha_{AI}\beta_I + \mu_I \beta_A\right)}{\mu_I\left(\alpha_{AI}+\mu_A\right)}.$$ Pair-based SEAIR model \[sec:pair\_model\] ------------------------------------------ ![Graphical representation of the twenty-five different pair states (i.e. states of pairs of node) of the pairwise SEAIR model, and of all the possible transitions from one state to another described by a directed flow graph with an associated adjacency matrix $\mathscr{A}_P$. Edges in black represent linear transitions between states, while edges in red refer to nonlinear ones.<span data-label="fig:pairwise_transitions"></span>](pairwise_transitions_vertical.png){width="\linewidth"} At variance with the individual-based model of Section \[sub:ib\], for which we have obtained the master equations for the individual probabilities $\langle X \rangle_t$, in order to derive a pair-based (or pairwise) population-level SEAIR model, we need to write down a closed set of equations describing the temporal evolution of the pair probabilities $\langle XY \rangle_t$. To do so, we first need to list all the possible transitions that may occur among the pair states. This conceptual step is not straightforward, as the number of ways in which a pair can move from one state to another according to Eq. (\[eq:SEAIR\_transitions\]) is considerably larger than in the case of individual transitions. For instance, a pair in state $(S,S)$ can progress either to one of the states $(S,E)$ or $(E,S)$, when only one node of the pair is infected, or to the state $(E,E)$, when both nodes are infected at the same time. Let us come back for a moment to the diagram of the individual transitions shown in Fig. \[fig:SEAIR\_model\]. We can interpret the flow diagram as a directed graph and associate to it an adjacency matrix $\mathscr{A}_I$. If we label the model compartments such that S is indexed by 1, E by 2, and so on, then we have that $(\mathscr{A}_I)_{nm}=1$ (with $n,m = 1,\ldots 5$) if there is a transition from compartment $m$ to compartment $n$, and $(\mathscr{A}_I)_{nm}=0$ otherwise. Note that, for any $n$, $(\mathscr{A}_I)_{nn}=1$, as an individual in state $n$ can remain in it, although, for the sake of clarity, the self-loops are not represented in Fig. \[fig:SEAIR\_model\]. Therefore, the adjacency matrix $\mathscr{A}_I$ corresponding to the diagram in Fig. \[fig:SEAIR\_model\] is given by $$\mathscr{A}_I = \left( \begin{array}{ccccc} 1 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 \\ \end{array} \right)$$ Analogously, the flow diagram at the level of pair transitions can be represented by an adjacency matrix $\mathscr{A}_P$. Remarkably, since the transition of a pair from a state to another is determined by the progress of an individual from a compartment to another, we can evaluate the matrix $\mathscr{A}_P$ from the matrix $\mathscr{A}_I$ as $$\mathscr{A}_P = \mathscr{A}_I \otimes \mathscr{A}_I.$$ where the symbol $\otimes$ denotes the matrix direct product (also known as Kronecker product). In components, matrix $\mathscr{A}_P$ is given as $$\left(\mathscr{A}_P\right)_{(i,\ell),(j,m)} = \left(\mathscr{A}_I\right)_{i,j} \left(\mathscr{A}_I\right)_{\ell,m}$$ which means that there is a link from pair $(i,\ell)$ to pair $(j,m)$ in the pairwise graph if and only if there exist both edges $(i,j)$ and $(\ell,m)$ in the individual graph. The set of all the possible (twenty-five) different pair states in the pairwise SEAIR model is shown in Fig. \[fig:pairwise\_transitions\], together with the flow diagram associated to the adjacency matrix $\mathscr{A}_P$. Again, as in Fig. \[fig:SEAIR\_model\], self-loops are not displayed. Finally, from this diagram, we can write the master equations for the pairwise SEAIR model as $$\begin{array}{lll} \langle SS \rangle_{t+1} &=& \langle SS \rangle_{t} - 2\Pi_{SS\rightarrow SE} - \Pi_{SS\rightarrow EE} \\[2pt] \langle SE \rangle_{t+1} &=& \langle SE \rangle_{t} + \Pi_{SS\rightarrow SE} - \Pi_{SE\rightarrow SA} - \Pi_{SE\rightarrow EA} - \Pi_{SE\rightarrow EE} \\[2pt] \langle SA \rangle_{t+1} &=& \langle SA \rangle_{t} + \Pi_{SE\rightarrow SA} - \Pi_{SA\rightarrow EA} - \Pi_{SA \rightarrow ER} - \Pi_{SA \rightarrow SR} - \Pi_{SA \rightarrow EI} - \Pi_{SA \rightarrow SI} \\[2pt] \langle SI \rangle_{t+1} &=& \langle SI \rangle_{t} + \Pi_{SA\rightarrow SI} - \Pi_{SI\rightarrow SR} - \Pi_{SI\rightarrow EI} - \Pi_{SI\rightarrow ER} \\[2pt] \langle SR \rangle_{t+1} &=& \langle SR \rangle_{t} + \Pi_{SA\rightarrow SR} + \Pi_{SI\rightarrow SR} - \Pi_{SR\rightarrow ER}\\[2pt] \langle EE \rangle_{t+1} &=& \langle EE \rangle_{t} + \Pi_{SS\rightarrow EE} + 2\Pi_{SE\rightarrow EE} - 2\Pi_{EE\rightarrow EA} - \Pi_{EE\rightarrow AA}\\[2pt] \langle EA \rangle_{t+1} &=& \langle EA \rangle_{t} + \Pi_{SE\rightarrow EA} + \Pi_{EE\rightarrow EA} + \Pi_{SA\rightarrow EA} - \Pi_{EA\rightarrow AA} - \Pi_{EA\rightarrow AI} - \Pi_{EA\rightarrow AR} - \Pi_{EA\rightarrow ER} - \Pi_{EA\rightarrow EI} \\[2pt] \langle EI \rangle_{t+1} &=& \langle EI \rangle_{t} + \Pi_{SA\rightarrow EI} + \Pi_{SI\rightarrow EI} + \Pi_{EA\rightarrow EI} - \Pi_{EI\rightarrow AI} - \Pi_{EI\rightarrow ER} - \Pi_{EI\rightarrow AR}\\[2pt] \langle ER \rangle_{t+1} &=& \langle ER \rangle_{t} + \Pi_{SI\rightarrow ER} + \Pi_{EA\rightarrow ER} + \Pi_{SA\rightarrow ER} + \Pi_{SR\rightarrow ER} + \Pi_{EI\rightarrow ER} - \Pi_{ER\rightarrow AR}\\[2pt] \langle AA \rangle_{t+1} &=& \langle AA \rangle_{t} + 2\Pi_{EA\rightarrow AA} + \Pi_{EE\rightarrow AA} - \Pi_{AA\rightarrow II} - 2\Pi_{AA\rightarrow IR} - 2\Pi_{AA\rightarrow AI} - 2\Pi_{AA\rightarrow AR} - \Pi_{AA\rightarrow RR} \\[2pt] \langle AI \rangle_{t+1} &=& \langle AI \rangle_{t} + \Pi_{AA\rightarrow AI} + \Pi_{EA\rightarrow AI} + \Pi_{EI\rightarrow AI} - \Pi_{AI\rightarrow IR} - \Pi_{AI\rightarrow RR} - \Pi_{AI\rightarrow AR} - \Pi_{AI\rightarrow II} \\[2pt] \langle AR \rangle_{t+1} &=& \langle AR \rangle_{t} + \Pi_{AI\rightarrow AR} + \Pi_{ER\rightarrow AR} + \Pi_{EA\rightarrow AR} + \Pi_{AA\rightarrow AR} + \Pi_{EI\rightarrow AR}- \Pi_{AR\rightarrow IR} - \Pi_{AR\rightarrow RR} \\[2pt] \langle II \rangle_{t+1} &=& \langle II \rangle_{t} + \Pi_{AA\rightarrow II} + 2\Pi_{AI\rightarrow II} - 2\Pi_{II\rightarrow IR} - \Pi_{II\rightarrow RR}\\[2pt] \langle IR \rangle_{t+1} &=& \langle IR \rangle_{t} + \Pi_{II\rightarrow IR} + \Pi_{AA\rightarrow IR} + \Pi_{AR\rightarrow IR} + \Pi_{AI\rightarrow IR} - \Pi_{IR\rightarrow RR}\\[2pt] \langle RR \rangle_{t+1} &=& \langle RR \rangle_{t} + \Pi_{II\rightarrow RR} + 2\Pi_{IR\rightarrow RR} + \Pi_{AA\rightarrow RR} + 2\Pi_{AI\rightarrow RR} + 2\Pi_{AR\rightarrow RR}, \end{array} \label{eq:pair}$$ where the term $\Pi_{XY \rightarrow X'Y'}$ represents the transition probability from the pair state $(X,Y)$ to the pair state $(X',Y')$. Note that, as $\langle XY \rangle_t = \langle YX \rangle_t$, we have that $\Pi_{XY \rightarrow X'Y'} = \Pi_{YX \rightarrow Y'X'}$. Due to the symmetries in the pair states, the equations for the states $(X',Y')$ and $(Y',X')$ are equivalent. For this reason, we have only reported here the system of fifteen distinct equations (over the total of twenty-five) needed to fully characterize the system. As for the individual-based model, we distinguish two classes of transition probabilities, i.e. linear and nonlinear ones. In particular, the class of nonlinear transition probabilities consists of all the terms involving at least one node in state $S$, as the probability of being infected (and consequently the probability of remaining susceptible) depends on the state of the nearest neighbors of the node. Again, let us first consider the linear transition probabilities. As an example we focus on the case of two symptomatic infected individuals, one of which recovers while the other remains infectious, i.e. on the transition from state $(I,I)$ to state $(I,R)$. The probability of such transition can be written as: $$\Pi_{II \rightarrow IR} = \langle II \rangle_t (1-\mu_I)\mu_I = \Pi_{II \rightarrow RI}, \label{eq:linear_trans_pair}$$ where the term $(1-\mu_I)\mu_I$ considers the two independent processes taking place in the pair transition, namely the recovery of the first node of the pair, occurring with probability $\mu_I$, and the persistence of the infection in the second, occurring with probability $(1-\mu_I)$. As an example of nonlinear transition probability, let us consider the transition from state $(S,E)$ to state $(E,A)$, i.e. the case of a susceptible node connected to an exposed one, with the former that gets infected, while the latter becomes asymptomatic infectious. Similarly to the individual-based model formulation, as the infection of a susceptible node depends on the state of its neighbors, we first need to develop a node-level description of the process. Hence, let us denote the susceptible node as $i$, the exposed node as $j$, and derive the expression for the probability, $\Pi_{S_i E_j\rightarrow E_i A_j}$, that the pair $(i,j)$ moves from state $(S_i,E_j)$ to state $(E_i,A_j)$ at time $t$. We assume that the nodes $i$ and $j$ are connected on the contact graph $\mathcal{G}$, i.e. according to the adjacency matrix $G=\{g_{ij}\}$, and we consider the subgraph induced by the pair $(i,j)$. Such subgraph consists of nodes $i$ and $j$ and of all their $L$ neighbours. An example in which node $i$ is in state S, node $j$ is in state E and $k_i=k_j=k$ is shown in Fig. \[fig:subgraph\_pairwise\] The transition probability can be written as: $$\begin{array}{ll} &\Pi_{S_i E_j \rightarrow E_i A_j} = \langle S_iE_jI_{h_1}U_{h_2}\ldots U_{h_L} \rangle_t [1-(1-g_{ih_1}\beta_I)]\\%[3pt]&\times\alpha_{EA} \\%[3pt] &+ \langle S_iE_jU_{h_1}I_{h_2}\ldots U_{h_L} \rangle_t [1-(1-g_{ih_2}\beta_I)]\alpha_{EA}\\%[3pt] & +\ldots\\%[3pt] &+ \langle S_iE_jU_{h_1}U_{h_2}\ldots I_{h_L} \rangle_t [1-(1-g_{ih_L}\beta_I)]\alpha_{EA}\\%[3pt] &+ \langle S_iE_jA_{h_1}U_{h_2}\ldots U_{h_L} \rangle_t [1-(1-g_{ih_1}\beta_A)]\alpha_{EA}\\%[3pt] &+\ldots\\%[3pt] &+ \langle S_iE_jU_{h_1}U_{h_2}\ldots A_{h_L} \rangle_t [1-(1-g_{ih_L}\beta_A)]\alpha_{EA}\\%[3pt] &+ \langle S_iE_jI_{h_1}I_{h_2}\ldots U_{h_L} \rangle_t [1-(1-g_{ih_1}\beta_I)(1-g_{ih_2}\beta_I)]\\%[3pt]&\times\alpha_{EA}\\%[3pt] &+\ldots\\%[3pt] &+ \langle S_iE_jI_{h_1}U_{h_2}\ldots I_{h_L} \rangle_t [1-(1-g_{ih_1}\beta_I)(1-g_{ih_L}\beta_I)]\\%[3pt]&\times\alpha_{EA}\\%[3pt] &+ \langle S_iE_jI_{h_1}A_{h_2}\ldots U_{h_L} \rangle_t [1-(1-g_{ih_1}\beta_I)(1-g_{ih_2}\beta_A)]\\%[3pt]&\times\alpha_{EA}\\%[3pt] &+\ldots\\%[3pt] &+ \langle S_iE_jA_{h_1}A_{h_2}\ldots A_{h_L} \rangle_t [1-\prod_{n=1}^{L}(1-g_{ih_n}\beta_A)]\alpha_{EA}, \end{array} \label{eq:transition_pair}$$ where $h_1$, $h_2$, ..., $h_L$ label the $L$ nodes in the neighborhood of link $(i,j)$. Each term on the right-hand side of Eq. (\[eq:transition\_pair\]) is given by the probability that the subgraph induced by $(i,j)$ is in a certain configuration, conditional to $(i,j)$ being in state $(S_i,E_j)$, times a term which, in turn, is given by the product of the probability that node $i$ gets infected and the probability that node $j$ becomes infectious over the next time step. The different terms in Eq. (\[eq:transition\_pair\]) take into account all the possible different states of the neighbourhood of link $(i,j)$. ![Graphical representation of the subgraph induced by a link $(i,j)$. Note that we are considering a configuration where each of the two nodes has $k$ neighbors and there are no triangular loops, so that $L=2k-2$. Here, node $i$ is in state $S$, node $j$ is in state $E$, $n_A$ ($m_A$) indicates the number of neighbors of $i$ (of $j$) in state A, and, similarly, $n_I$ ($m_I$) those in state I.<span data-label="fig:subgraph_pairwise"></span>](sottografo_pair.pdf){width="0.8\linewidth"} Similarly to what observed in the individual-based model, given the current form of the transition probability, also Eqs. (\[eq:pair\]) are exact but not closed. This time, however, we close the system equations at the level of links by assuming statistical independence in the states of node pairs. In other words, to close the system we need to find an approximating function $F$ that allows to write the higher-order joint probability as $$\begin{array}{l} \label{eq:SE_node_closure} \langle S_iE_j X_{h_1}\ldots Y_{h_{L-1}} Z_{h_L} \rangle_t \approx%\\ %F(\langle S_i \rangle_t,\langle E_j\rangle_t,\ldots,\langle Z_{h_L} \rangle_t, \langle S_{i} E_{j} \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t) F(\langle S_{i} E_{j} \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t) \end{array}$$ At variance with the individual-based model, for which the expression of $F$ is straightforward, several moment closures exist for the pairwise model, whose quality depends on the topology of the underlying contact network @pellis2015exact. Here we consider a closure which is exact under the assumption that the network contains no cycles of any order. Though this assumption does not hold in real finite systems, the closure above provides a valuable approximation for the analysis of dynamic processes in large sparse networks (such as sparse random regular graphs and Erdös-Renyi random graphs), in which the number of cycles is negligibly small. Taking into account these considerations, the subgraph $\mathcal{G}_{ij} = (\mathcal{V}_{ij},\mathcal{E}_{ij})$ induced by $(i,j)$ is in the form shown in Fig. \[fig:subgraph\_pairwise\], and, according to Ref. @frasca2016discrete, the following approximating function $F$ can be adopted $$\begin{array}{l} %F(\langle S_i \rangle_t,\langle E_j\rangle_t,\ldots,\langle Z_{h_L} \rangle_t, \langle S_{i} E_{j} \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t) =\\ F(\langle S_i E_j \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t) = \frac{\prod_{(n,m)\in \mathcal{E}_{ij}}\langle N_n M_m\rangle_t}{\langle S_i\rangle_t^{k_i-1}\langle E_j\rangle_t^{k_j-1}}, \end{array} \label{eq:node_level_closure}$$ Note that the numerator consists in the product of the state probabilities of each link in $\mathcal{E}_{ij}$. Note also that $\langle S_i\rangle_t$ and $\langle E_j\rangle_t$ are the marginals probabilities evaluated from Eq. (\[eq:marginal\]) and that the closure in Eq. (\[eq:node\_level\_closure\]) is consistent with e marginal probabilities it is constructed from, namely $$\begin{array}{l} \sum\limits_{X_{h_1}, Y_{h_2}, \dots Z_{h_L}\in\Omega} %F(\langle S_i \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t)= F(\langle S_i E_j \rangle_t,\ldots,\langle Y_{h_{L-1}} Z_{h_L} \rangle_t)= \langle S_i, E_j \rangle_t \end{array}$$ The joint probabilities in Eq. (\[eq:transition\_pair\]) can then be rewritten using the expression of the approximating function in Eq. (\[eq:node\_level\_closure\]). We can finally introduce the homogeneous mixing hypothesis to formulate the master equations at the level of population, which permits to drop the node indices in the probability terms. Assuming each node to be connected to $k$ neighbors, after some manipulation=s (detailed in Appendix B), we can write the transition probability $\Pi_{SE\rightarrow EA}$ as $$\begin{array}{l} \Pi_{SE\rightarrow EA} \approx \langle SE \rangle_t \sum\limits_{p=1}^{k-1}\sum\limits_{n=0}^{p} \frac{\langle SA \rangle_t^{n}\langle SI \rangle_t^{p-n}\langle SU \rangle_t^{k-1-p}}{\langle S\rangle_t^{k-1}}\\ \times{k-1 \choose p}{p \choose n}[1-(1-\beta_A)^n(1-\beta_I)^{p-n}]\\ \times\sum\limits_{q=0}^{k-1}\sum\limits_{m=0}^{q}\frac{\langle EA \rangle_t^{m}\langle EI \rangle_t^{q-m}\langle EU \rangle_t^{k-1-q}}{\langle E\rangle_t^{k-1}}{k-1 \choose q}{q \choose m}\alpha_{EA}. \end{array} \label{eq:double_sum}$$ This can be further simplified, so to write an expression which is similar to the one obtained for the individual-based model, i.e. Eq. (\[eq:PiSEchiusaInd\]). We have $$\begin{array}{l} \Pi_{SE\rightarrow EA} \approx \langle SE \rangle_t \left[1-\left(1-\beta_A\frac{\langle SA \rangle_t}{\langle S \rangle_t} - \beta_I\frac{\langle SI \rangle_t}{\langle S \rangle_t}\right)^{k-1}\right]\\ \times \alpha_{EA}. %\Pi_{SA\rightarrow EI} \approx\\ %\langle SA \rangle_t \left[1-\left(1-\beta_A\frac{\langle SA \rangle_t}{\langle S \rangle_t} - \beta_I\frac{\langle SI \rangle_t}{\langle S \rangle_t}\right)^{k-1}\left(1-\beta_A\right)\right]\alpha_{AI}\\ %\Pi_{SS\rightarrow SE} \approx \langle SS \rangle_t \left[1-\left(1-\beta_A\frac{\langle SA \rangle_t}{\langle S \rangle_t} - \beta_I\frac{\langle SI \rangle_t}{\langle S \rangle_t}\right)^{k-1}\right]\\ %\times\left(1-\beta_A\frac{\langle SA \rangle_t}{\langle S \rangle_t} - \beta_I\frac{\langle SI \rangle_t}{\langle S \rangle_t}\right)^{k-1} \end{array} \label{eq:pairwise_population_SE_EA}$$ Note that as the transition of an individual from state E to state A is independent on the state of the neighbors, the transition probability does not depend on the state probabilities $\langle EX\rangle$ but on $\alpha_{EA}$ only. The other transition terms appearing in Eq. (\[eq:pair\]) are in the form of Eq. (\[eq:linear\_trans\_pair\]), if linear, or of Eq. (\[eq:pairwise\_population\_SE\_EA\]), if nonlinear, and are derived following similar arguments. They are fully reported in Appendix C. Eq. (\[eq:pair\]) along with Eq. (\[eq:linear\_trans\_pair\]) and Eqs. (C1)-(C10) represent a closed set of equations for the pairwise population-level SEAIR model. We conclude the Section, as done for the individual-based model, here we report the expression of the basic reproduction number for the pairwise SEAIR model, evaluated through the NGM approach (see Appendix D). In this case we have $$\label{eq:R0_pair} \mathcal{R}_0 = \frac{\left(k - 1\right) \{\alpha_{AI} \beta_{I} \left(1 - \beta_{A}\right) + \beta_{A} \left[1- \left(1 - \beta_{I}\right) \left(1 - \mu_{I}\right)\right]\}}{\left[1- \left(1 - \beta_{A}\right) \left(1 - \alpha_{AI} - \mu_{A}\right) \right] \left[1- \left(1 - \beta_{I}\right) \left(1 - \mu_{I}\right) \right]}$$ Reproducing the evolution of an epidemic {#section:epidemic_evolution} ======================================== ![Comparison between stochastic simulations, individual-based model (orange solid line) and pair-based model (blue solid line) for a random $r$-regular graph with $N=500$ nodes and $r=5$. Both the numerical simulations and the models dynamics are evaluated with $\beta_I=0.4$, $\beta_A=0.6$, $\alpha_{EA} = 0.3$, $\alpha_{AI} = 0.2$, $\mu_A = 0.15$, $\mu_I = 0.3$, $S(0) = 99.98$, $E(0) = 0$, $A(0) = 0.01$, $I(0) = 0.01$, $R(0) = 0$. The stochastic simulations are represented as solid gray lines, while the average is plotted as a dashed black
{'source': 'arXiv_out/2110'}