Skip to main content
Evolution, Medicine, and Public Health logoLink to Evolution, Medicine, and Public Health
. 2024 Aug 27;12(1):248–259. doi: 10.1093/emph/eoae018

Diagnostic testing and the evolution of detection avoidance by pathogens

Jason Wood 1,, Ben Ashby 2,3,4
PMCID: PMC12079369  PMID: 40375892

Abstract

Diagnostic testing is a key tool in the fight against many infectious diseases. The emergence of pathogen variants that are able to avoid detection by diagnostic testing therefore represents a key challenge for public health. In recent years, variants for multiple pathogens have emerged which escape diagnostic testing, including mutations in Plasmodium falciparum (malaria), Chlamydia trachomatis (chlamydia) and SARS-Cov-2 (Severe acute respiratory syndrome coronavirus 2) (Coronavirus disease 2019). However, little is currently known about when and the extent to which diagnostic test escape will evolve. Here we use a mathematical model to explore how the frequency of diagnostic testing, combined with variation in compliance and efficacy of isolating, together drive the evolution of detection avoidance. We derive key thresholds under which a testing regime will (i) select for diagnostic test avoidance, or (ii) drive the pathogen extinct. Crucially, we show that imperfect compliance with diagnostic testing regimes can have marked effects on selection for detection avoidance, and consequently, for disease control. Yet somewhat counterintuitively, we find that an intermediate level of testing can select for the highest level of detection avoidance. Our results, combined with evidence from various pathogens, demonstrate that the evolution of diagnostic testing avoidance should be carefully considered when designing diagnostic testing regimes.

Keywords: disease surveillance, evolution, diagnostic test escape, public health

INTRODUCTION

Pathogens may evolve in response to human interventions, which presents a key challenge for public health policymakers. For example, pharmaceutical interventions such as antimicrobials or vaccines, can lead to the evolution of antimicrobial resistance (AMR) [1] or vaccine escape [2], respectively. Pathogen evolution can therefore have dramatic effects on the efficacy of public health interventions by hindering efforts to treat or prevent infections. Consequently, substantial efforts have been devoted to understanding how pathogens evolve in response to public health policies, especially pharmaceutical interventions, and devising optimal strategies to mitigate or constrain pathogen evolution [3].

While much attention has been paid to the impact of pharmaceutical interventions on pathogen evolution, non-pharmaceutical interventions (NPIs), such as diagnostic testing [4, 5] or reducing social mixing [6] may also affect pathogen evolution. For example, routine surveillance of Clostridium difficile in Costa Rica identified three variants which gave negative PCR test results, caused by deletion of the tcdC gene [7]. Similarly, in SARS-Cov-2 (Severe accute respiratory syndrome coronavirus 2), a deletion within the N gene can produce false-negative antigen tests [8, 9], and in Plasmodium falciparum, variants lacking the histidine-rich protein 2 (pfhrp2) and 3 (pfhrp3) genes have been identified following the introduction of rapid diagnostic tests targeting these antigens [5]. Similar patterns have been observed in STIs. In Chlamydia trachomatis, a variant with a 377 bp deletion has previously escaped diagnostic PCR testing [4, 10], and in Neisseria gonorrhoeae it has been shown that diagnostic escape could occur through a reversion in the gyrA allele (the gene encoding the A subunit of DNA gyrase) [11]. Pathogen evolution arising from NPIs therefore has the potential for significant adverse effects on public health responses for many pathogens, akin to the effects of pharmaceutical interventions. Detection avoidance arising from diagnostic testing is of particular concern. Without reliable diagnostics, patients may experience prolonged symptoms or unknowingly transmit the disease. Understanding precisely how diagnostic testing affects pathogen evolution is crucial for assessing the risk of inducing selection for detection avoidance, and its impact on population health.

Theoretical studies on the evolution of detection avoidance have primarily focussed on selection for asymptomatic infections [12, 13], and by comparison relatively little is known about escape from diagnostic testing. As far as we are aware, only four studies have explored the evolution of detection avoidance arising from diagnostic testing. Watson et al. [14] explored a mathematical model for the spread of a variant of P. Falciparum (the causative agent of malaria) which has been observed to escape Rapid Diagnostic Test kits (RDTs) due to gene deletions in histidine-rich protein 2 (HRP2). They found that selection for detection avoidance was most prevalent when malaria transmission was low, and patients were seeking and receiving treatment frequently based on diagnosis with RDTs. Smid [15] used a spatially structured mathematical model of chlamydia transmission in Sweden to explore the emergence of a C. trachomatis variant known to escpe detection by two diagnostic tests due to a plasmid deletion. They found that the C. trachomatis variant spread more favourably in counties which used both nucleic acid amplification tests, but once the testing regime had been updated to detect the new variant, the proportion of the population affected by the variant dramatically decreased. This could indicate a likely evolutionary trade-off associated with detection avoidance, which has also been speculated for the deletion of HRP2 in P. falciparum [14]. Similarly, Del Vecchio et al. [9] explored antigen test target failure in primary care settings in Italy for SARS-Cov-2. They found that a variant which produced false-negative antigen tests was selected for in the region of Veneto, in which a higher proportion of tests were antigen rather than PCR (Polymerase Chain Reaction). Del Vecchio et al. [9] also found that the variant which produced false-negative tests likely had a lower reproduction number than the Alpha variant, which was dominant at the time. Gurevich et al. [16] explored the evolution of SARS-Cov-2 using a two strain eco-evolutionary model. They found that as the test-evasive strain became more detectable, testing rates needed to increase to select for the evasive strain, however as the strength of NPIs increased the required testing rate decreased.

Here, we investigate how different testing regimes and the frequency or probability of taking a test affects selection for diagnostic test escape. In particular, we focus on how the effectiveness of (and compliance with) subsequent public health measures to reduce transmission (i.e. isolation) mediates detection avoidance evolution. We derive key thresholds for (i) pathogen extinction due to testing, and (ii) detection avoidance to evolve, and show how evolution can prevent extinction. Crucially, we also show that an intermediate rate of testing can lead to the highest level of detection avoidance.

METHODS

Model description

We consider the epidemiological and evolutionary dynamics of a directly transmitted pathogen in a well-mixed population of hosts, where S is the density of healthy (uninfected) hosts, Q and A are the densities of hosts who are aware of their infection and are either isolating or not isolating, respectively, U  is the density of hosts who are not aware that they are infected, and R is the density of hosts who have recovered. The total density of the population is then N=S+Q+A+U+R. Hosts reproduce at a baseline rate b, which is not affected by infection status, but is subject to a density-dependent crowding affect, qN, where q>0. Pathogen transmission is a function of detectability, ρ, and is density dependent at baseline rate β(ρ), with force of infection, λ(ρ)=β(ρ)(δQ+A+U), where δ[0,1] is the reduction in transmission due to isolation. We assume that there is no link between awareness of the infection and the rate of recovery, γ, or disease-associated mortality (virulence), α, and that hosts who are not aware of their infection do not change their behaviour. A full description of the model parameters can be found in Table 1.

Table 1.

Parameter/ variable descriptions and default values

Parameter/ variable Description Default value(s)
b Host birth rate 2.0
c1 Strength of trade-off 1.0
c2 Curvature of trade-off 3.0
d Host natural death rate 0.1
m Probability of new infection being a mutant 0.2
q Strength of density-dependent competition 0.1
α Disease-associated mortality rate (virulence) 0.5
β0 Maximum pathogen transmission rate 1.0
γ Host recovery rate 0.5
δ Effectiveness of isolating measures 0,0.1
η Probability of host compliance with isolating measures 1,0.9
λ Force of infection n/a
ρ Probability of a false-negative test n/a
σ Probability of taking a test in Model A 0.75
ζ Population testing rate in Models B and C 3

We consider three versions of the model to account for different testing scenarios. In all three cases, ρ is the probability of a false-negative test, which we assume to be under selection in the pathogen (see below), and η is the probability that an individual complies with isolating measures. In the first version (Model A), all infected hosts take a single test with probability σ[0,1] when they initially become symptomatic, with the onset of symptoms coinciding with the beginning of the infectious period for all hosts. Upon infection, individuals with a positive test move into the isolating (Q) class with probability ση(1ρ) and into the aware-but-not-isolating class (A) with probability σ(1η)(1ρ). Individuals with a false-negative test move into the unaware class (U) with probability 1σ(1ρ). The ecological dynamics for Model A are given by:

S˙=b(1qN)N(λ(ρ)+d)S
 U˙=(σρ+(1σ))λ(ρ)S(d+α+γ)U
Q˙=σ(1ρ)ηλ(ρ)S(d+α+γ)Q (1)
A˙=σ(1ρ)(1η)λ(ρ)S(d+α+γ)A
R˙=γ(Q+A+U)dR

In the second version (Model B), infected hosts initially enter the unaware class (U) and test regularly at rate ζ with a probability ρ of returning a false negative per test (the outcome of tests are therefore independent). Infected individuals move to the isolating class at rate ζ(1ρ)η and to the aware-but-not-isolating class (A) at rate ζ(1ρ)(1η). The ecological dynamics for Model B are given by:

S˙=b(1qN)N(λ(ρ)+d)S
U˙=λ(ρ)Sζ(1ρ)U(d+α+γ)U
Q˙=ζ(1ρ)ηU(d+α+γ)Q (2)
A˙=ζ(1ρ)(1η)U(d+α+γ)A
R˙=γ(Q+A+U)dR

In the third version (Model C), hosts either enter a permanently unaware class (U) with probability (ρ) or the temporarily unaware class (I) with probability (1ρ). Temporarily unaware hosts then move into the isolating class (Q) at a rate ζη and into the aware-but-not-isolating class (A) with rate ζ(1η). As the testing rate gets very large (ζ), Model C becomes equivalent to Model A. In Model C, N=S+U+I+A+Q+R, and λ(ρ)=β(ρ)(δQ+A+U+I) The ecological dynamics of Model C are given by:

S˙=b(1qN)N(λ(ρ)+d)S
U˙=ρλ(ρ)S(d+α+γ)U
I˙=(1ρ)λ(ρ)SζI(d+α+γ)I (3)
Q˙=ζηI(d+α+γ)Q
A˙=ζ(1η)I(d+α+γ)A
R˙=γ(Q+A+U+I)dR

For all versions of the model, we investigate how compliance (η) and the effectiveness of isolating (δ) affect selection for detection avoidance (ρ) in the pathogen. We assume there is a trade-off between pathogen transmission, β, and the likelihood of producing a false-negative test, ρ, such that β=β(ρ) and hence λ=λ(ρ). Mechanistically, we are assuming that the more transmission stages that are produced, the more likely these are to be detected by the test, and so an increase in transmission comes at the cost of being more detectable, while detection avoidance comes at the cost of a lower transmission rate, i.e. βρ<0. This assumption is motivated by data from chlamydia, SARS-Cov-2 and malaria infections, where variants that are less detectable by PCR and rapid testing also appear to be less transmissible [5, 10]. There is no a priori reasoning for the curvature of the trade-off, so we explore both accelerating and decelerating trade-offs of the form,

β(ρ)=β0((1c1)+c11ec2(1ρ)1ec2) (4)

where c1 controls the strength of the trade-off and c20 the curvature, with c2>0 corresponding to accelerating costs of detection avoidance on the transmission rate (diminishing returns of detection avoidance) and c2<0 corresponding to decelerating costs (increasing returns of detection avoidance).

We assume that mutations are sufficiently rare that the epidemiological dynamics (equations 13) reach a stable endemic equilibrium before a mutant arises and that mutations have small phenotypic effects. A rare new mutant pathogen with false negativity probability ρm will then have invasion dynamics,

U˙m=(σρm+(1σ))λ(ρm)S(d+α+γ)Um
Q˙m=σ(1ρm)ηλ(ρm)S(d+α+γ)Qm (5)
A˙m=σ(1ρm)(1η)λ(ρm)S(d+α+γ)Am

in Model A, and

U˙m=λ(ρm)Sζ(1ρm)Um(d+α+γ)Um
Q˙m=ζ(1ρm)ηUm(d+α+γ)Qm (6)
A˙m=ζ(1ρm)(1η)Um(d+α+γ)Am

in Model B, and

U˙m=ρλ(ρm)S(d+α+γ)Um
I˙m=(1ρm)λ(ρm)SζIm(d+α+γ)Im
Q˙m=ζηIm(d+α+γ)Qm
A˙m=ζ(1η)Im(d+α+γ)Am

in Model C, where asterisks denote the resident population at equilibrium.

We calculate the invasion fitness, r(ρm,ρ), of a rare mutant using the Next Generation Method [17], and subsequently the fitness gradient, F(ρ)=r(ρm,ρ)ρm|ρm=ρ (see Supplementary Material), as:

 F(ρ)=S((1+η(δ1)(ρ1)σ)β(ρ)+β(ρ)ησ(δ1))d+α+γ (8)

in Model A,

 F(ρ)=1(d+α+γ)(ζ(1ρ)+d+α+γ)2(((ζ(1ρ)+d+α+γ)              ((1+(δ1)η)(ρ1)ζ+d+α+γ)β(ρ)              ηζβ(ρ)(δ1)(d+α+γ))S) (9)

in Model B, and

F(ρ) =S(β(ρ)((1+(ρ1)(δ1)η)ζ(d+α+γ))+ηζβ(ρ)(δ1))(d+α+γ)(d+α+γ+ζ) (10)

in Model C.

A singular strategy, ρ, is a value of ρ which satisfies  F(ρ)=0. The evolutionary stability of a singular strategy is determined by the sign of E(ρ)=2r(ρm,ρ)ρm2|ρm=ρ=ρ, and the convergence stability is determined by the sign of E(ρ)+M(ρ)  where M(ρ)=2r(ρm,ρ)ρmρ|ρm=ρ=ρ. A singular strategy, ρ, is evolutionary stable if E(ρ)<0, and convergence stable if E(ρ)+M(ρ)<0. In all three models, it can be shown that M(ρ)=2r(ρm,ρ)ρmρ|ρm=ρ=ρ=0, hence meaning any evolutionarily stable point is also convergence stable, and branching is not possible (see Supplementary Material).

Adaptive dynamics focuses on long-term evolutionary dynamics. To explore short-term evolutionary dynamics during the expansion phase of an epidemic, we used stochastic simulations by implementing the Gillespie algorithm [18]. Specifically, we create a discretised trait space for ρ, and assume that each new infection has a probability (m=0.2) of mutating to the adjacent strain. We assume the population size is large but non-replenishing (N=100 000). We initialize simulations with 10 infected individuals and N10 susceptible individuals. We normalize each simulation by the time taken to reach the epidemic peak to compare across testing rates, as the time taken to reach the epidemic peak increases with the testing rate. At each recording step, we calculate the average level of detection avoidance and track the number of infected hosts. For each set of parameter values, we run 20 simulations. We also compare our adaptive dynamics results to long-term stochastic simulations in a smaller, but replenishing population where any host that dies is replaced by a new susceptible, and recovered hosts re-enter the susceptible pool (N=1000). All code used to produce the figures within this article is available within the Supplementary material and on GitHub.

RESULTS

No compliance

Trivially, if there is no compliance with isolating measures (η=0), then the fitness gradient in all three models is

F(ρ)=Sβ(ρ)d+α+γ<0 (11)

since β(ρ) is negative for all ρ. The pathogen will therefore evolve to produce as few false-negative tests as possible (ρ0), favouring a higher rate of transmission (the same outcome occurs if isolating has no effect on transmission (δ=1)).

Perfect compliance and isolating

From the fitness gradients (equations 810), we can deduce that the strongest selection for false-negative tests (highest value of ρ) will occur when there is perfect compliance with isolating measures (η=1) and isolating completely prevents transmission (δ=0). In Model A, the singular strategy satisfies,

β(ρ)=σβ(ρ)σρ+(1σ) (12)

in Model B satisfies

β(ρ)=ζS=ζβ(ρ)ζ(1ρ)+d+α+γ (13)

and in Model C satisfies

β(ρ)=ζβ(ρ)ζρ+d+α+γ (14)

In Model A, there is only a single opportunity to move into the ‘aware’ class as only one test is taken at the onset of symptoms, with probability σ. The probability of taking a test therefore plays a crucial role in driving selection for an intermediate probability of false positives, depending on the strength of the trade-off with transmission. In Model B, hosts test at a continuous rate leading to an additional flux out of the infectious class, similar to death (d+α) and recovery (γ). In Model C there is one opportunity to move into the aware classes, but the rate of testing varies. As a result, the optimal probability of false negativity depends on how the rate of testing (ζ) compares to the rate of movement out of the class due to other processes. When testing is maximal (σ=1 in Model A and ζ in Model B and Model C) any non-zero probability of false-negative tests (ρ>0) results in some individuals moving into the unaware infected class (U) in Model A and Model C, whereas in Model B the unaware class is only non-empty if the pathogen produces exclusively false-negative tests (ρ=1).

If detection avoidance is increasingly costly to transmission (c2<0), the pathogen always evolves to an evolutionarily stable strategy, including the boundaries ρ=0 and ρ=1 (Fig. 1). This is very similar to the behaviour seen in many transmission-virulence trade-offs, where accelerating costs lead to intermediate levels of virulence evolution [19]. Accelerating costs imply diminishing returns, which generally favours an intermediate optimal level of detection avoidance. However, if detection avoidance is decreasingly costly (c2>0) the pathogen may evolve to either maximize (ρ=1) or minimize (ρ=0) detection avoidance depending on the initial conditions due to the presence of an evolutionary repeller. This is because decelerating costs mean there is a disproportionately high cost of false negativity when ρ is relatively small, which tends to select against detection avoidance, whereas there is a disproportionately low cost when ρ is sufficiently high, which tends to select for greater detection avoidance (i.e. an evolutionary repeller). The existence of an evolutionary repeller in the decelerating cost space means that the outcome typically depends on the initial level of detection avoidance (Fig. 2). In Model B, for example, the only possible outcomes are no or complete detection avoidance (Fig. 2B). For Models A and C, higher testing probabilities/rates increase the lower bound on evolved false negativity, ρ and increase the basin of attraction (above the repeller) for complete detection avoidance (Fig. 2A, C). Hereafter we will assume detection avoidance is I ncreasingly costly (c2<0) as this is the only scenario where an intermediate level of false negativity may evolve in all three models.

Figure 1.

Figure showing three heatmaps, one heatmap for each model structure, displaying different 4 possible outcomes for different levels of trade-off cost and trade-off curvature.

Evolutionary outcomes for Model A (A), Model B (B) and Model C (C), for different trade-off curvatures (c2) and trade-off costs (c1). The pathogen experiences accelerating costs (diminishing returns) of detection avoidance when c2<0, and decelerating costs (increasing returns) when c2>0. Blue regions indicate the pathogen evolves to an intermediate level of detection avoidance (0<ρ<1). The orange regions indicate where the pathogen does not evolve detection avoidance (ρ=0). In the green regions, the pathogen maximizes detection avoidance (ρ=1). In the red regions, there is an evolutionary repeller at an intermediate value of ρ, above which selection maximizes detection avoidance (ρ=1), and below which selection minimizes detection avoidance (ρ=0). Parameters as in Table 1 except where specified, δ=0, η=1. A colour version of this figure appears in the online version of this article.

Figure 2.

Figure showing the evolutionary consequences of the different levels of diagnostic testing for each of the model types. Subfigures labelled A through I. A through C show the evolved level of false positivity. D through F show the pathogen prevelance at that level of false positivity and testing. G through I show the basic reproduction number at that level of testing and false positivity.

Evolved levels of false negativity with imperfect isolating (A–C), corresponding pathogen prevalence (D–F) and reproduction numbers (G–I). Dashed blue line (A–C) represents the evolutionary repellers. Dashed vertical line denotes level of testing required to select for false-negative tests. Dotted and Dashed line indicates extinction thresholds. In Reproduction number plots a horizontal dashed line indicates the value R0=1. In pathogen prevalence and reproduction number plot, blue points indicate prevalence or R0 of singular strategy, orange points indicate prevalence or R0 in the absence of evolution. Parameters as in Table 1 except where specified, c2=3.0, δ=0.1, η=0.9. A colour version of this figure appears in the online version of this article.

As testing increases, one might naively have expected the optimal level of false-negative tests to also increase (in all of the models). However, if we imagine low testing, e.g. σ0 or ζ0, we would not expect to see selection for detection avoidance as there is a cost to transmission of producing false-negative tests. From this, we can infer that there is a threshold wherein testing needs to be sufficiently common before selection favours detection avoidance. In the Supplementary Material we derive the minimum test probability (Model A) and minimum testing rate (Models B and C) needed for detection avoidance to evolve. Similarly, if testing is sufficiently common (large σ or ζ), isolating is sufficiently effective (large δ) and compliance is sufficiently high (large η), it may be possible for the pathogen to be driven extinct.

Unsurprisingly, more testing (between the minimum and extinction thresholds) selects for greater detection avoidance (Fig. 3A–C). Testing also reduces pathogen prevalence (Fig. 3D–F) and the basic reproduction number R0 (Fig. 3G-I), but through the evolution of detection avoidance the pathogen can persist at much higher levels of testing than the pathogen which cannot escape the diagnostic tests. Crucially, from a public health perspective, even if the pathogen evolves detection avoidance, testing still reduces pathogen prevalence. This occurs for two reasons. First, unless detection avoidance is perfect (ρ=1) or isolation measures are completely ineffective (η=0 or δ=0), there is a non-zero probability that a test will be positive and result in reduced transmission due to isolation. Second, detection avoidance is costly, resulting in an intrinsic reduction in transmission.

Figure 3.

Figure showing the evolutionary consequences of the different levels of diagnostic testing for each of the model types. Subfigures labelled A through I. A through C show the evolved level of false positivity. D through F show the pathogen prevelance at that level of false positivity and testing. G through I show the basic reproduction number at that level of testing and false positivity.

Evolved levels of false negativity under perfect compliance and isolating (ρ;  A–C), corresponding pathogen prevalence (proportion of hosts infected; D–F) and basic reproduction numbers (R0; G–I). The dashed vertical lines denote the level of testing required to select for detection avoidance (ρ>0). Dot-dashed lines indicate pathogen extinction thresholds for the evolved pathogen (R0<1). In G–I, the horizontal dashed line indicates the extinction threshold R0=1. In D–I, the blue curve corresponds to the evolved pathogen and the orange curve to the ancestral state with no detection avoidance (ρ=0). Parameters as in Table 1 except where specified, δ=0, η=1. A colour version of this figure appears in the online version of this article.

Imperfect isolation

In reality, the effectiveness of isolating and compliance with public health measures is imperfect (δ>0, η<1). Naturally, a decrease in compliance or the effectiveness of isolating will shift the thresholds for extinction and the evolution of detection avoidance to higher testing probabilities (Model A) or rates (Models B and C). The testing threshold for the evolution of detection avoidance in Model A is closely related to the perfect compliance/isolating scenario, with

σ>β(0)η(δ1)(β(0)β(0)) (15)

for detection avoidance to evolve. Clearly, when isolation is perfect (η=1 and δ=0), this is equivalent to equation S53. Note that for sufficiently ineffective public health measures (whether in terms of compliance or the strictness of isolation measures), the right-hand side of this inequality is greater than one and so there is no level of testing which selects for detection avoidance. The loss of perfect compliance and isolating has no qualitative effect on the evolution of detection avoidance in Model A (Figs. 3A and 4A) and in Model C, as the testing rate threshold is closely related to the perfect compliance / isolating scenario with

Figure 4.

Figure showing the evolutionary consequences of the different levels of diagnostic testing for each of the model types. Subfigures labelled A through I. A through C show the evolved level of false positivity. D through F show the pathogen prevelance at that level of false positivity and testing. G through I show the basic reproduction number at that level of testing and false positivity.

Evolved levels of false negativity with imperfect isolating (A–C), corresponding pathogen prevalence (D–F) and reproduction numbers (G–I). Dashed vertical line denotes level of testing required to select for false-negative tests. Dotted and Dashed line indicates extinction thresholds. In Reproduction number plots a horizontal dashed line indicates the value R0=1. In pathogen prevalence and reproduction number plot, blue line indicates prevalence or R0 of singular strategy, orange line indicates prevalence or R0 in the absence of evolution. Parameters as in Table 1 except where specified, δ=0.1, η=0.9. A colour version of this figure appears in the online version of this article.

ζ>β(0)(d+α+γ)β(0)(1δη+η)+ηβ(0)(δ1) (16)

for detection avoidance to evolve. As in Model A, when isolation and compliance is perfect, we recover equation S67.

In Model B, detection avoidance evolves provided

(ζ+d+α+γ)((1+(δ1)η)ζ+d+α+γ)    β(0)ηζβ(0)(δ1)(d+α+γ)>0. (17)

This inequality is quadratic in the testing rate, ζ, and so can be solved to find upper and lower bounds for when testing selects for detection avoidance. Detection avoidance therefore peaks for an intermediate testing rate in Model B (Fig. 4B), in contrast to the perfect compliance and isolating scenario (Fig. 3B).

This result is somewhat unintuitive, as one might expect that an increase in testing always selects for greater detection avoidance (as in Fig. 3B). However, this does not account for the costs associated with false-negative tests and the ‘leakiness’ that occurs with imperfect isolating. As the testing rate becomes sufficiently large, infected individuals rapidly leave the unaware class. Hence, production of new infections from the aware classes (either due to imperfect isolating or some hosts not isolating) becomes increasingly important, with detection avoidance less advantageous due to the independence between tests.

This can be thought of as a shifting of priorities. When testing is rare, selection favours high transmissibility and low detection avoidance as infected individuals spend most of their time in the unaware class (detection avoidance is not necessary). As testing becomes more common, selection favours detection avoidance as this increases time spent in the unaware class where onwards transmission is greatest, assuming the R0 is sufficiently high that testing does not immediately supress the spread of infections. But as testing becomes even more frequent, selection once again favours higher transmission and lower detection avoidance as most infected individuals quickly move into the aware classes even if the pathogen produces false-negative tests, because the result of each test is independent. If an infected individual takes n tests, then the probability that all tests are negative is ρn which tends to 0 as n provided ρ1, and hence a higher testing rate renders detection avoidance ineffective if the results of each test are independent.

In contrast to perfect isolating and compliance (Fig. 3), imperfect isolating may be insufficient to drive the pathogen extinct, even if testing occurs at a very high rate and there is no detection avoidance (Fig. 4D–F). This is because the pathogen may be completely sustained by infections produced in the aware classes. Our observations indicate that for even slightly imperfect isolating or compliance, the testing rate needed to cause extinction is unreasonably high. We also note that while testing always reduces the prevalence of the pathogen, the imperfect nature of isolating and compliance with public health measures may mean that the prevalence does not drastically reduce (Fig. 4D–F). This indicates that the effectiveness of diagnostic tests for reducing disease prevalence may be limited.

Stochastic simulations

Our long-term adaptive dynamics predictions are consistent in stochastic simulations in smaller, finite populations with replenishment, with detection avoidance increasing with greater testing in Models A and C but peaking at intermediate testing in Model B (Supplementary Fig. S1). The short-term evolutionary dynamics in a large but non-replenishing population are broadly similar in Models A and C, with detection avoidance increasing with greater testing (Fig. 5). However, in Model A we do observe a substantial increase in detection avoidance when every individual is tested (σ=1), which does not occur in our adaptive dynamics analysis. This suggests that extreme levels of testing create a very strong short-term selection for detection avoidance, but this recedes over the long term. In Model C we see no significant differences between our adaptive dynamics analysis and the results of stochastic simulations. In Model B, however, selection for detection avoidance saturates as the testing rate increases rather than peaking at intermediate testing rates (Supplementary Fig. S2). This suggests that during the expansion phase of an epidemic, there may still be an advantage to detection avoidance even if hosts are frequently tested with each test having an independent result, as there is still a large pool of susceptible hosts that has yet to be sufficiently depleted. When the time length of the large population simulations is extended, we recover the behaviours seen within the adaptive dynamics framework (Supplementary Fig S3).

Figure 5.

Figure showing the evolution of false positivity during an outbreak using stochastic simulations for each of the model types. Subfigures labelled A through F. Sub figures A through C show the level of false positivity within the population as the outbreak approaches it's peak. Sub figures D through F show the number of infected people up to the peak of the infection.

Stochastic simulations of Models A–C with imperfect isolating in a large, non-replenishing population. The first row of figures (A–C) show the average detection avoidance at a given time. The second row of figures (D–F) show the average number of infected individuals. Parameters as in Table 1 except δ=0.1, η=0.9, β=0.0001, N=100,000

DISCUSSION

The evolution of pathogens in response to human interventions is well documented [1, 4, 5, 8, 10, 20]. Intuitively, efforts to manage infectious diseases naturally select for pathogen variants that can resist or evade interventions. The evolution of antimicrobial resistance (AMR) [1] and vaccine escape [20] are the most prominent examples. Yet pathogens can also evolve in response to NPIs [6]. In particular, there is a growing body of evidence that many pathogens can readily evolve in response to diagnostic testing, but little is known about precisely how diagnostic testing affects selection for detection avoidance. As far as we are aware, only four theoretical studies [4, 9, 14, 16] have considered the evolution of detection avoidance arising from diagnostic testing, and these have focussed on specific pathogens rather than the development of general eco-evolutionary theory of detection avoidance.

Here we have explored how three approaches to diagnostic testing drive the evolution of detection avoidance. When infected individuals may only take a single test (Models A and C), there is a minimum threshold for selection for detection avoidance, above which more testing always results in selection for higher false negativity. In some cases, a sufficiently high level of testing may drive the pathogen extinct. In contrast, when infected individuals regularly test for infection but test results are independent (Model B), more frequent testing does not necessarily lead to selection for higher false negativity. When either isolating or compliance are imperfect, detection avoidance peaks at an intermediate testing rate in Model B, with higher testing rates selecting for low levels of detection avoidance in the long term. In the perfect isolating and compliance scenario, an increase in the testing rate leads to more ‘dead-end’ infections by fully preventing onwards transmission, and hence detection avoidance increases with the testing rate. But in the imperfect isolating and compliance scenario, aware individuals can still produce new infections. Hence, as the testing rate increases, selection shifts from prioritizing transmission before isolating (investment in detection avoidance) to transmission in the aware class (investment in infectivity). However, our stochastic simulations reveal that the latter outcome only occurs in the long term, as detection avoidance instead saturates as the testing rate increases in the short term. This suggests that during the epidemic phase, selection for detection avoidance is higher than during the endemic phase, most likely due to there still being a large pool of susceptible hosts to exploit. This is analogous to virulence evolution, where move virulent strains may have a growth advantage during the early stages of an epidemic, but lose out in the long run when hosts become more scarce (see e.g. [21]).

A possible link between virulence, infectivity and detection has also been proposed as a possible limiting factor for the evolution of virulence, with Kennedy [22] arguing that many human diseases would be expected to experience selection against virulence if disease severity influences human behaviour. The model presented in Kennedy [22] is similar to our model A, under the assumption that all hosts test (i.e. testing probability σ=1) and all aware hosts comply (i.e. compliance probability η=1). Like us, Kennedy finds that detection avoidance often evolves to intermediate levels, assuming there is a trade-off between transmission and likelihood of detection.

Although the evolution of detection avoidance from diagnostic testing presents a significant public health concern, in our models, with the trade-off between diagnostic escape and transmission and no other epidemiological effects (e.g. if detection avoidance correlates with antibody production and therefore affects the potential for reinfection), testing still always reduces overall pathogen prevalence in the population relative to the absence of testing. This happens for two reasons. First, unless the pathogen completely avoids detection, testing inevitably leads to a reduction in transmission as some individuals will isolation. Second, because we assumed that there is a trade-off between false negativity and transmissibility—motivated by evidence from pathogens including P. falciparum [14], C. trachomatis [23] and SARS-CoV-2 [9]—avoiding detection is costly in the absence of testing. Detection avoidance therefore cannot result in an increase in pathogen prevalence relative to the absence of testing. However, the emergence of detection avoidance would clearly result in an increase in pathogen prevalence at a given level of testing.

Our model made a number of key assumptions which should be relaxed and explored in future work. Most importantly, when using an adaptive dynamics framework, which employs a separation of ecological and evolutionary timescales, we were not able to explore selection for detection avoidance during transient epidemic dynamics. However, this approach does provide qualitative insights into the effects of healthcare interventions on the direction of selection (see also [24]), and the adaptive dynamics assumptions were relaxed in our stochastic simulations. We also assumed that the host population was homogeneous, but significant heterogeneity in both disease outcomes and compliance with NPIs is likely in most populations. For example, during the COVID-19 pandemic there was considerable variation in compliance with NPIs [25]. Such heterogeneity may weaken the effects of diagnostic testing on transmission (similar to reducing η or δ in our model), and hence generally weaken selection for detection avoidance. The effects of awareness-driven behaviour changes at the population level can also lead to complex feedback on epidemic dynamics, but these effects have received relatively little attention [26]. Finally, a key assumption in Model B is that the outcome of each test is independent of all others. Hence, repeated testing at a high enough rate would eventually detect most (if not all) infections (provided ρ<1). This was based on the assumption that detection avoidance is probabilistic, but if tests always yield the same result for a given infection, then the peak in detection avoidance at intermediate testing rates does not occur, as observed in Model C. Finally, we did not consider the economic costs or side effects of testing, including the impact of social isolation due to isolating, or the impact of false positive tests on the population, as our focus was on the evolutionary effects of diagnostic testing.

This study was motivated by evidence of detection avoidance arising from diagnostic testing in a variety of pathogens [4, 5, 7, 8, 10, 11]. Rapid antigenic and PCR testing became particularly widespread during the COVID-19 pandemic, and this may signal a shift in attitudes towards (and the availability of) diagnostic tests for other pathogens. Interestingly, as new major variants emerged during the COVID-19 pandemic, a cyclical pattern emerged in spike gene target failures (SGTF) in PCR tests, which allowed for the accurate identification of specific variants [27]. While this did not lead to detection avoidance, clearly the spike gene was under selection (although cycles in SGTF could have arisen due to interference competition; i.e. the Hill-Robertson effect). One might speculate that had the spike gene been the only target of PCR tests, variants with SGTF would have been at an even greater advantage due to detection avoidance. Conversely, the multi-pronged testing regime used in many countries during the COVID-19 pandemic (frequent rapid antigen tests and PCR testing with multiple target genes) is likely a good strategy to help mitigate the emergence of variants that can avoid diagnostic tests.

While theoretical studies of detection avoidance evolution are rare, there are strong analogies with sexually transmitted infections (STIs), such as chlamydia and gonorrhoea, which may have evolved to be inconspicuous to avoid detection by choosy mates [28, 29]. If prospective mates are less likely to choose partners who display signs of infection, then this can create a strong selection for being inconspicuous, similar to the selection for diagnostic testing avoidance. For example, Syphilis, which initially presented as a severely acute and noticeable disease during the middle ages, rapidly evolved to be much more cryptic, likely due to mate-choice effects in humans [30]. Thus, the patterns we see in our model are in good agreement with established evolutionary theory.

Overall, we have shown how the nature of testing, compliance with public health measures to reduce transmission, and the efficacy of isolating measures, can dramatically drive selection for detection avoidance. In particular, our results demonstrate that detection avoidance can readily evolve above a threshold level of testing, but also that selection for detection avoidance can weaken, or even change direction, at higher levels of testing. However, since diagnostic testing always reduces disease prevalence, it is likely to be beneficial despite the evolution of detection avoidance.

Supplementary Material

eoae018_suppl_Supplementary_Material

Acknowledgements

JW is supported by a scholarship from the EPSRC Centre for Doctoral Training in Statistical Applied Mathematics at Bath (SAMBa), under the project EP/L015684/1. BA is supported by the Natural Environment Research Council (grant numbers NE/N014979/1 and NE/V003909/1). We acknowledge the support of the Natural Sciences and Engineering Research Council of Canada (NSERC). Nous remercions le Conseil de recherches en sciences naturelles et en génie du Canada (CRSNG) de son soutien.

Contributor Information

Jason Wood, Department of Mathematical Sciences, University of Bath, Bath, UK.

Ben Ashby, Department of Mathematical Sciences, University of Bath, Bath, UK; Department of Mathematics, Simon Fraser University, Vancouver, Canada; The Pacific Institute on Pathogens, Pandemics and Society (PIPPS), Simon Fraser University, Burnaby, BC, Canada.

Author contributions

Jason Wood (Conceptualization [lead], Formal analysis [Lead], Writing—original draft [equal]), and Ben Ashby (Writing—original draft [equal])

Conflict of interest

The authors declare they have no conflicts of interest.

Data availability

The code used to produce the figures is available on Github here.

References

  • 1. Davies  J, Davies  D.  Origins and evolution of antibiotic resistance. Microbiol Mol Biol Rev  2010;74:417–33. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Qu  W, Sui  L, Li  Y.  Vaccine escape challenges virus prevention: the example of two vaccine-preventable oncogenic viruses. J Med Virol  2023;95:e29184. [DOI] [PubMed] [Google Scholar]
  • 3. Omenn  GS.  Evolution and public health. Proc Natl Acad Sci USA  2010;107:1702–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4. Seth-Smith  HM, Harris  SR, Persson  K  et al. Co-evolution of genomes and plasmids within Chlamydia trachomatis and the emergence in Sweden of a new variant strain. BMC Genomics  2009;10:239. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Feleke  SM, Reichert  EN, Mohammed  H  et al. Plasmodium falciparum is evolving to escape malaria rapid diagnostic tests in Ethiopia. Nat Microbiol  2021;6:1289–99. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Ashby  B, Smith  CA, Thompson  RN.  Non-pharmaceutical interventions and the emergence of pathogen variants. Evol Med Public Health  2023;11:80–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Ramírez-Vargas  G, López-Ureña  D, Badilla  A  et al. Novel Clade C-I Clostridium difficile strains escape diagnostic tests, differ in pathogenicity potential and carry toxins on extrachromosomal elements. Sci Rep  2018;8:13951. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8. Zannoli  S, Dirani  G, Taddei  F  et al. A deletion in the N gene may cause diagnostic escape in SARS-CoV-2 samples. Diagn Microbiol Infect Dis  2022;102:115540. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Del Vecchio  C, Cracknell Daniels  B, Brancaccio  G  et al. Impact of antigen test target failure and testing strategies on the transmission of SARS-CoV-2 variants. Nat Commun  2022;13:1–16. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10. Persson  K, Hammas  B, Janson  H  et al. Decline of the new Swedish variant of Chlamydia trachomatis after introduction of appropriate testing. Sex Transm Infect  2012;88:451–5. [DOI] [PubMed] [Google Scholar]
  • 11. Rubin  DH, Mortimer  TD, Grad  YH.  Neisseria gonorrhoeae diagnostic escape from a gyrA-based test for ciprofloxacin susceptibility and the effect on zoliflodacin resistance: a bacterial genetics and experimental evolution study. Lancet Microbe  2023;4:e247–54. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Saad-Roy  CM, Wingreen  NS, Levin  SA  et al. Dynamics in a simple evolutionary-epidemiological model for the evolution of an initial asymptomatic infection stage. Proc Natl Acad Sci USA  2020;117:11541–50. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Okamoto  KW, Ong  V, Wallace  R  et al. When might host heterogeneity drive the evolution of asymptomatic, pandemic coronaviruses? Nonlinear Dyn  2023;111:927–49. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Watson  OJ, Slater  HC, Verity  R  et al. Modelling the drivers of the spread of Plasmodium falciparum hrp2 gene deletions in sub-Saharan Africa. Elife  2017;6:e25008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Smid  JH, Althaus  CL, Low  N  et al.  Rise and fall of the new variant ofChlamydia trachomatisin Sweden: mathematical modelling study. Sexually Transmitted Infections  2019;96:375–9. doi: https://doi.org/ 10.1136/sextrans-2019-054057 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16. Gurevich  Y, Ram  Y, Hadany  L.  Modeling the evolution of SARS-CoV-2 under non-pharmaceutical interventions and testing. Evol Med Public Health  2022;10:179–88. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Hurford  A, Cownden  D, Day  T.  Next-generation tools for evolutionary invasion analyses. J R Soc Interface  2010;7:561–71. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Gillespie  DT.  Exact stochastic simulation of coupled chemical reactions. J Phys Chem  1977;81:2340–61. [Google Scholar]
  • 19. Cressler  CE, McLEOD  DV, Rozins  C  et al. The adaptive evolution of virulence: a review of theoretical predictions and empirical tests. Parasitology  2016;143:915–30. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Restif  O, Grenfell  BT.  Vaccination and the dynamics of immune evasion. J R Soc Interface  2007;4:143–53. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. Berngruber  TW, Froissart  R, Choisy  M  et al. Evolution of Virulence in Emerging Epidemics. PLoS Pathog  2013;9:e1003209. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Kennedy  DA.  Death is overrated: the potential role of detection in driving virulence evolution. Proc Biol Sci  2023;290:20230117. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Smid  JH, Althaus  CL, Low  N  et al. Rise and fall of the new variant of Chlamydia trachomatis in Sweden: mathematical modelling study. Sex Transm Infect  2020;96:375–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Fan  R, Geritz  SAH.  Evolution of pathogens with cross-immunity in response to healthcare interventions. J Theor Biol  2023;572:111575. [DOI] [PubMed] [Google Scholar]
  • 25. Seale  H, Dyer  CEF, Abdi  I  et al. Improving the impact of non-pharmaceutical interventions during COVID-19: examining the factors that influence engagement and the impact on individuals. BMC Infect Dis  2020;20:1–13. doi: https://doi.org/ 10.1186/s12879-020-05340-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26. Weitz  JS, Park  SW, Eksin  C  et al. Awareness-driven behavior changes can shift the shape of epidemics away from peaks and toward plateaus, shoulders, and oscillations. Proc Natl Acad Sci USA  2020;117:32764–71. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. McMillen  T, Jani  K, Robilotti  EV  et al. The spike gene target failure (SGTF) genomic signature is highly accurate for the identification of Alpha and Omicron SARS-CoV-2 variants. Sci Rep  2022;12:18968. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28. Ashby  B, Iritani  R, Best  A  et al. Understanding the role of eco-evolutionary feedbacks in host-parasite coevolution. J Theor Biol  2019;464:115–25. [DOI] [PubMed] [Google Scholar]
  • 29. Pirrie  A, Chapman  H, Ashby  B.  Parasite-mediated sexual selection: to mate or not to mate? In: Ezenwa  V, Altizer  SM, Hall  R (eds.). Animal Behavior and Parasitism. Oxford: Oxford University Press, 2022, 151–68. doi: https://doi.org/ 10.1093/oso/9780192895561.003.0009 [DOI] [Google Scholar]
  • 30. Knell  RJ.  Syphilis in Renaissance Europe: rapid evolution of an introduced sexually transmitted disease? Proc Biol Sci  2004;271:S174–6. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

eoae018_suppl_Supplementary_Material

Data Availability Statement

The code used to produce the figures is available on Github here.


Articles from Evolution, Medicine, and Public Health are provided here courtesy of Oxford University Press

RESOURCES