{'fraction_non_alphanumeric': 0.03187683172839036, 'fraction_numerical': 0.011247288090435048, 'mean_word_length': 5.099477655252467, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 1, 'zh_pornsignals.json': 0}}
Social information use shapes the coevolution of sociality and virulence

Abstract Social contacts can facilitate the spread of both survival‐related information and infectious diseases, but little is known about how these processes combine to shape host and parasite evolution. Here, we use a theoretical model that captures both infection and information transmission processes to investigate how host sociality (contact effort) and parasite virulence (disease‐associated mortality rate) (co)evolve. We show that selection for sociality (and in turn, virulence) depends on both the intrinsic costs and benefits of social information and infection as well as their relative prevalence in the population. Specifically, greater sociality and lower virulence evolve when the risk of infection is either low or high and social information is neither very common nor too rare. Lower sociality and higher virulence evolve when the prevalence patterns are reversed. When infection and social information are both at moderate levels in the population, the direction of selection depends on the relative costs and benefits of being infected or informed. We also show that sociality varies inversely with virulence, and that parasites may be unable to prevent runaway selection for higher contact efforts. Together, these findings provide new insights for our understanding of group living and how apparently opposing ecological processes can influence the evolution of sociality and virulence in a range of ways.

Animals exhibit strong variation in sociality, both within (Watters and Sih 2005;Pike et al. 2008;Croft et al. 2009;Tanner and Jackson 2012;Aplin et al. 2013Aplin et al. , 2015bWeber et al. 2013) and between (Sachser 1986; Barton et al. 1996) populations. Some individuals have relatively few, potentially stable associations (e.g., nongregarious species or those that form pair bonds) while others have a greater number of interactions that may be more transient (e.g., herding behavior or roaming individuals) (Couzin 2006;Silk et al. 2014;Farine et al. 2015b). Crucially, what constitutes a good social strategy under one set of ecological conditions may be a poor choice under different circumstances (Krause and Ruxton 2002), hence, it is important to understand how changes in the environment shape social behavior. Depending on the ecological circumstances, sociality may be associated with various costs (e.g., higher risk of infection or greater competition for resources) and benefits (e.g., information exchange, increased mating opportunities, or symbiont transmission), which trade-off to determine whether selection favors increased sociality (Romano et al. 2021). While sociality can take a variety of forms (e.g., contact effort, rate, turnover, degree, or strength), in this study, we shall focus on contact effort.
Intuitively, if sociality confers diminishing benefits but accelerating costs, then the population should evolve to an evolutionarily stable level of sociality. This is straightforward when costs and benefits are fixed, so that a given level of sociality always incurs the same cost or provides the same benefit. For example, living in a larger groups may lead to foraging benefits  or a reduced risk of predation (Kenward 1978). However, when the costs and benefits are dynamic, for example, due to variation in infection prevalence (dynamic cost) and information prevalence (dynamic benefit), feedbacks may exist between sociality and the likelihood of realizing an associated cost or benefit (Cantor et al. 2021b). For example, more social members of a population may experience greater exposure to parasites (Lloyd-Smith et al. 2005;Eames and Keeling 2006;Ashby and Gupta 2013) and access to social information (Aplin et al. 2012;Aplin et al. 2015a;Snijders et al. 2021) than those that form fewer contacts or have more stable associations (Evans et al. 2020). However, the sociality of the population will affect the prevalence of infection or social information in the population, and therefore, the likelihood of incurring a cost or realizing a benefit of sociality (Romano et al. 2020). For example, a study on wild house finches found that individuals that visited bird feeders more often (an outcome of information acquisition [Hillemann et al. 2020]) were more likely to be infected by the bacterial pathogen Mycoplasma gallisepticum (Adelman et al. 2015). Thus, while we should expect parasitism and social information to influence the evolution of sociality, we must also consider how the (co)evolution of sociality and virulence shapes the dynamics of these cost or benefit processes due to ecoevolutionary feedbacks (Ashby et al. 2019). An outstanding question, which we address in the present study, is how dynamic costs (in terms of parasite transmission) and benefits (in terms of information transmission) mediate the (co)evolution of sociality and virulence.
The evolution of virulence is intrinsic to the informationdisease trade-off when being social. Mortality virulence (as opposed to sterility virulence, which we do not consider here) is typically costly to the parasite, as it reduces the average infectious period and, hence, limits the time available for transmission (note that this is not always the case, for example, if host death is required for transmission). Naively, one may, therefore, assume that selection should favor lower virulence. However, parasites usually need to harm their hosts to grow and reproduce, and so there may be a trade-off between virulence and onwards transmission, leading to selection for an intermediate level of virulence (reviewed in Alizon et al. 2009). As a result, entwined in the evolution of sociality in hosts are virulence-transmission trade-offs, which will not only determine the direction of selection but also the prevalence of infection in the host population.
Classical predictions for parasite evolution suggest that higher levels of population mixing should select for higher virulence when it is positively correlated with transmission (Ewald 1994). Yet this does not necessarily mean that higher levels of sociality will select for higher virulence, as this depends on factors such as population structure (Evans et al. 2020;Cantor et al. 2021b;Romano et al. 2021). Bonds et al. (2005) showed that the coevolution of contact effort with virulence may instead lead to an inverse relationship between these traits. They also showed that sociality (contact rate) is minimized for intermediate infection prevalence, and therefore, higher infection prevalence can select for greater sociality. This is because there is little chance of avoiding infection when prevalence is high, and so the marginal costs of greater sociality are low. In a related study, Prado et al. (2009) used a stochastic individual-based network model to show that coevolution between host contact number (degree) and parasite virulence (disease-associated mortality rate) can lead to fluctuating selection in both traits, with the cost of sociality depending both on the virulence of the parasite and its prevalence in the population. However, few theoretical studies have considered how ecoevolutionary feedbacks mediate the evolution of sociality (see Cantor et al. 2021b for a review), and as far as we are aware, these are the only two theoretical studies to date to explore the coevolution of sociality and virulence (Buckingham and Ashby 2022). While these studies demonstrate the importance of parasitism as a dynamic cost in the evolution of sociality, both assume that the benefits of sociality are fixed, so that each additional contact increases host fitness by a predetermined amount. Theoretical studies have yet to consider dynamic rather than fixed benefits of sociality.
One of the most prominent examples of a dynamic benefit of sociality is social information, which can provide individuals with knowledge about ephemeral resources or conditions such as foraging or nesting sites, or predation risk (Doligez et al. 2002;Danchin et al. 2004;Valone 2007). This information can be transmitted through active signaling (Elgar 1986) or via inadvertent cues (Pöysä 1992;Galef and Giraldeau 2001). Empirical studies from wild songbirds have demonstrated that more social individuals are likely to receive information sooner than poorly connected members of the population (Aplin et al. 2012Snijders et al. 2021). We should, therefore, expect sociality to increase access to survival-related information, but as is the case with infection prevalence, the prevalence of information will depend on sociality, forming an ecoevolutionary feedback that causes the evolution of sociality to diverge from the fixed-benefit scenario.
While social information and parasite transmission share many similarities, their dynamics may occur over similar or very different timescales, which may affect selection on social strategies. Social information about predation or resource availability is expected to be of high value that rapidly decays over time (between seconds and days), whereas the risk of infection may vary more slowly and over longer periods of time (weeks, months, or years). For example, the life cycle of a parasite can decouple the transmission from social contacts by several weeks (Grear et al. 2013). In general, we should expect social information dynamics to be relatively fast compared to infection dynamics. The success of a particular social strategy is likely to depend on the relationship between these timescales, as well as wider contact patterns in the population, the value of social information, and the prevalence and severity of infection.
Here, we examine how social information mediates the evolution of sociality (contact effort) and virulence (diseaseassociated mortality rate). We present a mathematical model of social information and epidemiological dynamics, allowing host sociality to evolve with no inherent costs or benefits, and parasite virulence to evolve subject to a trade-off with transmission (i.e., lower virulence implies lower transmission). Evolution is determined purely by balancing access to social information, which reduces the mortality rate, and infectious disease caused by parasites, which increases the mortality rate. We consider two versions of the model, where social information dynamics occur on relatively fast or slow timescales, with fast information dynamics allowing for a separation of timescales with epidemiological dynamics. We show that selection favors increased sociality when social information is neither very common nor too rare and infection prevalence is either high or low. When social information and infection prevalence are both at intermediate levels, selection may favor increased or decreased sociality depending on the relative costs and benefits of acquiring social information and parasites, the relative timescales of the transmission processes, as well as the sociality of other members of the population. As a result, we show how ecological conditions can determine when: (1) the population evolves toward an evolutionarily stable level of sociality; (2) parasites are unable to constrain selection for sociality; or (3) when selection for reduced sociality drives social information and parasites "extinct."

FULL MODEL
We model the (co)evolution of sociality (contact effort, E ) and virulence (disease-associated mortality rate, α) due to the transmission of social information and horizontally transmitted parasites that cause infectious disease (Fig. 1). We assume that the environment is constantly changing (e.g., food sites may be ephemeral, predation risk may vary over time and space) and that individuals can learn about the environment independently and through social cues. For simplicity, individuals either have poor (P) or good (G) information about the environment. Those with poor information have a baseline mortality rate of d (on average), and those with good information have mortality rate ad, where 0 ≤ a < 1. All individuals continuously learn about the environment at a constant (arbitrary) rate, but the extent to which an individual can learn independently is assumed to be limited, corresponding to a relatively poor information state (P). An individual in a poor information state can only improve to a good information state (G) through social cues from an individual who is better informed about the environment, which they do with probability τ given social contact. Individuals are poor at integrating information, such that multiple individuals with poor information cannot come together to produce good information-good information can only be socially learnt. For example, the location of a highly camouflaged predator may (almost never) be individually discovered, but is readily socially learnt, and that information is only valid while the individual is foraging near the predator. Since the environment is constantly changing, and since individual priorities may change (e.g., an individual may seek shelter once satiated, seek a different type of food, or simply leave the area), socially learned information loses value to an individual over time (but may still be valuable to others). For simplicity, individuals in the good information state revert to the poor state of information at a constant rate, σ.
In addition to their information status, individuals are classed as either susceptible (S) or infectious (I ). Infected hosts transmit parasites to susceptible social contacts with probability β per social contact. Infected hosts recover at rate γ, at which point they become susceptible again. Infection leads to an increase in the host mortality rate due to virulence, α. We assume that the transmission probability (β) and virulence (α) are evolving traits subject to a trade-off such that β = β(α). While increased transmission is beneficial for the parasite, increased virulence is costly as it results in higher host mortality and therefore, reduces the average infectious period. In the absence of a trade-off, the parasite would, therefore, maximize the infectious period by minimizing virulence. We assume that new transmission stages are produced by infecting host cells or tissues, and so more transmissible parasites are also more virulent (β (α) > 0). We also assume that the parasite eventually tends toward perfect transmission as virulence increases (β(α) → 1as α → ∞, with β (α) < 0; Fig. 1b). This means that there are diminishing returns on virulence, which ensures that there is always an optimal level of virulence, α * .
We model social contacts following Bonds et al. (2005). Social contacts are assumed to be ephemeral, random, and occur based on contact "effort." Each individual, i, has a contact effort, E i , which is assumed to be a heritable quantitative trait. An individual's contact frequency, C i = E iĒ , is the product of its own contact effort and the average contact effort of the population (Ē = 1 N N j = 1 E j ). We assume that the only benefits and costs associated with contact effort (sociality) are access to survival-related information and the risk of infection, respectively.
In a monomorphic population with E i = E there are four classes (S P , S G , I P , I G ), where S i and I i refer to susceptible and infected individuals in information state i ∈ {P, G}and the total population size is N = S P + S G + I P + I G . The per-capita birth rate is equal to (b − qN ), where b is the maximum birth rate and q is the strength of density dependence (resource competition). The per-capita information transmission rate is equal to the product of the information transmission probability per contact, τ, the population contact frequency, E 2 , and the proportion of individuals in state G, 1 N (S G + I G ). Similarly, the parasite transmission rate is equal to the product of the parasite transmission probability per contact β, the population contact frequency, E 2 , and the proportion of individuals who are infected, 1 N (I P + I G ). The population dynamics are described by the following set of ordinary differential equations (ODEs):

APPROXIMATION
When the dynamics of social information are much faster than demographic (τE 2 , σ b, d ) and epidemiological processes (τE 2 β, σ γ), the proportion of individuals in the good information state for a given value of E , G E , rapidly reaches equilibrium. Letting G E = 1 N (S G + I G ), we see that Thus, either no individuals are in information state G, or G * E = 1 − σ τE 2 , when σ < τE 2 . We can, therefore, make the following approximation to the full model when social information dynamics are relatively fast: where N = S + I and G * E = max(1 − σ τE 2 , 0) is the proportion of individuals in information state G. Note that G * E is an increasing, concave downward function of E , which means that there are diminishing effects of sociality on mortality.

ANALYSIS
We use evolutionary invasion analysis (adaptive dynamics; Geritz et al. 1998) to determine how host contact effort (E ) and parasite virulence (α) (co)evolve. Briefly, this method assumes that mutations (1) are sufficiently rare, so that we can separate ecological and evolutionary timescales (i.e., the ecological dynamics reach equilibrium before the next mutation occurs); and (2) have small phenotypic effects, so that mutant traits are similar to resident traits. For the full model (Equation 1), we derive host fitness analytically (see Supplementary Material for details), but solve the system numerically, as it is not possible to find an expression for the coexistence equilibrium where parasites and social information are both present. For the fast social information approximation (Equation 3), it is possible to find an expression for the coexistence equilibrium, and in turn, expressions for fitness and fitness gradients. However, we omit these expressions as they are lengthy and provide no analytical insights, and so we present numerical results instead. We illustrate the different dynamics using evolutionary simulations. Briefly, every T time units of the deterministic ODE solver, a rare mutant is introduced which is phenotypically similar to a randomly chosen member of the population. Phenotypes which fall below an arbitrary frequency, , are removed from the population, and the process is repeated. The simulations relax the adaptive dynamics assumptions of continuous traits and a complete separation of ecological and evolutionary time scales (source code available in the Supplementary Material).

Ecological Dynamics
In the full model, the host population has a trivial equilibrium at S * P = N * = (b − d )/q in the absence of parasites or social information, which exists provided b > d (hereafter, we assume this condition is always satisfied). This equilibrium is stable, if whereR I 0 andR D 0 are the basic reproductive ratios for social information and infection at the trivial equilibrium, respectively. The basic reproductive ratios are the average number of transmission events per informed or infected individual in an otherwise uninformed or susceptible population. IfR I 0 > 1, then social information can spread in the absence of parasites and ifR D 0 > 1 then infection can spread in the absence of social information.
The full model also has three nontrivial equilibria:

and (iii) both information and infection present (coexistence equilibrium). The latter is viable if R I
0 > 1 at the infectiononly equilibrium and R D 0 > 1 at the information-only equilibrium, where R I 0 and R D 0 are the full basic reproductive ratios for information and infection: with I α = ad + α + σ, I γ = ad + γ + σ and D = d + α + γ (see Supplementary Material for derivation). Note that in the special case where there is either no infection or no social information, Equations 6 and 7 reduce to Equations 4 and 5. Intuitively, for the coexistence equilibrium to be stable, we require R I 0 > 1 at the infection-only equilibrium and R D 0 > 1 at the informationonly equilibrium (i.e., social information and infection can always spread when rare). While it is not possible to obtain an analytical expression for the coexistence equilibrium, a numerical parameter sweep indicates that it is always stable when it is viable.
The fast social information approximation has two equilibria. There is an infection-free equilibrium at and a coexistence equilibrium at: where The corresponding basic reproductive ratios for the fast social information approximation are given below: (see Supplementary Material). The coexistence equilibrium is stable whenR D 0 > 1 and is unstable whenR D 0 < 1 (the opposite is true for the infection-free equilibrium). Note that whenR I 0 < 1, we must have G * E = 0 (social information transmission cannot be sustained), and hence,R D 0 =R D 0 . The basic reproductive ratios for the full model and the approximation are very similar provided social information dynamics are sufficiently fast (τ β; Fig. 2a,b). When information dynamics occur on slower timescales, then the approximation diverges from the full model ( Fig. 2a,b). Likewise, as the information dynamics become increasingly fast relative to the epidemiological dynamics, the equilibrium population distributions in the full model approach that of the approximation (Fig. 2c,d).

Evolution of sociality
We explore the evolution of host sociality in terms of the contact effort, E . We first investigate how the fitness gradient varies for a fixed value of E to illustrate how social information and infection prevalence influence the direction of selection. We then focus our analysis on the extent to which social information reduces mortality (a) (note that smaller values of a correspond to greater benefits of social information), the cost of being infected (α), the rate at which social information loses value to an individual (expires) relative to its transmission probability (σ/τ), and the relative transmission probabilities of social information and infection (τ/β).
To explore host evolution, we consider the invasion of rare host mutant with contact effort E m ≈ E into an established resident population at equilibrium (denoted by asterisks). In the full model, the invasion dynamics of the rare host mutant are given by the following: For the fast social information approximation, we let Rearranging and substituting G * E = 1 − σ τE 2 gives the following:

that social information and infection prevalence vary accordingly. In both cases, the host fitness gradient is positive (bluer shading) when social information prevalence is intermediate and there is either a high or low level of infection, and is negative (redder shading) when social information prevalence is either at a high or low level and infection is at intermediate prevalence.
Fixed parameters as in Figure 2, except β = 0.2 We can, therefore, approximate the invasion dynamics of a rare mutant when social information dynamics are fast by: In the Supplementary Material, we show the derivation for invasion fitness in both versions of the model. Figure 3 shows how the host fitness gradient varies with social information and infection prevalence when the benefits of sociality are relatively high (Fig. 3a) or low (Fig. 3b) compared to the costs. Social information dynamics are assumed to be fast, but the overall patterns hold for slow information dynamics. Note that here E is fixed, with σ and β modulating social information and infection prevalence, but when E evolves (see Host evolutionary dynamics) it will feedback to affect prevalence and, hence, selection for sociality. Nevertheless, considering how the fitness gradient varies when E is fixed allows us to qualitatively see how changes in social information and infection prevalence affect the fitness gradient, all else being equal. The fitness gradient is always positive when social information prevalence is intermediate and infection is either rare or common, regardless of whether the benefits of sociality are rel-atively high or low compared to the costs. Intuitively, increased sociality is likely to be beneficial when infection prevalence is low, but only if social information is neither too rare nor very common. This is because greater sociality does not significantly increase the rate at which individuals obtain social information if it is readily available or unlikely to become accessible. Somewhat counterintuitively, increased sociality may also be beneficial when infection prevalence is high (as shown in Bonds et al. 2005). This is because most individuals are likely to be infected anyway, but increased sociality will improve access to social information with little increase to the risk of infection. Conversely, the fitness gradient is always negative when social information is either rare or very common and infection is at intermediate prevalence. This pattern mirrors the one described above, but with the roles of social information and infection switched due to their opposing effects on the fitness gradient. Intuitively, the fitness gradient is negative when social information prevalence is low and infection is common in the population, as greater sociality increases the risk of infection but does not substantially increase the likelihood of obtaining social information. But perhaps counterintuitively, the fitness gradient is also negative when social information is widespread and infection is at moderate levels. This is because most individuals are well-informed, and so increased sociality will only marginally improve access to social information but may substantially increase the risk of infection.

HOST FITNESS GRADIENT
When both social information and infection are at intermediate prevalence, the sign of the fitness gradient depends on the relative costs and benefits of being infected or informed. When awareness of social information is relatively more valuable than the cost of being infected, the fitness gradient is positive whenever social information prevalence is at an intermediate level regardless of infection prevalence (Fig. 3a). Infection may, therefore, not always be sufficient to curtail the evolution of sociality. In contrast, when awareness of social information is less valuable, and the cost of being infected is relatively high, the fitness gradient is negative whenever infection prevalence is at an intermediate level regardless of social information prevalence (Fig. 3b). Our qualitative analysis of the fitness gradient suggests that the host population may experience different evolutionary outcomes depending on the initial conditions: if infection prevalence is sufficiently low, the population may evolve toward a stable level of sociality, but if infection is initially very common then the population may experience runaway selection for greater sociality.

HOST EVOLUTIONARY DYNAMICS
We focus on how the host contact effort, E , evolves depending on the rate at which social information loses value to an individual (the expiry rate), σ, relative to the information transmission probability, τ, which we consider for fixed costs of infection (virulence, α) and benefits of social information (a) (Fig. 4, Supplementary information S1). The shaded regions in Figure 4 and Supplementary information S1 indicate the direction of selection for the contact effort. If the initial contact effort is too low, then neither infection nor social information is viable (R I 0 ,R D 0 < 1; grey regions in Fig. 4, Supplementary information S1) and so no adaptive evolution occurs. IfR I 0 > 1 and/orR D 0 > 1, adaptive evolution will occur, causing the contact effort to increase or decrease until the contact effort either: (i) evolves to a continuously stable strategy (CSS; an "evolutionary endpoint"); (ii) decreases until neither infection nor social information is viable (R I 0 ,R D 0 < 1), resulting in a semistable contact effort (selection prevents an increase in contact effort, but drift may cause it to decrease); or (iii) increases until a physiological limit is reached. The first outcome (CSS) generally occurs for sufficiently low values of σ/τ (social information expires at a relative slow rate, all else being equal), provided the initial contact effort is neither too low nor too high. This ensures that social information prevalence is neither too rare nor too common, resulting in evolution toward an optimal contact effort ( Fig. 5a,b). If it exists, the CSS peaks for intermediate values of σ/τ, which will typically correspond with moderate levels of information prevalence. Social information expires more quickly as σ/τ increases, and so the overall prevalence of social information in the population falls, which increases selection for sociality. However, as sociality increases so too does infection prevalence, which reduces selection for sociality.
The second outcome (semistable contact effort) occurs for sufficiently high values of σ/τ (social information expires at a relative fast rate, all else being equal). As information is relatively scarce, this causes the population to evolve a lower contact effort until bothR I 0 < 1 andR D 0 < 1, at which point the fitness gradient is zero and no further adaptive evolution occurs (hence, it is semistable, as it could still be subject to drift; Fig. 5d). For intermediate values of σ/τ, the contact effort may evolve to a stable evolutionary endpoint (CSS) or increase through runaway selection until a physiological limit is reached (Fig. 5c). The outcome depends on the precise costs of infection (α), the benefits if information (a), and the initial contact effort. Higher costs of infection (larger α) and smaller benefits of information (lower a) generally have a stabilising effect, whereas lower costs of infection and larger benefits of information promote runaway selection at intermediate σ/τ. Thus, if the costs of being more social are relatively low, the population may experience runaway selection, but at higher costs, sociality is curtailed at a stable intermediate level.
Moreover, the higher the initial contact effort, the more likely the population will experience runaway selection. Runaway selection can occur, for example, when most individuals in the population are infected, and so there is little cost to increased sociality. Runaway selection for sociality is unrealistic as contact efforts would be constrained by other factors (e.g., other costs or physical constraints). Instead, runaway selection for sociality in the model should be interpreted as infection being insufficient to constrain sociality.
The results are broadly the same whether social information and epidemiological dynamics occur on similar timescales (σ ≈ γ; Fig. 4) or when the former occurs on a much faster timescale (σ γ; Supporting information Fig. S1). However, there are a few notable differences. First, the viability threshold for social information transmission is lower when the dynamics are rapid (R I 0 < R I 0 ), which means the population can evolve over a broader range of initial contact efforts. Second, faster information dynamics generally make runaway selection less likely. This means that when social information dynamics are relatively slow, there may be runaway selection for greater sociality, but when the social information dynamics are relatively fast, sociality may evolve to a stable level (Fig. 6). The timescale of social information dynamics can, therefore, play an important role in determining the evolution of sociality.

Evolution of virulence
To explore parasite evolution, we consider the invasion of rare mutant with virulence α M ≈ α into an established resident population (at equilibrium, denoted by asterisks). For simplicity, we  Figures 6 and 5, respectively. Fixed parameters as in Figure 2, except β = 0.2 assume that social information dynamics are fast by using the approximation to the full model. The invasion dynamics of the rare parasite mutant are given below:

Pink (+) and blue (-) regions indicate when the fitness gradient is positive (E will increase) and negative (E will decrease), respectively. Grey (0) regions indicate when there is no selection as social information and infection are both absent from the population. Blue dashed curves indicate stable or semistable levels of contact effort. Dots in (d) and (e) correspond to initial conditions for simulations in
In the Supplementary Material, we derive the invasion fitness and show that evolution maximizes the basic reproductive ratio, We now consider how the evolution of sociality affects the evolution of parasite virulence. The optimal level of virulence, α * , occurs when: where g(α * , E ) is used for notational convenience and is equal to the term in parentheses. To determine what happens to the optimal level of virulence when sociality changes, consider y (α, E ) = β(α)g(α, E ) − dβ dα and suppose α = α * , so that y (α * , E ) = 0. Note that g(α, E ) is a decreasing function of α  Figure 2, except τ = β = 0.2 and is an increasing function of E provided 0 ≤ a < 1. Hence, y(α, E ) is also an increasing function of E . Now consider the derivative of y with respect to α at α = α * :

repellers (red) and continuously stable strategies (CSSs; dark blue); and thresholds below which social information and information transmission is viable (pink and light blue, respectively). Above the pink dashed line, sociality increases, and above the light blue line, sociality decreases. Bottom row: proportion of individuals that are infected (green) or are in the good information state (purple) in each simulation. Fixed parameters as in
where dβ dα | α =α * = g(α * , E )β(α * ) from Equation 19 and dg dα | α =α * = −g 2 (α * , E ). This means that if sociality increases, the optimal level of virulence must decrease (Fig. 7). This may appear to contradict classical predictions on population mixing and the evolution of virulence (Ewald 1994), but the difference occurs due to the effects of social information on the mortality rate of the host, which affects the infectious period. Note that if the host mortality rate is independent of sociality (a = 1), then it follows that the optimal level of virulence occurs when: which does not depend on the contact effort, E . Thus, the reason optimal virulence is inversely related to sociality in the present model is due to effects of sociality on the mortality rate of the host (and hence the infectious period).

Coevolution of sociality and virulence
We combine our results from the previous sections to analyze the effects of social information on the coevolution of sociality and virulence (Table 1). For tractability, we make three simplifying assumptions: (1) social information dynamics are fast (i.e., we use the approximation to the full model); (2) the parasite evolves much faster than the host; and (3) the relationship between transmission and virulence is β (α) = √ α and 0 ≤ α ≤ 1. Simulations indicate that relaxing these assumptions does not qualitatively affect our results. The second assumption allows us to substitute α = α * into the host fitness gradient, where The range of qualitative outcomes for coevolution is the same as for one-sided adaptation in the host (Fig. 8). The host and parasite may tend to a joint stable level of sociality and virulence, respectively, or they may experience runaway selection for higher sociality and lower virulence, or infection or social information may be unviable. However, note that in the case of runaway selection virulence asymptotes to a lower bound of α * = ad + γ  Coevolution Social information expiry rate Virulence increases with the social information expiry rate until social information is no longer viable  ). Under coevolution, the evolutionary stable level of virulence increases with the ratio of the information expiry rate to transmissibility (σ/τ), until social information dynamics are no longer viable (R I 0 < 1).

Discussion
Sociality entails both risks and benefits, but there is currently little understanding of how dynamic ecological processes influence the evolution of sociality. Here, we explored a model of social information and parasite transmission to determine their effects on the evolution of host sociality and parasite virulence. Although previous studies have examined the role of parasitism in the evolution of sociality, ours is the first that captures both dynamic costs and benefits of different social tendencies. This means that the fitness benefits of sociality, in terms of increased access to social information, and fitness costs, in terms of increased exposure to infection, are not imposed on the system, but instead are emergent properties that are subject to ecoevolutionary feedbacks. Hence, changes in sociality at the individual level affect the properties of transmission at the population level, and these population-level properties, in turn, affect both the costs and benefits of sociality at the level of the individual. Our model shows how contrasting transmission processes can trade-off to mediate the evolution of sociality and virulence. Crucially, we have shown that selection for sociality (and hence virulence) depends nonmonotonically on the prevalence of both social information and infection (Fig. 3). Specifically, selection usually favors greater sociality (and lower virulence) when social information is neither too common nor too rare and infection risk is either low or high. Conversely, selection against sociality (and for greater virulence) typically occurs when social information is either rare or very common and infection is at moderate prevalence. The fact that these two processes mirror each other is not surprising: the transmission processes are fundamentally the same in the model, but social information is beneficial and infection is costly.
Naively, one might assume that selection for sociality should increase with social information prevalence and decrease with infection prevalence. But when social information prevalence is high, there is little benefit to increasing contact effort because most individuals are already informed; similarly, when infection prevalence is high, a higher contact effort carries little extra cost because most individuals are already infected. Slightly higher or lower sociality, therefore, makes little difference to the rate of exposure to social information or infection when prevalence is high. The effects of infection prevalence on the evolution of sociality have previously been observed by Bonds et al. (2005), and occurs across a variety of behavioral and physiological defenses against parasitism, including resistance (Haldane 1949), recovery (van Baalen 1998), mate choice (Ashby and Boots 2015), and sexual reproduction (Ashby and King 2015). However, the effects of social information prevalence on the evolution of sociality have not previously been documented.
The patterns described above for high or low prevalence are robust, but the picture is more complicated when social information and infection are both at intermediate prevalence. Here, it is possible for evolutionary trajectories to exist where the sign of the fitness gradient is invariant to infection or social information prevalence, leading to runaway selection for higher sociality or lower virulence or lower sociality or higher virulence (Figs. 4,8). However, while our model allowed for runaway selection for sociality, in reality one would expect other factors to eventually constrain evolution (e.g., physiological constraints, additional costs). We omitted additional constraints from our model so that we could determine when infection alone is sufficient to constrain the evolution of sociality. The results for "runaway selection" should, therefore, be interpreted in this light.
In previous studies (Bonds et al. 2005;Prado et al. 2009), the fitness benefits of sociality were fixed rather than dynamic. While some modeling studies have explored how social information and infectious disease affect sociality, this has been in the form of host plasticity during an epidemic (Funk et al. 2010), rather than an evolutionary response, or where the outcomes are compared across populations with different fixed social strategies (Udiani and Fefferman 2020). Here, the two processes operate as independent forces of selection. Our findings are closely linked to those of Bonds et al. (2005), where sociality and virulence are shown to coevolve to stable levels. In contrast, Prado et al. (2009) found that coevolutionary cycling (fluctuating selection) may occur between sociality and virulence. It is not clear why Prado et al. (2009) found cycles, yet Bonds et al. (2005) and the present study have not, but part of the reason may be due to model structure. Prado et al. (2009) modeled epidemiological dynamics using a stochastic individual-based network, whereas Bonds et al. (2005) and the present study employed deterministic models with randomly mixing populations. A priority for future research in this area is, therefore, to establish precisely when coevolutionary cycling of sociality and virulence occurs, whether this is driven by population structure and/or stochasticity, and how it relates to other mechanisms that generate coevolutionary cycling (Ashby and Boots 2017). An important consideration when modeling the benefits of sociality dynamically in terms of social information, as opposed to fixed benefits (Bonds et al. 2005;Prado et al. 2009), is the timescale of information dynamics relative to other processes. We have shown that for the most part, evolutionary outcomes are qualitatively and quantitatively similar whether social information dynamics are relatively fast or on a similar timescale to demographic and epidemiological processes. However, this is not always the case. In general, faster social information dynamics tend to have a stabilizing effect (Fig. 6), reducing parameter ranges for runaway selection. Hence, while one can often approximate social information dynamics by assuming the population rapidly reaches a stable distribution, this assumption does not always hold and can fundamentally change evolutionary outcomes.
Our model also suggests that the initial conditions can determine the long-term evolutionary outcome (stable level of sociality and virulence, or runaway selection for increased sociality and decreased virulence; Figs. 4,8). The possibility of more than one outcome suggests that different populations might evolve contrasting social strategies for coping with parasitism, and that variable ecological conditions can lead to sudden shifts in sociality and virulence. How evolutionary outcomes play out in a given population could be affected by the structure of the social contacts. Our model assumes a well-mixed population, which can represent dynamics in one small patch. However, at a broader scale, it is now clear that almost all animal populations exhibit some structure (Cantor et al. 2021b), and that population structure can shape both transmission dynamics and parasite evolution (Eames and Keeling 2006;Lion and Boots 2010;Ashby and Gupta 2013).
Social structure can arise due to individual preferences for certain relationships (Alberts 2019) or because the environment induces limitations on who can come into contact with whom (He et al. 2019;Silk et al. 2019;Albery et al. 2021). For example, recent work has suggested that-all else being equal-some landscapes may be more predisposed to facilitating parasite transmission than other landscapes (He et al. 2021). Social organization can also play a part. For example, cooperative breeding can limit host dispersal (Armansin et al. 2020), affecting transmission processes and, in turn, selection for sociality and virulence. Furthermore, different dispersal strategies may evolve depending on the infection status of the host (Iritani 2015). Some mammal (Grueter et al. 2020) and birds (Papageorgiou et al. 2019;Camerlenghi et al. 2022) also exhibit multiple levels of social connections-named multilevel societies-with social contacts being expressed within and across social units.
A number of studies have also shown that within-population variation in sociality can influence the spread of social information (Aplin et al. 2012;Allen et al. 2013;Farine et al. 2015a;Snijders et al. 2021). For example, the social network attributes of wild great tits (Parus major) can be used to predict the discovery rate of novel food patches (Aplin et al. 2012). As in previous theoretical studies (Bonds et al. 2005;Prado et al. 2009), we did not observe coexistence of different social strategies. However, several empirical studies have highlighted the potential importance of maintaining mixed strategies in social groups or local populations. For example, Aplin et al. (2014) suggested that variation in sociality could increase group-level efficiency in exploiting patches. Similarly, in ants, mixed colonies (in terms of aggressive type) have more efficient task allocation and are more successful at capturing prey , with task specialization also buffering colonies from the effects of parasite exposure (Scharf et al. 2012).
One potential reason for the lack of mixed social strategies in current theoretical studies is that they do not include assortative mixing (Farine 2014). Assortative mixing has been shown to facilitate the coexistence of multiple parasites (Eames and Keeling 2006), so it is possible that mixed social strategies could also evolve in the presence of nonrandom mixing-a process that could be either actively generated through social preferences or passively through exogenous drivers of social structure. It is also possible that mixed social strategies could evolve in fluctuating environments, especially if individuals value information differently (e.g., due to personality traits, Aplin et al. 2014), or if individuals vary in their propensity to form social relationships (e.g., due to developmental conditions, Boogert et al. 2014;Brandl et al. 2019). A challenge for future theoretical research is to establish whether selection arising from infection and information-use dynamics can drive the evolution of mixed social strategies. Our results suggest that a number of potential mechanisms (e.g., variation in the perceived value of information) could facilitate this process.
Our model, along with many simulation studies of dynamics on social networks, further assumes individuals do not vary their contact effort depending on their infection or information status. In reality, infected individuals may become less social when they are sick or may be avoided by those who are healthy (reviewed in Romano et al. 2020;Stockmaier et al. 2021), and an individual may become more or less social depending on their information state (Kulahci and Quinn 2019) or starvation risk (Gareta García et al. 2021). Future theoretical work should, therefore, consider the implications of plastic sociality for host-parasite coevolution and how this may affect our predictions for how variance in information awareness affects selection for sociality.
One of the key predictions from this study and previous work (Bonds et al. 2005) is that sociality should vary inversely with mortality virulence, which may appear at odds with classical predictions for virulence evolution (Ewald 1994). The contradiction is resolved by noticing that: (1) our model considers contact rates in a randomly mixing population rather than contact number in a structured population; and (2) higher contact rates do not directly select for lower virulence, but do so indirectly through the spread of social information, which reduces host mortality and increases the infectious period. Hence, greater sociality as modeled here is not equivalent to population mixing in a structured model, and the effects on virulence evolution are mediated via host mortality rather than contact rates. Based on these insights, we therefore, predict that sociality should covary inversely with mortality virulence in populations where social or spatial structuring is weak but should covary positively with mortality virulence when structuring is strong. Future empirical studies may be able to test this prediction directly by manipulating population structure or through comparative data (e.g., Sah et al. 2018).
While social structure, variation in social strategies, and social contact dynamics might be important, studies simulating disease transmission suggest that the importance of social structure in shaping parasite transmission is likely to be overstated (Sah et al. 2017). Recent studies of how information is accumulated and integrated into cultural traits in structured populations have also suggested that transmission properties, rather than contact structure, have the most significant impact on cultural evolution in networks (Cantor et al. 2021a). For example, individuals can use different learning rules, such as conformist transmission (e.g. having a disproportionate preference for copying a more common behavior ) or require passing a certain threshold number of informed contacts before becoming informed (Rosenthal et al. 2015). While real transmission processes for social information will rarely mirror those of parasites, such findings are highly relevant to the spread of infectious diseases (Sah et al. 2017;Evans et al. 2020). For example, complex parasitic life cycles can impact how social contacts translate to transmission events (Grear et al. 2013;Farine 2017). Transmission properties will, therefore, modify how transmission pathwaysfor both disease and information-emerge from social contacts.
Fully testing the predictions of our model will require tracking infection and information states. Empirically determining the prevalence of infection in a population is generally straightforward, but it is likely to be more challenging to determine the prevalence of information. In some systems, it may be possible to focus on variance in information awareness or infection status. Our model predicts that when most individuals are either informed or uninformed (low variance), selection is unlikely to favor increased sociality, but when the numbers of informed and uninformed individuals are more balanced (high variance), selec-tion may favor increased sociality (and in turn, lower virulence). Similarly, one can reframe the predictions based on infection prevalence in terms of variance in infection status.
The dynamic benefit of sociality in our model was motivated by studies of social information in animals, but our model is also applicable to other dynamic benefits such as symbiont transmission. If symbionts are horizontally transmitted and provide a benefit to their hosts in terms of reduced mortality (Brownlie and Johnson 2009;Ford and King 2016;Ashby and King 2017;Rafaluk-mohr et al. 2018), then we should expect our key results to hold. From an empirical perspective, it may be easier to test our predictions about dynamic costs and benefits using experimental evolution of bacteria and plasmids. Plasmids can increase or decrease bacterial fitness and can be transmitted through conjugation, with bacteria able to evolve higher or lower conjugation rates (akin to contact effort) depending on environmental conditions (Harrison and Brockhurst 2012). Bacteria-plasmid systems may, therefore, prove to be a more tractable target for directly testing some of our predictions, especially those involving coevolution.
In summary, our study suggests that not only does the sociality of the population affect social information and epidemiological dynamics, but also that these processes are likely to influence the evolution of sociality and virulence. Crucially, we predict that: (1) selection for sociality and virulence will vary nonmonotonically with both social information and infection prevalence; and (2) if social information increases host survival, then increased sociality may correlate with decreased virulence. The context-dependent relationships that we have shown to exist between the ecology of information or epidemiological dynamics and the evolution of sociality or virulence highlights the need to understand host and parasite evolution in the context of multiple ecological processes and that simulations of disease spread on networks are likely to produce limited insights on the costs and benefits of sociality.

AUTHOR CONTRIBUTIONS
BA and DRF conceived the study and contributed equally to writing the manuscript. BA carried out the analysis.