## Abstract

A factor that may limit the ability of many populations to adapt to changing conditions is the rate at which beneficial mutations can become established. We study the probability that mutations become established in changing environments by extending the classic theory for branching processes. When environments change in time, under quite general conditions, the establishment probability is approximately twice the ‘effective selection coefficient’, whose value is an average that gives most weight to a mutant's fitness in the generations immediately after it appears. When fitness varies along a gradient in a continuous habitat, increased dispersal generally decreases the chance a mutation establishes because mutations move out of areas where they are most adapted. When there is a patch of favourable habitat that moves in time, there is a maximum speed of movement above which mutations cannot become established, regardless of when and where they first appear. This critical speed limit, which is proportional to the mutation's maximum selective advantage, represents an absolute constraint on the potential of locally adapted mutations to contribute to evolutionary rescue.

## 1. Introduction

Hutchinson [1] famously referred to ‘the ecological theater and the evolutionary play’ to emphasize that natural selection occurs in an environmental context. But, the metaphor works equally well if ‘ecological’ and ‘evolutionary’ are transposed: evolution provides the phenotypic setting that determines how the demographic processes of survival and extinction unfold. A major (if subtle) shift in thinking about ecology and evolution over the past generation has been the growing appreciation of how intertwined adaptation and population dynamics are, and how often they proceed on similar time-scales.

This new perspective has been recently thrown into high relief by the need to understand how species may respond to environmental change caused by human activity. It seems certain that a substantial fraction of our planet's current biodiversity will be lost to extinction as species' habitats change at an accelerating rate [2]. Some species, however, may be able to escape that fate by adapting, shifting their geographical ranges, or both. This leads to the questions of when, where and how might adaptation allow species to survive, leading to ‘evolutionary rescue’ [3].

Some basic answers to those questions come from theory. Both population genetics and demography have rich theoretical traditions, and so it is perhaps surprising that only quite recently have these approaches been wed in models of how populations respond to changing environments (reviewed in recent studies [4–8]). Most attention has been given to quantitative genetic models in which adaptation relies on standing genetic variation. A first case of interest is when a species inhabits a single habitat that changes in time. The population will then lag behind the optimal value(s) for the trait(s) under selection. If this lag is too large, then the selection load will exceed the population's reproductive capacity and extinction results [9–14].

A second case is when selection varies in space but not in time. Here, the outcome is determined by two competing forces: local adaptation, which favours range expansion, and gene flow, which inhibits it. An ecological situation faced by some species is when there are two discrete habitat types, and selection is ‘hard’ (i.e. the number of individuals surviving in each habitat depends on their mean fitness). The species will then adapt to both habitats when migration between them is either very high or very low, and will become specialized on one habitat with intermediate migration [15]. In the case of a continuous habitat (e.g. a continent or an ocean) that falls along an environmental gradient (such as temperature), the balance between local selection pressures and gene flow can cause the range either to expand outwards indefinitely, to collapse to extinction, or to reach equilibrium at a stable finite size [16,17]. The potential for expansion can be inhibited by drift in small marginal populations [18,19].

A third case is when there is a systematic temporal trend in the gradient (e.g. warming). A species can then evade extinction by both adapting and shifting its geographical distribution if the rate of environmental change is sufficiently slow. Larger amounts of genetic variation allow species to survive greater rates of environmental change [20–22]. A conclusion general to all these cases is that the amount of standing genetic variation can play a decisive role in determining whether a species survives.

These quantitative genetic models are motivated by the conventional wisdom that virtually all traits, including those that could contribute to evolutionary rescue, have substantial heritabilities. That view may, however, be often mistaken for two reasons. There are now examples of range limits that are set by traits that appear to lack any standing genetic variation whatever [23,24]. Second, patterns of genetic correlation between traits can generate constraints even when each individual trait has substantial genetic variance. Patterns of multivariate genetic variation suggest that a large fraction of the total standing genetic variation is often concentrated on a relatively small number of combinations of traits [25–28].

These considerations lead to the question of what roles new mutations might play in evolutionary rescue. Population genetic models without explicit demography provide key results for the probability that new mutations are established in environments that change in time [29,30] and space [31,32]. Analytic models that include both evolution and demography have shown how changes in population size affect fixation probabilities [33], conditions that allow a locally adapted allele to become established [34–37], and when new mutations may be able to save a declining population from extinction [12,34,38]. A limitation of many of these results is that they are not in closed form, and actual calculations must be conducted numerically. Most recently, stochastic simulations of locally adapted mutations in a continuous habitat have been used to study how a species' range evolves [39,40]. In sum, there has been substantial work on how beneficial mutations become established in environments that vary in space, less work on environments that change in time, and apparently no attention to environments that change in both space and time. In all of these cases, we lack simple analytic solutions that can guide our intuition.

When adaptation is limited by the supply of beneficial mutations, an important factor determining the rate of evolution is the probability that new mutations survive random loss while they are still rare [41,42]. A famous result due to Haldane [43] is that a mutation with a selective advantage *s* has a probability of only 2*s* of surviving and spreading to fixation. Haldane derived this result, which assumes a demographic equilibrium and selection that is constant in space and time, using the theory of branching processes. His analysis has since been generalized in several ways (see [44,45] for reviews).

This paper builds on that foundation to develop new results for mutations that adapt populations to changing environments. The main questions that interest us here are: when and where do mutations occur that allow adaptation to environments that change in space and time? We begin by outlining the branching process model that is the basis for our analyses. We next study adaptation to a single habitat that is changing in time. We then consider a species in a continuous habitat with an environmental gradient that is constant in time. Finally, we investigate adaptation when the spatial gradient changes in time. Throughout, our aim is to develop simple analytical expressions that have intuitive interpretations, and the more technical details are relegated to the electronic supplementary material. The approach is partially based on results that we recently developed elsewhere [46], and that paper can be consulted for further details.

This paper focuses on how beneficial mutations become established. It does not explore here the important question of how successful mutations could affect demography (but we do make connections to those effects at several points). These results can therefore be seen as a foundation for a future theoretical framework that will predict how beneficial mutations may contribute to population growth and prevent extinction.

## 2. Models and results

We begin by considering the situation in which selection varies in time but is constant in space for a population that is at demographic equilibrium. We ask, what is the probability that a single copy of a mutation survives loss when rare and becomes permanently established? Our approach is based on the classical theory of branching processes [44,47]. The model assumes that the population size is infinite, so that if a mutation spreads when it is rare it will be become permanently established. (In fact, the results give very good approximations for finite populations if the product of the relevant selection coefficients and the population size is much larger than unity.) We begin by briefly reviewing our recent results from a companion paper [46], which can be consulted for further details.

The fate of a single copy of a mutation at generation *t* is determined by the probability distribution of the number of descendant copies it leaves to the next generation. That distribution can be completely described in terms of its probability generating function (PGF):
2.1

where *f _{k}*

_{,t}is the probability that a mutant living in generation

*t*leaves

*k*offspring copies to the next generation. While the mutation is still rare, the numbers of offspring left by each descendant copy are independent of one another. In that case, the probability that a mutation appearing at generation 0 will survive to generation

*t*is 2.2

While equation (2.2) is useful for calculating survival probabilities in constant environments, it has limitations when selection changes in time. Given the offspring distributions for each generation (the *f*), we can use (2.2) to calculate *P _{t}* numerically, but that approach does not give simple analytic expressions. Further, it does not allow us to determine the mutation's ultimate fate, because the expression for

*P*

_{∞}involves an infinite number of terms.

We therefore introduce an approximation. Assume that changes in the environment for the first few generations after the mutation appears are small. Then, the PGFs for each generation can be written as the sum of a reference (or average) PGF and a small deviation. (Details about the reference PGF are given in Peischl & Kirkpatrick [46].) By neglecting terms in equation (2.2) that include products of two or more of those deviations, we can derive a remarkably simple approximation for the probability that the mutation survives indefinitely [46]. That probability is 2.3

where *V* is the average variance in the number of offspring copies that the mutation leaves, and *s*_{e} is the *effective selection coefficient*. This is a weighted average of the selection coefficients through time:
2.4

Here, is the mean selection coefficient over time and *s _{k}* is the selection coefficient in generation

*k*. Because the fate of a mutation is usually determined during the first couple of generations after which it appears, the approximation is most accurate if during this initial period. A more general version of equations (2.3) and (2.4) can be found in Peischl & Kirkpatrick [46].

There are two immediate implications. The first is that establishment is only possible if the mean selection coefficient is positive. If our assumption of infinite population size is violated, however, then it is possible for mutations that are neutral or deleterious to reach fixation. Second, the mutation can establish even if the selection coefficient *s _{k}* is negative in some generations, so long as the long-term average defined by (2.4) is positive. Like Haldane's [43] earlier result, equation (2.3) is an approximation that holds under weak selection (

*s*

_{e}≪ 1). Mathematically speaking, the approximation is guaranteed to improve as becomes smaller. Some sense of the size of the error involved with the approximation can be gained from the numerical examples that follow.

A striking feature of this result is that *s*_{e} is the only way in which temporal variation in selection enters the result. That is, only the mutation's average effect matters, and not its effects on the variance and higher moments of the offspring distribution. If offspring number is Poisson-distributed and selection does not change in time, then *V* = 1 and *s _{k}* =

*s*, and we recover Haldane's classic conclusion that the fixation probability is simply twice the mutation's selective advantage. Equation (2.3) generalizes Haldane's result to any temporal pattern of change in selection, either random or systematic, and to any type of distribution for offspring numbers.

An important conclusion implied by equation (2.3) is that a mutation's fate is largely determined by its fitnesses in the first few generations after it appears. This follows because the selection coefficient for the *k*th generation after the mutation appears, *s _{k}*, is weighted by which becomes successively smaller with larger

*k*. Thus, a mutation that has the good fortune to appear in a benign environment has a much better chance of surviving than one appearing in a bad environment, even when fitnesses fluctuate randomly and both mutations have the same fitness on average.

Having reviewed results from our recent work [46], we now apply those results to situations relevant to evolutionary rescue. Electronic supplementary material gives further details about the calculations.

### (a) Environments that change systematically in time

Many species live in environments that show a systematic trend over many generations, for example as the result of global climate change. We can use the model outlined above to find the fixation probability when a mutation has fitness *s*_{0} when it first appears, and then its fitness increases or decreases linearly over the next *T* generations to a final fitness *s*_{1}. We assume that the mutation is favoured in the final environment (*s*_{1} > 0) because it is certain to be ultimately lost if that is not the case. For the sake of simplicity, we also assume here and in the following cases that the offspring distribution is Poisson (and so *V* ≈ 1 in equation (2.3)).

Calculating the summation in equation (2.4) gives the fixation probability 2.5

Figure 1 shows how that probability varies with *T*, the number of generations over which the change occurs. With time measured on a logarithmic scale, we see there are two time-scales. When the environmental change is slow (so *T* is large), the fixation probability is close to what is predicted by the mutation's initial fitness: *p* ≈ 2*s*_{0}. On the other hand, when the change is fast, the probability is close to what is predicted by its final fitness: *p* ≈ 2*s*_{1}. The transition between these two regimes occurs when *T* is roughly equal to 1/*s*_{1}. That behaviour is sensible, because whether a mutation is established in a constant environment is largely decided in the first 1/*s* generations of its life. A conclusion here is that the mutation's initial fitness dominates its fate over longer time-scales when selection is weak.

These results provide some intuition about the potential for evolutionary rescue. Trending changes in conditions can both trigger a decline in population size and alter the fitness effects of new mutations. If the environment is deteriorating so rapidly that rescue requires that the population adapt within a few dozen generations, say, then new mutations are unlikely to contribute substantially. That is both because there is little time for new mutations to arise and because those that do will not spread to appreciable frequencies before extinction occurs. With a slower change in the environment, mutations might play an important role. In this case, however, establishment is determined by the mutations' fitness in the current environment, which may or may not help population viability in the long run. Establishment favours alleles that have large beneficial effects initially rather than later, and in rapidly deteriorating environments rescue may depend on whether there are mutations with those kinds of effects.

### (b) Environments that change in space

When selection varies in space, a critical factor that determines how populations adapt is the grain of the environment [48]. The environment is said to be ‘fine grained’ if in each generation individuals typically disperse over distances that are substantially larger than the spatial scale of the environmental heterogeneity. Roughly speaking, in this case, an allele that is already established evolves as if it is experiencing uniform selection, with fitness determined by an average over the habitats it encounters [49]. If the allele is favoured in an environmental patch but disfavoured elsewhere, it is doomed if the size of the favourable patch is much smaller than a critical size determined by the relative strengths of selection and migration [50].

A related issue is the probability that a new mutation becomes established in a fine-grained environment. Intuitively, we expect that the outcome will again be determined by some sort of average fitness. We can confirm that intuition by generalizing equation (2.1) to allow for fitness variation between individuals in the same generation. Denote the PGF for individual *i* in generation *t* as *ϕ*_{i}_{,t}(·). Then, the fixation probability is again given by equation (2.2) if we now use
2.6

where *n _{t}* is the number of mutant copies alive at generation

*t*[46]. Equation (2.6) shows that the PGF that determines mutant survival is the geometric mean of the PGFs for the individual copies of the mutation. In this situation,

*(*

*ϕ*_{t}*x*) is a random function whose value depends on the particular sequence of environments. We can, however, find the expected probability of survival over all possible sequences by simply taking the average of the

*ϕ*_{i}_{,t}(assuming again that selection is weak).

When all individuals have Poisson-distributed offspring distributions and selection is weak, equation (2.6) can be used to show that equations (2.3) and (2.4) again give the fixation probability if we simply use the arithmetic average of the selection coefficient across all individuals in each generation. This result is consistent with the fact that in a large population (*N*s ≫ 1) where density is proportional to the population's mean fitness (‘hard’ density dependence), the dynamics of the mutation's spread are again determined by the mutation's average fitness in each generation [51].

Different questions arise when heterogeneity is ‘coarse-grained’, meaning that the spatial scale of variation in the environment is much larger than the typical dispersal distance. Consider a population that lives along an environmental gradient in a continuous habitat. Mutations arise that are locally adapted, for example by increasing the fitness of individuals over a certain range of temperature but decreasing fitness outside that range. What is the probability that a mutation arising at a given point along the gradient will become established?

To study this question, consider a model in which a mutation has a selective advantage of *s _{x,t}* at point

*x*in generation

*t*. Individuals disperse at random with a diffusion rate

*σ*

^{2}, and population density is assumed equal everywhere. The electronic supplementary material finds that probability that a mutation arising at point

*x*in generation

*t*will become established satisfies the partial differential equation (see also Barton [31]): 2.7

To study the survival of a mutation in a patch of favourable habitat, we rescale space so that the mutation has a maximum fitness advantage of *s* at *x* = 0 and that its fitness declines as a Gaussian function as we move away from that point:
2.8

The spatial scale has been chosen here so that *x* in equation (2.8) is dimensionless. With this fitness function, the mutation is beneficial (i.e. *s _{x}* > 0) over the region –1.38 <

*x*< 1.38, and its fitness declines towards zero as we move far outside that patch. (Equation (2.8) has the same curvature as a Gaussian fitness function in discrete time with variance unity.)

We ask what is the probability that a mutation becomes locally established. (Because mutations are locally adapted, they cannot become fixed everywhere.) First, we note that the probability of establishment will be time-independent because fitness does not change in time. Therefore, to calculate the probability of establishment, we set the left-hand side of equation (2.7) to zero. Analytical solution of the resulting ordinary differential equation does not seem possible, but we can make progress with numerical methods and approximation.

Figure 2 shows how establishment is affected by migration, based on numerical integration of equation (2.7). Migration decreases the maximum probability of establishment from the value of 2*s*. If the migration variance *σ*^{2} is greater than that value, then the mutation will move too rapidly out of the patch where it is locally adapted and so it is doomed to extinction. Because we have scaled space to the size of the favourable patch, another way to state the conclusion is to say that extinction is certain if the average dispersal distance per generation (which is very roughly *σ*) is much larger than the width of the favourable patch times The same conclusion comes from analysis of the deterministic change in allele frequency for mutations that are already established [50].

The mutation can become established even if it first appears in a region where its growth rate is negative because there is a chance it will move into the favourable patch before it is lost. The region in which the mutation can appear and become established grows in size with increasing values for the local fitness advantage *s* and the movement rate *σ*^{2}. Figure 3 shows examples of two mutations that succeed in becoming established, based on simulations. If a mutation originates outside the region where it has positive fitness, it will almost certainly be lost unless its descendants happen to move into the benign environment in the first few (approx. 1/*s*) generations after it appears (the dark points in figure 3).

To get further intuition, we can derive an approximation. Anticipating that the solution for *p _{x}* is approximately proportional to a Gaussian, we substitute a function of that form into the right-hand side of (2.7) and then solve for its parameters. We find that the establishment probability is approximately
2.9

where 2.9

Plugging equation (2.9) back into equation (2.7) shows that it provides an accurate approximation provided selection and migration are weak (*s*, *σ*^{2} ≪ 1) (see the electronic supplementary material).

This result gives two conclusions. It shows that in general the probability of establishment declines with increasing migration (*k* becomes smaller as *σ*^{2} grows). There is a critical dispersal rate above which a mutation is certain to become extinct. We see that *k* is negative when *σ*^{2} > 2*s*. Because the average distance that individuals disperse each generation is very roughly *σ*, this implies that mutations cannot establish if the average dispersal distance is much greater than Second, the expression for *v* shows that, in general, the width of the region over which mutations can become established grows as the ratio of the migration rate *σ*^{2} to the maximum fitness advantage *s* increases.

### (c) Environments that change in space and time

The last situation we will consider is when fitnesses vary in both space and time. We extend the model from (b) so that the environmental patch favourable to the mutation moves in space at a constant rate *c*. The mutant's selection coefficient is now
2.10

To permanently survive, a mutation must avoid extinction and establish itself in a ‘travelling wave’ [52] that chases the region where it has positive fitness. The probability of that outcome depends on where and when the mutation appears. The solution for *p _{x,t}* (which now satisfies equations (2.7) and (2.10) with appropriate boundary conditions) cannot be found analytically, so again we resort to numerical analysis and approximation.

Figure 4 shows examples based on numerical integration of equation (2.7). We see that the point in space that maximizes a mutation's probability of establishing precedes the advancing patch of favourable habitat. This is sensible, because a mutation that appears there will benefit from an improving environment as the favourable patch moves towards it. If established, a mutation survives in a travelling wave that advances with the favourable patch, but this wave follows rather than precedes the patch [20,21].

We can again gain intuition, using approximation. Assume that the solution can be approximated by a Gaussian function whose maximum moves in space at a rate *c*:
2.11

We substitute this expression and equation (2.10) into equation (2.7) and solve for the parameters *k* (which gives the maximum probability), *v* (the width of the probability function in space) and * δ_{x}* (the distance in space between where the environmental optimum lies and where establishment probability is maximized). The solutions are
2.12

Equations (2.11) and (2.12) assume that the speed of change and the rate of migration are small relative to the strength of selection Numerical integration of equation (2.7) confirms that these approximations are valid under those conditions. Further details are given in the electronic supplementary material.

These results show that the point in space that maximizes survival moves further in front of the favourable patch (i.e. *δ _{x}* grows) as the speed of the patch's movement (

*c*) increases and the migration rate (

*σ*

^{2}) decreases. As the speed of movement increases, the probability of establishment decreases (

*k*declines). That effect is minor for small values of

*c*, but as

*c*grows the probability of establishment declines more and more quickly.

There is a critical speed of patch movement at which establishment becomes impossible, regardless of where and when the mutation first appears. This value (which is determined approximately by when *k* = 0) is simply
2.13

Equation (2.13) confirms that there is an evolutionary speed limit: favourable mutations cannot establish if the favourable patch moves too fast relative to the mutation's maximum fitness. This result is a very rough approximation because it violates the assumption of slow change used to derive it. Nevertheless, numerical integration of equation (2.7) confirms that there is a critical upper limit to *c*, and further shows that the limit is smaller than (2.13). Thus, this result is conservative in the sense that an environment changing at this speed will certainly prevent establishment.

The key conclusion that we draw is that there is an absolute limit on the potential of locally adapted mutations to contribute to evolutionary rescue. Environments that change too rapidly, relative to the maximum benefit of locally adapted alleles, cannot be rescued by new mutations.

## 3. Discussion

The simple models introduced here suggest several basic conclusions about how adaptation to changing environments occurs. Whether a beneficial mutation becomes established is largely determined by chance events that occur in the first few generations after it appears. In a single habitat that changes in time, a mutation's probability of establishment is determined by an average of its fitnesses through time that is weighted more heavily on the early generations. Because even mutations that improve fitness substantially need many generations to spread to appreciable frequencies, they are not likely to contribute much to evolutionary rescue in populations facing extinction in the short term. When environmental deterioration is slower, the survival of new beneficial mutations is determined by their effects under the conditions when they first appear. Random dispersal decreases the probability of establishment in habitats that change in space because a locally adapted mutation will move out of the area where it is favoured. When fitnesses change in a consistent way in both time and space, a new beneficial mutation faces three challenges: it must survive loss in the first few generations, it must occur near or in front of the region where it is currently favoured, and it needs to improve fitness enough to establish a travelling wave that advances along with the favourable habitat. There is an upper limit to the rate at which the environment can change in time above which a mutation cannot become established regardless of where and when it appears. This rate, which is proportional to the mutation's maximum fitness, sets an absolute constraint on the opportunity of locally adapted mutations to contribute to evolutionary rescue.

Dispersal has several effects on when and where new mutations establish. A mutation can appear outside a region where it is favoured and then become established by moving into it. This possibility is unlikely to be very important, however, because a mutation will usually not survive the first few generations if it has negative fitness effects. The converse situation seems likely to be more common: a mutation appears in a favourable habitat, disperses out of it and then is lost. The results show that this effect is certain to doom beneficial mutations to extinction if average dispersal distances are much larger than the size of the favourable patches multiplied by the square root of the maximum fitness benefit that the mutation gives.

We assumed that dispersal is random and is constant in space and time. Selection that varies in time and space will favour evolutionary changes in dispersal [53]. Even in the absence of changing selection pressures, expansion of a population favours higher dispersal phenotypes at the range margin, an effect that has been observed in invasive species [54]. Further, variation in density and selection pressures can favour non-random movement. All of these factors will affect the probabilities that adaptive mutations become established.

We have been discussing single mutations in isolation and neglected other genetic events that may be happening in the population. This may often be a good approximation for sexually reproducing species with substantial recombination. In species with little or no recombination, which includes many microbes, the approximation is less plausible. One complication here is that the fitness of individuals carrying the mutation will also be affected by the genetic background on which the mutation appeared (both through additive and epistatic effects). This problem can be sidestepped in our framework if we interpret the selection coefficients as referring to the focal genotype's overall fitness rather than just the effect of the mutation. A more subtle issue is that beneficial mutations spreading through the population at the same time interfere with each other's establishment [42,55,56]. This effect is much more important in populations without recombination because interference will occur between the focal mutation and other beneficial mutations that occur anywhere in the rest of the genome. The importance of this effect depends on interactions between the size of the population and the distribution of mutation effects, and is difficult to account for [57].

These models have focused entirely on the genetic side of evolutionary rescue, and have not considered demographic effects. That is appropriate for the questions posed here, which concern how individual mutations first get established. Demography can alter the conclusions from these models in several ways. First, population density affects the flux of mutations. Small numbers of mutations occur where densities are low [6,40]. Consequently, adaptation and rescue by beneficial mutations at the edge of a species' range may be seriously constrained. Second, density itself can affect fitness. Consider a case in which population densities decline smoothly to zero as one approaches the range margin. If decreasing densities lead to reduced intraspecific competition, the point where the mutation has highest fitness will be displaced further towards the range margin from the point where it has highest abiotic fitness. This effect increases the fixation probability for a mutation that appears further from the range core [40]. Conversely, positive density dependence (‘Allee effects’) will push the location that maximizes the establishment probability away from the range margin.

A third effect of demography is perhaps the most conspicuous element missing from our models. We have focused exclusively on how mutations first become established, and said nothing about what happens if they do. Evolutionary rescue can occur only if beneficial mutations not only become established but also rise in frequency to the point where they increase a population's size and/or growth rate. The second phase of that process will be an important focus for future work.

## Acknowledgements

We are very grateful to S. Otto and M. Whitlock for useful discussions. This research was supported by NSF grant no. DEB-0819901 to M.K.

## Footnotes

One contribution of 15 to a Theme Issue ‘Evolutionary rescue in changing environments’.

- © 2012 The Author(s) Published by the Royal Society. All rights reserved.