Behavior can spread through communication and social learning like an infection through a community (Bass, 1969; Centola, 2018) . Cavalli-Sforza and Feldman, who pioneered treating cultural transmission in an analogous manner to genetic transmission, noted that "another biological model may offer a more satisfactory interpretation of the diffusion of innovations. The model is that of an epidemic" (Cavalli-Sforza and Feldman, 24 1981, 32-33) . The biological success of Homo sapiens has been attributed to its capacity for cumulative culture, and particularly to the rapid and flexible adaptability that arises from social learning (Henrich, 2015) . Adoption of adaptive behaviors during an epidemic 27 of an infectious disease could be highly beneficial to both individuals and the population in which they are embedded (Fenichel et al., 2011) . Coupling models of behavioral adoption and the transmission of infectious disease, what we call coupled contagion models, may thus provide important insights for understanding dynamics and control of epidemics. While we might expect strong selection-both biological and cultural-for adaptive responses to epidemics, complications such as the potentially differing time 33 scales of culture and disease transmission and the existence of social structures that shape adoption may complicate convergence to adaptive behavioral solutions. In this paper, we explore the joint role of homophily-the tendency to form ties with people sim-36 ilar to oneself-and outgroup aversion-the tendency to avoid behaviors preferentially associated with an outgroup.
Several previous studies have considered the coupled contagion of behavior and infection, usually focused on cases where the behavior is one that decreases the spread of the disease (such as social distancing) and sometimes using the assumption that increased disease prevalence promotes the spread of the behavior (Tanaka et al., 2002 ; Epstein to analyze. To help us make sense of the dynamics, we will first describe the dynamics 75 of infection and behavior adoption in isolation, and then explore the full coupled model.
We model infection in a population in which individuals can be in one of three states: 78 Susceptible, Infected, and Recovered. When susceptibles interact with infected individuals, they become infected with a rate equal to the effective transmissibility of the disease, τ . Infected individuals recover with a constant probability ρ. This is the well-known 81 SIR model of epidemics (Tolles and Luong, 2020 ). The baseline model assumes random interactions governed by mass action, and the dynamics are described by well-known differential equations (see Supplemental Materials). This model yields the classic dy-84 namics in which the susceptible and recovered populations appear as nearly-mirrored sigmoids, while the rate of infected individuals rises and falls ( Figure S1 ). The threshold for the epidemic is given by the basic reproduction number, R 0 , which is a measure of 87 the expected number of secondary cases caused by a single, typical primary case at the outset of an epidemic and occurs when R 0 > 1. For the basic SIR model in a closed population, R 0 = τ ρ .
Our analysis will focus on scenarios where individuals assort based on identity. In this case, assume that individuals all belong to one of two identity groups, indicated with the subscript 1 or 2. Let w i be the probability that interactions are with one's 93 ingroup, i ∈ {1, 2}. It is therefore a measure of homophily; populations are homophilous when w i > 0.5. It is important to recognize that groups can differ in their homophily (Morris, 1991) . For example, if groups differ in socioeconomic class and group 1 tends 96 to employ members of a group 2 as service workers, homophily will be higher for group 1; a member of group 2 is more likely to encounter members of group 1 than the reverse. We can update the equations governing infection dynamics for members of group 1, with 99 analogous equations governing members of group 2.
We assume the disease breaks out in one of the two groups, so the initial number of infected in group 1 is small but nonzero, while the initial number of infected in 102 group 2 is exactly zero. Without loss of generality, we have assumed that group 1 is always infected first. When homophily is low, the model exhibits standard SIR dynamics approximating a single unified population. When an infection breaks out in group 1, 105 homophily can delay the outbreak of the epidemic in group 2. Homophily for each group works somewhat synergistically, but the effect is dominated by w 2 . This is because the infection spreads rapidly in a homophilous group 1, and if group 2 is not homophilous, its 108 members will rapidly become infected. However, if group 2 is homophilous, its members can avoid the infection for longer, particularly when group 1 is also homophilous. If only group 2 is homophilous, the initial outbreak will be delayed, but the peak infection 111 rate in group 2 can actually be higher than in group 1, as the infection is driven by interactions with both populations (Figure 1 ). We also considered the case in which the transmissibility of the infection can be 114 reduced to very near the recovery rate, so that R 0 is very close to 1. In this case, homophily can protect groups where infection did not originally break out by keeping members relatively separated from the infection group ( Figure S3 ).
We model behavior adoption as a susceptible-infectious-susceptible (SIS) process, in which individuals can oscillate between adoption and non-adoption of the behavior indef-120 initely. We view this as more realistic than an SIR process for preventative-but-transient behaviors like social distancing or wearing face masks. To avoid confusion with infection status, we denote individuals who adopted the preventative behavior as Careful (C), 123 and those who have not as Uncareful (U ). Unlike a disease, which is reasonably modeled as equally transmissible between any susceptible-infected pairing, where behavior is concerned, susceptible individuals are more likely to adopt when interacting with in-126 group adopters, but less likely to adopt when interacting with outgroup adopters. We model the behavioral dynamics for members of group 1 are as follows, with analogous equations 1 governing members of group 2:
Members of group i may spontaneously adopt the behavior independent of direct social influence, and do so at rate α i . This adoption may be due to individual assessment of the behavior's utility, to influences separate from peer mixing, such as from media sources, 132 or to socioeconomic factors that make behavior adoption more or less easy for certain groups. For these reasons, we assume that groups can differ on their rates of spontaneous adoption. In reality, it is possible for groups to differ on all four model parameters, all of 135 which can influence differences in adoption rates. For simplicity, we restrict our analysis to differences in spontaneous adoption.
Uncareful individuals are positively influenced to become careful by observing careful 138 individuals of their own group, with strength β. However, this is countered by the force of outgroup aversion, γ, whereby individuals may cease being careful when they observe this behavior among members of the outgroup. The behavior is eventually discarded at 141 rate δ, representing financial and/or psychological costs of continuing to adopt preventive behaviors like social distancing. This model assumes no explicit homophily in terms of behavioral influence. On the 144 one hand, it seems obvious that we observe and communicate with those in our own group more than other groups. On the other hand, opportunities for observing outgroup behaviors are abundant in a digitally-connected world, which alter the conditions for 147 cultural evolution (Acerbi, 2019). For simplicity, we do not add explicit homophily terms to this system. Instead, we simply adjust the relative strengths of ingroup influence and outgroup aversion, β/γ. When this ratio is higher, it reflects stronger homophily for 150 behavioral influence. Numerical simulations that illustrate the influence of outgroup aversion are depicted in Figure 2 . In all cases, the behavior is first adopted by group 1. In the absence of 153 outgroup aversion, both groups adopt the behavior at saturation levels, with group 2 being slightly delayed. When outgroup aversion is added, the delay increases, but more importantly, overall adoption declines for both groups. This decline continues as long as 156 the strength of outgroup aversion is less than the strength of positive ingroup influence. A phase transition occurs here ( Figure 2C ,D). Although group 2 may initially adopt the behavior, adoption is subsequently suppressed, resulting in a polarizing behavior that is 159 abundant in group 1 but nearly absent in group 2.
1 Because all individuals have either adopted or not, U1 = 1 − C1, these coupled equations can be replaced by a single equation through substitutions. For intuitive reasons, we leave them as two coupled equations. We also consider the case in which one group has a higher intrinsic adoption rate, which could be driven by differences in personality types, norms, or media exposure 162 between the two groups. When α 1 > α 2 , the equilibrium adoption rate for group 1 could be considerably higher than for group 2, even when ingroup positive influence was greater than outgroup aversion ( Figure 2E , F). Note that these differences arise entirely 165 because of outgroup aversion. When γ = 0, both groups adopt at maximum levels.
Outgroup aversion has a strong influence on adoption dynamics. It can delay adoption, reduce equilibrium adoption rates, and even suppress adoption entirely in the later-168 adopting group. As we will see, when the behavior being adopted influences disease transmission, quite complex dynamics can emerge.
Before we explore the coupled dynamics of this system, we must add one more consideration to the model. We focus on the adoption of preventative behaviors that decrease the effective transmission rate of the infection, such as social distancing or wearing face 174 masks. We model this by asserting that the transmission rate is τ C for careful individuals and τ U for uncareful individuals, such that τ U ≥ τ C . When considering the 
The model has six compartments, with two-letter abbreviations denoting the disease and behavioral state ( Figure S4 ). The coupled dynamics for members of group 1 are as follows, with analogous equations governing members of group 2, such that the full system is defined by 12 coupled differential equations. A list of all parameters is presented in Table 1 .
Behavioral adoption is independent of infection status in this model. This may not be a realistic assumptions for some systems, such as Ebola, where the both the infection 180 status of the adopter and the perceived incidence in the population are likely to influence behavior. The assumption is more realistic for infections like influenza and COVID-19, where infection status is not always transparent and decisions are likely to be made on 183 the basis of more abstract socially-transmitted information. To make the behavioral adoption most meaningful, we focus on the case where instantaneous and universal adoption of the careful behavior would decrease the disease transmissibility so that R 0 < 1. That is, if everyone immediately adopted the behavior, the epidemic would fizzle out. However, behavior adoption does not typically work this way. We have already observed that under assumptions of between-group variation and outgroup aversion, a 189 behavior is likely to be adopted neither instantaneously nor universally. The question we tackle now is how those socially-driven facets of behavioral adoption influence disease dynamics. Figures S5, S6 ). In the absence of either ho-195 mophily or outgroup aversion, our results mirror previous work on coupled contagion in which the adoption of inhibitory behaviors reduces peak infection rates, flattening the curve of infection. Due to differences in spontaneous adoption rates, however, group 198 2 may see a higher peak infection rate even when the infection breaks out in group 1, because the inhibitory behavior spreads more slowly in that group ( Figure 3A ).
Homophilous interactions further lower infection rates. If group 1 alone is homophilous, 201 the infection rate declines in that group, while peak infections actually increase in group 2 ( Figure 3C ). This is because group 1 adopts the careful behavior early, decreasing their transmission rate and simultaneously avoiding contact with the less careful members of 204 group 2, who become infected through their frequent contact with group 1. If group 2 alone is homophilous, on the other hand, the infection is staved off even more so than if both groups are homophilous ( Figure 3B , D). This is because members of group 2 avoid 207 contact with group 1 until the careful behavior has been widely adopted, while members of group 1 diffuse their interactions with some members of group 2, and these are less likely to lead to new infections.
Outgroup aversion considerably changes these dynamics. First and foremost, outgroup aversion leads to less widespread adoption of careful behaviors, dramatically increasing the size of the epidemic. Moreover, because under many circumstances there will be 213 between-group differences in equilibrium behavior-adoption rates, this can lead to dramatic group differences in infection dynamics. In the absence of outgroup aversion, we saw that homophily in group 2 could lead to an almost total suppression of the epidemic.
Not so with outgroup aversion, in which the peak infection rates increase relative to the low homophily case ( Figure 3E , F). This occurs because homophily causes a delay in the infection onset in group 2. Behavioral adoption slows the epidemic initially in both 219 groups. However, when the infection finally reaches group 1, behavioral adoption has decreased past its maximum due to the outgroup aversion, causing peak infections in both groups to soar.
The dynamics are particularly interesting for the case where group 1 is homophilous. Recall that this is the group in which the epidemic first breaks out. Because of homophily and rapid behavior adoption, the epidemic is initially suppressed in this group. However, 225 due to slower and incomplete behavior adoption, the infection spreads rapidly in group 2. As the infection peaks in group 2 while group 1 decreases its behavior adoption rate, we observe a delayed "second wave" of infection in group 1, well after the infection 228 has peaked in group 2 ( Figure 3G ). This effect is exacerbated when both groups are homophilous, as the epidemic runs rampant in the less careful group 2 ( Figure 3H ). As shown in the Supplementary Material, the timing of the second wave is also delayed to 231 a greater extent when the adopted behavior is more efficacious at reducing transmission ( Figure S7 ).
It is well known that disease transmission is influenced by behavior. What is often overlooked is how behavior itself changes within heterogeneous cultural populations. Both population structure and social identity influence who interacts with whom, af-237 fecting disease transmission, and who learns from whom, affecting behavior change. We have highlighted two of these forces-homophily and outgroup aversion-and shown their dramatic influence on disease dynamics in a simple model.
Homophily is often treated as though it were a global propensity for assortment by type (e.g. Centola, 2011). However, homophily is frequently observed to a greater or lesser degree across subgroups, a phenomenon known as differential homophily (Morris, 1991).
There are several different interpretations of homophily in these simple models. When the homophily of group 1 is less than group 2, group 1 can be interpreted as "frontline" workers, who are exposed to a broader cross-section of the population by nature of their 246 work. Outgroup avoidance of this group's adopted protective behavior can arise if there are status differentials across the groups. Prestige bias is a mechanism that can drive differential uptake of novel behavior by different groups (Boyd and Richerson, 1985) , for 249 which there is quite broad support (Jiménez and Mesoudi, 2019) . When both groups are highly homophilous and outgroup aversion is strong, the resulting dynamics suggest the case of negative partisanship (Abramowitz and Webster, 2016), in which differences 252 in the relative size of the epidemic will be driven purely by differences in the adoption rates by the two groups, including those differences induced by outgroup aversion.
Homophily has three main effects in our coupled-contagion models. When homophily 255 is strong, it can protect the uninfected segment of the population (i.e., group 2) if the transmissibility of the infection is sufficiently low ( Figure S3 ) or if outgroup aversion is negligible ( Figure 3 ). However, when R 0 is high enough and outgroup aversion induces 258 group differences in behavior adoption, strong homophily among group 2 can lead to larger, albeit delayed, epidemics in the initially-uninfected segment of the population. Finally, when homophily is asymmetric and higher in group 1, it can substantially reduce 261 the size of the epidemic in that group because the protective behavior spreads rapidly at the outset of the epidemic when there is the greatest potential to reduce the epidemic's toll.
Incorporating adaptive behavior into epidemic models has been shown to significantly alter dynamics (Fenichel et al., 2011) . Prevalence-elastic behavior (Funk et al., 2010) is a behavior that increases with the growth of an epidemic. While it may be protective, it can also lead to cycling of incidence, which can prolong epidemics. Similarly, the adoption of some putatively-protective behaviors that are actually ineffective can be driven by the existence of an epidemic when the cost of adoption is sufficiently low 270 (Tanaka et al., 2009). We have shown in this paper that group-identity processes can have large effects, leading groups that would otherwise respond adaptively to the threat of an epidemic to behave in ways that put them, and the broader populations in which 273 they are embedded, at risk.
The context of the ongoing COVID-19 pandemic provides some interesting and timely perspective on the relationship between behavior, adaptive or otherwise, and transmis- infection rates. We expect that such a situation will not induce strong prevalence-elastic behavioral responses, and that the sorts of identity-based responses we describe here will dominate the behavioral effects on transmission.
In terms of social interaction and adoption dynamics, group identity exerts its influence by way of homophily, a powerful social force. Aral et al. (2009), for example, showed that homophily accounted for more than 50% of contagion in a natural exper-288 iment on behavioral adoption. The effect of homophily on diffusion dynamics can be variable. For example, homophily can slow down convergence toward best responses in strategic networks (Golub and Jackson, 2012). This can be critical when the time scales 291 of learning and infection are different. Homophily can also lower the threshold for desirability (or the selective advantage) required for adoption of a behavior. Creanza and Feldman (2014) showed that homophily and selection can have balancing effects-the 294 selective advantage of a trait does not need to be as high to spread when it is transmitted assortatively by its bearers. In the case of our coupled-contagion model, strong homophily interferes with the adaptive adoption of protective behavior. Centola (2011) 297 showed that homophily can increase the rate of adoption of health behaviors, but his experimental population could assort only on positive cues, and had no ability to signal or perceive group identity. When homophily promotes negative partisanship (Abramowitz 300 and Webster, 2016) with respect to the adoption of adaptive behavior, it can lead to quite complex outcomes, as we have outlined in this paper.
How do we intervene in a way to offset the pernicious effects of negative partisanship on 303 the adoption of adaptive behavior? While it may seem obvious, strategies for spreading efficacious protective behaviors in a highly-structured population with strong outgroup aversion will require weakening the association between protective behaviors and par-306 ticular subgroups of the population. Given that we are writing this during a global pandemic in which perceptions and behaviors are highly polarized along partisan lines, attempts to mitigate partisanship in adaptive behavioral responses seem paramount to 309 support. The models we have analyzed in this paper are broad simplifications of the coupled dynamics of behavior-change and infection. It would therefore be imprudent to use 312 them to make specific predictions. The goal of this approach is to develop strategic models in the sense of Holling (1966) , sacrificing precision and some realism for general understanding of the potential interactions between social structure, outgroup aversion, and coupled contagion (Levins, 1966; Smaldino, 2017) . Such models provide a scaffold for the development of richer theories concerning coupled disease and behavioral contagions. Epstein, J. M., Parker, J., Cummings, D., and Hammond, R. A. (2008) . Coupled contagion dynamics of fear and disease: mathematical and computational explorations. line model assumes random interactions governed by mass action, and the dynamics are described by the following well-known differential equations describing the proportion of the population in these three compartments:
This model yields the classic dynamics in which the susceptible and recovered populations appear as nearly-mirrored sigmoids, while the rate of infected individuals rises 447 and falls ( Figure S1 ). Figure S1 . Classic SIR dynamics. Here τ = 0.3, ρ = 0.07.
The threshold for the epidemic is given by the basic reproduction number, R 0 , which is a measure of the expected number of secondary cases caused by a single, typical at the outset of an epidemic and occurs when R 0 > 1. R 0 is essentially the ratio of the rate of additional infections to the rate of removal of infections through recovery and possibly death. For the classic SIR model, the calculation is quite simple. We assume that S ≈ 1 at the time of initial outbreak, and we are interested in the case where the rate of new infections exceeds the rate of recovery:
Appendix B. The SIR model with homophily
We extend the SIR model to explore scenarios where individuals assort based on 450 identity. In this case, assume that individuals all belong to one of two identity groups, indicated with the subscript 1 or 2. Let w i be the probability that interactions are with one's ingroup, i ∈ 1, 2. It is therefore a measure of homophily; populations are 453 homophilous when w i > 0.5. Homophily can be asymmetric between groups, because members of one group may be more likely to have interactions with the outgroup than the other group. For example, low SES individuals, who often work service jobs, may 456 be unable to avoid interactions with the outgroup. We can update the equations governing infection dynamics for members of group 1, with analogous equations governing members of group 2:
As illustrated in Figure S2 , when an infection breaks out in group 1, homophily can delay the outbreak of the epidemic in group 2. Homophily for each group works somewhat synergistically, but the effect is dominated by w 2 . This is because the infection 462 spreads rapidly in a homophilous group 1, and if group 2 is not homophilous its members will rapidly become infected. However, if group 2 is homophilous, its members can avoid the infection for longer, particularly when group 1 is also homophilous. 465 We also explored a scenario where R 0 for the basic model was very close to 1, indicating a small epidemic (we used R 0 = 1.14; Figure S3 ). When homophily was low (w = 0.6), the populations mixed a lot. The proportion of infected individuals in group 1 briefly fell, 468 as the majority of new infected individuals were in group 2. However, the groups quickly matched their pace and experienced the outbreak in tandem. When homophily was high (w = 0.99), not only did group 2 experience a delayed outbreak, it also experienced a 471 substantially lower peak infection rate, because the total number of infected individuals at the start of its outbreak was so much lower than that experienced by group 1. Thus, homophily can serve not only to delay an epidemic, but also to reduce it in the cases of homophily and the SIS behavioral adoption model with outgroup aversion. The adopted behavior decreases the effective transmission rate of the infection due to measures like social distancing. We model this by asserting that the transmission rate is τ C for careful 480 individuals and τ U for uncareful individuals, such that τ U ≥ τ C . When considering the interaction between groups, we use the geometric mean, so the transmissibility between SU and IU is √ τ U τ C .
The model has six compartments, with two-letter abbreviations denoting the disease and behavioral state ( Figure S4 ). The coupled dynamics for members of group 1 are as follows, with analogous equations governing members of group 2, such that our system is defined by 12 coupled differential equations:
Here we present an extended version of the full model analysis presented in the main text, that includes intermediate homophily of w i = 0.9. Analysis with no outgroup 486 aversion is shown in Figure S5 , and with outgroup aversion is shown in Figure S6 . The figures illustrate how homophily and outgroup aversion can interact to produce unintuitive dynamics. When both forces are present, an infection that begins in group 1 489 can peak earlier and stronger in group 2, followed by a smaller peak in the group where it began.
In the main text analysis, we assumed that the adopted behavior reduced the transmission to below the threshold for R 0 < 1. In other words, if everyone immediately and universally adopted the behavior at the start of the outbreak, it would not become an epidemic. Although we view this as a reasonable assumption (that is, the efficacy of the behavior is reasonable, not the expectation that it will be either immediately or universally adopted), it is also worth examining what happens with the spread of behaviors 498 that reduce transmission, but not below epidemic levels. Figure S7 illustrates the model SU1 SC1 Figure S4 . Illustration of the model dynamics. (A) Transition probabilities between compartments for members of group 1. For simplicity these probabilities do not include the influence of homophily. (B) homophilous interactions. Members of group i have physical contact with members of their own group with probability w i and members of the outgroup with probability 1 − w i . dynamics for varying levels of behavior efficacy (τ C ) with and without outgroup aversion and for both weak and strong homophily.
Without outgroup aversion (γ = 0), the effect is clear: the more efficacious the behavior, the smaller the epidemic. This occurs because the behavior spreads effectively. With outgroup aversion, two things happen. First, the more effectively the behavior reduces 504 transmission (that is, the smaller τ C is), the smaller the overall epidemic, but with an effect that is much stronger in group 1. In group 2, the effect of increased behavior efficacy is relatively small, because adoption is reduced and delayed. Second, the better the be-507 havior reduces transmission, the bigger the delay in when group 1 experiences a "second wave." This illustrates how complex the dynamics of disease transmission can become when even simple assumptions about behavior and group structure are considered. 
More effective behavior adoption Figure S7 . Coupled dynamics of the full model for varying levels of behavior efficacy, τ C = {0.15, 0.1, 0.069}, where only the last case would provide R 0 < 1 if immediately and universally adopted at the start of the outbreak. We provide analyses with and without outgroup aversion and for both weak and strong homophily. Darker lines are group 1, lighter lines are group 2. Parameters used: τ U = 0.3, ρ = 0.07, α 2 = 0.1, α 2 = 0.001, β = 0.3, δ = 0.