1 Introduction

Epidemiology originates from the study of infectious diseases such as gonorrhoea, cholera and the flu (Bailey 1975; Anderson and May 1992). Human beings do not only transmit infectious diseases from one individual to another, but also opinions, on-line social media content and innovations. Furthermore, man-made structures exhibit epidemic phenomena, such as the propagation of failures in power networks or the spread of a malicious computer virus. Modern epidemiology has evolved into the study of general spreading processes (Pastor-Satorras et al. 2015; Nowzari et al. 2016). Two properties are essential to a broad class of epidemic models. First, individuals are either infected with the disease (respectively, possess the information, opinion, etc.) or healthy. Second, individuals can infect one another only if they are in contact (e.g., by a friendship). In this work, we consider an epidemic model which describes the spread of a virus between groups of individuals.

We consider a contact network of N nodes, and every node \(i=1,\ldots , N\) corresponds to a groupFootnote 1 of individuals. If the members of two groups ij are in contact, then group i and group j can infect one another with the virus. We denote the symmetric \(N \times N\) adjacency matrix by A and its elements by \(a_{ij}\). If there is a link between node i and node j, then \(a_{ij}=1\), and \(a_{ij}=0\) otherwise. Hence, the virus directly spreads between two nodes i and j only if \(a_{ij}=1\). We stress that in most applications it holds that \(a_{ii}\ne 0\), since infected individuals in group i usually do infect susceptible individuals in the same group i. At any time \(t\ge 0\), we denote the viral state of node i by \(v_i(t)\). The viral state \(v_i(t)\) is in the interval [0, 1] and is interpreted as the fraction of infected individuals of group i. N-intertwined mean-field approximation (NIMFA) with heterogeneous spreading parameters (Lajmanovich and Yorke 1976; Van Mieghem and Omic 2014) assumes that the curing rates \(\delta _i\) and infection rates \(\beta _{ij}\) depend on the nodes i and j.

Definition 1

(Heterogeneous NIMFA) At any time \(t\ge 0\), the NIMFA governing equation is

$$\begin{aligned} \frac{d v_i (t)}{d t }&= - \delta _i v_i(t) + \left( 1 - v_i(t)\right) \sum ^N_{j = 1} {\tilde{\beta }}_{i j} a_{ij} v_j(t) \end{aligned}$$
(1)

for every group \(i=1,\ldots , N\), where \(\delta _i >0\) is the curing rate of node i, and \({\tilde{\beta }}_{i j} > 0\) is the infection rate from node j to node i.

For a vector \(x\in {\mathbb {R}}^N\), we denote the diagonal matrix with x on its diagonal by \({\text {diag}}(x)\). We denote the \(N\times N\) curing rate matrix \(S = {\text {diag}}(\delta _1,\ldots , \delta _N)\). Then, the matrix form of (1) is a vector differential equation

$$\begin{aligned} \frac{d v (t)}{d t }&= - S v(t) + {\mathrm{diag}}\left( u - v(t)\right) B v(t), \end{aligned}$$
(2)

where \(v(t) = (v_1(t),\ldots , v_N(t))^T\) is the viral state vector at time t, the \(N\times N\) infection rate matrix B is composed of the elements \(\beta _{ij} = {\tilde{\beta }}_{ij} a_{ij}\), and u is the \(N\times 1\) all-one vector. In this work, we assume that the matrix B is symmetric.

Definition 2

(Steady-State Vector) The \(N \times 1\) steady-state vector \(v_\infty \) is the non-zero equilibrium of NIMFA, which satisfies

$$\begin{aligned} \left( B - S \right) v_\infty = {\mathrm{diag}}\left( v_\infty \right) B v_\infty . \end{aligned}$$
(3)

In its simplest form, NIMFA (Van Mieghem et al. 2009) assumes the same infection rate \(\beta \) and curing rate \(\delta \) for all nodes. More precisely, for homogeneous NIMFA the governing equations (2) reduce to

$$\begin{aligned} \frac{d v (t)}{d t }&= - \delta v(t) + \beta {\mathrm{diag}}\left( u - v(t)\right) A v(t). \end{aligned}$$
(4)

For the vast majority of epidemiological, demographical, and ecological models, the basic reproduction number \(R_0\) is an essential quantity (Hethcote 2000; Heesterbeek 2002). The basic reproduction number \(R_0\) is defined (Diekmann et al. 1990) as “The expected number of secondary cases produced, in a completely susceptible population, by a typical infective individual during its entire period of infectiousness”. Originally, the basic reproduction number \(R_0\) was introduced for epidemiological models with only \(N=1\) group of individuals. Van den Driessche and Watmough (2002) proposed a definition of the basic reproduction number \(R_0\) to epidemic models with \(N>1\) groups. For NIMFA (1), the basic reproduction number \(R_0\) follows (Van den Driessche and Watmough 2002) as \(R_0 = \rho (S^{-1}B)\), where \(\rho (M)\) denotes the spectral radius of a square matrix M. For the stochastic Susceptible-Infected-Removed (SIR) epidemic process on data-driven contact networks, Liu et al. (2018) argue that the basic reproduction number \(R_0\) is inadequate to characterise the behaviour of the viral dynamics, since the number of secondary cases produced by an infectious individual varies greatly with time t. In contrast to the stochastic SIR process, for the deterministic NIMFA equations (1), the basic reproduction number \(R_0 = \rho (S^{-1}B)\) is of crucial importance for the viral state dynamics. Lajmanovich and Yorke (1976) showed that there is a phase transition at the epidemic threshold criterion \(R_0 = 1\): If \(R_0 \le 1\), then the only equilibrium of NIMFA (1) is the origin, which is globally asymptotically stable. Else, if \(R_0 > 1\), then there is a second equilibrium, the steady-state \(v_\infty \), whose components are positive, and the steady-state \(v_\infty \) is globally asymptotically stable for every initial viral state \(v(0) \ne 0\). For real-world epidemics, the regime around epidemic threshold criterion \(R_0 = 1\) is of particular interest. In practice, the basic reproduction number \(R_0\) cannot be arbitrarily great, since natural immunities and vaccinations lead to significant curing rates \(\delta _i\) and the frequency and intensity of human contacts constrain the infection rates \(\beta _{ij}\). Beyond the spread of infectious diseases, many real-world systems seem to operate in the critical regime around a phase transition (Kitzbichler et al. 2009; Nykter et al. 2008).

The basic reproduction number \(R_0\) only provides a coarse description of the dynamics of NIMFA (1). Recently (Prasse and Van Mieghem 2019), we analysed the viral state dynamics for the discrete-time version of NIMFA (1), provided that the initial viral state v(0) is small (see also Assumption 2 in Sect. 3). Three results of Prasse and Van Mieghem (2019) are worth mentioning, since we believe that they could also apply to NIMFA (1) in continuous time. First, the steady-state \(v_\infty \) is exponentially stable. Second, the viral state is (almost always) monotonically increasing. Third, the viral state v(t) is bounded by linear time-invariant systems at any time t. In this work, we go a step further in analysing the dynamics of the viral state v(t), and we focus on the region around the threshold \(R_0 =1\). More precisely, we find the closed-form expression of the viral state \(v_i(t)\) for every node i at every time t when \(R_0 \downarrow 1\), given that the initial state v(0) is small or parallelFootnote 2 to the steady-state vector \(v_\infty \).

We introduce the assumptions in Sect. 3. Section 4 gives an explicit expression for the steady-state vector \(v_\infty \) when \(R_0 \downarrow 1\). In Sect. 5, we derive the closed-form expression for the viral state vector v(t) at any time \(t\ge 0\). The closed-form solution for \(R_0 \downarrow 1\) gives an accurate approximation also for \(R_0 >1\) as demonstrated by numerical evaluations in Sect. 6.

2 Related work

Lajmanovich and Yorke (1976) originally proposed the differential equations (1) to model the spread of gonorrhoea and proved the existence and global asymptotic stability of the steady-state \(v_\infty \) for strongly connected directed graphs. In Lajmanovich and Yorke (1976), Fall et al. (2007), Wan et al. (2008), Rami et al. (2013), Prasse and Van Mieghem (2018) and Paré et al. (2018), the differential equations (1) are considered as the exact description of the virus spread between groups of individuals. Van Mieghem et al. (2009) derived the differential equations (1) as an approximation of the Markovian Susceptible-Infected-Susceptible (SIS) epidemic process (Pastor-Satorras et al. 2015; Nowzari et al. 2016), which lead to the acronym “NIMFA” for “N-Intertwined Mean-Field Approximation” (Van Mieghem 2011; Van Mieghem and Omic 2014; Devriendt and Van Mieghem 2017). The approximation of the SIS epidemic process by NIMFA is least accurate around the epidemic threshold (Van Mieghem et al. 2009; Van Mieghem and van de Bovenkamp 2015). Thus, the solution of NIMFA when \(R_0\downarrow 1\), which is derived in this work, might be inaccurate for the description of the probabilistic SIS process.

Fall et al. (2007) analysed the generalisation of the differential equations (1) of Lajmanovich and Yorke (1976) to a non-diagonal curing rate matrix S. Khanafer et al. (2016) showed that the steady-state \(v_\infty \) is globally asymptotically stable, also for weakly connected directed graphs. Furthermore, NIMFA (1) has been generalised to time-varying parameters. Paré et al. (2017) consider that the infection ratesFootnote 3\(\beta _{ij}(t)\) depend continuously on time t. Rami et al. (2013) consider a switched model in which both the infection rates \(\beta _{ij}(t)\) and the curing rates \(\delta _i(t)\) change with time t. NIMFA (1) in discrete time has been analysed in Ahn and Hassibi (2013), Paré et al. (2018), Prasse and Van Mieghem (2019) and Liu et al. (2020).

In Van Mieghem (2014b), NIMFA (4) was solved for a special case: If the adjacency matrix A corresponds to a regular graph and the initial state \(v_i(0)\) is the sameFootnote 4 for every node i, then NIMFA with time-varying, homogeneous spreading parameters \(\beta (t), \delta (t)\) has a closed-form solution. In this work, we focus on time-invariant but heterogeneous spreading parameters \(\delta _i, \beta _{ij}\). We solve NIMFA (1) for arbitrary graphs around the threshold criterion \(R_0 = 1\) and for an initial viral state v(0) that is small or parallel to the steady-state vector \(v_\infty \).

3 Notations and assumptions

The basic reproduction number \(R_0= \rho (S^{-1}B)\) is determined by the infection rate matrix B and the curing rate matrix S. Thus, the notation \(R_0 \downarrow 1\) is imprecise, since there are infinitely many matrices BS such that the basic reproduction number \(R_0\) equals 1. To be more precise, we consider a sequence \(\left\{ \left( B^{(n)}, S^{(n)}\right) \right\} _{n \in {\mathbb {N}}}\) of infection rate matrices \(B^{(n)}\) and curing rate matrices \(S^{(n)}\) that convergesFootnote 5 to a limit \((B^*, S^*)\), such that \(\rho \left( \left( S^* \right) ^{-1}B^*\right) =1\) and

$$\begin{aligned} \rho \left( \left( S^{(n)} \right) ^{-1}B^{(n)}\right) > 1 \quad \forall n \in {\mathbb {N}}. \end{aligned}$$

For the ease of exposition, we drop the index n and replace \(B^{(n)}\) and \(S^{(n)}\) by the notation B and S, respectively. In particular, we emphasise that the assumptions below apply to every element \(\left( B^{(n)}, S^{(n)}\right) \) of the sequence. In Sects. 4 to 6, we formally abbreviated the limit process \(\left( B^{(n)}, S^{(n)}\right) \rightarrow \left( B^*, S^*\right) \) by the notation \(R_0\downarrow 1\). For the proofs in the appendices, we use the lengthier but clearer notation \(\left( B, S\right) \rightarrow \left( B^*, S^*\right) \). Furthermore, we use the superscript notation \(\varXi ^*\) to denote the limit of any variable \(\varXi \) that depends on the infection rate matrix B and the curing rate matrix S. For instance, \(\delta ^*_i\) denotes the limit of the curing rate \(\delta _i\) of node i when \(\left( B, S\right) \rightarrow \left( B^*, S^*\right) \). The Landau-notation \(f(R_0) = {\mathcal {O}}(g(R_0))\) as \(R_0 \downarrow 1\) denotes that \(|f(R_0)| \le \sigma |g(R_0)|\) for some constant \(\sigma \) as \(R_0 \downarrow 1\). For instance, it holds that \((R_0-1)^2 = {\mathcal {O}}( R_0-1 )\) as \(R_0 \downarrow 1\).

In the remainder of this work, we rely on three assumptions, which we state for clarity in this section.

Assumption 1

For every basic reproduction number \(R_0>1\), the curing rates are positive and the infection rates are non-negative, i.e., \(\delta _i >0\) and \(\beta _{ij} \ge 0\) for all nodes ij. Furthermore, in the limit \(R_0\downarrow 1\), it holds that \(\delta _i \not \rightarrow 0\) and \(\delta _i \not \rightarrow \infty \) for all nodes i.

We consider Assumption 1 a rather technical assumption, since only non-negative rates \(\delta _i\) and \(\beta _{ij}\) have a physical meaning. Furthermore, if the curing rates \(\delta _i\) were zero, then the differential equations (1) would describe a Susceptible-Infected (SI) epidemic process. In this work, we focus on the SIS epidemic process, for which it holds that \(\delta _i>0\).

Assumption 2

For every basic reproduction number \(R_0>1\), it holds that \(v_i(0) \ge 0\) and \(v_i(0) \le v_{\infty , i}\) for every node \(i=1,\ldots , N\). Furthermore, it holds that \(v_i(0)>0\) for at least one node i.

For the description of most real-world epidemics, Assumption 2 is reasonable for two reasons. First, the total number of infected individuals often is small in the beginning of an epidemic outbreak. (Sometimes, there is even a single patient zero.) Second, a group i often contains many individuals. For instance, the viral state \(v_i(t)\) could describe the prevalence of virus in municipality i. Thus, even if there is a considerable total number of infected individuals in group i, the initial fraction \(v_i(0)\) would be small.

Assumption 3

For every basic reproduction number \(R_0>1\), the infection rate matrix B is symmetric and irreducible. Furthermore, in the limit \(R_0\downarrow 1\), the infection rate matrix B converges to a symmetric and irreducible matrix.

Assumption 3 holds if and only if the infection rate matrix B (and its limit) corresponds to a connected undirected graph (Van Mieghem 2014a).

4 The steady-state around the epidemic threshold

We define the \(N\times N\) effective infection rate matrix W as

$$\begin{aligned} W = S^{-1} B. \end{aligned}$$
(5)

In this section, we state an essential property that we apply to solve the NIMFA equations (1) when the basic reproduction number \(R_0\) is close to 1: The steady-state vector \(v_\infty \) converges to a scaled version of the principal eigenvector \(x_1\) of the effective infection rate matrix W when \(R_0 \downarrow 1\).

Under Assumptions 1 and 3, the effective infection rate matrix W is non-negative and irreducible. Hence, the Perron–Frobenius Theorem (Van Mieghem 2014a) implies that the matrix W has a unique eigenvalue \(\lambda _1\) which equals the spectral radius \(\rho (W)\). As we show in the beginning of Appendix B, the eigenvalues of the effective infection rate matrix W are real and satisfy \(\lambda _1 = \rho (W) > \lambda _2\ge \cdots \ge \lambda _N\). In particular, under Assumptions 1 and 3, the largest eigenvalue \(\lambda _1\), the spectral radius \(\rho (W)\) and the basic reproduction number \(R_0\) are the same quantity, i.e., \(R_0 = \rho (W) = \lambda _1\).

In Van Mieghem (2012, Lemma 4) it was shown that, for homogeneous NIMFA (4), the steady-state vector \(v_\infty \) converges to a scaled version of the principal eigenvector of the adjacency matrix A when \(R_0 \downarrow 1\). We generalise the results of Van Mieghem (2012) to heterogeneous NIMFA (1):

Theorem 1

Under Assumptions 1 and 3, the steady-state vector \(v_\infty \) obeys

$$\begin{aligned} v_\infty = \gamma x_1 + \eta , \end{aligned}$$
(6)

where the scalar \(\gamma \) equals

$$\begin{aligned} \gamma = \left( R_0 - 1 \right) \frac{\sum ^N_{l=1} \delta _l \left( x_1\right) ^2_l}{\sum ^N_{l=1} \delta _l \left( x_1\right) ^3_l}, \end{aligned}$$
(7)

and the \(N\times 1\) vector \(\eta \) satisfies \(\Vert \eta \Vert _2 \le {\mathcal {O}}\left( \left( R_0-1\right) ^2\right) \) when the basic reproduction number \(R_0\) approaches 1 from above.

Proof

Appendix B. \(\square \)

5 The viral state dynamics around the epidemic threshold

In Sect. 5.1, we give an intuitive motivation of our solution approach for the NIMFA equations (1) when \(R_0 \downarrow 1\). In Sect. 5.2, we state our main result.

5.1 Motivation of the solution approach

For simplicity, this subsection is confined to the homogeneous NIMFA equations (4). In numerical simulations (Prasse and Van Mieghem 2018), we observed that the \(N \times N\) viral state matrix \(V=(v(t_1),\ldots , v(t_N))\), for arbitrary observation times \(t_1<\cdots < t_N\), is severely ill-conditioned. Thus, the viral state v(t) at any time \(t\ge 0\) approximately equals the linear combination of \(m<<N\) orthogonal vectors \(y_1,\ldots , y_m\), and we can write \(v(t) \approx c_1(t) y_1 + \cdots + c_m(t) y_m\), see also Prasse and Van Mieghem (2020). Here, the functions \(c_1(t),\ldots , c_m(t)\) are scalar. We consider the most extreme case by representing the viral state v(t) by a scaled version of only \(m=1\) vector \(y_1\), which corresponds to \(v(t)\approx c(t) y_1\) for a scalar function c(t). The viral state v(t) converges to the steady-state vector \(v_\infty \) as \(t\rightarrow \infty \). Hence, a natural choice for the vector \(y_1\) is \(y_1 = v_\infty \), which implies that \(c(t)\rightarrow 1\) as \(t\rightarrow \infty \). If \(R_0 \approx 1\) and \(v(0)\approx 0\), then the approximation \(v(t) \approx c(t) v_\infty \) is accurate at all times \(t\ge 0\) due to two intuitive reasons.

  1. 1.

    If \(v(t)\approx 0\) when \(t \approx 0\), then NIMFA (4) is approximated by the linearisation around zero. Hence, it holds that

    $$\begin{aligned} \frac{d v (t)}{d t } \approx \left( \beta A - \delta I \right) v(t) \end{aligned}$$
    (8)

    when \(t\approx 0\). The state v(t) of the linear system (8) converges rapidly to a scaled version of the principal eigenvector \(x_1\) of the matrix \(\left( \beta A - \delta I \right) \). Furthermore, Theorem 1 states that \(v_\infty \approx \gamma x_1\) when \(R_0 \approx 1\). Thus, the viral state v(t) rapidly converges to a scaled version of the steady-state \(v_\infty \):

  2. 2.

    Suppose that the viral state v(t) approximately equals to a scaled version of the steady-state vector \(v_\infty \). (In other words, the viral state v(t) is “almost parallel” to the vector \(v_\infty \).) Then, it holds that

    $$\begin{aligned} v(t) \approx c(t) v_\infty \end{aligned}$$
    (9)

    for some scalar c(t). We insert (9) into the NIMFA equations (4), which yields that

    $$\begin{aligned} \frac{d c(t)}{d t } v_\infty&\approx c(t) \left( \beta A - \delta I \right) v_\infty - \beta c^2(t) {\text {diag}}(v_\infty ) A v_\infty . \end{aligned}$$
    (10)

    For homogeneous NIMFA (4), the steady-state equation (3) becomes

    $$\begin{aligned} \left( \beta A - \delta I \right) v_\infty = \beta {\text {diag}}\left( v_\infty \right) A v_\infty . \end{aligned}$$
    (11)

    We substitute (11) in (10) and obtain that

    $$\begin{aligned} \frac{d c(t)}{d t } v_\infty&\approx \left( c(t) - c^2(t) \right) \left( \beta A - \delta I \right) v_\infty . \end{aligned}$$
    (12)

    Since \(v_\infty \approx \gamma x_1\) around the epidemic threshold, it holds that \(A v_\infty \approx \rho (A) v_\infty \). Hence, we obtain that

    $$\begin{aligned} \frac{d c(t)}{d t } v_\infty&\approx \left( c(t) - c^2(t) \right) \left( \beta \rho (A) - \delta \right) v_\infty . \end{aligned}$$
    (13)

    Left-multiplying (13) by \(v^T_\infty \) and dividing by \(v^T_\infty v_\infty \) yields that

    $$\begin{aligned} \frac{d c(t)}{d t }&\approx \left( c(t) - c^2(t) \right) \left( \beta \rho (A) - \delta \right) . \end{aligned}$$
    (14)

    The logistic differential equation (14) has been introduced by Verhulst (1838) as a population growth model and has a closed-form solution.

Due to the two intuitive steps above, NIMFA (4) reduces around the threshold \(R_0 \approx 1\) to the one-dimension differential equation (14). Solving (14) for the function c(t) gives an approximation of the viral state v(t) by (9). The solution approach is applicable to other dynamics on networks, see for instance (Devriendt and Lambiotte 2020).

However, the reasoning above is not rigorous for two reasons. First, the viral state vector v(t) is not exactly parallel to the steady state \(v_\infty \). To be more specific, instead of (9) it holds that

$$\begin{aligned} v(t) = c(t) v_\infty + \xi (t) \end{aligned}$$
(15)

for some \(N\times 1\) error vector \(\xi (t)\) which is orthogonal to the steady-state vector \(v_\infty \). In Sect. 5.2, we use (15) as an ansatz for solving NIMFA (1).

Second, the steady-state vector \(v_\infty \) is not exactly parallel to the principal eigenvector \(x_1\). More precisely, we must consider the vector \(\eta \) in (6). Since \(\eta \ne 0\), the step from (12) to (13) is affected by an error.

5.2 The solution around the epidemic threshold

Based on the motivation in Sect. 5.1, we aim to solve the NIMFA differential equations (1) around the epidemic threshold criterion \(R_0 = 1\). The ansatz (15) forms the basis for our solution approach. From the orthogonality of the error vector \(\xi (t)\) and the steady-state vector \(v_\infty \), it follows that the function c(t) at time t equals

$$\begin{aligned} c(t) = \frac{1}{ \Vert v_\infty \Vert ^2_2 } v^T_\infty v(t). \end{aligned}$$
(16)

The error vector \(\xi (t)\) at time t follows from (15) and (16) as

$$\begin{aligned} \xi (t) = \left( I - \frac{1}{ \Vert v_\infty \Vert ^2_2 }v_\infty v^T_\infty \right) v(t). \end{aligned}$$
(17)

Our solution approach is based on two steps. First, we show thatFootnote 6 the error term \(\xi (t)\) satisfies \(\xi (t)= {\mathcal {O}}((R_0 - 1)^2)\) at every time t when \(R_0 \downarrow 1\). Hence, the error term \(\xi (t)\) converges to zero uniformly in time t. Second, we find the solution of the scalar function c(t) at the limit \(R_0 \downarrow 1\).

Assumption 2 implies thatFootnote 7 the viral state v(t) does not overshoot the steady-state \(v_\infty \):

Lemma 1

Under Assumptions 1 to 3, it holds that \(v_i(t) \le v_{\infty , i}\) for all nodes i at every time \(t \ge 0\). Furthermore, it holds that \(0 \le c(t) \le 1\) at every time \(t \ge 0\).

Proof

Appendix C. \(\square \)

Theorem 2 states that the error term \(\xi (t)\) converges to zero in the order of \((R_0 - 1)^2\) when \(R_0 \downarrow 1\).

Theorem 2

Under Assumptions 1 to 3, there exist constants \(\sigma _1, \sigma _2 >0\) such that the error term \(\xi (t)\) at any time \(t\ge 0\) is bounded by

$$\begin{aligned} \Vert \xi (t) \Vert _2 \le \Vert \xi (0) \Vert _2 e^{-\sigma _1 t} + \sigma _2 (R_0 - 1)^2 \end{aligned}$$
(18)

when the basic reproduction number \(R_0\) approaches 1 from above.

Proof

Appendix D. \(\square \)

Under Assumption 2, the steady-state \(v_\infty \) is exponentially stable for NIMFA in discrete time (Prasse and Van Mieghem 2019). If the steady-state \(v_\infty \) is exponentially stable, then the error vector \(\xi (t)\) goes to zero exponentially fast, since \(\xi (t)\) is orthogonal to \(v_\infty \). Thus, the first addend on the right-hand side in (18) is rather expectable, under the conjecture that the steady-state \(v_\infty \) is exponentially stable also for continuous-time NIMFA (1). Regarding this work, the most important implication of Theorem 2 is that \(\xi (t) = {\mathcal {O}}\left( (R_0-1)^2\right) \) uniformly in time t when \(R_0 \downarrow 1\), provided the initial value \(\xi (0)\) of the error vector is negligibly small.

We define the constant \(\varUpsilon (0)\), which depends on the initial viral state v(0), as

$$\begin{aligned} \varUpsilon (0) = {\mathrm{artanh}} \left( 2 \frac{ v^T_\infty v(0) }{ \Vert v_\infty \Vert ^2_2 } -1 \right) . \end{aligned}$$
(19)

Furthermore, we define the viral slope w, which determines the speed of convergence to the steady-state \(v_\infty \), as

$$\begin{aligned} w = (R_0 - 1)\sum ^N_{l=1} \delta _l \left( x_1\right) ^2_l. \end{aligned}$$

Then, building on Theorems 1 and 2, we obtain our main result:

Theorem 3

Suppose that Assumptions 1 to 3 hold and that, for some constant \(p>1\), \(\Vert \xi (0) \Vert _2 = {\mathcal {O}}\left( (R_0 - 1)^p\right) \) when \(R_0 \downarrow 1\). Furthermore, define

$$\begin{aligned} v_{\mathrm{apx}}(t)= \frac{1}{2} \left( 1 + \tanh \left( \frac{w}{2} t + \varUpsilon (0)\right) \right) v_\infty . \end{aligned}$$
(20)

Then, there exists some constant \(\sigma >0\) such that

$$\begin{aligned} \frac{\Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2}{ \Vert v_\infty \Vert _2} \le&\sigma (R_0 - 1)^{s-1} \quad \forall t\ge 0, \end{aligned}$$
(21)

where \(s = {\mathrm{min}}\{p, 2\}\), when the basic reproduction number \(R_0\) approaches 1 from above.

Proof

Appendix E. \(\square \)

We emphasise that Theorem 3 holds for any connected graph corresponding to the infection rate matrix B. Theorem 3 is in agreement with the universality of the SIS prevalence (Van Mieghem 2016). The bound (21) states a convergence of the viral state v(t) to the approximation \(v_{\text {apx}}(t)\) which is uniform in time t. Furthermore, since both the viral state v(t) and the approximation \(v_{\text {apx}}(t)\) converge to the steady-state \(v_\infty \), it holds that \(\Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2\rightarrow 0\) when \(t \rightarrow \infty \). At time \(t=0\), we obtain from Theorem 3 and (17) that

$$\begin{aligned} \Vert v(0) - v_{\mathrm{apx}}(0)\Vert _2 = \Vert \xi (0) \Vert _2. \end{aligned}$$

Since \(\Vert \xi (0) \Vert _2 = {\mathcal {O}}\left( (R_0 - 1)^p\right) \) and, by Theorem 1, \(\Vert v_\infty \Vert _2 = {\mathcal {O}}\left( R_0 - 1\right) \), we obtain that

$$\begin{aligned} \frac{ \Vert v(0) - v_{\mathrm{apx}}(0)\Vert _2 }{\Vert v_\infty \Vert _2 } = {\mathcal {O}}\left( (R_0 - 1)^{p-1}\right) . \end{aligned}$$

Hence, for general \(t\ge 0\) the approximation error \(\Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2 / \Vert v_\infty \Vert _2\) does not converge to zero faster than \({\mathcal {O}}\left( (R_0 - 1)^{p-1}\right) \), and the bound (21) is best possible (up to the constant \(\sigma \)) when \(p\le 2\). With (17), the term \(\Vert \xi (0) \Vert _2\) in Theorem 2 can be expressed explicitly with respect to the initial viral state v(0) and the steady-state \(v_\infty \). In particular, it holds that \(\Vert \xi (0) \Vert _2 \le \Vert v(0)\Vert _2\). Furthermore, if the initial viral state v(0) is parallel to the steady-state vector \(v_\infty \), then it holds that \(\xi (0)=0\). Thus, if the initial viral state v(0) is small or parallel to the steady-state vector \(v_\infty \), then it holds that \(\xi (0)=0\) and the bound (21) on the approximation error vector becomes

$$\begin{aligned} \frac{\Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2}{ \Vert v_\infty \Vert _2} \le \sigma (R_0 - 1 ) \quad \forall t\ge 0. \end{aligned}$$
(22)

The time-dependent solution to NIMFA (1) at the epidemic threshold criterion \(R_0 = 1\) depends solely on the viral slope w, the steady-state vector \(v_\infty \) and the initial viral state v(0). The viral slope w converges to zero as \(R_0 \downarrow 1\). Thus, Theorem 3 implies that the convergence time to the steady-state \(v_\infty \) goes to infinity when \(R_0 \downarrow 1\), even though the steady-state \(v_\infty \) converges to zero. More precisely, it holds:

Corollary 1

Suppose that Assumptions 1 and 3 hold and that the initial viral state v(0) equals \(v(0) = r_0 v_\infty \) for some scalar \(r_0 \in (0, 1)\). Then, for any scalar \(r_1 \in [r_0 , 1)\), the largest time \(t_{01}\) at which the viral state satisfies \(v_i(t_{01}) \le r_1 v_{\infty , i}\) for every node i converges to

$$\begin{aligned} t_{01} = \frac{1}{w} \log \left( \frac{r_1}{r_0} \frac{1 - r_0}{1 - r_1}\right) \end{aligned}$$

when the basic reproduction number \(R_0\) approaches 1 from above.

Proof

Appendix F. \(\square \)

We combine Theorem 1 and Theorem 3 to obtain Corollary 2.

Corollary 2

Suppose that Assumptions 1 to 3 hold and that, for some constant \(p>1\), \(\Vert \xi (0) \Vert _2 = {\mathcal {O}}\left( (R_0 - 1)^p\right) \) when \(R_0 \downarrow 1\). Furthermore, define

$$\begin{aligned} {\tilde{v}}_{\mathrm{apx}}(t)= \left( 1 + \tanh \left( \frac{w}{2} t + \varUpsilon (0)\right) \right) \frac{\gamma }{2} x_1. \end{aligned}$$
(23)

Then, there exists some constant \(\sigma >0\) such that

$$\begin{aligned} \frac{\Vert v(t) - {\tilde{v}}_{\mathrm{apx}}(t)\Vert _2}{ \Vert v_\infty \Vert _2} \le&\sigma (R_0 - 1)^{s-1} \quad \forall t\ge 0, \end{aligned}$$

where \(s = {\mathrm{min}}\{p, 2\}\), when the basic reproduction number \(R_0\) approaches 1 from above.

In contrast to Theorem 3, the approximation error \(\Vert v(t) - {\tilde{v}}_{\mathrm{apx}}(t)\Vert _2\) in Corollary 2 does not converge to zero when \(t \rightarrow \infty \), since we replaced the steady-state \(v_\infty \) by the first-order approximation of Theorem 1. Corollary 2 implies that

$$\begin{aligned} \frac{v_i(t)}{v_j(t)} \rightarrow \frac{{\tilde{v}}_{{\text {apx}}, i}(t)}{{\tilde{v}}_{{\text {apx}}, j}(t)} = \frac{(x_1)_i}{(x_1)_j} \end{aligned}$$
(24)

at every time t when \(R_0 \downarrow 1\), provided that the initial viral state v(0) is small or parallel to the steady-state vector \(v_\infty \). From (24) it follows that, around the epidemic threshold criterion \(R_0 = 1\), the eigenvector centrality (Van Mieghem 2010) fully determines the “dynamical importance” of node i versus node j.

For homogeneous NIMFA (4), the infection rate matrix B and the curing rate matrix S reduce to \(B = \beta A\) and \(S = \delta I\), respectively. Hence, the effective infection rate matrix becomes \(W = \frac{\beta }{\delta } A\), and the principal eigenvector \(x_1\) of the effective infection rate matrix W equals the principal eigenvector of the adjacency matrix A. Furthermore, the limit process \(R_0 \downarrow 1\) reduces to \(\tau \downarrow \tau _c\), with the effective infection rate \(\tau = \frac{\beta }{\delta }\) and the epidemic threshold \(\tau _c = 1/\rho (A)\). For homogeneous NIMFA (4), Theorem 3 reduces to:

Corollary 3

Suppose that Assumptions 1 to 3 hold and consider the viral state v(t) of homogeneous NIMFA (4). Furthermore, suppose that \(\Vert \xi (0) \Vert _2 = {\mathcal {O}}\left( (\tau - \tau _c)^p\right) \) for some constant \(p>1\) when \(\tau \downarrow \tau _c\) and define

$$\begin{aligned} v_{\mathrm{apx}}(t)= \frac{1}{2}\left( 1 + \tanh \left( \frac{ ( \tau - \tau _c ) \delta }{2 \tau _c} t + \varUpsilon (0)\right) \right) v_\infty . \end{aligned}$$
(25)

Then, there exists some constant \(\sigma >0\) such that

$$\begin{aligned} \frac{\Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2}{ \Vert v_\infty \Vert _2} \le&\sigma (\tau - \tau _c)^{s-1} \quad \forall t\ge 0, \end{aligned}$$

where \(s = {\mathrm{min}}\{p, 2\}\), when the effective infection rate \(\tau \) approaches the epidemic threshold \(\tau _c\) from above.

Proof

Appendix G. \(\square \)

From Corollary 3, we can obtain the analogue to Corollary 2 for NIMFA (4) with homogeneous spreading parameters \(\beta , \delta \). Furthermore, the approximation \(v_{\mathrm{apx}}(t)\) defined by (25) equals the exact solution (Van Mieghem 2014b) of homogeneous NIMFA (4) on a regular graph, provided that the initial state \(v_i(0)\) is the same for every node i. In particular, the net dose \(\varrho (t)\), a crucial quantity in Van Mieghem (2014b); Kendall (1948), is related to the viral slope w via \(\varrho (t)=wt\).

Theorem 3 and Corollary 3 suggest that, around the epidemic threshold criterion \(R_0 =1\), the dynamics of heterogeneous NIMFA (1) closely resembles the dynamics of homogeneous NIMFA (4). In particular, we pose the question: Can heterogeneous NIMFA (1) be reduced to homogeneous NIMFA (4) around the epidemic threshold criterion \(R_0 = 1\) by choosing the homogeneous spreading parameters \(\beta , \delta \) and the adjacency matrix A accordingly?

Theorem 4

Consider heterogeneous NIMFA (1) with given spreading parameters \(\beta _{ij}, \delta _i\). Suppose that Assumptions 1 to 3 hold and that, for some constant \(p>1\), \(\Vert \xi (0) \Vert _2 = {\mathcal {O}}\left( (R_0 - 1)^p\right) \) when the basic reproduction number \(R_0\) approaches 1 from above. Define the homogeneous NIMFA system

$$\begin{aligned} \frac{d v_{i, {{\mathrm{hom}}}} (t)}{d t }&= - \delta _{{\mathrm{hom}}} v_{i, {{\mathrm{hom}}}}(t) + \beta _{ii, {{\mathrm{hom}}}} \left( 1-v_{i, {{\mathrm{hom}}}}(t)\right) v_{i, {{\mathrm{hom}}}}(t) \nonumber \\&\quad + \left( 1-v_{i, {{\mathrm{hom}}}}(t)\right) \beta _{{\mathrm{hom}}} \sum ^N_{j=1, j\ne i} v_{j, {{\mathrm{hom}}}}(t), \end{aligned}$$
(26)

where the homogeneous curing rate \(\delta _{{\mathrm{hom}}}\) equals

$$\begin{aligned} \delta _{{\mathrm{hom}}} = \frac{\sum ^N_{l=1} \delta _l \left( x_1\right) ^3_l}{\sum ^N_{l=1} \left( x_1\right) ^3_l}, \end{aligned}$$
(27)

the homogeneous infection rate \(\beta _{{\mathrm{hom}}}\) equals

$$\begin{aligned} \beta _{{\mathrm{hom}}}= \frac{\delta _{{\mathrm{hom}}}}{\sum ^N_{l=1} \left( x_1\right) _l } \left( 1 + \gamma \sum ^N_{l=1} \left( x_1\right) ^3_l \right) \underset{l=1,\ldots , N}{{\text {min}}} \left( x_1\right) _l \end{aligned}$$
(28)

with the variable \(\gamma \) defined by (7), and the self-infection rates \(\beta _{ii, {{\mathrm{hom}}}}\) equal

$$\begin{aligned} \beta _{ii,{{\mathrm{hom}}}} = \beta _{{\mathrm{hom}}} \left( \frac{1}{\underset{l=1,\ldots , N}{{\text {min}}} \left( x_1\right) _l } - \frac{1}{\left( x_1\right) _i} \right) \sum ^N_{j=1} \left( x_1\right) _j + \beta _{{\mathrm{hom}}}. \end{aligned}$$

Then, if \(v_{{\mathrm{hom}}}(0)=v(0)\), there exists some constant \(\sigma >0\) such that

$$\begin{aligned} \frac{\Vert v(t) - v_{{\mathrm{hom}}}(t)\Vert _2}{ \Vert v_\infty \Vert _2} \le&\sigma (R_0 - 1)^{s-1} \quad \forall t\ge 0, \end{aligned}$$

where \(s = {\mathrm{min}}\{p, 2\}\), when the basic reproduction number \(R_0\) approaches 1 from above.

Proof

Appendix H. \(\square \)

In other words, when \(R_0 \downarrow 1\), for any contact network and any spreading parameters \(\delta _i, \beta _{ij}\), heterogeneous NIMFA (1) can be reduced to homogeneous NIMFA (4) on a complete graph plus self-infection rates \(\beta _{ii, {{\mathrm{hom}}}}\). We emphasise that the sole influence of the topology on the viral spread is given by the self-infection rates \(\beta _{ii, {{\mathrm{hom}}}}\). Thus, under Assumptions 1to 3, the network topology has a surprisingly small impact on the viral spread around the epidemic threshold.

6 Numerical evaluation

We are interested in evaluating the accuracy of the closed-form expression \(v_{\text {apx}}(t)\), given by (20), when the basic reproduction number \(R_0\) is close, but not equal, to one. We generate an adjacency matrix A according to different random graph models. If \(a_{ij}= 1\), then we set the infection rates \(\beta _{ij}\) to a uniformly distributed random number in [0.4, 0.6] and, if \(a_{ij}= 0\), then we set \(\beta _{ij}=0\). We set the initial curing rates \(\delta ^{(0)}_l\) to a uniformly distributed random number in [0.4, 0.6]. To set the basic reproduction number \(R_0\), we set the curing rates \(\delta _l\) to a multiple of the initial curing rates \(\delta ^{(0)}_l\), i.e. \(\delta _l = \sigma \delta ^{(0)}_l\) for every node l and some scalar \(\sigma \) such that \(\rho (W) = R_0\). Thus, we realise the limit process \(R_0 \downarrow 1\) by changing the scalar \(\sigma \). Only in Sect. 6.2, we consider homogeneous spreading parameters by setting \(\beta _{ij}=0.5\) and \(\delta ^{(0)}_i=0.5\) for all nodes ij. Numerically, we obtain the “exact” NIMFA viral state sequence v(t) by Euler’s method for discretisation, i.e.,

$$\begin{aligned} \left. \frac{d v_i (t )}{d t }\right| _{t = Tk} \approx \frac{ v_i(Tk) - v_i\left( T(k-1)\right) }{T} \end{aligned}$$
(29)

for a small sampling time T and a discrete time slot \(k\in {\mathbb {N}}\). In Prasse and Van Mieghem (2019), we derived an upper bound \(T_{\text {max}}\) on the sampling time T which ensures that the discretisation (29) of NIMFA (1) converges to the steady-state \(v_\infty \). We set the sampling time T to \(T = T_{\text {max}}/100\). Except for Sect. 6.3, we set the initial viral state to \(v(0)= 0.01 v_\infty \). We define the convergence time \(t_{\text {conv}}\) as the smallest time t at which

$$\begin{aligned} \left| v_i(t_{\text {conv}}) - v_{\infty , i} \right| \le 0.01 \end{aligned}$$

holds for every node i. Thus, at the convergence time \(t_{\text {conv}}\) the viral state \(v(t_{\text {conv}})\) has practically converged to the steady-state \(v_\infty \). We evaluate Theorem 3 with respect to the approximation error \(\epsilon _V\), which we define as

$$\begin{aligned} \epsilon _V = \frac{1}{N t_{\text {conv}}} \sum ^N_{i=1} \int ^{t_{\text {conv}}}_0 \frac{\left| v_i\left( {\tilde{t}}\right) - v_{{\text {apx}}, i}\left( {\tilde{t}}\right) \right| }{v_{\infty , i}} d{\tilde{t}}. \end{aligned}$$

All results are averaged over 100 randomly generated networks.

6.1 Approximation accuracy around the epidemic threshold

We generate a Barabási–Albert random graph (Barabási and Albert 1999) with \(N=500\) nodes and the parameters \(m_0 = 5\), \(m= 2\). Figure 1 gives an impression of the accuracy of the approximation of Theorem 3 around the epidemic threshold criterion \(R_0 = 1\). For a basic reproduction number \(R_0 \le 1.1\), the difference of the closed-form expression of Theorem 3 to the exact NIMFA viral state trace is negligible.

Fig. 1
figure 1

For a Barabási–Albert random graph with \(N=500\) nodes, the approximation accuracy of Theorem 3 is depicted. Each of the sub-plots shows the viral state traces \(v_i(t)\) of seven different nodes i, including the node i with the greatest steady-state \(v_{\infty , i}\)

We aim for a better understanding of the accuracy of the closed-form expression of Theorem 3 when the basic reproduction number \(R_0\) converges to one. We generate Barabási–Albert and Erdős–Rényi connected random graphs with \(N=100,\ldots , 1000\) nodes. The link probability of the Erdős–Rényi graphs (Erdős and Rényi 1960) is set to \(p_{\text {ER}}=0.05\). Figure 2 illustrates the convergence of the approximation of Theorem 3 to the exact solution of NIMFA (1). Around the threshold criterion \(R_0=1\), the approximation error \(\epsilon _V\) converges linearly to zero with respect to the basic reproduction number \(R_0\), which is in agreement with Theorem 3. The greater the network size N, the greater is the approximation error \(\epsilon _V\) for Barabási–Albert networks. The greater the network size N, the lower is the approximation error \(\epsilon _V\) for Erdős–Rényi graphs.

Fig. 2
figure 2

The approximation error \(\epsilon _V\) of the NIMFA solution versus the basic reproduction number \(R_0\) for different network sizes N

6.2 Impact of degree heterogeneity on the approximation accuracy

For NIMFA (4) with homogeneous spreading parameters \(\beta , \delta \), the approximation \(v_{\text {apx}}(t)\) defined by (4) is exact if the contact network is a regular graph. We are interested how the approximation accuracy changes with respect to the heterogeneity of the node degrees. We generate Watts–Strogatz (Watts and Strogatz 1998) random graphs with \(N=100\) nodes and an average node degree of 4. We vary the link rewiring probability \(p_{\text {WS}}\) from \(p_{\text {WS}}=0\), which correspond to a regular graph, to \(p_{\text {WS}}= 1\), which corresponds to a “completely random” graph. Figure 3 depicts the approximation error \(\epsilon _V\) versus the rewiring probability \(p_{\text {WS}}\) for homogeneous spreading parameters \(\beta , \delta \). Interestingly, the approximation error reaches a maximum and improves when the adjacency matrix A is more random.

Fig. 3
figure 3

The approximation error \(\epsilon _V\) versus the link rewiring probability \(p_{\text {WS}}\) for Watts–Strogatz random graphs with \(N=100\) nodes and homogeneous spreading parameters \(\beta , \delta \)

6.3 Impact of general initial viral states on the approximation accuracy

Theorem 3 required that the initial error \(\xi (0)\) converges to zero, which means that the initial viral state v(0) must be parallel to the steady-state \(v_\infty \) or, since \(\Vert \xi (0)\Vert _2 \le \Vert v(0)\Vert \), converge to zero. To investigate whether the approximation of Theorem 3 is accurate also when the initial error \(\xi (0)\) does not converge to zero, we set the initial viral state \(v_i(0)\) of every node i to a uniformly distributed random number in \((0, r_0 v_{\infty , i}]\) for some scalar \(r_0 \in (0, 1]\). By increasing the scalar \(r_0\), the initial viral state v(0) is “more random”. Figure 4 shows that the approximation error \(\epsilon _V\) is almost unaffected by an initial viral state v(0) that is neither parallel to the steady-state \(v_\infty \) nor small. Figure 5 shows that the viral state v(t) converges rapidly to the approximation \(v_{\text {apx}}(t)\) as time t increases.

For general initial viral states v(0) with \(\xi (0)\ne 0\), it holds that \(v_{\text {apx}}(0) \ne v(0)\) since the approximation \(v_{\text {apx}}(0)\) is parallel to the steady-state vector \(v_\infty \). Hence, the approximation \(v_{\text {apx}}(t)\) does not converge point-wise to the viral state v(t) when \(R_0 \downarrow 1\). However, based on the results shown in Figs. 4 and 5, we conjecture convergence with respect to the \(L_2\)-norm for general initial viral states v(0) when \(R_0 \downarrow 1\).

Conjecture 1

Suppose that Assumptions 1 to 3 hold. Then, it holds for the approximation \(v_{\mathrm{apx}}(t)\) defined by (20) that

$$\begin{aligned} \frac{1}{\Vert v_\infty \Vert _2 } \int ^\infty _0 \Vert v(t) - v_{\mathrm{apx}}(t)\Vert _2 dt \rightarrow 0 \end{aligned}$$

when the basic reproduction number \(R_0\) approaches 1 from above.

Fig. 4
figure 4

The approximation error \(\epsilon _V\) versus the scalar \(r_0\), which controls the variance of the randomly generated initial viral state v(0), for Barabási–Albert networks with \(N= 250\) nodes

Fig. 5
figure 5

For a Barabási–Albert random graph with \(N=500\) nodes, a basic reproduction number \(R_0=1.01\) and a randomly generated initial viral state v(0), the approximation accuracy of Theorem 3 is depicted. The viral state traces \(v_i(t)\) of seven different nodes i are depicted

6.4 Directed infection rate matrix

The proof of Theorem 3 relies on a symmetric infection rate matrix B as stated by Assumption 3. We perform the same numerical evaluation as shown in Fig. 2 in Sect. 6.1 with the only difference that we generate strongly connected directed Erdős–Rényi random graphs. Figure 6 demonstrates the accuracy of the approximation \(v_{\text {apx}}(t)\) for a directed infection rate matrix B, which leads us to:

Conjecture 2

Suppose that Assumptions 1 and 2 hold and that the infection rate matrix B is irreducible but, in contrast to Assumption 3, not necessarily symmetric. Then, the viral state v(t) is “accurately described” by the approximation \(v_{\mathrm{apx}}(t)\) when the basic reproduction number \(R_0\) approaches 1 from above.

Fig. 6
figure 6

The approximation error \(\epsilon _V\) of the NIMFA solution versus the basic reproduction number \(R_0\) for directed Erdős–Rényi graphs for different network sizes N

Fig. 7
figure 7

The approximation error \(\epsilon _t\) of the convergence time \(t_{01}\) versus the basic reproduction number \(R_0\) for different network sizes N

6.5 Accuracy of the approximation of the convergence time

Corollary 1 gives the expression of the convergence time \(t_{01}\) from the initial viral state \(v(0) = r_0 v_\infty \) to the viral state \(v(t_{01}) \le r_1 v_\infty \) for any scalars \(0< r_0 \le r_1 <1\) around the epidemic threshold criterion \(R_0 = 1\). We set the scalars to \(r_0 = 0.01\) and \(r_1= 0.9\) and define the approximation error

$$\begin{aligned} \epsilon _t = \frac{\left| {\hat{t}}_{01} - t_{01} \right| }{t_{01}}, \end{aligned}$$

where \(t_{01}\) denotes the exact convergence time and \({\hat{t}}_{01}\) denotes the approximate expression of Corollary 1. We generate Barabási–Albert and Erdős–Rényi random graphs with \(N=100,\ldots , 1000\) nodes. Figure 7 shows that Corollary 1 gives an accurate approximation of the convergence time \(t_{01}\) when the basic reproduction number \(R_0\) is reasonably close to one.

6.6 Reduction to a complete graph with homogeneous spreading parameters

Theorem 4 states that, around the epidemic threshold, heterogeneous NIMFA (1) on any graph can be reduced to homogeneous NIMFA (4) on a complete graph. Figures 8 and 9 show the approximation accuracy of Theorem 4 for Erdős–Rényi and Barabási–Albert random graphs, respectively. To accurately approximate heterogeneous NIMFA on Barabási–Albert graphs by homogeneous NIMFA on a complete graph, the basic reproduction number \(R_0\) must be closer to 1 than for Erdős–Rényi graphs.

Fig. 8
figure 8

The approximation accuracy of Theorem 4 on a Erdős–Rényi random graph with \(N=100\) nodes. Each of the sub-plots shows the viral state traces \(v_i(t)\) of seven different nodes i, including the node i with the greatest steady-state \(v_{\infty , i}\)

Fig. 9
figure 9

The approximation accuracy of Theorem 4 on a Barabási–Albert random graph with \(N=100\) nodes. Each of the sub-plots shows the viral state traces \(v_i(t)\) of seven different nodes i, including the node i with the greatest steady-state \(v_{\infty , i}\)

7 Conclusion

We solved the NIMFA governing equations (1) with heterogeneous spreading parameters around the epidemic threshold when the initial viral state v(0) is small or parallel to the steady-state \(v_\infty \), provided that the infection rates are symmetric (\(\beta _{ij}=\beta _{ji}\)). Numerical simulations demonstrate the accuracy of the solution when the basic reproduction number \(R_0\) is close, but not equal, to one. Furthermore, the solution serves as an accurate approximation also when the initial viral state v(0) is neither small nor parallel to the steady-state \(v_\infty \). We observe four important implications of the solution of NIMFA around the epidemic threshold.

First, the viral state v(t) is almost parallel to the steady-state \(v_\infty \) for every time \(t\ge 0\). On the one hand, since the viral dynamics approximately remain in a one-dimensional subspace of \({\mathbb {R}}^N\), an accurate network reconstruction is numerically not viable around the epidemic threshold (Prasse and Van Mieghem 2018). Furthermore, when the basic reproduction number \(R_0\) is large, then the viral state v(t) rapidly converges to the steady-state \(v_\infty \), which, again, prevents an accurate network reconstruction. On the other hand, only the principal eigenvector \(x_1\) of the effective infection rate matrix W and the viral slope w are required to predict the viral state dynamics around the epidemic threshold. Thus, around the epidemic threshold, the prediction of an epidemic does not require an accurate network reconstruction.

Second, the eigenvector centrality (with respect to the principal eigenvector \(x_1\) of the effective infection rate matrix W) gives a complete description of the dynamical importance of a node i around the epidemic threshold. In particular, the ratio \(v_i(t)/v_j(t)\) of the viral states of two nodes ij does not change over time t.

Third, around the epidemic threshold, we gave an expression of the convergence time \(t_{01}\) to approach the steady-state \(v_\infty \). The viral state v(t) converges to the steady-state \(v_\infty \) exponentially fast. However, as the basic reproduction number \(R_0\) approaches one, the convergence time \(t_{01}\) goes to infinity.

Fourth, around the epidemic threshold, NIMFA with heterogeneous spreading parameter on any graph can be reduced to NIMFA with homogeneous spreading parameters on the complete graph plus self-infection rates.

Potential generalisations of the solution of NIMFA to non-symmetric infection rate matrices B or time-dependent spreading parameters \(\beta _{ij}(t), \delta _l(t)\) stand on the agenda of future research.