## Abstract

The dynamics of epidemic spreading is often reduced to the single control parameter *R*_{0} (reproduction-rate), whose value, above or below unity, determines the state of the contagion. If, however, the pathogen evolves as it spreads, *R*_{0} may change over time, potentially leading to a mutation-driven spread, in which an initially sub-pandemic pathogen undergoes a breakthrough mutation. To predict the boundaries of this pandemic phase, we introduce here a modeling framework to couple the inter-host network spreading patterns with the intra-host evolutionary dynamics. We find that even in the extreme case when these two process are driven by mutually independent selection forces, mutations can still fundamentally alter the pandemic phase-diagram. The pandemic transitions, we show, are now shaped, not just by *R*_{0}, but also by the balance between the epidemic and the evolutionary timescales. If mutations are too slow, the pathogen prevalence decays prior to the appearance of a critical mutation. On the other hand, if mutations are too rapid, the pathogen evolution becomes volatile and, once again, it fails to spread. Between these two extremes, however, we identify a broad range of conditions in which an initially sub-pandemic pathogen can breakthrough to gain widespread prevalence.

## Introduction

Epidemic dynamics are driven by the interplay of two processes, occurring at fundamentally different scales. First, at the individual level, once infected, the contracted pathogen undergoes replication, and potential mutation, within a host’s body. Then, once reaching a sufficient load, transmission between hosts helps the pathogen penetrate the social network. These two processes, each characterized by its own intrinsic timescales and relevant parameters, are often modeled independently: the in-host dynamics is captured by a random process of mutation and selection^{1,2,3,4}; the inter-host propagation is tracked using compartmental dynamics, such as the susceptible-infected-recovered (SIR) model^{5,6}, or its more elaborate variants^{7}. While the former is inherently stochastic, most analytical advances on the latter^{5} are achieved via deterministic methods, i.e. ordinary differential equations (ODE). This combination often prohibits systematic analytical advances^{8}, as we lack a unified toolbox by which to treat both the inter-host ODEs and the stochastic intra-host dynamics.

Here, we show that we can reduce the intra-host evolutionary dynamics into an effective random walk, biased or unbiased, in the transmissibility fitness space. This allows us to construct a tractable analytical framework by which to predict the mutation/selection dynamics of a spreading pathogen. In this framework, mutations occur during the intra-host replication process^{1,2,3,4}. Selection for transmissibility, on the other hand, is driven by the inter-host contagion dynamics, as fitter strains proliferate more rapidly and take over the available susceptible population. Together, these two processes may lead to a *mutation-driven phase*, whose boundaries and transition dynamics we pursue below. In this phase an initially non-pandemic pathogen breaks through to reach an evolved pandemic state.

We find that besides the classic epidemiological parameters, i.e. infection/recovery rates, two additional components factor in the observed mutation rate *σ*, quantifying the intra-host evolutionary timescales, and the fraction of infected individuals *η*(*t*), which determines the likelihood of a critical mutation to occur within the relevant time-frame. Therefore, as opposed to classic pandemic transitions, which depend solely on the epidemiological parameters^{9,10,11,12,13}, here the time-dependent prevalence of the pathogen *η*(*t*) and its replication stability, both have direct impact on its anticipated spread.

### Evolving pathogens and network contagion

Consider a pathogen spreading across a social network *A*_{ij}. Once contracted by a specific host *i*, it begins to replicate within *i*’s body, until, after an average of *ρ* replication cycles, one (or more) of its offspring is transferred via infection to one of *i*’s network neighbors *j*. Throughout this in-host replication, the pathogen may undergo mutations, and hence *j* may potentially be infected by a different strain than the one originally contracted by *i*. To track this process^{14,15,16,17,18,19,20} we consider the different strains *μ* and the probabilities *M*_{μν} that upon replication a strain *μ* will mutate into an offspring *ν* (Fig. 1a–c).

Each strain *μ* is characterized by two distinct fitness parameters. The *intra-host fitness* *φ*_{μ}(*i*) quantifies its replication rate within the host *i*. This parameter is affected by *i*’s internal biological environment, e.g., *i*’s immune response, body temperature and so on. Strains with higher *φ*_{μ}(*i*) multiply more efficiently within the host’s body, and hence gain higher prevalence with each replication cycle. Complementing *φ*_{μ}(*i*) is the *inter-host fitness* *ψ*_{μ}, which characterizes the pathogen’s capacity to spread *between* hosts. This parameter, independent of *i*, increases if *μ* has phenotypical traits that enhance its tranmissibility, for example, an extended survival time outside the host’s body^{21}, or a longer pre-symptomatic stage^{22,23}, both of which offer more opportunities for an *i* → *j* transmission.

Within the host, this results in a mutation and selection process that favors high *φ*_{μ}(*i*), as, indeed, fitter strains benefit from an increased intra-host growth rate. Consequently, after an average of *ρ* in-host replication cycles, *i*’s pathogen population reaches a unique *multistrain* \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\)^{20}, capturing a pathogen composition with a fraction *Z*_{μ}(*i*) of the strain *μ* (Fig. 1b). This composition is determined by the interplay between the pathogen’s intrinsic mutation rates (*M*_{μν}), and its intra-host fitness landscape (*φ*_{μ}(*i*)). The multistrain \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\) is characterized by the fitness distribution

capturing the probability that a randomly selected pathogen from \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\) has intra and inter-host fitness *φ* and *ψ*, respectively. Upon transmission *i* → *j*, a single pathogen is sampled from (1), initiating *j*’s intra-host evolutionary dynamics with (Fig. 1c)

Here *φ*(*j*, 0) and *ψ*(*j*, 0) denote the fitness parameters of *j*’s originally contracted pathogen, and *f*_{i}(*φ*) = ∑_{ψ} = *f*_{i}(*φ*, *ψ*), *f*_{i}(*ψ*) = ∑_{φ} = *f*_{i}(*φ*, *ψ*) represent the marginal probabilities of (1). Hence, Eq. (2) describes a randomly selected pathogen from \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\) that is transmitted from *i* to *j*, with initial fitness values *φ*(*j*, 0) and *ψ*(*j*, 0). From this starting point *j*’s own intra-host dynamics commences, resulting in a potential secondary transmission, this time extracted from \({{{{{{{{\mathcal{Z}}}}}}}}}_{j}\).

Taken together, as the process unfolds - from *i*’s exposure, through its intra-host replication, mutation, selection, and eventually, transmission to *j* - we observe potential shifts in both the intra and the inter-host fitness of the pathogen population, such that

The evolutionary steps Δ*φ*, Δ*ψ* are governed by the intra-host mutation/selection processes, yet they impact the inter-host spreading dynamics through *ψ*_{μ}. On the other had, as fitter strains (higher *ψ*_{μ}) spread more efficiently, the inter-host contagion governs the *ψ*-selection process. Below we analyze the resulting interplay between these intra and inter-host patterns of pathogen spread (Fig. 1d).

## Results

To observe the spreading patterns under pathogen evolution we consider the susceptible-infected-recovered^{5} (SIR) dynamics on a random network *A*_{ij}. In the classic SIR formulation the spreading dynamics are governed by three parameters: the recovery rate *α*, the infection rate *β*, and *A*_{ij}’s average degree \(\overline{k}\). Together, they provide \({R}_{0}=\overline{k}\beta /\alpha\), the *reproduction number*, which determines the state of the system^{24,25,26,27,28} - pandemic (*R*_{0} ≥ 1) or infection-free (*R*_{0} < 1).

In the presence of mutations, however, these parameter may change over the course of the spread, with each strain *μ* characterized by its own specific *α*_{μ}, *β*_{μ}, and hence its unique reproduction number

Here *ψ*_{μ}, the inter-host fitness of the *μ*-strain, is defined as

where *α*_{0}, *β*_{0} are the recovery/infection rates of the wild-type. Therefore, the wild-type *μ* = 0 has *ψ*_{0} = 1, and consequently a reproduction number of precisely *R*_{0}. As the spread progresses, mutations may push *ψ*_{μ} below or above this value, by introducing strains with varying *α*_{μ}, *β*_{μ}. The higher is *ψ*_{μ} the greater is *R*_{μ}, and hence the fitter is the strain for inter-host transmission (Fig. 1g).

We can now model the SIR dynamics by tracking the infection, recovery and mutation processes. For the process of infection we write (Fig. 1a–c)

in which a susceptible (*S*) individual *j* contracts the pathogen from their infected (*I*) neighbor *i*, leading to both *i* and *j* becoming infected. The rate of the process in (7), *β*(*j*, 0), represents the infection rate of the transmitted strain, i.e. the selected pathogen from \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\), which will now begin to replicate and potentially mutate within *j*. The spreading fitness of *j*’s contracted strain, *ψ*(*j*, 0) in (8), is extracted from Eq. (4), with the \(\max\) function conditioning that *ψ*(*j*, 0) ≥ 0, i.e. avoiding negative fitness. Next we consider the process of recovery

where an infected host transitions to the recovered (*R*) state. Here *α*_{j} represents the effective recovery rate of *j*’s multistrain \({{{{{{{{\mathcal{Z}}}}}}}}}_{j}\), whose composition results from *j*’s intra-host mutation/selection dynamics. The initial outbreak occurs at a randomly selected node *o*, with *ψ*(*o*, 0) = 1, the wild-type spreading fitness (Fig. 1d), from which point fitness is gained/lost via (8) upon each instance of infection.

### Evolutionary dynamics

To complete the processes (7–9) we now evaluate the magnitude of the evolutionary *jumps* Δ*ψ* at each infection cycle. We therefore, in Fig. 1e, f, model a single instance of intra-host evolutionary dynamics, from initial exposure to transmission. Assigning *μ* = 0 to represent the wild-type, we index all pathogen strains based on genetic similarity, such that *μ* = 1 is closest to the wild-type, and as *μ* is increased we reach more highly mutated variants. Prohibiting direct mutation between highly distant strains, the transition matrix *M*_{μν} → 0 in case *μ* and *ν* are far apart. Here we only allow transitions between directly neighboring strains, taking *M*_{μν} = *p* in case *ν* = *μ* ± 1, *M*_{μν} = 1 − 2*p* if *μ* = *ν* and *M*_{μν} = 0 otherwise (Fig. 1e). The parameter *p*, therefore, characterizes the stability of the pathogen, quantifying the expected frequency of mutations, where *p* → 0 indicates the limit of no evolution at all.

The fitness parameters for each strain are extracted from a pair of normal distribution \({\varphi }_{\mu }(i) \sim {{{{{{{\mathcal{N}}}}}}}}(1,{\sigma }_{\varphi }^{2})\) and \({\psi }_{\mu } \sim {{{{{{{\mathcal{N}}}}}}}}(1,{\sigma }_{\psi }^{2})\), such that every strain is independently assigned an intra and inter-host fitness. This independence captures the fact that the intra-host environment is fundamentally distinct from that of the inter-host transmission, and hence the phenotypic traits enhancing *φ*_{μ}(*i*) and *ψ*_{μ} are, by and large, uncorrelated. In Supplementary Section 4 we also examine the case where the two *are* related.

To observe the evolutionary dynamics, at *t* = 0 we infect *i* with a specific strain (*φ*(*i*, 0), *ψ*(*i*, 0), Fig. 1f, grey dot). As the pathogen multiplies within *i*, fitter strains are selected and the composition of the pathogen population shifts in favor of strains with greater *φ*_{μ}(*i*). In this process of mutation/replication, the composition of *ψ*_{μ} changes as well. After *ρ* reproduction cycles, we extract the two fitness distributions of Eq. (1) as obtained from the resulting multistrain \({{{{{{{{\mathcal{Z}}}}}}}}}_{i}\): As expected, we find that *f*_{i}(*φ*), the intra-host fitness, follows a shifted normal distribution, with an average fitness greater than the initial *φ*(*i*, 0) (Fig. 1f, blue). This is a direct consequence of the intra-host selection process, which favors the rapidly replicating variants (large *φ*_{μ}(*i*)).

The inter-host fitness, on the other hand, lacking selection within the host, drifts up and down at random (grey path), resulting in \({f}_{i}(\psi ) \sim {{{{{{{\mathcal{N}}}}}}}}(\psi (i,0),{\sigma }^{2})\), a zero-mean normal distribution with variance *σ*^{2}. Upon transmission to *j*, *ψ*(*j*, 0) in (8) is extracted precisely from this resulting normal distribution (Fig. 1f, green). Mathematically, this process is mapped to an effective random walk beginning at the initial starting point *ψ*(*i*, 0), and taking random steps of size ~ *σ*.

This captures our first key observation, that the detailed mutation/selection process taking place within the host can be reduced to an effective random walk in *ψ*-space. We can now use Eq. (4) to write Δ*ψ* = *ψ*(*j*, 0) − *ψ*(*i*, 0), which using the above observation, that \(\psi (j,\, 0) \sim {{{{{{{\mathcal{N}}}}}}}}(\psi (i,\, 0),\,{\sigma }^{2})\), provides us with

a zero-mean normal distribution, whose variance depends on the *intra*-host evolutionary dynamics. Hence, the intra-host mutation/selection process condenses into the single parameter *σ* in (10) that helps characterize the observed *inter*-host evolutionary dynamics. In the limit where *σ* = 0, we have Δ*ψ* = 0 in (8) at all times, mutations are suppressed, and Eqs. (7–9) converge to the classic SIR model, with a stable *R*_{0}. In contrast, as *σ* is increased, significant *ψ*-mutations become more frequent and the inter-host fitness rapidly evolves. We therefore, below, vary *σ* to control the *mutation rate* of the spreading pathogens.

Taken together, our modeling framework accounts for the dynamics of infection and recovery (SIR) under the effect of pathogen mutation. As the spread progresses, pathogens evolve via Eq. (8), blindly altering their inter-host fitness at random, as, indeed, the intra-host selection has no bearing on *ψ*_{μ}. The inter-host dynamics, however, will favor positive *ψ*-mutations, in which Δ*ψ* > 0. This is because such mutations lead to greater *R*_{μ} in (5), and hence to higher transmissibility. This, in turn, translates to higher prevalence, allowing fitter strains to eventually dominate the population (Fig. 1g).

### Critical mutation

Consider an outbreak of a wild-type with *R*_{0} < 1, i.e. below the epidemic threshold. This can be either due to the pathogen’s initial sub-pandemic parameters, or a result of mitigation, e.g., social distancing to reduce *β*_{0}. In the classic SIR formulation, such pathogen will fail to penetrate the network. However, in the presence of mutations (*σ* > 0 in (10)) the pathogen may potentially undergo selection, reach *R*_{μ} > 1, and from that time onward begin to proliferate. This represents a *critical mutation*, which, using (5), translates to

the *critical fitness* that, once crossed, may lead an initially non-pandemic pathogen to become pandemic. The smaller is *R*_{0} the higher is *ψ*_{c}, as, indeed, weakly transmissible pathogens require a longer evolutionary path to turn pandemic. Next, we analyze the spreading patterns of our evolving pathogens, seeking the conditions for the appearance of such a critical mutation.

### Phase-diagram of evolving pathogens

To examine the behavior of (7–10) we constructed an Erdős-Rényi (ER) network *A*_{ij} with *N* = 5000 nodes and \(\overline{k}=15\), providing a testing ground upon which we incorporate a series of epidemic scenarios (Fig. 2). Each scenario is characterized by a different selection of our model’s three epidemiological parameters: *α*_{0}, *β*_{0}, which determine the wild-type’s reproduction *R*_{0}, and *σ*, which controls the effective inter-host mutation rate. We then follow the spread by measuring the prevalence *η*(*t*), which monitors the fraction of infected individuals vs. time (0 ≤ *η*(*t*) ≤ 1). We also track the pathogen’s evolution via the population averaged inter-host fitness \(\overline{\psi }(t)=(1/N)\mathop{\sum }\nolimits_{i=1}^{N}\psi (i,0)\), i.e. the average fitness over all transmitted pathogens. We observe several potential spreading patterns:

#### Pandemic (Fig. 2a, b red)

In our first scenario we set *α*_{0} = 0.1, *β*_{0} = 8 × 10^{−3} and *σ* = 2 × 10^{−2}. This captures a pandemic wild-type, which, using \(\overline{k}=15\), has *R*_{0} = 1.2 > 1, namely it can spread even without mutation. Indeed *η*(*t*) rapidly climbs to gain macroscopic coverage, congruent with the prediction of the classic SIR model, only this time instead of a single infection wave, we observe a secondary peak, due to the introduction of fitter variants, that help increase \(\overline{\psi }(t)\). Such successive waves of infection, driven by pathogen evolution, have, in fact, being observed in the spread of SARS-CoV-2 ^{29,30,31,32,33,34}.

#### Mutation-driven (Fig. 2c, d green)

Next we reduce the wild-type infection rate to *β*_{0} = 1.67 × 10^{−3}, an initial reproduction of *R*_{0} = 0.25 < 1. This describes a pathogen whose transmissibility is significantly below the epidemic threshold, and therefore, following the initial outbreak we observe a decline in *η*(*t*), which by *t* ~ 30 almost approaches zero, as the disease seems to be tapering off (inset). In this scenario, however, we set a faster mutation rate *σ* = 2. As a result, despite the initial remission, at around *t* ~ 5, the pathogen undergoes a critical mutation as \(\overline{\psi }(t)\) crosses the critical *ψ*_{c} = 1/*R*_{0} = 4 (grey dashed line) and transitions into the pandemic regime. Consequently, *η*(*t*) changes course, the disease reemerges and the mutated pathogens successfully spreads.

#### Infection-free (Fig. 2e, f blue)

We now remain in the sub-pandemic range, with *R*_{0} = 0.25, but with a much slower mutation rate, set again to *σ* = 2 × 10^{−2}. As above, *η*(*t*) declines, however the pathogen evolution is now too slow, and cannot reach critical fitness on time. Therefore, the disease fails to penetrate the network, lacking the opportunity for the emergence of a critical mutation.

Hence, the dynamics of the spread are driven by three parameters: the initial epidemiological characteristics of the wild-type, *α*_{0} and *β*_{0}, which determine *R*_{0}, and the mutation rate *σ*, which governs the timescale for the appearance of the critical *ψ*_{c}. Therefore, below, to determine the conditions for a mutation-driven contagion, we investigate the balance between the decay in *η*(*t*) vs. the gradual increase in \(\overline{\psi }(t)\).

### The mutation-driven phase

To understand the dynamics of the evolving pathogen model, we show in Supplementary Section 1.1 that at the initial stages of the spread, the prevalence *η*(*t*) follows

The time-dependent exponential rate *ξ*(*t*) is determined by the epidemiological/mutation rates via

whose two terms characterize the pre-mutated vs. post-mutated spread of the pathogen. The first term, linear in *t*, represents the initial stages of the spread, which are determined by the wild-type parameters, *α*_{0}, *R*_{0}. For *R*_{0} < 1 this describes an exponential decay, *a là* the SIR dynamics in the sub-pandemic regime. At later times, however, as *t*^{3} becomes large, the second term begins to dominate, and the exponential decay is replaced by a rapid proliferation, now driven by the mutation rate *σ*. The transition between these two behaviors–decay vs. proliferation–occurs at \({\tau }_{c}=\sqrt{2(1-{R}_{0})/3{\alpha }_{0}{\sigma }^{2}{R}_{0}^{2}}\), which provides the anticipated timescale for the appearance of the critical mutation *ψ*_{c} in (11).

This analysis portrays the mutation-driven contagion as a balance between two competing timescales: on the one hand the exponential decay of the sub-pandemic pathogen, and on the other hand the evolutionary timescale *τ*_{c} for the appearance of the critical mutation. For the evolution to *win* this race the pathogen must not vanish before *t* = *τ*_{c}. This imposes the condition that (Fig. 3a–c)

ensuring that at *τ*_{c} there are still one or more individuals hosting the pathogen. Indeed, *η*(*τ*_{c}) ≤ 1/*N* indicates that *on average*, at *t* = *τ*_{c} less than a single individual is left in the infected pool. Under this condition, the critical mutation is too late, the spread has already tapered off, and the exponential growth driven by the positive term in (13) is averted.

Taking *η*(*τ*_{c}) from (12), we can now use (14) to express the boundary of the mutation-driven phase, predicting the *critical mutation rate* as (Supplementary Section 1.1)

where \({{{{{{{\mathcal{{I}}}}}}}_{0}}}=N\eta (t=0)\) is the number of individuals infected at *t* = 0. Equation 15 describes the minimal mutation rate required for the wild-type to evolve into a potentially pandemic strain. For *R*_{0} = 1 it predicts *σ*_{c} = 0, as such pathogen can indeed spread even without mutation. However, as *R*_{0} is decreased, the pathogen prevalence rapidly declines, and hence it must evolve at an accelerated rate to reach critical fitness on time. This is expressed in (15) by an increased *σ*_{c}, which approaches infinity as *R*_{0} → 0.

Note that the condition in (14), that at *t* = *τ*_{c} there is a *single* infected individual, is not necessarily stringent, and hence, should be taken more loosely as *η*(*τ*_{c}) is *of the order of* 1/*N*. Indeed, even if the pathogen reaches its critical mutation when there are two or three infected individuals, due to the stochasticity of the spreading dynamics under such small numbers, pathogen extinction continues to be a probable scenario. Therefore *σ*_{c} in (15) is only predicted upto a multiplicative constant of order unity, as signified by the ∝ sign, i.e. *σ*_{c}*scales as*, not *equals to* the expression on the r.h.s. We also note that, for simplicity the derivation leading to Eq. (15) in Supplementary Section 1.1 is conducted under *β*-mutations, namely setting *α*_{μ} = *α*_{0} and allowing only the infection rate to evolve. In Supplementary Section 1.3 we further generalize the analysis, using a combination of analytical and numerical tools, to cover also *α*-mutations.

To test prediction (15) we simulate in Fig. 2i an array of 1050 realizations of Eqs. (7–10), representing different epidemiological scenarios. We varied *R*_{0} from 0 to 1.5, i.e. from non-transmissible to pandemic, and scanned a spectrum of mutation rates from *σ* = 10^{−3} to *σ* = 10, spanning four orders of magnitude. Simulating each scenario 50 times we observe the probability *P* for the disease to gain coverage. This is done by tracking the total fraction of recovered individuals \({r}_{\infty }=\int\nolimits_{0}^{\infty }\eta (t)\,{{{{{{{\rm{d}}}}}}}}t\) and counting the realizations in which *r*_{∞} → 0 vs. those where *r*_{∞} > 0 (Supplementary Section 5.1). As predicted, we find that the pandemic state, classically observed only at *R*_{0} ≥ 1, now extends to lower *R*_{0} in the presence of sufficiently rapid mutations. This gives rise to the mutation-driven phase (green), in which an initially decaying contagion suddenly turns pandemic. The boundaries of this phase (grey zone) are, indeed, well-approximated by our theoretically predicted (15), as depicted by the black solid line separating the infection-free from the mutation-driven phases.

### Explosive transition

Unlike the classic pandemic threshold, the mutation-driven phase shift is of explosive nature^{35,36}, capturing a first-order phase-transition (Fig. 2j). This is because once a critical mutation occurs, the pathogen gains prevalence, providing opportunities for additional mutations that push \(\overline{\psi }(t)\) ever higher. This creates a positive feedback, which, in turn, leads to a discontinuous *jump* in *r*_{∞}: below the boundary of (15) the total fraction of infected individuals is *r*_{∞} → 0, yet once we cross this boundary, it abruptly rises to *r*_{∞} ≲ 1.

Such discontinuous transition illustrates the risks of *soft mitigation*. Indeed, from social distancing to vaccination, our natural response in the face of a pandemic pathogen is to drive *R*_{0} below the critical threshold, be it *R*_{0} ≤ 1 absent mutations (*σ* = 0), or lower in case of an evolving pathogen (*σ* > 0), as predicted in (15). To minimize the ensuing socioeconomic disruption, it is tempting to tune our response, as much as we can, to push *R*_{0} just below this threshold, reaching a state in which the system fluctuates around criticality^{37,38,39}. Under a continuous transition, as classically observed for most epidemiological models, such minimal response may suffice. However, here, the abrupt first-order transition portrays a system that is highly sensitive around the phase boundary. Hence, minor excursions above the threshold can potentially lead to a sudden jump in prevalence, as they unleash a potential sequence of breakthrough mutations. We, therefore, must remain at a safe distance from criticality when responding to an evolving pathogen.

### Time sensitivity

Equation (15) shows that *σ*_{c} depends not only on the epidemiological characteristics of the pathogen (*α*_{0}, *R*_{0}), but also on the initial condition, here captured by the number of infected individuals \({{{{{{{\mathcal{{I}}}}}}}_{0}}}=\eta (t=0)N\). If \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\) is large the critical rate *σ*_{c} becomes lower, in effect expanding the bounds of the mutation-driven phase. To understand this consider the evolutionary paths followed by all pathogens as they spread. These paths represent random trajectories in *fitness space*, starting from *ψ*_{0} = 1, the wild-type, and with a small probability crossing the critical fitness *ψ*_{c}. The more such attempts are made, the higher the chances that at least one of these paths will be successful. Therefore, a higher initial prevalence \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\) of the pathogen increases the probability *P* for the appearance of a critical mutation, enabling a mutation-driven phase even under a relatively small *σ*. In simple words, even rare mutations may occur if the initial pathogen pool (\({{{{{{{\mathcal{{I}}}}}}}_{0}}}\)) is large enough^{40,41,42,43}. Indeed, in Fig. 3d we find that the phase boundary shifts towards lower *σ*_{c} as the initial prevalence is increased (grey shaded lines). Hence, the greater is \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\), the broader are the conditions that enable mutation-driven contagion.

This dependence on \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\) indicates that the risk of a critical mutation increases in case the pathogen is already widespread. For example, consider a pandemic pathogen (*R*_{0} > 1) that begins to spread, exhibiting an exponentially increasing *η*(*t*). At time *t* = *t*_{R} we instigate our response, aiming to suppress *R*_{0}, e.g., via social distancing. In case of a late response (*t*_{R} large), our mitigation encounters an already prevalent pathogen, with a large \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\), and hence an increased probability to undergo a critical mutation. Therefore, early response is key, aiming to eliminate the pathogen while its population is still small, when it is still outside the bounds of the mutation-driven phase.

We emphasize, that also without mutations, the advantages of responding early are well known^{44,45,46,47}, primarily to help us avoid a prolonged pandemic state. The crucial difference is, that in these classic formulations pushing *R*_{0} below criticality guarantees the desired transition to the infection-free phase. The only question being the temporal trajectory of this transition–prolonged or rapid. Here, however, responding late, may catch the pathogen when it has already entered a different phase, i.e. mutation-driven, and hence it is not just a matter of *how long* it will take for the pandemic to decay, but rather if it will decay at all. Indeed, our dynamics lead to a unique phenomenon where the phase boundary itself, as expressed in (15), shifts with time, due to the accumulation of infected individuals, which increases \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\). Therefore, the longer we wait the more likely we are to experience, at some point later in the pathogen’s spreading trajectory, a game-changing mutation. In simple terms - the risk is not just a prolonged decay, but an actual reemergence of the pandemic state.

To observe this, in Fig. 4a we simulated the spread of a pandemic pathogen with *R*_{0} = 1.2 (red). To counter the spread, we first employ our mitigation at *t*_{R} = 20 days, reducing *R*_{0} by a factor of two to *R*_{R} = 0.6 (blue). The result is a sharp turning point in the spread, as the pathogen begins to exponentially decay, eventually eradicated within several weeks. We then examine an alternative scenario of late mitigation, this time setting *t*_{R} = 75 days (green). At first, the mitigation seems to be working, as *η*(*t*) begins to rapidly decline. However, as we have now *caught* the pathogen at a higher prevalence, our mitigation is insufficient, as *R*_{R} = 0.6 is now within the bounds of the mutation-driven phase. Indeed, the phase boundary has shifted with *t*, and what was a sufficient response at *t*_{R} = 20 is no longer enough now that *t*_{R} = 75. Therefore, after an initial remission, we observe a second wave of infection, due to breakthrough mutations.

Our late response, we emphasize, did not simply lead to a prolonged pandemic state, but rather to a reemergence of the pandemic. This second wave, we emphasize, occurs at *t* ≫ *t*_{R}, however its seeds were already planted at the time of our initial delayed response. This delay caused the pathogen to cross the boundary into the mutation-driven phase, sealing our fate to a potential future second wave. In Fig. 4b we examine this more systematically, plotting the probability *P* to reach critical mutation vs. our response time *t*_{R}, as obtained for a range of mutation rates *σ*. As predicted, we find that the risk for mutation driven contagion consistently increases as we delay our response.

### Hysteresis

This dependence of the phase boundary on \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\) indicates that the transition point changes if we approach it from the infection-free state (small \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\)) or from the pandemic state (large \({{{{{{{\mathcal{{I}}}}}}}_{0}}}\)). This captures a hysteresis phenomenon, in which the critical transition depends on the direction towards which we push *R*_{0}: starting from low *R*_{0} we observe the transition at *R*_{c,1}; however, reversing the path, pushing *R*_{0} from high to low we approach the transition from a high prevalence state, and therefore only reach the infection-free phase at *R*_{c,2} < *R*_{c,1}. This can be observed in case the pathogen spreads via the susceptible-infected-susceptible (SIS) dynamics, where as opposed to SIR, the pandemic fixed-point has a constant fraction of infected individuals, i.e. *η*(*t* → *∞*) > 0 (see Supplementary Section 2).

### The volatile phase

The analysis above indicates that rapid intra-host mutations, i.e. large *σ*, support a pathogen’s ability to spread. This is thanks to the combination of fast mutation and inter-host selection, that leads to critical fitness within a sufficiently short timescale. There is, however, an upper limit to *σ*, beyond which mutation-driven spread cannot be sustained. Indeed, when *σ* is too large the pathogen fitness \(\overline{\psi }(t)\) becomes unstable. As a result, while the pathogen rapidly reaches critical fitness, the random nature of its frequent mutations, renders it unable to uphold this fitness–resulting in an irregular \(\overline{\psi }(t)\), that fluctuates above and below the critical *ψ*_{c} (Fig. 2g, h). The result is a second transition from mutation-driven contagion (Fig. 2i, green) to the volatile phase (blue), in which, once again, the pathogen fails to spread. The difference is that while in the infection-free phase (*σ* small) contagion is avoided because mutations are too slow, here the pathogen extinction occurs because they were too rapid.

To gain deeper insight into the volatile phase, consider the natural selection process, here driven by the inter-host reproduction benefit of the fitter strains. This process is not instantaneous, and requires several reproduction instances, i.e. generations, to gain a sufficient spreading advantage. With *σ* too high, natural selection is confounded, the pathogen shows no consistent gains in fitness and, as Fig. 2g indicates, *η*(*t*) decays exponentially to zero. In Supplementary Section 1.2 we use a timescale analysis, similar to the one leading to Eq. (15), to show that the volatile phase occurs when *σ* exceeds

Here \({\psi }_{\max }=\mathop{\max }\limits_{\mu }\{{\psi }_{\mu }\}\) represents the maximal inter-host fitness over all potential strains of the pathogen. This prediction is, indeed, confirmed by our simulated phase diagram in Fig. 2i (black solid line).

While related, the volatile phase is distinct from the classic error-catastrophe, that renders a pathogen non-viable due to high error rates during replication^{48}. Indeed, the error-catastrophe captures a state in which mutations are frequent enough to disrupt the inter-generational preservation of genetic information. Such conditions prohibit the pathogen from producing enough viable offspring, resulting in failure to sustain its population. Here, however, the spreading bottleneck is different: the pathogen *is* able to successfully replicate, but it fails to lock-in its fitness gains. Indeed, by the time natural selection, here governed by the inter-host spreading dynamics, affords the fitter strains a sufficient spreading advantage, mutations have already driven the pathogen, or better yet–its offspring, into a different area in *ψ*-space. Hence, the pathogen extinction is not due to replication failure, indeed–it replicates viably within its host, but rather to the short memory of advantageous mutations, vs. the relatively longer natural selection timescales^{49,50,51,52,53}. Consequently, absent selection, mutations drive the pathogen erratically across fitness-space, a volatile dynamics, in which the critical mutation, despite being reached, is short-lived, overrun by new mutations, before the fitter strain can gain sufficient ground.

Our phase-diagram illustrates the different forces governing the spread of pathogens in the presence of mutations. While spread is prohibited classically for *R*_{0} < 1, here we observe a mutation-driven phase, in which the disease can successfully permeate despite having an initially low reproduction rate. The conditions for this phase require a balance between three separate timescales: (i) The time for the initial outbreak *η*(0) to reach near-zero prevalence *τ*_{1}; (ii) The time for the pathogen to evolve beyond critical fitness *τ*_{c}; (iii) The time for the natural selection to lock-in the fitter mutations *τ*_{2}. Pathogens with small *R*_{0}, we find, can still spread provided that

illustrating the window of mutation-driven pandemic spread. The l.h.s. of (17) ensures that the pathogen can reach critical fitness before reaching near-zero prevalence. This gives rise to the first transition of Eq. (15), between the infection-free and the mutation-driven phases. The r.h.s. of (17) is responsible for the second transition, from mutation-driven to *volatile*. It ensures that fitter pathogens do not undergo additional mutation before they proliferate via natural selection. Therefore, we observe a Goldilocks zone, in which the mutation rate *σ* is just right: on the one hand, enabling unfit pathogens to cross the Rubicon towards pandemicity, but on the other hand, avoiding aimless capricious mutations.

## Reinfection

Our discussion up to this point focused on mutations that randomly increase *R*_{0} by impacting *α*_{0} or *β*_{0}, namely the epidemiological parameters. We now complete our analysis considering a different breakthrough mechanism of reinfection via immunity evasion. Here, a mutant variant, distinct enough from the wild-type, can reinfect an already recovered individual. This mechanism is, of course, well-studied^{54,55,56,57,58,59}, however, our analysis framework can help us advance by observing its outcomes under a range of variants *μ* = 0, 1, 2,….

To examine this in a realistic setting we consider the spread of SARS-CoV-2. We therefore collected data on the COVID-19 infection cycle^{60,61,62,63,64,65,66,67,68,69,70} (Fig. 5a): upon infection, individuals enter a pre-symptomatic state, which lasts, on average 5 days. During this period, typically within 2–4 days they begin to shed the virus and infect their network contacts (PS, purple). This continues until the onset of mild (*I*_{M}), severe (*I*_{S}) or critical (*I*_{C}) symptoms, at which point they mostly enter isolation and cease to spread the virus. (Of course, individuals may not comply, and hence in Supplementary Section 5.3 we examine the case where ~30% of the mildly symptomatic (*I*_{M}) continue to interact despite their symptoms.) In addition, a fraction (~30%) of infected individuals never go on to develop noticeable symptoms (AS, top arrow), and hence they continue to spread the virus until their full recovery (*R*), typically within ~7 days.

To evaluate the (wild-type) infection rate *β*_{0} we used empirical data on the observed spread in 12 different countries^{29} (Supplementary Section 5.3). Focusing on the early stages of the contagion, prior to the instigation of lock-downs or other mitigation schemes, we find that *β*_{0} = 5 × 10^{−2} days^{−1} best fits the observed spreading dynamics. This corresponds to a reproduction rate of *R*_{0} ≈ 2.6, congruent with existing^{60,71,72} valuations of *R*_{0} under COVID-19.

For the evolutionary dynamics, we consider, again, intra-host mutations, governed by *M*_{μν} and selected via each host’s idiosyncratic fitness landscape *φ*_{μ}(*i*). The result, as discussed above, is an effective random walk, starting from the wild-type *μ* = 0, and accumulating increasing levels of genetic variation along the *μ*-axis. Each variant *μ* is assigned a *reinfection fitness**ϕ*_{μ}, capturing its probability to penetrate the wild-type induced immunity. The greater is *μ*, the higher the genetic distance from the wild-type, and hence also the greater is *ϕ*_{μ}^{16,73,74,75}. In our simulations we use \({\phi }_{\mu }={z}^{h}/({z}_{r}^{h}+{z}^{h})\), where \(z=\mu /{\mu }_{\max }\) is the normalized distance (0 ≤ *z* ≤ 1) from the wild-type, and *z*_{r} is a parameter governing the typical distance required for *μ* to reinfect a wild-type recovered individual. For *z* ≪ *z*_{r} we have *ϕ*_{μ} → 0, i.e. no reinfection, and if *z* ≫ *z*_{r} we have *ϕ*_{μ} → 1, a variant fully resistant to the wild-type antibodies.

Similarly to our previous analysis, also here, the emergence of a breakthrough mutation is driven by the timescales of the inter/intra-host dynamics. If mutations are slow compared to the spreading dynamics (*σ* small) the outbreak decays before the critical mutation *z* > *z*_{r} is reached, and we observe a single wave of infection (Fig. 5b, c). If, however, mutations are rapid (*σ* large), *z* grows fast enough to reach *z*_{r} on time, and we risk a second wave with relatively high probability (Fig. 5c, d). This gives rise to the *R*_{0}, *σ* risk-map, capturing the probability *P* of a second wave, given the wild-type epidemiological parameters (encapsulated within *R*_{0}) and the pathogen replication stability (encapsulated within *σ*); Fig. 5f.

Our sigmoidal *ϕ*_{μ} allows us to account for the gradual accumulation of reinfection fitness, as governed by the saturation parameter *h*. Under large *h*, *ϕ*_{μ} jumps abruptly from 0 to 1 at *z* = *z*_{r}, mapping to existing frameworks in which one considers a discrete set of (typically two) variants^{76,77,78,79,80}. Tuning *h*, however, or considering more complex *ϕ*_{μ}, we can take advantage of our analytical framework that helps capture the evolutionary dynamics across a continuum of variants.

### Prospects and limitations

Throughout our presentation we we have made several simplifying assumptions, selected primarily for methodical reasons, which can be relaxed to introduce more realism, where relevant. For example, our Gaussian fitness distributions \({{{{{{{\mathcal{N}}}}}}}}(1,\,{\sigma }_{\varphi }^{2})\) and \({{{{{{{\mathcal{N}}}}}}}}(1,\,{\sigma }_{\psi }^{2})\) (Fig. 1e) may be replaced with more complex fitness landscapes. This will impact the patterns of the observed inter-host fitness jumps, and hence replace the simplistic zero-mean random walk of Eq. (10) by a more specified exploration of the inter-host fitness space. Another potential generalization, relevant in real-world applications, considers the fact that individuals may experience different disease cycles. For instance, in COVID-19, most individuals exhibit a limited infection time-window, while few sustain the virus for extended periods. These latter individuals, hosting the virus for many replication cycles, are the main contributors to its genetic variability^{81,82,83,84,85,86}. This heterogeneity across hosts translates to a distributed *σ*, i.e. *σ*_{i}, a potential complication that was not considered in our implementation. Finally, in our last example we focus solely on reinfection vs. the wild-type *μ* = 0, and hence we observed–at most–two infection waves. More generally, one may consider more complex fitness functions *ϕ*_{μν}, designed to capture the probability of *ν* to reinfect an individual recovered from *μ*. This, however, may require complex book-keeping of infections, which, if carried out in all detail, i.e. per each pair of *μ*, *ν*, may limit the feasibility of our framework.

## Discussion

The phase diagram of epidemic spreading is a crucial tool for forecasting and mitigating pandemic risks. First, it identifies the relevant control parameters, such as *α*_{0}, *β*_{0} and \(\overline{k}\), whose values determine *R*_{0}. Then it predicts the phase boundaries that help us assess the state of the system–infection-free or pandemic. Finally, it provides guidelines for our response, from social distancing to reduce \(\overline{k}\), through therapeutic treatment to increase *α*_{0} or mask wearing to suppress *β*_{0}.

Here we have shown that mutations can fundamentally change this phase diagram. Instead of just one dimension, the relevant phase space is now driven by two control parameters: *R*_{0}, the wild-type reproduction number, which encapsulates the inter-host epidemiological characteristics of the pathogen, and *σ* the observed mutation rate, which is determined by the intra-host evolutionary dynamics. This (*σ*, *R*_{0}) phase space gives rise to a mutation-driven phase, whose boundaries we predict here, observing several characteristics that stand in contrast to most known pandemic transitions. Most notably, the abrupt first-order transition, that depicts extreme sensitivity in the vicinity of the phase boundary, and the dependence of the transition point on the current prevalence *η*(*t*), which predicts that similar responsive actions may lead to different outcomes at different stages of the spread^{44}. As we are now experiencing, first hand, how novel mutations are driving the proliferation of SARS-CoV-2, we hope that these qualitative predictions will guide our response.

While the classic control parameter *R*_{0} is well-understood, our analysis introduces an additional relevant parameter *σ*, designed to capture the observed inter-host mutation rate. This parameter emerges from the microscopic model of the intra-host replication/mutation dynamics. It is, therefore driven by the intra-host fitness landscape *φ*_{μ}(*i*), *ψ*_{μ}, its patterns of mutation transitions *M*_{μν}, *p* and its replication cycle *ρ*. In Supplementary Section 5.2 we analyze the impact of each of these microscopic model characteristics on the observed mutation rate *σ*.

Our analysis assumed that the intra and inter host fitness parameters, *φ*_{μ}(*i*) and *ψ*_{μ}, are independent of each other. Indeed, the two environments, that of the in-host replication vs. that governing host-to-host transmission, are, by and large, unrelated, and hence being fit for one has no bearing on the pathogen’s fitness for the other^{75,87}. One exception, is under drug-based mitigation. Drugs are designed to disrupt the intra-host replication, and by that increase the recovery rate *α*_{0} (reducing *R*_{0}), thus suppressing the inter-host transmission. This naturally creates a positive correlation between *φ*_{μ}(*i*) and *ψ*_{μ}, since variants with higher drug resistance will not only be more fit for intra-host replication, but also have a lower *α*_{0}, and hence higher transmissibility. The observed inter-host evolutionary dynamics will no longer follow a random walk in fitness space, as in Eq. (4), but rather show a systematic bias towards higher fitness (Supplementary Section 4). With an array of new drugs, some at final stages of approval^{88}, being currently considered for the treatment of COVID-19, we believe that this analysis may offer key insights on the potential arms-race between our treatment and SARS-CoV-2’s evolution ^{89}.

## Methods

### Simulations

All simulations were done on a random network of *N* = 5000 nodes and \(\overline{k}=15\). The disease parameters were set to *α*_{0} = 0.1 and the infection rate was set variably to \({\beta }_{0}={\alpha }_{0}{R}_{0}/\overline{k}\), to obtain the different values of *R*_{0}. The mutation rate *σ* is specified in the relevant figure panels panel. In the results presented in the main text we employ *α*-mutations, and set *β* = *β*_{0} unchanged. This is complemented in Supplementary Section 3, where we examine *β*-mutations under fixed *α* = *α*_{0}. In each scenario we set the initial condition to *η*(*t* = 0) = 0.02.

### Phase-diagram

To construct the phase-diagrams in Figs. 2 and 3 we varied *R*_{0} ∈ (0, 1.5) and *σ* ∈ (10^{−3}, 10), amounting to a total of 1050 distinct epidemiological scenarios, as characterized by *α*_{0}, *β*_{0} and *σ*. For each of these 1050 scenarios we ran 50 independent stochastic realizations, and measured the fraction *P* that resulted in *r*_{∞} > *ϵ*; setting *ϵ* = 0.2. If the majority of realizations under a specific *R*_{0}, *σ* failed to spread (*r*_{∞} < *ϵ*) we have *P* → 0, and yet if most reached pandemic levels (*r*_{∞} > *ϵ*) then *P* → 1.

### Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

## Data availability

Data for analyzing and extracting the COVID-19 parameters is available at https://github.com/heibaihe/EpidemicSpreadingUnderMutation.

## Code availability

All code to study, reproduce and improve the results shown here is freely available at https://github.com/heibaihe/EpidemicSpreadingUnderMutation; https://doi.org/10.5281/zenodo.7092756.

## References

Rouzine, I. M., Rodrigo, A. & Coffin, J. M. Transition between stochastic evolution and deterministic evolution in the presence of selection: general theory and application to virology.

*Microbiol Mol. Biol. Rev.***65**, 151–185 (2001).Nowak, M. A. Evolutionary dynamics: exploring the equations of life. Harvard university press (2006).

Blythe, R. A. & McKane, A. J. Stochastic models of evolution in genetics, ecology and linguistics.

*J. Stat. Mech.: Theory Exp.***2007**, P07018 (2007).Neher, R. A. & Walczak, A. M. Progress and open problems in evolutionary dynamics. arXiv preprint, arXiv:1804.07720 (2018).

Pastor-Satorras, R., Castellano, C., Van Mieghem, P. & Vespignani, A. Epidemic processes in complex networks.

*Rev. Mod. Phys.***87**, 925 (2015).Rüdiger, S., Plietzsch, A., Sagués, F., Sokolov, I. M. & Kurths, J. Epidemics with mutating infectivity on small-world networks.

*Sci. Rep.***10**, 1–11 (2020).Mehdaoui, M., A review of commonly used compartmental models in epidemiology. arXiv preprint, arXiv:2110.09642 (2021).

Barzel, B. & Biham, O. Stochastic analysis of complex reaction networks using binomial moment equations.

*Phys. Rev. E***86**, 031126 (2012).Hufnagel, L., Brockmann, D. & Geisel, T. Forecast and control of epidemics in a globalized world.

*Proc. Natl Acad. Sci. USA***101**, 15124–15129 (2004).Colizza, V., Barrat, A., Barthélemy, M. & Vespignani, A. The role of the airline transportation network in the prediction and predictability of global epidemics.

*Proc. Natl Acad. Sci. USA***103**, 2015–2020 (2006).Balcan, D. et al. Multiscale mobility networks and the spatial spreading of infectious diseases.

*Proc. Natl Acad. Sci. USA***106**, 21484–21489 (2009).Brockmann, D. & Helbing, D. The hidden geometry of complex, network-driven contagion phenomena.

*Science***342**, 1337–1342 (2013).Liu, Q. et al. Measurability of the epidemic reproduction number in data-driven contact networks.

*Proc. Natl Acad. Sci. USA***115**, 12680–12685 (2018).Eigen, M. Self-organization of matter and the evolution of biological macromolecules.

*Naturwissenschaften***58**, 465–523 (1971).Nowak, M. A. What is a quasispecies?

*Trends Ecol. evolution***7**, 118–121 (1992).Iwasa, Y., Michor, F. & Nowak, M. A. Evolutionary dynamics of escape from biomedical intervention.

*Proc. R. Soc. Lond. Ser. B: Biol. Sci.***270**, 2573–2578 (2003).Iwasa, Y., Michor, F. & Nowak, M. A. Evolutionary dynamics of invasion and escape.

*J. Theor. Biol.***226**, 205–214 (2004).Regoes, R. R., Nowak, M. A. & Bonhoeffer, S. Evolution of virulence in a heterogeneous host population.

*Evolution***54**, 64–71 (2000).Lion, S. & Gandon, S. Spatial evolutionary epidemiology of spreading epidemics.

*Proc. R. Soc. B: Biol. Sci.***283**, 20161170 (2016).Bergstrom, C. T., McElhany, P. & Real, L. A. Transmission bottlenecks as determinants of virulence in rapidly evolving pathogens.

*Proc. Natl Acad. Sci.***96**, 5095–5100 (1999).Singanayagam, A. et al. Characterising viable virus from air exhaled by H1N1 influenza-infected ferrets reveals the importance of haemagglutinin stability for airborne infectivity.

*PLoS Pathog.***16**, e1008362 (2020).Liu, Y., Funk, S. & Flasche, S. The contribution of pre-symptomatic infection to the transmission dynamics of COVID-2019.

*Wellcome Open Res.***5**, 58 (2020).Gao, W., Lv, J., Pang, Y. & Li, M. Role of asymptomatic and pre-symptomatic infections in covid-19 pandemic.

*BMJ***375**, n2342 (2021).Maier, B. F. & Brockmann, D. Effective containment explains subexponential growth in recent confirmed COVID-19 cases in China.

*Science***368**, 742–746 (2020).Vespignani, A. et al. Modelling COVID-19.

*Nat. Rev. Phys.***2**, 279–281 (2020).teVrugt, M., Bickmann, J. & Wittkowski, R. Effects of social distancing and isolation on epidemic spreading modeled via dynamical density functional theory.

*Nat. Commun.***11**, 5576 (2020).Yang, H., Gu, C., Tang, M., Cai, S. & Lai, Y. Suppression of epidemic spreading in time-varying multiplex networks.

*Appl. Math. Model.***75**, 806–818 (2019).Zhai, Z., Long, Y., Tang, M., Liu, Z. & Lai, Y. Optimal inference of the start of COVID-19.

*Phys. Rev. Res.***3**, 013155 (2021).Dong, E., Du, H. & Gardner, L. An interactive web-based dashboard to track COVID-19 in real time.

*Lancet Infect. Dis.***20**, 533–534 (2020).Hadfield, J. et al. Nextstrain: real-time tracking of pathogen evolution.

*Bioinformatics***34**, 4121 (2018).Yao, H. et al. Patientderived sars-cov-2 mutations impact viral replication dynamics and infectivity in vitro and with clinical implications in vivo.

*Cell Discov.***6**, 76 (2020).Volz, E. et al. Assessing transmissibility of sars-cov-2 lineage b. 1.1. 7 in England.

*Nature***593**, 266 (2021).Davies, N. G. et al. Estimated transmissibility and impact of sars-cov-2 lineage b. 1.1. 7 in England, Science 372 (2021).

Coutinho, R. M. et al. Model-based evaluation of transmissibility and reinfection for the p. 1 variant of the sars-cov-2.

*Commun. Med.***1**, 48 (2021).Boccaletti, S. et al. Explosive transitions in complex networks? structure and dynamics: percolation and synchronization.

*Phys. Rep.***660**, 1–94 (2016).D’Souza, R. M., Gómez-Garden¨es, J., Nagler, J. & Arenas, A. Explosive phenomena in complex networks[J].

*Adv. Phys.***68**, 123–223 (2019).Weitz, J. S., Park, S. W., Eksin, C. & Dushoff, J. Awareness-driven behavior changes can shift the shape of epidemics away from peaks and toward plateaus, shoulders, and oscillations.

*Proc. Natl Acad. Sci. USA***117**, 32764–32771 (2020).Arroyo-Marioli, F., Bullano, F., Kucinskas, S. & Rondón-Moreno, T. C. Tracking R of COVID-19: A new real-time estimation using the Kalman filter.

*PloS One***16**, e0244474 (2021).Zhang, X. et al. A spatial vaccination strategy to reduce the risk of vaccine-resistant variants (preprint), EuropePMC ID: ppcovidwho-291508 (2021).

Silander, O. K., Tenaillon, O. & Chao, L. Understanding the evolutionary fate of finite populations: the dynamics of mutational effects.

*PLoS Biol.***5**, e94 (2007).Krakauer, D. C. & Plotkin, J. B. Redundancy, antiredundancy, and the robustness of genomes.

*Proc. Natl Acad. Sci. USA***99**, 1405–1409 (2002).Elena, S. F., Wilke, C. O., Ofria, C. & Lenski, R. E. Effects of population size and mutation rate on the evolution of mutational robustness.

*Evolution***61**, 666–674 (2007).Jiang, X. et al. Impacts of mutation effects and population size on mutation rate in asexual populations: a simulation study.

*BMC Evol. Biol.***10**, 298 (2010).Mancastroppa, M., Burioni, R., Colizza, V. & Vezzani, A. Active and inactive quarantine in epidemic spreading on adaptive activity-driven networks.

*Phys. Rev. E***102**, 020301 (2020).Yan, X., Zou, Y. & Li, J. Optimal quarantine and isolation strategies in epidemics control.

*World J. Model. Simul.***3**, 202–211 (2007).Yan, X. & Zou, Y. Optimal and sub-optimal quarantine and isolation control in SARS epidemics.

*Math. computer Model.***47**, 235–245 (2008).Small, M. & Tse, C. K. Small world and scale free model of transmission of SARS.

*Int. J. Bifurc. Chaos***15**, 1745–1755 (2005).Biebricher, C. & Eigen, M. The error threshold.

*Virus Res*.**107**, 117–127 (2005).Leigh, J. E. G. Natural selection and mutability.

*Am. Naturalist***104**, 301–305 (1970).Andre, J. B. & Godelle, B. The evolution of mutation rate in finite asexual populations.

*Genetics***172**, 611–626 (2006).Drake, J. W. A constant rate of spontaneous mutation in DNA-based microbes.

*Proc. Natl Acad. Sci. USA***88**, 7160–7164 (1991).Woodcock, G. & Higgs, P. G. Population evolution on a multiplicative single-peak fitness landscape.

*J. Theor. Biol.***179**, 61–73 (1996).Orr, H. A. The rate of adaptation in asexuals.

*Genetics***155**, 961–968 (2000).Rambaut, A., Posada, D., Crandall, K. A. & Holmes, E. C. The causes and consequences of HIV evolution.

*Nat. Rev. Genet***5**, 52–61 (2004).Fryer, H. R. et al. Modelling the evolution and spread of HIV immune escape mutants.

*PLoS Pathog.***6**, e1001196 (2010).Rosenberg, W. Mechanisms of immune escape in viral hepatitis.

*Gut***44**, 759–764 (1999).Hartfield, M. & Alizon, S. Within-host stochastic emergence dynamics of immune-escape mutants.

*PLoS computational Biol.***11**, e1004149 (2015).Harvey, W. T. et al. SARS-CoV-2 variants, spike mutations and immune escape.

*Nat. Rev. Microbiol.***19**, 409–424 (2021).Weigang, S. et al. Within-host evolution of SARS-CoV-2 in an immunosuppressed COVID-19 patient as a source of immune escape variants.

*Nat. Commun.***12**, 1–12 (2021).Li, Q. et al. Early transmission dynamics in Wuhan, China, of novel Coronavirus-infected pneumonia.

*N. Engl. J. Med.***382**, 1199 (2020).Ferguson, N. M. et al. Impact of Non-Pharmaceutical Interventions (npis) to Reduce COVID-19 Mortality and Health-Care Demand. (Imperial College COVID-19 Response Team, 2020).

WHO. Coronavirus Disease (COVID-2019) Situation Report 30. (2020).

Ferretti, L. et al. Quantifying SARS-CoV-2 transmission suggests epidemic control with digital contact tracing.

*Science***368**, 6936 (2020).Backer, J. A., Klinkenberg, D. & Wallinga, J. Incubation period of 2019 novel Coronavirus (2019-ncov) infections among travelers from Wuhan, China, 20-28 January 2020.

*Eurosurveillance***25**, 2000062 (2020).Linton, N. M. et al. Incubation period and other epidemiological characteristics of 2019 novel Coronavirus infections with right truncation: a statistical analysis of publicly available case data.

*J. Clin. Med.***9**, 538 (2020).Tao, Y. et al. High incidence of asymptomatic SARS-CoV-2 infection, Chongqing, China. medRxiv https://doi.org/10.1101/2020.03.16.20037259 (2020).

Mizumoto, K., Kagaya, K., Zarebski, A. & Chowell, G. Estimating the asymptomatic proportion of Coronavirus disease 2019 (COVID-19) cases on board the Diamond Princess cruise ship, Yokohama, Japan, 2020.

*Eurosurveillance***25**, 2000180 (2020).Pan, X. et al. Asymptomatic cases in a family cluster with SARS-CoV-2 infection.

*Lancet Infect. Dis.***20**, 410 (2020).Lu, X. et al. SARS-CoV-2 infection in children.

*N. Engl. J. Med.***382**, 1663–1665 (2020).Al-Tawfiq, J. A. Asymptomatic coronavirus infection: MERS-CoV and SARS-CoV-2 (COVID-19).

*Travel Med. Infect. Dis.***35**, 101608 (2020).Bar-On, Y. M., Flamholz, A., Phillips, R. & Milo, R. SARS-CoV-2 (COVID-19) by the numbers.

*eLife***9**, e57309 (2020).Meidan, D. et al. Alternating quarantine for sustainable epidemic mitigation.

*Nat. Commun.***12**, 220 (2021).Ferguson, N. M., Galvani, A. P. & Bush, R. M. Ecological and immunological determinants of influenza evolution.

*Nature***422**, 428–433 (2003).Heesterbeek, H. et al. Modeling infectious disease dynamics in the complex landscape of global health.

*Science***347**, aaa4339 (2015).Grenfell, B. T. et al. Unifying the epidemiological and evolutionary dynamics of pathogens.

*Science***303**, 327–332 (2004).Lobinska, G., Pauzner, A., Traulsen, A., Pilpel, Y. & Nowake, M. A. Evolution of resistance to COVID-19 vaccination with dynamic social distancing.

*Nat. Hum. Behav.***6**, 193–206 (2022).Gordo, I., Gomes, M. G. M., Reis, D. G. & Campos, P. R. A. Genetic diversity in the SIR model of pathogen evolution.

*PloS one***4**, e4876 (2009).Fudolig, M. & Howard, R. The local stability of a modified multi-strain SIR model for emerging viral strains.

*PloS one***15**, e0243408 (2020).Gubar, E., Taynitskiy, V. & Zhu, Q. Optimal control of heterogeneous mutating viruses.

*Games***9**, 103 (2018).Rella, S. A., Kulikova, Y. A., Dermitzakis, E. T. & Kondrashov, F. A. Rates of SARS-CoV-2 transmission and vaccination impact the fate of vaccine-resistant strains.

*Sci. Rep.***11**, 15729 (2021).Cele, S. et al. SARS-CoV-2 prolonged infection during advanced HIV disease evolves extensive immune escape.

*Cell host microbe***30**, 154–162 e5 (2022).Baumgarte, S. et al. Investigation of a limited but explosive COVID-19 outbreak in a German secondary school.

*Viruses***14**, 87 (2022).Walker, A. et al. Characterization of Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) infection clusters based on integrated genomic surveillance, outbreak analysis and contact tracing in an urban setting.

*Clin. Infect. Dis.***74**, 1039–1046 (2022).Yeh, T. Y. & Contreras, G. P. Viral transmission and evolution dynamics of SARS-CoV-2 in shipboard quarantine.

*Bull. World Health Organ.***99**, 486 (2021).Tonkin-Hill, G. et al. Patterns of within-host genetic diversity in SARS-CoV-2.

*Elife***10**, e66857 (2021).Lythgoe, K. A. et al. SARS-CoV-2 within-host diversity and transmission.

*Science***372**, eabg0821 (2021).Bonhoeffer, S. & Nowak, M. A. Mutation and the evolution of virulence.

*Proc. R. Soc. Lond. Ser. B: Biol. Sci.***258**, 133–140 (1994).Ledford, H. Hundreds of COVID trials could provide a deluge of new drugs.

*Nature***603**, 25–27 (2022).Hacohen, A., Cohen, R., Efroni, S., Bachelet, I. & Barzel, B. Distribution equality as an optimal epidemic mitigation strategy.

*Sci. Rep.***12**, 10430 (2022).

## Acknowledgements

X.Z. thanks Dr. Xiaobo Chen, Dr. Tingting Shi, Dr. Xing Lu and Prof. Weirong Zhong for their fruitful discussions and support of the numerical simulations. This work was supported by the NNSF of China (grant No. 12105117; X.Z., and 12005079; M.Z.), the Fundamental Research Funds for Central Universities (grant No. 21621007; X.Z.), the Guangdong Basic and Applied Basic Research Foundation (grant No. 2022A1515010523; X.Z.), the Science and Technology Planning Project of Guangzhou (grant No. 202201010360; X.Z.), the funding for Scientific Research Startup of Jiangsu University (grant No. 4111710001; M.Z.), Jiangsu Specially-Appointed Professor Program (M.Z.), the Israel Science Foundation (grant No. 499/19; B.B.), the bi-national Israel-China ISF-NSFC joint research program (grant No. 3552/21; B.B.) and the Bar-Ilan University Data Science Institute grant for COVID-19 related research (B.B.).

## Author information

### Authors and Affiliations

### Contributions

All authors jointly designed the research. X.Z., B.B. and S.B. conducted the mathematical modeling and analysis; X.Z. and Z.R. performed the numerical simulations. X.Z., B.B. and S.B. were the lead writers of the paper.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

*Nature Communications* thanks Benjamin Althouse and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer review reports are available.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Zhang, X., Ruan, Z., Zheng, M. *et al.* Epidemic spreading under mutually independent intra- and inter-host pathogen evolution.
*Nat Commun* **13**, 6218 (2022). https://doi.org/10.1038/s41467-022-34027-9

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41467-022-34027-9

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.