Eco‐evolutionary community turnover following environmental change

Abstract Co‐occurring species often differ in intraspecific genetic diversity, which in turn can affect adaptation in response to environmental change. Specifically, the simultaneous evolutionary responses of co‐occurring species to temporal environmental change may influence community dynamics. Local adaptation along environmental gradients combined with gene flow can enhance genetic diversity of traits within populations. Quantitative genetic theory shows that having greater gene flow results in (a) lower equilibrium population size due to maladaptive immigrant genotypes (migration load), but (b) faster adaptation to changing environments. Here, I build off this theory to study community dynamics of locally adapted species in response to temporal environmental changes akin to warming temperatures. Although an abrupt environmental change leaves all species initially maladapted, high gene flow species subsequently adapt faster due to greater genetic diversity. As a result, species can transiently reverse their relative abundances, but sometimes only after long lag periods. If constant temporal environmental change is applied, the community exhibits a shift toward stable dominance by species with intermediate gene flow. Notably, fast‐adapting high gene flow species can increase in absolute abundance under environmental change (although often only for a transient period) because the change suppresses superior competitors with lower gene flow. This eco‐evolutionary competitive release stabilizes ecosystem function. The eco‐evolutionary community turnover studied here parallels the purely ecological successional dynamics following disturbances. My results demonstrate how interspecific variation in life history can have far‐reaching impacts on eco‐evolutionary community response to environmental change.

The observation that humans are rapidly changing global environments has motivated studies of temporal changes in selection (Bay et al., 2017;Siepielski et al., 2017). Environmental change can cause population decline, extinction, or persistence via plasticity or evolution (Aitken, Yeaman, Holliday, Wang, & Curtis-McLane, 2008).
Theoretical and experimental studies have largely focused on two scenarios of environmental change: (a) a rapid, abrupt shift from a historical selection regime to a new one (Gomulkiewicz & Holt, 1995;Orr & Unckless, 2008) or (b) sustained change in selection through time (Gonzalez, Ronce, Ferriere, & Hochberg, 2013;Lynch & Lande, 1993;Pease et al., 1989;Polechová et al., 2009). Most theoretical studies have focused on the binary outcome of whether species survive or go extinct following environmental change. For example, a number of authors have investigated factors influencing the probability of evolutionary rescue (Bell & Gonzalez, 2009;Gomulkiewicz & Holt, 1995;Orr & Unckless, 2008;Uecker, Otto, & Hermisson, 2014), which is defined as adaptation that prevents extinction following environmental change . Still, little is known about how evolutionary response to rapid environmental change impacts abundance patterns, apart from equilibrium abundance of individual populations (Polechová et al., 2009). Despite this gap, community and ecosystem processes are strongly influenced by abundance dynamics of component species, such that understanding abundance responses to environmental change is a central goal of community and ecosystem ecology (Clark, Gelfand, Woodall, & Zhu, 2014;Loreau, 2010). An emerging area of inquiry has investigated community evolutionary rescue, roughly defined as evolutionary rescue of multiple co-occurring species (Fussmann & Gonzalez, 2013;Kovach-Orr & Fussmann, 2013;Low-Décarie et al., 2015).
Among the factors that determine population response to environmental change are initial population size and genetic diversity in the trait(s) under selection. When populations are small before environmental change, they face a greater risk of stochastic extinction following environmental change (Gomulkiewicz & Holt, 1995).
Additionally, if genetic variants do not exist within a population that are beneficial after environmental change, then a population will wait for new mutations or immigrant alleles (e.g., Orr & Unckless, 2008), a scenario most relevant when adaptation is oligogenic. Alternatively, standing variation within populations may allow rapid adaptation, if adaptive variants are already present at the time of environmental change (Bonhoeffer & Nowak, 1997). Such standing variation can be caused by gene flow along spatial selective gradients (Barton, 2001).
In particular, quantitative genetic models of local adaptation are relevant to adaptation to anthropogenic change because phenotypes involved in climate adaptation are often complex with polygenic architecture (Bay et al., 2017).
Here, I build on existing quantitative genetic theory of local adaptation (Barton, 2001) and adaptation to a shifting optimum (Lynch & Lande, 1993;Pease et al., 1989;Polechová et al., 2009). I reframe this theory to demonstrate the complex role interspecific variation in gene flow plays in communities due to its effect on genetic diversity, which induces migration load on populations but also causes faster adaptation Pease et al., 1989;Polechová et al., 2009). I then ask how interspecific variation in gene flow and other traits impact community dynamics following environmental change due to ecological and evolutionary processes.

| MODEL AND RE SULTS
I start with a model of locally adapted populations following Barton (2001), Kirkpatrick and Barton (1997), Pease et al. (1989), and Polechová et al. (2009), a stochastic version of which was studied by Polechová and Barton (2015; referred to as the continuum of alleles model by Barton 2001). The model I use is a deterministic model of a population with logistic growth and a quantitative trait z subject to hard selection with a spatially varying selective gradient. The mean per capita reproductive rate is given by where r m is population growth rate of optimal phenotype individuals at low density, N is census population size, K is carrying capacity (assumed constant through space), and V P is variance of phenotype z (assuming a Gaussian phenotype distribution, Kirkpatrick & Barton, 1997). The first term on the right-hand side of Equation 1 determines a reduction in fitness due to negative density dependence.
The second term gives reduction in fitness due to the mismatch between the population mean phenotype z and the local optimum θ, and V S gives the inverse strength of stabilizing selection. Even if the population is adapted to the local optimum (i.e., z = ), there still may be many maladapted individuals (i.e., V P > 0), whose contribution to population mean fitness is determined by the last term in Equation 1.
The optimal trait value θ changes in space (x) at rate b such that (Kirkpatrick & Barton, 1997). The mean trait z at a given location x changes through time due to curvature of the cline in space, asymmetric gene flow (modeled as a Gaussian with standard deviation σ) across the cline due to spatial trends in abundance, and selection, given by the first three terms on the right-hand side of Equation 2, respectively (Pease et al., 1989) Population dynamics at x are given by where the first term on the right-hand side gives change due to migration and spatial trends in abundance, and the second term gives change due to average individual fitness (Pease et al., 1989). Note that here there is no frequency or density-dependent selection; that is, intraspecific competition (or apparent competition) is not dependent on z in any way, beyond the effects of z on N. This assumption may be well-justified for traits involved in abiotic stress tolerance (e.g., cold or heat tolerance) where selection does not promote diversity in z. Barton (2001) allowed genetic variance within a population (V G ) to change (evolve) due to gene flow among populations. As gene flow increases, so does immigration of maladaptive genotypes into any given population. A stable equilibrium exists in this model where all populations are locally adapted along the linear environmental gradient b, that is z = at all x (Barton, 2001). At this equilibrium, (Barton, 2001). An additional consequence of local adaptation and a linear cline in z is that 2z x 2 = 0 and constant population size in space, ln (N) x = 0. I ignore spatial boundary conditions that would result in asymmetric gene flow.

| Impacts on community structure
Two traits that ecologists commonly study are important in this model: the rate and scale of dispersal/gene flow (determined by σ) and reproductive rate at low density (r m ). Maladapted immigrants depress mean fitness (known as migration load, Equation 1). The equilibrium census population size (Polechová & Barton, 2015)  To study how interspecific variation in σ could structure communities along spatiotemporal environmental gradients, I now consider a community of species that vary only in σ (but not other parameters e.g., K, V S , V E ). For mathematical convenience, I start with communities lacking species interactions. I follow with simulations that introduce competition among species.
In the Barton (2001) model, greater σ increases V G and migration load and thus decreases equilibrium population size. From Equation 4, the proportional reduction in N due to migration load is . I differentiate with respect to σ to obtain which gives the slope of species equilibrium abundance versus gene flow. Thus, the species abundance distribution for a community (McGill et al., 2007) could be obtained using the distribution of σ and applying Equation 6. The parameters on the right of Equation 6 are each constrained to be positive so that when holding these constant across species of varying σ there is a negative relationship between σ and N . The effect of migration load is stronger, and the abundance distribution is steeper as the selective gradient b is steeper.

| Abrupt environmental change and transient community turnover
The interesting effects of gene flow in a community context arise from the dual role of σ following environmental change. Greater σ can have a fitness benefit when population mean traits differ from the optimum, z ≠ , such as in populations that have experienced recent environmental change Polechová et al., 2009) (Polechová & Barton, 2015). I then imposed an instantaneous change in θ such that a new phenotype, θ* = 1, was optimal, and the change in selection was the same at all locations; that is, the slope b of the spatial gradient did not change, θ*(x) = bx + 1 (Figure 1). This scenario is mathematically convenient because all populations experience the same relative change and dynamics and thus no spatial trend in abundance emerges nor does the cline in z change. If a system begins at locally adapted equilibrium, a change in θ by the same amount at all F I G U R E 1 In a locally adapted system, interspecific variation in σ (determining the rate and scale of gene flow) determines differences in V G and rate of adaptation. Here, there is no interspecific competition. Species with low (a) and high (b) σ are subject to the same selective gradient b (favoring an increase in phenotype value through space from left to right), and all populations are locally adapted. (b) The high σ species has higher diversity of the trait under selection within populations (V G ; evident via a thicker gray smear for any given location along the x-axis) due to maladaptive immigration. (c) An instantaneous change in optimal phenotype from θ to θ* occurs at generation 50. (d) The higher σ species adapts to the new optimum faster (d), and (e) when comparing 100 species with a range of σ values. (e) White is the optimal trait prior to the change, and green is the optimal trait following the change. (f) Faster adaptation by a high σ species compared to a low σ species leads to transient community turnover. Parameter values (unless otherwise noted) were b = 0.05, V S = 1, V E = 0.05, r m = 0.5, and Hi Density Generation locations x will leave V G unchanged because the slope of the cline in z is unchanged (see equation 10B in Barton, 2001).
I first compare evolution of z for two noninteracting species differing only in θ (σ 1 = 0.326 and σ 2 = 3.069). Both species were subject to the same selective gradient b = 0.05 and the clines in the mean phenotype z of the two species were equal before environmental change, but with the second species having greater variance within any local population (i.e., greater V G , Figure 1). The high gene flow species rapidly adapts to θ* with the low σ species lagging far behind ( Figure 1d).
Faster adaptation following a shift in environment will lead to more rapid recovery of population mean fitness. Although species with high σ are less abundant than low σ species in communities in a stable environment (Equation 4), the faster adaptation of high σ species can allow them to increase their relative abundance following an environmental change. These two example species (σ = 0.326 and σ = 3.069, respectively) exhibit a transient reversal in relative abundance as the high σ species is more abundant for an interval following the environmental change ( Figure 1f). The reversal is transient because the stable environment after change again favors low σ. This transient shift to species with high σ and back to species with low σ also emerges if this system is subjected to ecological disturbance (Supporting Information Figure S4).
Thus, the predicted patterns of eco-evolutionary turnover from this model may follow patterns of ecological succession, albeit due to different mechanisms.
I now introduce species interactions into the model. In a diverse community of interacting species that vary in gene flow, one can ask how composition might shift due to different evolutionary responses. Species interactions could change the relative importance of some of the processes studied previously. For example, interspecific competition could depress the mean fitness of species, pushing them closer to extinction, and also exacerbate relative population differences. Here, I build on the previous quantitative genetic models to simulate species within a community competing against each other, using the Lotka-Volterra form. ; α ij is unrelated to z i and z j , cf. Fussmann Osmond & de Mazancourt, 2013). cies, but now with interspecific competition (α ij = 0.1). I initiated species at a low abundance (N = 10 −5 ), but then allowed 500 generations for population growth with interspecific competition and constant θ, before imposing change in θ and simulating for 500 more generations.
I calculated which species was most abundant at each time point.
Under equilibrium, the species with lowest σ has highest N ( Figure 2). Equation 4 gives N when there is no interspecific competition. In a diverse community, all species experience approximately equal effects of interspecific competition, and thus, the relative differences among species in N remain approximately the same, albeit with a decrease in the maximum σ capable of persisting (Supporting Information Figure S2). Following an instantaneous shift to θ*, higher σ species dominate but gradually give way to lower σ species. However, the time required for poor dispersers to adapt can be long given their slow rate of adaptation ( Figure 1e). This interspecific variation in adaptation following environmental change will likely have impacts on the distribution of traits in a community, which is often of interest to community and ecosystem ecologists (Muscarella & Uriarte, 2016;Šímová et al., 2018). For example, ecosystem function may be influenced by the mass-averaged functional traits in a community (Grime, 1998). In the Supporting Information, I show how interspecific competition causes community mean z to more quickly approach θ* as fast-adapting high σ species suppress the initially abundant low σ species, especially under a scenario of abrupt environmental change (Supporting Information Figure S1).
Because the transient advantage of higher σ species comes from their faster approach of z to θ* (Equation 2), the magnitude of environmental change might influence the degree of community turnover. Under a weak shift in θ, the benefit to adapting faster for high σ species is low (Figure 2). When the magnitude of the environmental shift is large, community turnover (as defined as which species dominate following the environmental shift) is also large. Notably, subtle shifts in environment lead to subtle, though delayed changes in the most dominant species (red lines in Figure 2a). This lag emerges because when a species starts with greater N in a constant environment the differences between species in maladaptation take time to erode the initial advantage ( Figure 2). Despite the lag in reversal of species rank abundances, the differences among species in r are quickly evident in the form of differences in N t (i.e., there is rapid emergence of differences among species in slope of N trajectories, Figure 2b).

| The strength of species interactions
To evaluate how the strength of species interactions can change eco-evolutionary response to environmental change, I simulated communities with different values of α ij and compared results.
Comparing scenarios with J = 100 species and α ij equal to 0, 0.01, or 0.1, showed little effect on turnover in the most abundant community member (Figure 2 and Supporting Information Figure S3).
Thus, the main effect of adding weak to modest pairwise interspecific competition in a diverse community was to reduce the maximal σ capable of persisting. Concordantly, variation in the magnitude of abrupt environmental change had similar impact on community dynamics, as measured as σ of the most dominant species, across these values of α ij . Note that although α ij = 0.01 means individual species interact weakly, the presence of many other species (e.g., J = 100) in the community can result in substantial competition in aggregate.
I also simulated ten strongly competing species (α ij = 0.75) and found substantial differences in community dynamics. Here, competition had a stronger effect on how the σ of the most abundant species changed with time (Supporting Information Figure S3).
Competition resulted in dominance of species with relatively lower σ shortly after environmental change. There were even stronger effects of competition on the dynamics of individual species. In the presence of this strong interspecific competition, low σ species that have relatively lower abundance following environmental change remained suppressed for longer periods of time and at very low densities (Supporting Information Figure S3). Close inspection of the results showed that these low σ species that reached low density following environmental change were on an upward population trend at the end of simulations. Thus, the dominance of higher σ species was still transient, though with a much slower return to the pre-environmental change equillibrium N . Note that my deterministic simulations lack stochastic extinction, which is likely a major problem for populations at very low density. Higher σ species can actually see increased absolute abundance following environmental change, despite going from being locally adapted to being maladapted ( Figure 2c and Supporting Information Figure S3). This surprising change results from the release from competitive suppression by low σ species. This spike is particularly pronounced for intermediate to high σ species that have a good balance of adaptability versus migration load (Supporting Information Figure S5).

| Modifiers of the trade-off between migration load versus adaptability
I next studied how factors that mediate the trade-offs associated with σ (migration load versus speed of adaptation) impact community dynamics. Migration load is ameliorated under shallower environmental gradients (lower b), though low b also reduces V G and hence the rate of adaptation. In nature, the slope of environmental gradients varies in space and is thought to be an important driver of biodiversity patterns (Yeaman & Jarvis, 2006). Under low b, there will be predominantly gene flow between like environments. The slope of the curve relating species abundance to gene flow ( dN d ) is proportional to b; thus, lower b will result in a shallower abundance curve, that is, a more even community. That is, migration load is reduced and species differing in σ have similar abundances at equilibrium. When r m is low, high σ species cannot persist and thus the magnitude of community turnover is lower. However, because r m is low, the recovery of species from low density is slow, and the community is dominated by relatively higher σ species for a long period of time ( Figure 3b). By contrast, high r m allows for the existence of high σ species and the rapid environmental change causes strong, but shorter lived, community turnover.

F I G U R E 3
Modifiers of the trade-off between migration load versus adaptability in the presence of interspecific competition among J = 100 species (all α ij = 0.1). (a) The slope of the selective gradient (b) affects trade-offs associated with σ and community turnover following an abrupt environmental change. Greater b results in dominance by intermediate σ species following abrupt environmental change (imposed after 500 generations). Lower b allows higher σ species to briefly dominate, although in these scenarios migration load is low and abundance at equillibrium (N) under stable environments is only weakly related to σ. (b) Greater reproductive rate at low density r m ameliorates migration load and affects community turnover following an abrupt environmental change. Greater r m results in an initially greater community turnover because lower migration load allows high σ species to leverage their faster adaptation. Lower r m increases migration load, limits the ability of high σ to take advantage of their faster adaptation, but also slows the rebound of eventually dominant low σ species. (c-d) Correlation between r m and σ affects community turnover following an abrupt environmental change. Greater correlation results in dominance by intermediate (as opposed to low) σ species at equillibrium under constant environments, and hence less turnover following environmental change. Parameter values (unless otherwise noted) were b = 0.05, V S = 1, V E = 0.05, θ* − θ = 1, and r m = 0.5

| Community turnover under sustained environmental change
Temporal environmental change can take any functional form. In the previous section, I simulated an instantaneous shift in environment that then stabilized (Gomulkiewicz & Holt, 1995;Orr & Unckless, 2008). Alternatively, environments may undergo more gradual sustained directional shifts. This scenario has been ana- That is, the lag in z for a given species is proportional to σ −1 (Polechová et al., 2009 identified this expression in a population genetic model of this scenario). Thus, stronger stabilizing selection reduces the lag, though to a lesser degree than identified by Lynch and Lande (1993, √ V S versus V S , Kremer et al., 2012). This is because when stabilizing selection is stronger (low V S ) the fitness advantage of adapted genotypes is higher but stronger stabilizing selection also reduces V G from immigration, slowing adaptation.
Lynch and Lande (1993) also derived the critical rate of environmental change above which populations go extinct (ignoring sto- Polechová et al., 2009). I substitute the Barton (2001)

| The strength of species interactions
I also simulated how interspecific competition impacts the community response to a sustained environmental change. I used the same model of species interactions as described above (Equation 7) under the scenario of shifting θ at rate k through time. I simulated diverse communities of species (J = 100) with different values of α ij :

| Ecosystem resilience and interspecific interactions
The increased absolute abundance exhibited by many intermediate In both cases, simulations showed that communities with stronger interspecific competition also showed greater resilience under strong environmental change and maladaptation. In diverse communities with weak interspecific competition, biomass either returned faster or was maintained at higher relative levels, compared to similar communities without interspecific competition ( Figure 6).
Communities with fewer species (10 species) but stronger interspecific competition exhibited even greater resilience relative to comparable communities without interspecific competition, under both scenarios of environmental change. This resilience is clearly due to increases in abundance of high σ species, which were released from competitive supression by previously dominant but slow adapting  (Figures 5 and 6).

| D ISCUSS I ON
Evolutionary genetic theory is a rich source of hypotheses for how life history affects evolution. On this rapidly changing planet, understanding and predicting evolutionary responses to environmental change will be particularly valuable (Bay et al., 2017;Gienapp et al., 2017). Molecular data are providing a deeper view of the differences among species in population genomic patterns (e.g., Romiguier et al., 2014). The present is ripe for studying how interspecific trait differences impact evolutionary response to environmental change and the consequences for communities and ecosystems. Here, I took existing quantitative genetic models of adaptation (Barton, 2001;Lynch & Lande, 1993;Polechová et al., 2009) and showed how interspecific trait variation gives rise to differences in genetic diversity with nonmonotonic effects on community structure and dynamics. Many previous studies of evolutionary rescue have largely focused on thresholds beyond which populations go extinct under environmental change (Bell & Gonzalez, 2009;Gomulkiewicz & Holt, 1995;Lynch & Lande, 1993;Uecker et al., 2014). In general, eco-evolutionary community inversions (i.e., reversals in relative abundances) may arise in any system where there is a negative or complex relationship between population size and adaptability to environmental change. In my model, these changes are driven by the fact that initially numerically abundant species are more maladapted for longer periods of time following environmental change. Genetic variance has a major influence on the rate of adaptation, but other traits, such as generation time, vary among species in communities and may also result in eco-evolutionary community turnover. For example, parasites may have shorter generation time than hosts, allowing parasites to adapt faster to abiotic environmental change. Both vertebrate hosts (Fraser, 2013) and their parasites (Sternberg & Thomas, 2014) can be locally adapted along temperature gradients, though parasites might adapt to climate change faster than hosts. Alternatively, when census population size is positively related to genetic variance in a trait under selection (Frankham, 1996), evolutionary responses to environmental change may reinforce the ecological responses, reducing community diversity.
I identified a transient benefit to high gene flow following an abrupt environmental change due to faster adaptation. In their experimental microcosm study, Low-Décarie et al. (2015) demonstrated how gene flow was key to the eco-evolutionary recovery of soil microbial communities responding to a novel herbicide.
Studies of genetic variation (Lande & Shannon, 1996) from dispersal (Blanquart & Gandon, 2011;Polechová et al., 2009) or mutation (Taddei et al., 1997) have yielded similar results. When environment is constant, low mutation rates are favored, though mutator lineages have transient benefits when they find adaptive mutations (Taddei et al., 1997). Additionally, fluctuating environments can favor higher mutation rates (Travis & Travis, 2002). Indeed, co-occurring species can exhibit a range of mutation rates (Baer, Miyamoto, & Denver, 2007), which may also play a role in species differences in the degree of local adaptation and subsequent responses to environmental change (Orr & Unckless, 2008). Here, I did not allow explicit evolution of dispersal distance (σ), though the comparison of population sizes for my species of differing σ provide insight into how dispersal would evolve in this system. In a temporally constant environment, dispersal is maladaptive due to the spatial selective gradient (Balkau & Feldman, 1973 However, gene flow across spatial selective gradients is likely a major source of within-population genetic variation in traits under selection (Farkas et al., 2013;Paul, Sheth, & Angert, 2011;Yeaman & Jarvis, 2006). Findings on ponderosa pine suggest that greater b can cause greater V G (Yeaman & Jarvis, 2006). Less is known, however, of how adaptability or V G are related to interspecific variation in population size. The negative relationship between these two quantities is the key to community turnover following environmental change in my results. One problem with empirically studying the processes I described there is often a substantial lag before better dispersing species dominate communities (Figures 2 and 5). Thus, researchers may overlook empirical population changes caused by environmental change.
Strongly interacting species may often experience selective gradients driven by the same environmental variable (e.g., temperature, Aitken & Bemmels, 2016) while their diversity is also shaped by interspecific variation in dispersal ability (Lasky, Keitt, Weeks, & Economo, 2017). Differences among these species in local adaptation to the same environmental variable might lead to different eco-evolutionary responses to environmental change, causing indirect effects on interacting species (Fussmann & Gonzalez, 2013). For example, multiple competing tree species may simultaneously be locally adapted along environmental gradients (Ikeda et al., 2014). Recent work by Brans et al. (2017) has shown similar intraspecific trait clines in multiple co-occurring cladocerans along urbanization gradients drives community patterns.
Here, I simulated competing species, but interactions of different types (e.g., trophic) may yield distinct eco-evolutionary community responses to changing environments. The competition simulated here was independent of the trait under changing selection; that is, there was no density or frequency-dependent selection. This scenario may be appropriate for abiotic stressors such as cold or heat.
However, other environmental conditions such as resource supply rates might change optimal trait values, but also be subject to density or frequency-dependent selection. Frequency-dependent selection can result in more complex patterns of population and trait variation among species (Roughgarden, 1976) and can reduce the likelihood of evolutionary rescue (Svensson & Connallon, 2019

| CON CLUS ION
Community composition is defined by the population sizes of component species, but greater population size might not correspond to greater adaptability to environmental change. This discrepancy can result in complex community turnover as selection regimes shift. The simple models studied here demonstrate some of the complexity in eco-evolutionary community change. Future research could improve our ability to predict responses to environmental change in nature by learning more about the genetics and ecology of adaptation in addition to theoretical investigation of more complicated scenarios.

ACK N OWLED G EM ENTS
This manuscript benefited from comments by Jitka Polechová and two anonymous reviewers, as well as Hidetoshi Inamine, Martin Turcotte, Andrew Gonzalez, and Andrew Hendry, in addition to conversations with Andrew Read, Katriona Shea, and Timothy Reluga.

CO N FLI C T O F I NTE R E S T
None declared.