Infectious Disease Dynamics
Epidemics, endemic equilibria, and the coevolution of hosts and parasites
A Brief History
Compartmental Models
The mathematical study of infectious disease dynamics began with Kermack and McKendrick's landmark 1927 paper, which introduced the first rigorous compartmental model. Rather than tracking individual infections, they divided populations into discrete epidemiological compartments and described the flows between them. This approach proved so powerful that variants remain standard tools in public health and evolutionary biology today.
The simplest and most famous model is the SIR model, which divides the population into three classes:
- S (Susceptible): individuals who can catch the disease
- I (Infectious): infected individuals who can transmit the disease
- R (Recovered): individuals with immunity, who cannot be reinfected
The model assumes homogeneous mixing (all individuals equally likely to contact any other), no demography (constant population), and two key rates: transmission rate β (contacts per infected per unit time that result in transmission) and recovery rate γ (rate at which infected individuals recover).
$$\frac{dS}{dt} = -\beta SI$$
$$\frac{dI}{dt} = \beta SI - \gamma I$$
$$\frac{dR}{dt} = \gamma I$$
where $S, I, R$ are proportions (or absolute numbers) in each compartment. The term $\beta SI$ represents the rate of new infections (proportional to the product of susceptible and infectious individuals). The term $\gamma I$ represents recovery. Note that $\frac{d(S+I+R)}{dt} = 0$, so the total population is conserved.
A related model is the SIS model, appropriate for diseases without lasting immunity (e.g. common cold, gonorrhea). Here, recovered individuals return to the susceptible class:
$$\frac{dS}{dt} = -\beta SI + \gamma I, \quad \frac{dI}{dt} = \beta SI - \gamma I$$In the SIS model, the disease either dies out or persists at an endemic equilibrium with a constant number of infected individuals. The SIR model, by contrast, shows epidemic waves followed by the disease dying out (in the absence of demography or reinfection).
The Basic Reproduction Number $R_0$
One of the most important quantities in epidemiology is the basic reproduction number, denoted $R_0$ (or sometimes $\mathcal{R}_0$). It represents the expected number of secondary infections caused by a single infectious individual in a population of entirely susceptible hosts.
For the SIR model, $R_0$ has a simple form. An infected individual remains infectious for an average duration $1/\gamma$, during which they cause infection at rate $\beta S$. When the entire population is susceptible, $S \approx 1$ (in units where the population is normalized), so:
$$R_0 = \frac{\beta}{\gamma}$$
Interpretation: The transmission rate β (contacts per infected per time) multiplied by the duration of infectiousness 1/γ.
Threshold Theorem: An epidemic occurs if and only if $R_0 > 1$.
- If $R_0 > 1$: the disease spreads (epidemic phase)
- If $R_0 < 1$: the disease dies out
- If $R_0 = 1$: the system is at a critical threshold
The threshold theorem is intuitive: if each infected person infects more than one other person on average, the disease can spread through the population. If fewer than one, the disease eventually runs out of susceptible hosts to infect.
Common estimates of $R_0$ for real diseases show the power of this concept: Measles (~12-18), COVID-19 (~2-6, depending on variant), Influenza (~1-2), Ebola (~1.5-2).
Herd Immunity
Vaccination reduces the susceptible fraction of the population. If a fraction $p$ of the population is vaccinated (and therefore immune), the proportion of susceptible individuals drops to $1-p$. The effective reproduction number in a partially vaccinated population is:
$$R_e = R_0(1-p)$$For the disease to be eliminated (or controlled), we need $R_e < 1$, which requires:
$$p > 1 - \frac{1}{R_0}$$This critical vaccination fraction is called the herd immunity threshold:
$$p_c = 1 - \frac{1}{R_0}$$Even unvaccinated individuals benefit: when enough others are immune, infected individuals encounter fewer susceptible contacts, reducing their ability to transmit. This phenomenon is called herd immunity or community immunity.
Examples:
- Measles ($R_0 \approx 15$): $p_c \approx 93\%$. This is why measles vaccination rates above 95% in some countries have nearly eliminated the disease.
- Polio ($R_0 \approx 5$): $p_c \approx 80\%$. Global vaccination campaigns have brought the world to the brink of polio eradication.
- COVID-19 ($R_0 \approx 3$): $p_c \approx 67\%$. This explains why public health measures aimed for vaccination rates above this threshold.
Herd immunity illustrates a key insight: individual vaccination protects one's self, but sufficient population-level vaccination protects everyone—even those who cannot be vaccinated due to age, allergy, or immunosuppression.
Endemic Equilibria
In the basic SIR model without demography, the disease eventually dies out and reaches an equilibrium with $I^* = 0$. However, many infections persist in human populations at low levels because new births continuously replenish the susceptible class. This leads to endemic equilibria.
Consider the SIR model with constant birth rate and death rate $\mu$ (assumed equal for population balance):
$$\frac{dS}{dt} = \mu - \beta SI - \mu S$$ $$\frac{dI}{dt} = \beta SI - \gamma I - \mu I$$ $$\frac{dR}{dt} = \gamma I - \mu R$$At equilibrium, $\dot{I} = 0$:
$$\beta S^* I^* = (\gamma + \mu) I^*$$If $I^* > 0$ (endemic equilibrium), this implies:
$$S^* = \frac{\gamma + \mu}{\beta}$$From the conservation law and the other equilibrium equations:
$$I^* = \frac{\mu(R_0 - 1)}{\beta}$$
where $R_0 = \beta / (\gamma + \mu)$ (note: the denominator includes mortality).
This equilibrium is stable and nonzero provided $R_0 > 1$. As $\mu \to 0$ (no death), the endemic equilibrium vanishes, and the system reverts to the SIR dynamics with eventual extinction.
The approach to endemic equilibrium is not monotonic. For many parameter values, the system exhibits damped oscillations: the infected prevalence overshoots the equilibrium, then gradually settles. These oscillations reflect a feedback loop: high prevalence reduces susceptibility, which causes prevalence to crash, which then allows susceptibility to rebuild, driving another cycle. Eventually, damping brings the system to the steady state.
Such oscillatory dynamics are observed in real childhood diseases like measles and pertussis, where seasonal forcing (e.g., school terms) can amplify natural oscillations into regular epidemics.
Explore: SIR Dynamics
Host–Parasite Coevolution
Infection is not a one-way street. As parasites evolve to exploit host defences, hosts evolve immune systems to resist parasites. This reciprocal evolutionary arms race, termed Red Queen dynamics by Leigh Van Valen (after the Alice in Wonderland character who must run constantly just to stay in place), drives perpetual cycling in parasite virulence and host resistance.
In a simple model with two host genotypes (resistant and susceptible) and two parasite genotypes, frequency-dependent selection creates cycles: a parasite type spreads because it infects the currently common host type, but as it increases, selection favours hosts that resist it, eventually driving that parasite to rarity. Meanwhile, the opposite parasite type, which could not spread before, now increases because it infects the newly common resistant hosts. This leads to a perpetual oscillation in both parasite and host frequencies.
In multi-host, multi-parasite systems with sufficient genetic complexity, allele frequencies often show chaotic or cyclical trajectories with no stable equilibrium. Rather than reaching a fixed state, populations are locked in perpetual evolutionary change. This has important implications for disease control: a pathogen that is today's concern may be naturally outcompeted by changing host resistance, only to re-emerge as hosts adapt to resist the current dominant strain.
Recent theoretical work has shown that chaotic coevolutionary dynamics are possible even in relatively simple systems. Studies by Schenk, Traulsen & Gokhale (2017) demonstrated "Chaotic provinces in the kingdom of the Red Queen" (J. Theor. Biol., 431, 1–10), where the phase space of host-parasite systems contains regions of deterministic chaos alongside regions of cyclic oscillation. Song, Gokhale, Papkou, Schulenburg & Traulsen (2015) further showed that Red Queen dynamics are sensitive to whether population sizes are held constant or allowed to fluctuate, with variable population sizes substantially altering the coevolutionary outcome.
These findings have practical implications for epidemiology: pathogen evolution is not merely driven by selection against human immunity, but by complex feedback between host genetic variation, parasite genetic diversity, and the structure of who interacts with whom. This explains why some diseases cycle predictably (measles, with its well-known interannual epidemics) while others (influenza, with its constant antigenic drift) show less structured patterns.
Evolution of Virulence
A natural question arises: why are some parasites devastating while others are mild? The answer involves a profound trade-off between transmission and virulence.
Consider that virulence—the reduction in host fitness caused by infection—is often directly linked to parasite load and reproduction. A more aggressive parasite replicates faster, causing more damage but also releasing more transmission propagules (spores, offspring, etc.). Conversely, a benign parasite takes longer to kill its host, allowing more opportunities for transmission, but each contact transmits fewer parasites.
Anderson and May (1982) formalized this in their seminal Parasitology paper, showing that the basic reproduction number $R_0$ depends on both transmission rate $\beta$ and virulence $\alpha$:
$$R_0(\alpha) = \beta(\alpha) \cdot \frac{1}{\alpha + \gamma}$$where $\beta(\alpha)$ is an increasing function (higher virulence → more transmission) and the denominator reflects that virulence $\alpha$ reduces host survival time. The optimal virulence $\alpha^*$ maximizes $R_0$, balancing the benefit of faster transmission against the cost of killing the host too quickly. This predicts intermediate virulence as an evolutionary equilibrium— neither avirulent nor maximally deadly.
The coevolutionary perspective reviewed by Buckingham & Ashby (2022, J. Evol. Biol.) extends this by considering how host resistance genetics feed back onto parasite evolution. When hosts evolve resistance, selection pressure on parasites shifts: a parasite that was optimally virulent when hosts were mostly susceptible becomes suboptimal when host resistance increases. The parasite must either evolve higher virulence (greater transmission to overcome host barriers) or face reduction in $R_0$. This creates a tension: the host's resistance arms race pushes the parasite toward higher virulence, while the parasite's transmission-virulence trade-off pulls it toward moderation. The outcome is a complex adaptive landscape with moving optima—a hallmark of coevolutionary dynamics.
Real examples illustrate both patterns:
- Myxoma virus in rabbits: When introduced to Australia, the virus was highly virulent. Over decades, less virulent strains increased in frequency because they allowed longer survival and transmission. Simultaneously, rabbits evolved resistance. Today, the system persists in a quasi-equilibrium of intermediate virulence and intermediate resistance.
- Antimicrobial resistance: Bacteria under antibiotic selection often evolve resistance genes, which typically carry a fitness cost in the absence of antibiotics. The trade-off between resistance and replication generates diversity, with the most transmissible resistant strains eventually dominating.
Exercises
Conceptual Questions
- Explain the basic reproduction number $R_0$ and why the epidemic threshold is $R_0 = 1$. What does $R_0 > 1$ versus $R_0 < 1$ mean biologically?
- In the SIR model, the disease eventually dies out even if $R_0 > 1$. Why? What does this imply about herd immunity and vaccination thresholds?
- The SIS model exhibits endemic equilibrium while the SIR model does not. Explain the biological difference and why recovered individuals cannot contract the disease again in SIR.
- What is the exposed class $E$ in the SEIR model and why is it important for diseases like COVID-19 or measles? How does the latent period affect epidemic dynamics?
- Describe the difference between density-dependent and frequency-dependent transmission. For which infectious diseases is each assumption more appropriate?
Computer Problems
- SIR Model with Variable $R_0$. Implement the SIR model with $\frac{dS}{dt} = -\beta SI$, $\frac{dI}{dt} = \beta SI - \gamma I$, $\frac{dR}{dt} = \gamma I$. Use $N = 10000$, $\gamma = 0.1$ (recovery rate), and vary $\beta$ to produce $R_0 = 0.5, 1.5, 3.0$. Plot $S(t)$, $I(t)$, and $R(t)$ for each and compute the final attack rate (fraction infected).
- Epidemic Threshold and Herd Immunity. For the SIR model with $R_0 = 2.5$, compute the herd-immunity threshold $H = 1 - 1/R_0$. Simulate vaccination strategies by removing fraction $v$ of susceptibles before the outbreak. Plot the peak infections and total attack rate versus vaccination coverage and confirm that $v \geq H$ prevents epidemics.
- SEIR Model for COVID-like Transmission. Implement the SEIR model with $\frac{dS}{dt} = -\beta SI$, $\frac{dE}{dt} = \beta SI - \sigma E$, $\frac{dI}{dt} = \sigma E - \gamma I$, $\frac{dR}{dt} = \gamma I$. Use $\sigma = 1/5$ (5-day latency) and $\gamma = 1/10$ (10-day infection). Explore how the latent period affects peak time and magnitude.
- SIS Endemic Equilibrium and Stability. For the SIS model $\frac{dI}{dt} = \beta I(N-I) - \gamma I$, derive and plot the endemic equilibrium $I^* = N(1 - \gamma/\beta)$ versus $\beta$ with $\gamma = 0.1$ and $N = 1000$. Verify stability by perturbing from equilibrium and confirming convergence.
- Pathogen Virulence Evolution Under Treatment. Model $R_0(v) = \beta(v)/(\gamma + \mu(v))$ where virulence $v$ trades off transmission $\beta(v) = \beta_0(1 + av)$ against host mortality $\mu(v) = \mu_0 + cv$. With treatment (increased $\gamma$), plot how the optimal virulence $v^*$ maximising $R_0$ changes. Show antibiotic/antiviral use can select for higher virulence.
References
- Kermack, W. O. & McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proc. R. Soc. Lond. A, 115, 700–721.
- Anderson, R. M. & May, R. M. (1982). Coevolution of hosts and parasites. Parasitology, 85, 411–426.
- Schenk, H., Traulsen, A. & Gokhale, C. S. (2017). Chaotic provinces in the kingdom of the Red Queen. J. Theor. Biol., 431, 1–10.
- Song, Y., Gokhale, C. S., Papkou, A., Schulenburg, H. & Traulsen, A. (2015). Host-parasite coevolution in populations of constant and variable size. BMC Evol. Biol., 15, 212.
- Buckingham, L. J. & Ashby, B. (2022). Coevolutionary theory of hosts and parasites. J. Evol. Biol., 35, 205–224.
- May, R. M. & Anderson, R. M. (1983). Epidemiology and genetics in the coevolution of parasites and hosts. Proc. R. Soc. Lond. B, 219, 281–313.