Tradeoff between speed and infectivity in pathogen evolution

Given the present pandemic and the constantly arising new variants of SARS-CoV-2, there is an urgent need to understand the factors driving disease evolution. Here, we investigate the tradeoff between the speed at which a disease progresses and its reproductive number. Using SEIR and agent-based models, we show that in the exponential growth phase of an epidemic, there will be an optimal duration of new disease variants, balancing the advantage of developing fast with the advantage of infecting many new people. In the endemic state this optimum disappears, and lasting longer is always advantageous for the disease. However, if we take into account the possibility of quarantining the infected, this leads to a new optimum disease duration emerging. This work thereby comments on the observation of ever shorter generation times in the evolution of variants of SARS-CoV-2 from the original strain to the Alpha, Delta, and ﬁnally Omicron variants.


Introduction
Since the emergence of SARS-CoV-2, multiple variants of the virus with faster transmission dynamics have arisen.The variants have supplanted each other in successive waves, with variants with ever higher transmission rates and/or faster generation times winning over older, slower variants.Since we are in the midst of this evolutionary race it is necessary to understand what drives new successful variants.
In this article, we will focus on the tradeoff between the duration of the latent and infectious periods on one hand, and the number of secondary cases that each infected individual has time to generate on the other.We assume that each infected individual transmits the disease with a roughly constant rate for each day of the infectious period.This means that a long disease duration should lead to a higher effective reproductive number, R e , that is, to more secondary infections.However, a long disease duration might also be a disadvantage to the disease, as it may be associated to a long latency and thereby a slow epidemic progression.This is exacerbated if we simply assume a proportional relation between the duration of latency time and its infectious period.There is some evidence to indicate that such a relationship exists in nature.We will derive relations and create an agent-based model to show when an optimum disease duration exists.Some work has already been done on modelling the evolution of the infection profile of SARS-CoV-2 and other similar pathogens.Saad-Roy et al. studied the evolution of a presymptomatic infectious state under the assumption that such a state is less infectious 1 , or in the context of superinfection and within-host competition 2 .In addition, the relationship between the duration of a disease or parasite infection and the infection rate has been studied under the assumption of a tradeoff between the two given by some functional relationship 3,4 .Analogue studies have been done on other ecological relationships, such as predation 5,6 .Porco et al. 7 investigated the effect of treatment and other interventions on disease evolution under the assumption of a similar tradeoff.Finally, Park et al. 8 have studied the interplay between disease infectivity and speed with a focus on mitigation rather than evolution.However, the possibility that a long infectious period might simultaneously be an evolutionary advantage and a disadvantage for a disease has not been studied in detail.

Model setup
For simplicity we assume that the infection rate β of a disease is constant for the duration of the infectious period T , giving a linear relationship between disease duration and number of secondary cases.This is likely not entirely realistic 9,10 , but since a longer infectious period leads to more opportunities for passing on the infection, there must be some positive relationship between the two.
Throughout this article, we will be distinguishing between the latent and incubation periods of a disease.The latent period is the time from the initial infection until the patient becomes infectious, corresponding to the exposed state E of a susceptible-exposed-infectious-recovered (SEIR) model.As opposed to this, the incubation period is the time from infection until the onset of symptoms.
Analytically, we will exclusively consider the initial, exponential growth phase of the epidemic.In this phase, it will be an advantage for a disease to be fast-growing, i.e., to have a high exponential growth rate, whereas in a simulation of an entire epidemic using a simple SEIR model, the disease with the highest R 0 will always end up eventually generating a larger outbreak, barring the effects of cross-immunity.Apart from our analytical work, we will use such a model to numerically calculate the exponential growth rate under different conditions early in an epidemic.
In the case when a society is far from herd immunity, exponential growth will occur whenever a disease starts spreading.This has for example been the case for most countries early in the COVID-19 pandemic.Subsequently, mitigation efforts artificially kept society far from herd immunity for a long period, meaning that whenever R e grew above 1 and the disease started spreading, we saw exponential growth again.Accordingly, our first scenario is not as limited as one might naively think.
When considering the evolution of the disease in an endemic state with a high degree of existing immunity in the population, we instead use an agent-based model.In this model, agents randomly infect each other, with some small probability of producing a mutant strain.A new mutant will have a recovery rate γ = 1/T that is slightly different from its parent strain.We will then run the simulation over an evolutionary timescale to see which strains end up dominating.To make the endemic state possible, we allow agents to lose immunity with a rate ω.
Finally, we add a quarantine rate p to the agent-based model.This is supposed to represent how individuals have some chance of becoming symptomatic, being contact traced, or otherwise being diagnosed for each day of illness.We should therefore expect that people suffering from a very long-lasting infectious disease will eventually self-quarantine.

Optimum disease duration for exponential growth
We will start our treatment of the tradeoff of disease duration in the exponentially growing phase of the epidemic by writing up the equations of a basic SEIR-model: Figure 1.A simple simulation of the initial exponential growth phase of an epidemic given different disease durations T .We see that up to a certain optimum, the disease grows faster for longer durations, but afterwards a longer infectious period leads to slower exponential growth.This illustrates the analytically derived growth rate shown in Fig. 2. Here, β = 1 and c = 1.
Here, S, E, I, and R are susceptible, exposed (but noninfectious), infectious, and recovered compartments respectively.β is the infection rate per day, τ is the average duration of the pre-infectious exposed period, and T is the duration of the infectious period.We here take the total population of the system to be fixed at N = 1.
In the exponential growth phase of an epidemic, we can find the growth rate by linearising the system of equations around the disease-free equilibrium.The epidemic growth rate r is now the largest eigenvalue of the Jacobian: where T is measured in days and r thus is the daily growth rate 11 .R 0 is the basic reproductive number of the disease, and is equal to β T .We have here used the assumption that there is some constant relationship between the duration of the infectious and exposed periods, meaning that we can write τ = cT .This function has a maximum for A plot of growth rate as a function of disease duration T as simulated, compared with the growth rate derived in Eq. 5. Here, we set β = 1 per day.One observes that the growth rate has a maximum at duration T = (c+1+2 (equal to 4 for c = 1 and 5.48 for c = 10) when using the expression derived theoretically.However, this varies when changing the shape factor k of the probability distribution function of the duration of latent and infectious periods.
Only the positive branch is a physical solution, as the negative branch yields negative disease durations.
In the exponential growth phase, the variant with the highest growth rate will quickly come to dominate.An illustration of this phase for different disease durations can be seen in Fig. 1, while a plot of the growth rate as a function of T for various values of β , c, and k is shown in Fig. 2. k is here the shape factor of the latency time distribution, whose importance we will further investigate below.It can be seen here that the exponential growth rate has a clear optimum for c = 1, and that there is a good fit between our analytical and numerical calculations for k = 1.When increasing c, the maximum growth rate decreases strongly, and the optimum becomes less clear.
In the equation for r derived above, it is assumed that the probability distribution function for the duration of the latency times and infectious periods of each individual is an exponential distribution.We wish to explore how using an alternative distribution affects the location and height of the peak in exponential growth rate.We do this numerically by solving the SEIR equations in the early phase of the epidemic for a variety of values of c and with a Gamma distributed latent and infectious period.The shape factor k of the Gamma distribution is then varied.k is a measure of how sharply peaked the distribution is, with the coefficient of variation being equal to 1/ √ k.Thus, a larger k means that the distribution is more sharply peaked.Some examples of the effect of varying k are shown in Fig. 2, while the full overview of these calculations can be seen in Fig. 3.
Here, we see that the maximal daily growth rate decreases monotonically when c grows, which is reasonable as this means that the latent period gets longer.On the other hand, increasing k, i.e., making the distribution of latency times more sharply peaked, only leads to a moderate decrease in growth rate.Fig. 3 (b) shows that the value of T which maximises growth rate r depends relatively weakly on c.However, it varies strongly with k.At low c, T max decreases with increasing k.Surprisingly, at c between 1 and 10, T max first drops and then increases with increasing k.That is, in this region the more sharply peaked the distribution of latency times, the longer the optimal disease duration will be.The reason for this may be the fact that for high k, the PDF of infectious periods will no longer have a long tail, representing individuals who remain infectious for a long time.Without these individuals, the spread of the disease may be severely hampered by a shorter duration of the infectious period.This is equal to the predictions from Eq. ( 5) for k = 1 and drops as k increases, though for c > 1 there is a minimum value which is reached at k between 1 and 5. β is here taken to be 1.
In a situation where the disease is growing exponentially, e.g., when an epidemic is breaking out or control measures are failing, the variants that balance the need to be fast with the need to spread to many people will win on the short term as illustrated in Figs. 1 and 2. This is, however, only the case for a short period during an epidemic.We will now turn our attention to the much more long-lived endemic state.

The endemic state
At the endemic state, whether there is an optimum disease duration or not turns out to depend on whether infectious individuals can be quarantined.In the case where the epidemic is completely unmitigated (quarantine rate p = 0) and infectious individuals are never quarantined, it will always be possible to increase the infectivity of the disease by lengthening disease duration.We therefore expect there to be no optimum disease duration, and longer-lived variants should always replace shorter-lived ones.
We investigate this using an agent-based simulation, as described in the model setup section.The results are illustrated in Fig. 4. The figure shows how the value of the recovery rate γ of the dominant variant of the pathogen evolves over time for varying values of p and ω.
From our agent-based simulations one sees that the successfully invading variants indeed develop lower and lower recovery rates γ, that is, longer and longer disease durations T .Thus, an infinitely long disease duration is favourable if people are never quarantined (p = 0).The unmitigated case corresponds to the graph for p = 0 in Fig. 4 (a).Therefore, we conclude that a pathogen in an unmitigated endemic state will always evolve to last longer.In practice, one should nearly always expect some sort of mitigation, which then demands special consideration.
Consider therefore the case when each infectious, symptomatic individual has a finite probability p of isolating themselves starting at any day during the infectious period.The results shown in Fig. 4 show that there will be an optimum disease duration, as we see that the γ-value of the dominant variant eventually settles down at a steady-state value, as opposed to the case where p = 0.This steady-state value appears to depend little on the exact value of the quarantine rate p (Fig. 4 (a)) or the immunity loss rate ω (Fig. 4 (b)), as long as p > 0.
We wish to ensure that the apparent steady-state value of γ which the variants approach over time is in fact an evolutionarily stable strategy and not simply an artifact of the simulation.To this end, we have tried for different immunity loss rates ω with p = 0.1/day.β is here set to 0.5 and c = 1.We see that when people are able to self-quarantine, the variants gradually evolve towards some evolutionarily stable state, whereas this does not appear to be the case if there is no quarantine.
to start out the simulation with longer disease duration (lower γ) than the apparently stable value (plot not shown).In the mitigated case (p > 0), the pathogen will now evolve towards shorter disease duration, as opposed to the case without mitigation.Therefore we conclude that for diseases where infected individuals have a tendency to isolate themselves there should be an evolutionarily optimal disease duration.

Discussion
Our analysis illustrates that being fast-acting can be an evolutionary advantage for a pathogen, even if it comes at the cost of a lower reproduction number.This includes situations where the number of infected is growing exponentially, and situations where the infectious individuals tend to isolate themselves as their disease progresses.These situations are expected to occur for a number of real life epidemic or endemic situations.
For example, during the COVID-19 pandemic mitigation efforts in various locations often kept the local R e at or below 1.When such efforts failed or were relaxed, local epidemics entered a new exponential growth phase.In the case of most infections, we would also expect the onset of symptoms to increase the chance that individuals stay home or are bedridden, effectively self-quarantining.
These results are particularly interesting in the context of the COVID-19 pandemic as they may help explain the swift takeover and large impact of the Delta variant and subsequently the Omicron variant.The Delta variant has been shown to have a somewhat shorter incubation period and significantly shorter generation time than wild-type virus [12][13][14] .Hart et al. 15 measure a generation time of 4.6 days for the Delta variant and a 5.5 days for the Alpha variant.In comparison, Omicron was even faster, with a reported serial interval of only 2.2 days 16 .The analysis in Abbott et al. further supports the tendency of faster disease progression for the latter SARS-CoV-2 variant, although Pung et al. disputes whether generation times of Delta were in fact significantly lower than for the Alpha variant 17,18 .
The present work highlights the tradeoff between the reproductive number of a disease and its speed.It also points out that mitigation efforts may have an effect on the course of evolution of a pathogen.Previously, it has been shown that mitigation strategies may interact with pathogen evolution  1. Examples of estimated values of the duration of the E and I states, as well as other parameters of real-world infectious diseases.From these, we may calculate c and k. k incubation is the shape factor for a Gamma distribution which we fit approximately to the measured distributions of incubation times found in the cited literature.Latent and infectious periods are in days.Notice that we here show the k-values of the distributions of incubation periods as opposed to the latent periods, which we assume are similarly distributed.The incubation period is the time from infection to symptom onset, while the latent period is the time from infection to onset of infectiousness.
a As infectiousness begins four days before the onset of a rash, latency time is calculated as incubation period minus four days.b The cited study reports separate infectious periods for survivors and deceased patients.We have here calculated the average.c Incubation period is reported as 4.6 days.We here take the infectious period to last while at least 50 % of patients secrete measurable quantities of the virus.In that case, infectiousness begins on day five after the onset of symptoms and ends on day 17, yielding a latency time of 9.6 days.
by disproportionately affecting superspreaders, benefitting homogeneously spreading diseases 19 .Here, we show that a fast disease may be able to outcompete a slower, more infectious disease if symptomatic individuals are quarantined or if a new outbreak or relaxation of control measures cause a transient exponential rise in the number of infected individuals.Both mitigation efforts and exponential growth conditions may thus drive the pathogen to evolve towards a shorter disease duration.
With each new SARS-CoV-2 mutant, one has naturally observed changes in both generation time and infectiousness per time unit.The analysis presented here focuses on the time aspect while ignoring the obvious gain a disease may obtain by increasing its probability of infection per encounter.We found that the growth rates in the exponential growth phase of epidemics indeed seem to be optimal for rather short generation times, in accordance with the still faster SARS-CoV-2 variants.This overall tendency during 2020-2021 with still faster virus variants may of course be broken.Our simulations demonstrate that this would be likely if the pandemic reaches a more endemic state where slower variants of the disease gain in fitness, as mitigation and quarantine efforts are dropped.Even under the assumption of quarantine measures, the evolutionarily optimal strategy shifts to a much longer disease duration in the endemic state.
It should of course be noted that this analysis focuses mainly on pathogens like SARS-CoV-2, which are transmitted through social contact and act on a relatively short timescale.In the real world many other types of pathogens exist, and many diseases act on timescales far longer than those predicted here.This is for example true of sexually transmitted diseases such as syphilis and HIV which cause lifelong infection.When our model fails to predict this it may be explained by the fact that our model considers the simplified

7/12
. case where latency time is proportional to infection time, while real diseases may ultimately decouple these two aspects of pathogen dynamics in the body.Some models have attempted to take these dynamics into account.They have consequently predicted the existence of several "regimes" of disease duration, from extremely fast-acting childhood infections in situations with high contact rates to lifelong infections in low-contact situations 47 .
There is, however, some support for our assumption of a relationship between the duration of latency and infectious period.In table 1, we show a number of examples of latency times and infectious periods for various diseases, along with the shape parameter k of their incubation period distributions.We see that the value of c is most often of the order 1.Only for diseases requiring close contact for transmission such as rabies or syphilis does the duration of the E-state seem to decouple from the I-state.Interestingly, we see a large variation in how sharply peaked the incubation periods are, with k varying from < 5 in respiratory diseases such as SARS, COVID-19, and influenza, to 35 in smallpox.Given our results shown in Figs. 2 and 3, this should have a significant effect on the early course of epidemics of these diseases.
In this article we have shown that for the simplest possible assumption about the relationship between disease duration and infectivity, namely that infectious individuals transmit the infection at a constant rate and infectious period is proportional to latent period, there will be an optimal duration of the infectious period of diseases.If an epidemic is in the exponential growth phase, this optimal duration will be short, whereas it will be longer at the endemic state.These results may help explain some observed dynamics of emerging SARS-CoV-2 variants.In a wider perspective our considerations may also shed some light on the apparent division of infectious diseases into a group of quite fast diseases characterized by epidemic outbreaks, and another group which are slow with long latent periods and an endemic pattern of infection.

Methods
For our work on the initial exponential growth phase of the epidemic, we solve the SEIR model given by Eqs. ( 1)-(4) numerically.We do this by using a simple Euler integrator with a step size of dt = 0.001 day.We then integrate the model equations over T + τ days and compute the growth rate at the end of this interval.The parameter is varied by splitting the E and I states into k identical compartments of exponentially distributed durations.Thereby, a Gamma distribution with shape parameter k is obtained.We start the simulation with the same small population in all exposed and infectious compartments to avoid transient effects of disease progression.
In the agent-based model, agents are represented by numbers in a vector.The dynamics of the epidemic and evolution are simulated by the following algorithm: For each timestep • Pick N random agents, corresponding to the total population, for each of the following operations • If an agent is infectious, pick a random other agent -If this agent is healthy, it becomes exposed with a probability β -With some small probability p mut , the pathogen mutates upon infection, gaining a new latent and infectious period.Each mutation changes the value of the recovery rate γ and disease progression rate η by some percentage between −50 and 50 % • If an agent is exposed, it becomes infectious with probability η = 1/τ = 1 cT • If an agent is infectious, it recovers with probability γ = 1/T
• If an agent is recovered, it loses immunity with probability ω The simulation is run for some number of timesteps.At regular intervals, it is checked which variant is dominant.The γ-value of the dominant variant is then plotted in Fig. 4.

Materials & correspondence
Correspondence and material requests should be directed to Andreas Eilersen.

Figure 3 .
Figure 3. Growth rates and optimal disease durations as a function of c and k.(a) shows the maximal exponential growth rate r of an epidemic pathogen given different values of c and k.We see that growth rates are highest for low c and also decrease slightly with k.(b) shows the optimum disease duration T max .This is equal to the predictions from Eq. (5) for k = 1 and drops as k increases, though for c > 1 there is a minimum value which is reached at k between 1 and 5. β is here taken to be 1.

Figure 4 .
Figure 4. Evolution of variants over time.The figure shows the evolution of the recovery rate γ (i.e., the inverse disease duration) of new variants (a) for different quarantine probabilities p, with immunity loss rate set to ω = 0.01 and (b)for different immunity loss rates ω with p = 0.1/day.β is here set to 0.5 and c = 1.We see that when people are able to self-quarantine, the variants gradually evolve towards some evolutionarily stable state, whereas this does not appear to be the case if there is no quarantine.