## Abstract

In populations with mixed vaccination status, testing programs focused on only the unvaccinated population are being enacted to mitigate SARS-CoV-2 spread. However, it is not well understood how viral spread occurs in mixed-status populations, including the possible benefits of unvaccinated-only testing. Here, we analyze a model of SARS-CoV-2 transmission in which a variable fraction of the population is fully vaccinated and unvaccinated individuals are proactively tested for infection, while varying transmission rates, vaccine effectiveness (VE) parameters, and prior infection rates. This analysis reveals principles of viral spread in communities of mixed vaccination status, with implications for testing policies. As vaccination rates increase, the proportions of infections occurring in unvaccinated individuals and the amount of transmission driven by the unvaccinated both decrease, such that at ∼65-75% vaccine coverage, most infections are vaccine breakthroughs, and at ∼76-83% vaccine coverage, most community spread is driven by breakthrough infections, under baseline mRNA VE assumptions. These ranges shift lower with waning VE and higher with boosted VE. In highly vaccinated communities proactive unvaccinated-only testing had little impact on community spread. Instead, the benefits of weekly unvaccinated-only testing were restricted to regimes with high or moderate ongoing transmission due to lower vaccination rates and strongly depended on near-perfect test compliance. By evaluating a wide range of scenarios, this work finds broadly that resources devoted to routine unvaccinated-only testing could be reallocated when vaccine coverage is sufficiently high.

## Introduction

SARS-CoV-2 has created a pandemic that is beginning to be countered in some areas by widespread vaccination. COVID-19 vaccines are not only extremely effective at preventing severe disease (vaccine efficacy, VE > 90%, [1]), but they also decrease susceptibility to infection (VE_{S}) and further decrease rates of onward transmission (VE_{I}). In spite of these reductions, so-called vaccine breakthrough infections and subsequent transmission have been widely documented [2], raising the question of how to further mitigate transmission in partially vaccinated populations.

Prior to the approval of COVID-19 vaccines, transmission mitigation via consistent population testing was shown to be an effective approach to break chains of transmission and decrease the burden of COVID-19 using both RT-PCR [3–5] and rapid antigen testing [5, 6]. Specifically, testing is effective at the community level because it decreases transmission from individuals who are *already* infected [5, 7]. However, this means that the impact of testing focused only on the unvaccinated population, as has been proposed [8–10], may be limited by the extent to which transmission is driven by the unvaccinated population.

Complicating matters further, the role of vaccines in reducing transmission is complex and changing. First, VE_{S} and VE_{I} vary depending on which vaccine was administered [11]. Second, both VE_{S} and VE_{I} wane with time since vaccination [12–14], but may also be boosted to higher levels for those receiving an additional dose [15]. Third, those who have experienced a SARS-CoV-2 infection also show decreased risks of infection and transmission [11], not only providing partial protection to those who are unvaccinated and previously infected, but augmenting protection for those who are vaccinated and previously infected [15]. Thus, the relative estimates of risk reductions due to vaccination, prior infection, or both, as well as the sizes of the populations falling into each category of immunity, will affect transmission dynamics—with or without testing.

In this study, we model the spread of SARS-CoV-2 in populations of mixed vaccination status, focusing on two critical questions. First, how do vaccinated and unvaccinated populations each contribute to community spread, and how do those contributions vary with rates of vaccination and prior infection? Second, how do testing programs focused on unvaccinated individuals alone affect community spread? Our study’s goals are not to make perfectly calibrated predictions but instead to elucidate more general principles of transmission and unvaccinated-only testing in partially vaccinated populations. As such, our analyses consider a wide range of parameters and scenarios.

## Results

### High vaccination rates drive total infections down, increase the proportion of breakthrough infections, and shift the drivers of transmission

To examine the dynamics of transmission in a population with mixed vaccination status, we first modeled transmission within and between communities of vaccinated (*V*) and unvaccinated (*U*) individuals in the absence of a testing program. Based on a standard Susceptible Exposed Infected Recovered (SEIR) model, we tracked the four transmission modes by which an infection might spread: *U* → *U, U* → *V, V* → *U*, and *V* → *V* (Fig. 1a). A constant fraction of both populations was assumed to have experienced prior SARS-CoV-2 infection, resulting in four categories of imperfect immunity: unprotected, infection-acquired, vaccine-acquired, and both vaccine- and infection-acquired with so-called “hybrid” immunity. To account for introductions of infection from outside the population, all susceptible individuals were subject to a small, constant rate of exposure, with infection-acquired or vaccine-acquired immunity providing partial protection against subsequent infection. Because precise estimates of the basic reproductive number *R*_{0} vary by context and over time, our analyses consider values inclusive of possible non-pharmaceutical interventions like masking and physical distancing, and thus range from 4 to 6. In our baseline modeling scenario, vaccines were assumed to reduce susceptibility to infection by VE_{S} = 65% and the likelihood of transmission to others by VE_{I} = 35%, values which land within plausible literature estimates for the effectiveness of two doses of mRNA vaccine in the absence of dramatic waning and without boosting [11, 15, 16]. Though less often studied in the literature, we assumed that prior SARS-CoV-2 infection would lead to 63% and 13% decreases in risk of infection and transmission based on a statistical model relating immunity to neutralization [15], and that hybrid immunity would be superior to either vaccination or prior SARS-CoV-2 infection alone. See Materials and Methods and Supplementary Table S1 for a complete description of the model and parameters.

In a modeled population of *N* = 20, 000 with 58% vaccination rate (corresponding to U.S. estimates as of Nov. 4, 2021 [17]) and 35% past infection rate, outbreaks still occurred, despite assuming a partially mitigated delta variant (*R*_{0} = 4) and immunity from past infection, vaccination, or both. During the ensuing outbreak, 59% of total infections occurred in unvaccinated individuals, despite making up only 42% of the population (Fig. 1c), with the remaining 41% of infections occurring among the vaccinated (breakthrough infections). Furthermore, the peak burden of disease occurred first in the unvaccinated community and then one week later in the vaccinated community (Fig. 1b), a known consequence of disease dynamics in populations with heterogeneous susceptibility and transmissibility [18, 19]. By categorizing transmission events into four distinct modes (Fig 1a), we observe that infections in both communities were driven predominantly and consistently by the unvaccinated community (*U* → *U, U* → *V* ; Fig. 1d), but that there was nevertheless some transmission from the vaccinated community (breakthrough transmission). These differences occurred despite a “well mixed” modeling assumption—namely, that neither type of individual is more or less likely to associate with a member of their own group vs the other group.

Vaccination and past infection rates vary widely across the U.S. [17] and the world [20] due to impacts of both vaccine availability [20] and refusal [21], as well as the success or failure of transmission mitigation policies. We therefore asked how a population’s vaccination and past infection rates would affect our observations about total infections, breakthrough infections, and the relative impacts of the four modes of transmission. This analysis revealed three important points.

First, our results reinforce the fact that increased vaccination rates lead to decreased total infections, both before and after the herd immunity threshold at *R*_{eff} = 1 (Fig. 1c). Moreover, when large proportions of the population are also partially protected by immunity from prior infection, the vaccination levels at which *R*_{eff} = 1 decrease considerably (Fig. 2a). For instance, increasing prior infection rates from 35% to 50% decreases the required vaccination rate for *R*_{eff} = 1 from 87% to 80%. Combinations of immunity from past infection and vaccination thus have the potential to create a herd immunity frontier, beyond which transmission is no longer self-sustaining even in the absence of testing.

Second, as vaccination rates increased, the fraction of infections classified as vaccine breakthroughs increased (Fig. 1c), creating a transition point such that when 68% of the population was vaccinated, 50% of all infections were breakthrough infections under our baseline modeling conditions. To determine whether this transition point of 68% was sensitive to the precise fraction of the population with immunity from past infection (35%, Fig. 1), we varied the fraction with infection-acquired immunity between 0% and 100%, finding that the 50/50 breakthrough infection transition occurred between 63% and 75% vaccine coverage (Fig. 2b). Thus, our results set the expectation that increasing vaccination rates will decrease total infections, but a higher proportion of those infections will be breakthroughs, irrespective of levels of immunity due to prior infection.

Third, as vaccination rates increased, the unvaccinated community ceased to be the primary driver of transmission. Under our baseline modeling conditions (*R*_{0} = 4, 35% with infection-acquired immunity), this transition occurred when 80% or more of the population was vaccinated (Fig. 1e). When we varied the fraction of the population with infection-acquired immunity between 0% and 100%, this transition point varied from 76% to 82% (Fig 2c). Thus, while COVID-19 morbidity and mortality are likely to remain concentrated primarily in unvaccinated populations, only a minority of infections will occur in, or be driven by, the unvaccinated community when vaccine coverage is sufficiently high. Note that this implies that unvaccinated individuals living in highly vaccinated communities will still be exposed to SARS-CoV-2 and thus remain at risk of infection.

These findings are driven by reductions in susceptibility and infectiousness arising from vaccination, prior SARS-CoV-2 infection, or both. However, quantitative estimates of those reductions vary depending on which vaccine was administered [14], time since vaccination or SARS-CoV-2 infection [12–14], whether an additional “booster” dose was given [15], and the variant circulating at the time of the study [22, 23]. We therefore sought to determine how our findings might change under different sets of assumptions about vaccine effectiveness by comparing our baseline scenario (VE_{S} = 0.65, VE_{I} = 0.35) with a waning/low immunity scenario (VE_{S} = 0.5, VE_{I} = 0.1) and a boosted/high immunity scenario (VE_{S} = 0.8, VE_{I} = 0.6).

To explore the impact of waning and boosted vaccine effectiveness, we simulated outbreaks for all combinations of vaccination and infection-acquired immunity rates under the three VE scenarios. Across simulations, we found that total infections were well predicted by calculating *R*_{eff} at the start of each simulation. In particular, outbreaks were small when vaccination or past infection rates crossed the herd immunity threshold (*R*_{eff} < 1). When *R*_{eff} > 1, total infections monotonically increased as *R*_{eff} increased (Supplementary Fig. S2). The herd immunity threshold was impossible to cross with vaccination alone in the waning VE scenario with partially mitigated transmission (*R*_{0} = 4, Fig. 3a, Supplementary Fig. S2) and in both waning and baseline VE scenarios with unmitigated transmission (*R*_{0} = 6; see Supplementary Fig. S2), as evidenced by the fact that the *R*_{eff} = 1 curves fail to intersect the vaccination rate axis.

Waning and boosting assumptions altered the proportions of infections occurring in, and transmission from, the unvaccinated vs vaccinated communities. All else being equal, waning immunity led to increased fractions of breakthrough infections and breakthrough transmission from the vaccinated community, while boosted immunity led to decreases of both. In turn, population vaccination rates at which the majority of infections were breakthroughs shifted down (waning; Fig. 3a), while vaccination rates at which the majority of transmission was driven by vaccinated individuals shifted up (boosting; Fig. 3c).

Among the three transition points identified in transmission dynamics, we observe that, in each VE scenario, *R*_{eff} is driven by both vaccination and past infection rates, as evidenced by curvature in *R*_{eff} = 1 isoclines (Fig. 3, black lines). In contrast, isoclines representing the transition points between majority-unvaccinated vs majority-breakthrough infections (Fig. 3, light green lines) and the transition points between majority-unvaccinated vs majority-breakthrough transmission (Fig. 3, dark green lines) are relatively insensitive to variation in rates of infection-acquired immunity, as evidenced by vertical or near-vertical isoclines. These findings suggest that the relative proportions of breakthrough infections and breakthrough transmission are driven by vaccination rates and VE, but not by rates of past infection or proximity to herd immunity; indeed, after the herd immunity threshold, both infection and transmission isoclines show essentially no variation. These observations suggest that unvaccinated-only testing programs, which decrease rates of *U* → *U* and *U* → *V* transmission, may be highly effective only in regimes where transmission is driven by the unvaccinated (i.e. to the “left” of dark green isoclines, Fig. 3), an intuition we now explore in detail.

### Unvaccinated-only testing may be of limited value in highly vaccinated populations

To explore the impact of unvaccinated-only testing on population transmission, we modified our simulations so that a positive test would result in an unvaccinated individual isolating to avoid infecting others [5, 24]. We considered test sensitivity equivalent to RT-PCR with a one-day delay between sample collection and diagnosis under two testing paradigms: weekly testing with 99% compliance and weekly testing with 50% compliance—a value which reflects observed compliance with a weekly testing mandate in a university setting [3].

Our simulations show that the benefits of an unvaccinated-only testing program fall into one of three categories, depending on the population vaccination rate and transmission dynamics. These categories align with three distinct regions in parameter space, denoted in Fig. 4 as regions I, II and III. In region I, testing is insufficient to fully control transmission, yet nevertheless markedly reduces total infections (Fig. 4a). In region II, testing successfully brings transmission under control (Fig. 4b). In region III, testing has little impact on transmission due to the fact that outbreaks are already mitigated by population immunity and other control measures (Fig. 4c). Unvaccinated-only testing is therefore impactful in the first two regions, sufficient for transmission control in only the second region, and largely inconsequential to transmission in the third.

The three regions that correspond to different impacts of testing are separated by boundaries which can be estimated from two analytical calculations of *R*_{eff}—one which includes the effects of testing and one which does not. The boundary separating regions I and II is given by those parameters for which *R*_{eff} = 1 *with* testing, while the boundary separating regions II and III is given by those parameters for which *R*_{eff} = 1 *without* testing (Fig. 4d). Thus, the value of an unvaccinated-only testing program can be evaluated based on which of three regions the current vaccination rate, prior infection rate, and VE fall into.

To illustrate the value of this *R*_{eff}-based analysis, we considered vaccination rates and prior infection rates ranging from 0-100% and varied VE between waning, baseline, and boosted scenarios. Across scenarios, dramatic relative reductions in infections are concentrated only within the envelope between the boundaries of *R*_{eff} = 1 with and without testing, i.e., region II (Fig. 5). Outside of this effective testing envelope, percent reductions in infections decreased markedly, either because unvaccinated-only testing was an insufficient intervention during a rapidly growing outbreak (region I), or because existing population immunity prevented large outbreaks in the first place (region III). Assuming a 35% past infection rate and *R*_{0} = 4, region III appeared only for baseline and boosted vaccine effectiveness assumptions, and only when vaccination rates were approximately 90% or greater (baseline VE) or 75% or greater (boosted VE). Sensitivity analyses show that increasing *R*_{0} to 6, potentially representing pre-pandemic contact rates and the SARS-CoV-2 delta variant, cause region III to shrink further. Thus continued testing for SARS-CoV-2 among the unvaccinated may be of limited value, but only when vaccination rates become sufficiently high.

The role of compliance—the fraction of scheduled tests that are actually taken—can also be clarified by examining the three regions of testing impact. Both the simulations and equations for *R*_{eff} show that increasing compliance from 50% to 99% causes the lower boundary of the effective testing envelope to shift to lower vaccination and prior infection rates, decreasing the size of region I and increasing the size of region II (Fig. 5). Moreover, increased testing compliance increases the magnitude of infection reductions within both regions, visible as an intensification of color in the infection reduction heatmaps (Fig. 5). As a result of these observations, we conclude that, in addition to test sensitivity, frequency, and turnaround time [5], high participation in testing programs is critical to expanding the impact of unvaccinated-only testing programs. However, we also note that testing compliance had little effect in region III where *R*_{eff} < 1, a result which parallels analysis of universal testing programs [7].

By reducing transmission from unvaccinated individuals, testing programs specifically mitigate *U* → *U* and *U* → *V* transmission modes, thus diminishing the role of the unvaccinated population in transmission dynamics and amplifying the relative role of breakthrough transmission. As a consequence, we observe that in the presence of testing, the vaccination rates at which the unvaccinated cease to drive a majority of transmission decrease by 5 to 15 percentage points (Fig. 6b), with the largest decreases for 99% compliance testing and waning vaccine effectiveness, and the smallest decreases for 50% compliance testing and boosted vaccine effectiveness. In other words, unvaccinated-only testing programs shrink the regime in which the unvaccinated population drives outbreaks.

In contrast, unvaccinated-only testing programs had little effect on the percentage of infections that were breakthroughs. Instead, majority breakthrough regimes remained primarily dependent on vaccination rates and vaccine effectiveness (Fig. 6a), with transitions to majority-breakthrough infection regimes beginning at 55 to 67% vaccination rates (waning VE), 63 to 75% vaccination rates (baseline VE) and 83 to 84% vaccination rates (boosted VE). We therefore conclude that unvaccinated only testing programs do not markedly alter the expectations of majority-breakthrough infections at high vaccination levels, particularly if VE is low or waning.

## Discussion

In this analysis, we find that in communities with mixed vaccination status, routine SARS-CoV-2 testing programs focused on the unvaccinated community can reduce infection, but in a manner dependent on two conditions. First, effective screening testing requires high participation to be most impactful, reinforcing the need for mechanisms to encourage or enforce high participation. Second, when vaccination and past infection rates are high enough to curtail transmission on their own, testing the remaining unvaccinated population averts few infections in both relative and absolute terms. Thus, targeted unvaccinated testing programs lose effectiveness once vaccination rates exceed the threshold at which population immunity and other interventions push *R*_{eff} below 1. These results echo related work focused on universal testing programs [7].

The critical vaccination rates, above which unvaccinated-only testing programs provide little transmission reduction, depend on vaccine effectiveness, rates of infection-acquired immunity, and whether transmission is mitigated by other means such as physical distancing and masking. In particular, our analysis suggests that with boosted vaccine effectiveness (VE_{S} = 80%, VE_{I} = 60%) and 35% past infection rates, unvaccinated-only testing is not needed when vaccination rates exceed 70% with other control measures in place (*R*_{0} = 4) or 85% in their absence (*R*_{0} = 6), with lower thresholds possible as rates of past SARS-CoV-2 infection increase. In contrast, with baseline vaccine effectiveness (VE_{S} = 65%, VE_{I} = 35%) and 35% past infection rates, unvaccinated-only testing is not needed only when 85% or more were vaccinated, and only then with other control measures (*R*_{0} = 4). For waning VE scenarios, practically no vaccination rates existed at which testing could cease. Thus, combinations of vaccination, boosting, masking or other mitigation measures, and past infections may allow some communities to cease testing and reallocate limited public health resources elsewhere (including to further increase vaccination rates), but such combinations are practically nonexistent for pre-pandemic contact rates and waning VE.

Our study predicts two critical transitions as vaccination rates increase. First, when vaccination rates are sufficiently high, a majority of the albeit reduced number of infections will be vaccine breakthrough infections. This fact should come as no surprise, as this transition must occur at some point for any vaccine below 100% effectiveness; our modeling estimates it to take place between 63% and 75% vaccine coverage (baseline VE; 55-67% vaccinated with waning VE; 83-84% vaccinated with boosted VE). Second, while at low vaccination rates, community spread is driven by the unvaccinated population, at higher vaccination rates, community spread is driven by the vaccinated population (Fig. 3). These vaccination rate transition points separating majority-unvaccinated transmission and majority-breakthrough transmission are driven lower by unvaccinated-only testing programs (Fig. 6). Taken together, these results suggest that while the overall number of cases in highly vaccinated communities will be low, vaccine breakthrough infections and transmission events from vaccinated individuals should not be surprising—vaccine effectiveness is not 100%. Consequently, in anticipation of continued community transmission even in highly vaccinated communities, those at increased risk of severe COVID-19 should take additional precautions to limit their risk of infection or severe disease.

Our analyses identify two limitations of testing programs in reducing community transmission. First, for a testing program to be effective, testing must have high rates of compliance; weekly testing with 50% compliance—a rate which reflects observed compliance in a population with a weekly testing mandate [3]— is likely to be relatively ineffective. Second, the ability of a testing program to prevent community spread is restricted to a limited “envelope” of past infection rate and vaccination rate combinations in which *R*_{eff} without testing is greater than one, and *R*_{eff} with testing is less than one. However, it is important to note that while our analyses focus on the benefits of testing in reducing transmission, testing also plays an important role in diagnosis and treatment, detection of variants, situational awareness and surveillance, and decreasing pressure on the healthcare system during outbreaks. Furthermore, testing focused on the unvaccinated population may provide additional incentives to get vaccinated and thus avoid regular testing. Our study did not explore the benefits of unvaccinated-only testing mandates for these additional purposes.

Our analysis is limited in at least three different manners. First, our modeling incorporated fixed parameters that are difficult to estimate in practice. For instance, while our analysis considered boosted, baseline, and waning scenarios for vaccines’ reductions in susceptibility VE_{S} and infectiousness VE_{I} based on ranges of estimates in the current literature, few studies are available to guide estimates of similar risk reductions associated with prior SARS-CoV-2 infection, with or without vaccination (but see Refs. [11] and [15]). Alternative parameter assumptions may be explored via the provided open-source code. Second, we assumed perfect isolation after receiving a positive test result in all testing regimens, effectively removing all infectiousness once a diagnosis is received. Were this assumption to be violated by imperfect or delayed isolation, we predict a proportional loss of testing impact across all scenarios. Third, our model assumed that vaccination and past infection statuses are uncorrelated at the population level, yet they may be anticorrelated due to the protective effects of vaccination or because those with past infection may choose to forgo subsequent vaccination. We similarly assumed no homophily in contact patterns based on vaccination status, yet those who choose to be vaccinated may be more likely to be situated in a social network with others who choose to be vaccinated, and vice versa [25]. Analyses of simulated communities with homophily by vaccination status only slightly increased vaccination rates at which the key transitions discussed above were observed. Finally, our model assumes values of *R*_{0} and immunity associated with the delta variant, but emerging variants such as omicron (identified a week prior to the present writing) may dramatically shift the values of these parameters. These limitations affect the exact vaccination and past infection rates at which the three transitions identified in our study occur, and thus our analyses describe fundamental phenomena but do not make projections or predictions for specific communities.

More broadly, our work is situated within a family of research which uses mathematical modeling to estimate the impact of targeted interventions or strategies in populations with heterogeneous susceptibility, transmissibility, and/or contact rates. Other areas of focus include the allocation of scarce personal protective equipment to reduce transmission [26], the prioritization of vaccines by subpopulation [27–29], proactive testing programs in specific workplace structures [30] or contact networks [7], immunity “passport” programs [24], or immune shielding strategies [31]. Our contribution to this literature is primarily to show that testing programs focused on the unvaccinated will substantially reduce transmission only with strict adherence, and only until population immunity is sufficiently high as to obviate the need for this form of targeted intervention.

## Data Availability

All code is open source and provided by the authors.

## Competing Interests Statement

R.P. is a founder of Faze Therapeutics. D.B.L. is an advisor to Darwin BioSciences and has received consulting fees from iCareDx. All other authors declare no conflicts of interest.

## Data and Code Availability

All code is open source and provided by the authors at https://github.com/kbubar/unvacc_testing_in_mixed_pop_repo.

## Materials and Methods

### SEIR model

Our analyses are based on a continuous time ordinary differential equation compartmental model with Susceptible, Exposed, Infectious, and Recovered (SEIR) compartments, stratified into vaccinated *V* and unvaccinated *U* groups. In addition to tracking infections among these two groups separately, we also tracked infections *from* both groups separately, enabling us to investigate four modes of transmission: from *U* to *U*, from *U* to *V*, from *V* to *U*, and from *V* to *V*. In all simulations, we used a constant total population size of *N* = 20, 000 and denoted the vaccinated fraction of the population with *ϕ*.

To incorporate the possibility that individuals may have experienced prior infections, we further subdivided *U* and *V* into SARS-CoV-2 naive and SARS-CoV-2 experienced subpopulations, such that a fraction *ψ* of each was assumed to be previously infected and 1 −*ψ* remains naive. For notation, we denote the subpopulations of *U* to be *u* (unvaccinated, naive) and *x* (unvaccinated, experienced/prior infection), and the subpopulations of *V* to be *v* (vaccinated, naive) and *h* (vaccinated, experienced). We assumed that vaccination and SARS-CoV-2 experience statuses were fixed at the start of each simulation and immutable throughout, such that there was no ongoing vaccination, and individuals who were infected and recovered during each simulation were not reassigned to SARS-CoV-2 experienced status [32].

We denote the protective effects of immunity as XE, VE, HE, expressed as reductions in risk due to prior infection alone (*x*), vaccination alone (*v*), or prior infection and vaccination (i.e. so-called “hybrid” immunity; *h*), respectively. Immunity was modeled to (i) decrease the risk of infection upon exposure, and (ii) decrease the risk of transmission upon infection, placing our vaccine and immunity model in the broader category of leaky models [33]. Reductions in the risk of infection upon exposure (XE_{S}, VE_{S}, HE_{S}) and reductions in the risk of transmission when infected (XE_{I}, VE_{I}, HE_{I}) were parameterized separately, based on ranges of estimates from the literature. See Table S1. Due to broad uncertainty in these effects over time since exposure [11, 32] or vaccination [11–13], by vaccine manufacturer and schedule [14, 15, 34, 35], by context [23, 36], and by variant [15], our analyses intentionally consider a range of values. We assumed that hybrid immunity would always be superior to either vaccination alone or prior infection alone, via the simple formula HE = (1 − VE)XE + VE.

Fig. S4 shows a model schematic diagram for the SEIR model used in the manuscript, where solid and dashed lines denote movement and transmission between classes, respectively. Because our study focuses on transmission, we did not track disease, hospitalization, or mortality variables nor include vaccination’s (or past infection’s) impacts on them.

To model a community with open boundaries, we included a uniform risk of exposure to infection from an external source at a rate of *N* ^{−1} per person per day. For instance, in a completely naive population, *S*_{u}*/N* individuals would be infected per day. After including the protective effects of vaccination and past infection this resulted in importation of infections at per-capita rates of (1 − VE_{S})*N* ^{−1}, (1 − HE_{S})*N* ^{−1}, (1 − XE_{S})*N* ^{−1}, and *N* ^{−1} new infections per day in the *v, h, x*, and *u* groups respectively.

All simulations were run for 270 days, and all individuals were initially in one of the susceptible compartments *S*_{u}, *S*_{x}, *S*_{v}, or *S*_{h} in proportions (1 −*ϕ*)(1 −*ψ*), (1 −*ϕ*)*ψ, ϕ*(1− *ψ*), and *ϕψ*, respectively. Model equations were solved using *lsoda* solver from the package deSolve, R version 4.1.0.

### Incorporation of testing

Testing of the unvaccinated population, with subsequent isolation of those testing positive, was modeled by increasing the rate at which infected individuals were removed from the unvaccinated *I*_{u} and *I*_{x} compartments. We estimated increased rates of removal using a previously established method that takes into account (i) the calibrated trajectories of viral loads within individual infection [37], (ii) the relationship between viral load and infectiousness [5], (iii) the frequency of testing, (iv) the test’s analytical sensitivity (i.e. limit of detection) and turnaround time [24], and (v) testing compliance and valid sample rates, i.e. the fraction of scheduled or mandated tests which actually produce a valid sample [3]. In particular, our adaptation takes a previous model [5, 24] and updates viral load dynamics for the delta variant of SARS-CoV-2 [38, 39], the dominant variant at the time of the present analysis. To incorporate the effectiveness of testing *θ*, we reduce the duration of infectiousness 1*/γ* by a factor (1 − *θ*). Parameter values for *θ* are found in Table S1, and are based on weekly PCR testing with a one-day turnaround, analytical limit of detection of 10^{3} RNA copies per ml sample, and compliance rates of 50% (as in [3]) or 99% (as in [6]). These values assume that individuals immediately and successfully isolate upon receiving a positive diagnosis. We note that estimated effects of rapid antigen tests (with higher analytical limits of detection, but zero turnaround time) are highly similar to PCR testing under the assumptions above, provided that testing program frequencies and compliance rates are identical [5].

### Transmission modes and forces of infection

Inclusive of all effects introduced above, the forces of infection are given by
where *i* ={*x, v, h*}, and reductions in susceptibility due to immunity are given by (*RR*_{S})_{i} = {XE_{S}, VE_{S}, HE_{S}}, correspondingly. The parameter *α* is the probability of infection given an infectious contact, tuned to achieve the desired *R*_{0}, *c*_{i→j} is the number of times an individual in group *j* is contacted by individuals from group *i* per day, and *N*_{j} is a convenience variable representing the number of people in subpopulation *j*.

To produce counts of how many infections were caused by each of the transmission modes *U* → *U, U* →*V, V* → *U*, and *V* → *V*, we integrated the appropriate terms of Eqs. (1) and (2) over the duration of each simulation. For instance, the cumulative number of vaccinated infections caused by the unvaccinated population is given by integrating over the forces of infection from *u* and *x* to *v* and *h*,

### Effective Reproductive number

This model’s reproductive number is given by
where *f*_{u} = (1 −*ψ*)(1 −*ϕ*), *f*_{x} = *ψ*(1−*ϕ*), *f*_{v} = (1 −*ψ*)*ϕ*, and *f*_{h} = *ϕψ* represent the fractions of the population in the unvaccinated, experienced, vaccinated, and hybrid immunity groups, respectively, and *r*_{x} = (1− XE_{I})(1−XE_{S}), *r*_{v} = (1 −VE_{I})(1 −VE_{S}), and *r*_{h} = (1 −HE_{I})(1 −HE_{S}) are the cumulative impacts of immunity on each group. Setting the above equation equal to a constant produces isoclines shown in plots throughout the paper. The reduction in *R*_{eff} due to testing is given by
a function linear in each of its variables which goes to zero as the vaccination rate *ϕ* approaches 1. For a complete derivation of these equations, see Supplementary Materials.

## Supplementary Materials

### Reproductive number

This model’s next generation matrix *M*, used to calculate the effective reproductive number *R*_{eff}, is given by
where *C* is the contact matrix
with units of number of contacts per person per day. In a well-mixed population of size *N* with proportions *ϕ* vaccinated and SARS-CoV-2 prior infection *ψ*,
The effective reproductive number is the absolute value of the dominant eigenvalue of *M*. It depends on *R*_{0}, *ϕ*, and *ψ*, as well as values of VE, HE, XE, and *θ*,
Setting *R*_{eff} = 1 leads to the following required vaccination fraction *ϕ* to achieve a reproductive number below one,
In the absence of testing, this equation simplifies to

## Acknowledgements

The authors thank Stephen Kissler, Yonatan Grad, and Michael Mina for their feedback. K.M.B. and C.E.M. were supported in part by the Interdisciplinary Quantitative Biology (IQ Biology) Ph.D. program at the BioFrontiers Institute, University of Colorado Boulder. K.M.B. was supported by the National Science Foundation Graduate Research Fellowship under Grant No. (DGE 1650115). C.E.M and D.B.L. were supported in part by the SeroNet program of the National Cancer Institute (1U01CA261277-01). R.P. was supported by the Howard Hughes Medical Institute.