Evolutionary bet-hedging in structured populations

As ecosystems evolve, species can become extinct due to fluctuations in the environment. This leads to the evolutionary adaption known as bet-hedging, where species hedge against these fluctuations to reduce their likelihood of extinction. Environmental variation can be either within or between generations. Previous work has shown that selection for bet-hedging against within-generational variation should not occur in large populations. However, this work has been limited by assumptions of well-mixed populations, whereas real populations usually have some degree of structure. Using the framework of evolutionary graph theory, we show that through adding competition structure to the population, within-generational variation can have a significant impact on the evolutionary process for any population size. This complements research using subdivided populations, which suggests that within-generational variation is important when local population sizes are small. Together, these conclusions provide evidence to support observations by some ecologists that are contrary to the widely held view that only between-generational environmental variation has an impact on natural selection. This provides theoretical justification for further empirical study into this largely unexplored area. Supplementary Information The online version supplementary material available at 10.1007/s00285-021-01597-z.


Introduction
Many traits in biological populations have been explained by selection for riskspreading to safeguard against environmental variation, known as evolutionary bet-hedging (Beaumont et al. 2009;Levy et al. 2012;Sarhan and Kokko 2007;Seger 1987;Starrfelt and Kokko 2012;Stumpf et al. 2002;Venable 2007). In a stochastically varying environment, a species that maximises its mean reproductive rate, or mean fitness, is not necessarily the strongest, since this could coincide with increased sensitivity to fluctuations in the environment. A bet-hedger is defined as a strategy that has lower mean fitness than its rival, but is selected over the rival since it has reduced variation in its fitness, due to being less sensitive to these fluctuations. For example, consider a simple habitat that fluctuates between a short wet season and a long dry season. Mean fitness would be maximised by adapting to the dry season. However, such an adaptation may result in terrible performance during the wet season. A generalist, who is well-adapted to both seasons, will have lower mean fitness, but is protected from the environmental fluctuations and therefore has reduced variation in its fitness across seasons.
An ecological example of bet-hedging can be observed in the delayed germination strategy in desert annuals (Cohen 1966;Philippi 1993;Venable 2007). These plants release multiple seeds, most of whom germinate in the next season with a fraction remaining dormant until future seasons. Such a strategy reduces mean fitness, since some dormant seeds may be lost before germination. However, this strategy also reduces the variation in fitness, because it ensures that not all offspring will die if the next season is bad. Bet-hedging adaptations have also evolved in microbial communities under turbulent environments (Beaumont et al. 2009;Levy et al. 2012). These examples consider between-generational variation (Gillespie 1973), whereby all individuals experience the same conditions at any time. Mathematically, adaption to counter this type of variation is easily described and understood assuming evenly mixed populations of species (Gillespie 1973;Hopper 1999;Starrfelt and Kokko 2012).
Environmental variation can also act locally on individuals, causing withingenerational (or demographic) variation. In this context, the fitness of an individual can be different from that of another individual of the same type at a given time, but both will have fitness drawn from the same distribution. One example is where predation levels across the habitat are variable. Assuming a cost of spreading offspring across numerous sites, the strategy to maximise fitness corresponds to choosing a single nesting location. However, since this site could be predated, a bet-hedger could evolve that spreads offspring across numerous sites to reduce the predation risk. An ecological example of potential bet-hedging against within-generational variation has been observed in female sierra dome spiders (Watson 1991). These females exhibit a multiple paternity strategy, whereby the primary mate is the victor of a fight among potential suitors, and secondary mates are selected at random. Mean fitness would be maximised by only selecting the primary mate, but random secondary mating hedges against the fight only taking place between weak suitors. Many other examples are similar and focus on multiple-paternity as a bet-hedging strategy (Fox and Rauter 2003;Sarhan and Kokko 2007;Watson 1991;Yasui 2001). Other work has identified strate-gies in Cabbage Butterflies (Root and Kareiva 1984) and Aphids (Ward and Dixon 1984) that potentially evolved as bet-hedgers against within-generational variation.
Despite the ecological observations, mathematical models in well-mixed populations lead to the conclusion that such variation does not drive evolutionary adaption unless the population is unrealistically small (Gillespie 1974;Hopper 1999;Hopper et al. 2003), contradicting and challenging the ecological observations (Courtney 1986;Hopper 1999;Hopper et al. 2003). Such challenges have potentially led to the lack of examples of bet-hedging against within-generational variation in recent literature, apart from cases restricting themselves to small population sizes (Sarhan and Kokko 2007).
Real populations are often not well-mixed and typically exist within some defined population structure, such as spatial or social structure. Some population structures consist of distinct groups of individuals within patches (or demes). Bet-hedging in such populations has been investigated using metapopulation models and deme-structured models (Lehmann and Balloux 2007;Shpak 2005;Shpak and Proulx 2007;Yasui and Garcia-Gonzalez 2016). These cases have demonstrated that within-generational bet-hedging strategies can evolve in metapopulations, provided the deme (or patch) contains sufficiently few individuals. Here we generalise the study of bet-hedging to graph structured populations, which can capture interaction/competition structure as well as deme-structure. The benefit of graph structure over metapopulations is that different types of contact structure can be considered. For example, populations where individuals interact and compete on a local scale but not within closed groups of individuals, such as competition in epithelial cells (Renton and Page 2019) and cancer growth (Hindersin et al. 2016). One distinction is that individuals do not necessarily interact with the neighbours of their neighbours, which can capture interactions such as social behaviour and spatially constrained competition. Mathematically, evolution in structured populations is described by evolutionary graph theory (Lieberman et al. 2005;Ohtsuki et al. 2006), which we build upon to incorporate variation. By analysing the evolutionary process in structured populations, we show that both between-and within-generational bet-hedging can be favoured in the evolutionary process, regardless of population size. This supports the conclusions from metapopulations in providing an explanation for the ecological observations. We also discuss how different types of structure impact selection for within-generational bet-hedging.

Evolutionary model
To determine the impact of population structure on the evolution of bet-hedging strategies we model the dynamics of the process. We are interested in when a bet-hedging strategy has a competitive advantage over the non-bet-hedging strategy, which we call the normal-type. Evolution in structured populations (generally in a non-variable environment) is described by evolutionary graph theory (Antal et al. 2006;Broom et al. 2010;Broom and Rychtář 2008;Hindersin et al. 2016;Lieberman et al. 2005;Renton and Page 2019). Here, population structure is represented by an undirected connected graph in which connections between individuals represent potential for competition. This framework is an extension of the Moran process (Moran 1958) to structured popu-lations. Metapopulation and deme-structured models fit this framework if we consider each patch (or deme) to be akin to a cluster of individuals who are connected, and the connections between patches to be represented by links between these clusters.
We consider a population with two types (or strategies) of individuals, the bethedging strategy M and the normal-type strategy R, either of which can play the role of the resident. The population structure is defined by a graph G = (V , E), where V is the set of nodes and E is the set of edges between these nodes. The biological interpretation is that individuals in the population each occupy a node, with only one individual per node. The edges represent competition between individuals, in the sense that individuals can only place their offspring onto connected nodes.
Following Argasinski and Broom (2013), Roff (2008), and Wild and Taylor (2004), the fitness of an individual is proportional to its birth rate. Therefore, an individual is first selected to die at random, resulting in a vacant node in the population. The neighbouring (connected) individuals of this node then compete to replace with an identical offspring, with probability proportional to their fitness ( Fig. 1). Since offspring are identical, there is no further mutation until one strategy eliminates the other. Following Ohtsuki et al. (2006), we refer to these dynamics as death-birth with selection on birth. Other dynamics have been proposed for evolution in structured populations, which we highlight in the discussion.
Traditional evolutionary graph theory dynamics do not capture variation in fitness, which is present in many real-world populations. To incorporate this we treat fitness as a random variable, the changes in which can be considered as changes in the local conditions. We assume that offspring inherit the fitness distribution of their parent, rather than the absolute fitness value. This general definition of fitness can account for either between and/or within-generational variation by changing correlations between each random variable. Many real-world examples (Beaumont et al. 2009;Gravenmier et al. 2018;Olofsson et al. 2009;Sarhan and Kokko 2007;Tufto 2015;Venable 2007;Yasui 2001;Yasui and Garcia-Gonzalez 2016;Yasui and Yoshimura 2018) can be modelled using random variables to capture the variability in future conditions. Modelling in this manner allows us to focus on the effect of variation. However, if applied to real populations, the explicit environmental changes may need to be modelled more directly.
To describe how this stochastic process changes, we define the probability of moving from one state to another, where a state represents which nodes are occupied by M and which are occupied by R. From any state S that is not all M or all R, we can move to a state S + with more type M individuals (bet-hedgers) or S − with more type R individuals (normal-types). To move from S to S + we require a normal-type to die followed by selecting a bet-hedger for reproduction. For a given node j, the probability of death is 1/N . After j is selected for death, the neighbouring individuals, which we will refer to as the selection group (Fig. 2), compete to replace j. We will refer to the probability of selecting a certain type (given that an individual has been selected for death) as the selection probability of that type. Therefore, the probability of moving to a state S + is given by summing the products of the probability that each normal-type individual is selected for death multiplied by the corresponding bet-hedger selection Fig. 1 The update dynamics of the evolutionary process. Firstly, an individual is randomly selected for death, indicated by the white arrow (left-most image). This results in a vacant node in the population, which the neighbouring individuals can then compete to fill (middle image). One of these individuals is then selected for birth, with probabilities proportional to their fitness, and the vacant node updates to become the type of selected individual (right-most image). Either the selected node becomes a bet-hedger M (top-case) or a normal-type R (bottom-case) probability. That is, where R S j = 1 if the individual in node j is a normal-type in state S, and zero otherwise. Similarly, the probability of moving to a state with more R individuals is given by The top figures indicate the graphs before an individual is selected for death, and the lower two figures show the resulting selection groups. After an individual is selected for death (central node), the connected individuals (in dashed circles) compete to replace this individual. We refer to these connected individuals as the selection group. The different structures can influence the number of nodes in the selection group, with a higher degree node having a much larger selection group where M S j = 1 if and only if the individual in node j is a bet-hedger in state S, and zero otherwise. These two probabilities dictate how the system evolves at each time step, and therefore provide a measure of the relative strength between the competing strategies.

The effect of fitness variation on bet-hedger selection probability
An obvious measure of variation is the variance, which is useful since it is easily calculated. However, it has limitations; for example, if two distributions have equal mean and variance it gives no insight into which is more varied. This information is captured in the higher order moments of the distributions, such as the skew and kurtosis. A more comprehensive representation of variation is given by the convex order (Shaked and Shanthikumar 2007;Wilkinson and Sharkey 2018), such that if one distribution is greater than another in convex order then it is more variable. Convex order describes variability by ordering the expected values of convex functions, which are sensitive to the variation.
For two random variables X and Y , we say that X is less than Y in convex order (and therefore less variable than for all convex functions φ. A useful result that can be obtained from convex ordering is (Shaked and Shanthikumar 2007) so if one random variable is less than another in convex order then its variance cannot be larger than the other. Establishing convex order can be difficult, but there are methods for doing this and under certain circumstances, this ordering of distributions reduces to ordering of the variance of the distributions (Shaked and Shanthikumar 2007). However, for our purposes, we only need to use this as a precise ordering of variability between any two distributions.
In the evolutionary process, selective pressure is governed by the selection probabilities on the right-hand side of Eqs. (1) and (2). For any given replacement event, the selection group consists of m bet-hedgers and n normal-types, so the selection probability depends on m and n. The bet-hedger selection probability can be shown ("Appendix" A) to reduce to where f M i is the fitness of a bet-hedger i and f R j is the fitness of a normal-type j. Here, the bet-hedgers in the selection group (immediate neighbours of the individual selected for death) are labelled from 1 to m and the normal-types are labelled from 1 to n, so that m + n = k where k is the size of the selection group. Noting that the selection probability of a normal type and the selection probability of a bet hedger sum to 1, the strength of selection can be represented solely by the bet-hedger selection probability. Equation (3) is the expected value of a convex function of normal-type fitness. Therefore, by the definition of convex order, increasing the variation of normaltype fitness in convex order can only increase the selection probability of the bethedger.
The bet-hedger selection probability can be also written as 1 minus the normal-type selection probability, which gives The second term here is a convex function of the bet-hedger fitness, which implies that decreasing the bet-hedger fitness variation through convex order can only decrease the value of this term, thus increasing the bet-hedger selection probability. Therefore, bethedger performance increases through either the environment experienced by normaltype individuals becoming more variable or by reducing its own fitness variability.
To obtain the selection probability (Eq. (3)), the bet-hedger fitness is averaged over the total fitness of the surrounding individuals ("Appendix" A). Assuming that the proportion of bet-hedgers to normal-types remains approximately constant (m/n ≈ γ ), the selection probability can be transformed to depend on sample averages, For within-generational variation, each individual can sample a different value at the same time. Therefore, as the selection group size increases, these sample averages become less sensitive to normal-type variation, due to the law of large numbers. Consequently, the selection probability becomes less sensitive to this variation as we increase selection group size, and for large selection groups, selection for reduced within-generational variation is diminished. This explains why in large well-mixed populations, within-generational bet-hedging should not evolve (Gillespie 1974). However, since the selection group depends on the degree of the node chosen for death (see Fig. 2 for an illustration), if the degree of this node is low then within-generational variation can have a large impact on the selection probability, regardless of population size. By taking small clusters of fully connected individuals, inter-connected with a sparse number of edges, we can create metapopulation-like graphs. In this case, if the cluster size is small, the selection group will be small and within-generational bethedging can evolve, agreeing with predictions from metapopulation models (Lehmann and Balloux 2007;Shpak 2005;Shpak and Proulx 2007;Yasui and Garcia-Gonzalez 2016). For between-generational variation, individuals experience identical conditions during a generation. This is modelled by having all individuals of a given type sample the same value. Therefore, the selection probability can be written as Assuming the proportion of bet-hedgers to normal-types is constant (m/n ≈ γ ), this becomes for any selection group size. Therefore, for between-generational bet-hedging there is no diminishing effect due to large selection groups since there is no dependence on selection group size, and between-generational variation will have a large impact for all graphs and population sizes. Since there is no significant impact of population structure on selection, and evolution of between-generational bet-hedging has been widely explored mathematically (Gillespie 1974;Hopper 1999;Starrfelt and Kokko 2012), we focus on within-generational bet-hedging for the remainder of this paper, and hence will drop the within-generational prefix in what follows.

Approximate result for variance
For evolutionary bet-hedging models, approximate results are often derived using a second order Taylor approximation (Frank and Slatkin 1990;Gillespie 1974;Rice 2008;Rice and Papadopoulos 2009;Shpak 2005;Shpak and Proulx 2007;Starrfelt and Kokko 2012). Following this approach, we apply a two-dimensional second-order Taylor approximation about the mean fitness of both types, which yields ("Appendix" B.1) where μ Z and σ 2 Z are the expected value and the variance of the type Z ∈ {M, R} fitness distribution, respectively. This suggests that mean and variance are key parameters controlling the selection probability.
The coefficient of σ 2 R is positive, so increasing the variation of the normal-type fitness through the variance is likely to increase the bet-hedger selection probability. The total coefficient of σ 2 M is negative, so decreasing the bet-hedger variation through the variance is also likely to increase the bet-hedger selection probability. We again observe that selection for bet-hedging depends on the size of the selection group rather than population size, since the variance dependent terms in Eq. (4) diminish with m and n. The diminishing effect occurs since the order and m and n in the denominator are higher than in the numerator.
For the bet-hedger to be favoured in a given replacement event, we require the selection probability of the bet-hedger in this event to be larger than the selection probability of the normal-type in the opposite event. That is, we require the bet-hedger selection probability from m bet-hedgers against n normal-types to be larger than the normal-type selection probability from m normal-types against n bet-hedgers. Treating the bet-hedger variance as fixed, the normal-type variance at which these are equal, which we call the critical normal-type variance, is approximated by ("Appendix" B.2) Alternatively, we can treat normal-type variance as fixed and find the critical bethedger variance by rearranging Eq. (5) to find σ 2 M (not shown). Taking the derivative of Eq. (5) with respect to m we obtain This can be written as Both h(m) and z(m) are strictly positive for m ≤ k/2. Therefore, we only need to consider the sign of g(m). The derivative of g(m) with respect to m is a negative function of m, so the minimum value occurs at m = k/2. Since g(k/2) > 0, g(m) must be positive for all m ≤ k/2. Since all three functions are positive over the range of m that we consider, f (m) is positive for all m ≤ k/2. Therefore, the critical normaltype variance is an increasing function of m, and the maximum critical normal-type variance occurs in the evenly-mixed scenario, m = n = k/2, where In this scenario, the critical normal-type variance grows linearly with the selection group size k, showing that selection for within generational bet-hedging quickly diminishes with selection group size. In the case where σ 2 M = 0, the critical normal-type variance is proportional to k, so any increase in k requires a increase in the critical normal-type variance. In the general case, if both k and σ 2 M increase by the same proportion, then the critical normal-type variance also increases by this proportion.

Implications for the fixation probability
The results in Sects. 3 and 3.1 focus on the relative strength of each strategy for a given selection event. However, the evolutionary process consists of multiple selection events with different selection groups. Therefore, the fixation probability determines the overall strength of each strategy. This is the probability that an initial subset of mutants takes over the population, and is a popular measure to compare different strategies within evolutionary theory (Altrock and Traulsen 2009;Broom and Rychtář 2008;Czuppon and Traulsen 2018;Giaimo et al. 2018;Lieberman et al. 2005;Traulsen and Hauert 2010). Since increasing variation in normal-type fitness (or decreasing bethedger fitness variation) increases the relative strength of bet-hedgers, we assume that bet-hedger fixation probability will also increase.
Assuming that bet-hedger fixation probability is increasing with normal-type variation, we want to find the level of variation above which the bet-hedger becomes favoured in the evolutionary process; i.e. the fixation probability of a bet-hedger invading a normal-type population is higher than the normal-type invading bet-hedgers. We call this the overall critical normal-type variation. Subject to the assumptions of the Taylor approximation, we showed that there is a level of variation in the normal-type fitness above which the bet-hedger is favoured for a given selection event. We assume that there is also a critical normal-type variation for arbitrary fitness distributions (where the assumptions of the Taylor approximation may not be satisfied). For certain distributions, such as the gamma distribution, this can be calculated using numerical methods (e.g. "Appendix" C.1). Alternatively, this critical normal-type variation can be approximated by setting the variance of the distribution to be given by Eq. (5). Since there is a level of variation above which, for a given selection group, the bet-hedger will be favoured, eventually the bet-hedger will be favoured in every selection group. Therefore, the overall critical normal-type variation must exist.
On k-regular graphs, the conclusions from the selection probability can easily be applied to fixation probability, since each selection group is of size k. Here, if the bethedger is favoured in every scenario for a size k selection group, they must be favoured overall. From the Taylor approximation, if the bet-hedger is favoured in the evenlymixed scenario then the bet-hedger is favoured in every scenario, so we assume that the critical normal-type variation for the evenly-mixed scenario provides an upper bound for the overall critical normal-type variation. Extending the conclusions to arbitrary graphs is less clear, since there can be variability in node-degree. In such cases, it is not obvious how the cumulative effects of different selection group sizes will affect the relative strength of bet-hedgers (the upper bound can be determined by looking at the maximum selection group size on the network, but this may be a very loose upper bound). To investigate this, and to confirm that our assumptions hold, we now investigate the fixation probability numerically.

Numerical results
Here we investigate the fixation probability numerically using stochastic simulations, in order to test the assumptions from Sect. 3.2. For a fitness distribution, we require a distribution bounded below by zero. Right-skewed distributions are common in many biological systems, so we choose to use gamma distributions to represent fitness for both bet-hedgers and normal-types. We opt to use gamma over other right-skewed distributions since for the gamma distribution, convex order reduces to ordering the variance, which enables the variation of the distribution to be easily controlled.

Regular graphs
We consider four 50 node graphs: a complete graph, and three k-regular random graphs, with degrees 16, 8 and 4. The relative strengths of the normal-type and the bethedger is determined by the ratio of their fixation probabilities. The overall critical normal-type variation for each graph is given by the variation at which this ratio is equal to 1. We compare this to the upper bounds predicted by the evenly-mixed critical normal-type variation, calculated numerically (see "Appendix" C.1) and using the Taylor approximation [Eq. (6)]. Figure 3 illustrates that increasing the normal-type variation increases the bethedger fixation probability and decreases the normal-type fixation probability for all graphs, as expected based on the assumptions in Sect. 3.2. Since the selection probability is very sensitive to the degree of the graph [Eq. (3)], for graphs with high degree, such as the complete graph, variation has little impact on the selection probability. This is reflected in the slight impact of normal-type variance on the fixation probability and is consistent with established results in well-mixed populations (Gillespie 1974;Seger 1987). For graphs with low average degree, variation has a significant effect on the fixation probability and can be a key factor in the evolutionary process. As we increase the variation in bet-hedger fitness (measured through increasing the variance, σ 2 M ) we observe the same pattern (Fig. 3), however the critical normal-type variation required   Fig. 3 The impact of within-generational variation on the overall relative strength of bet-hedgers on four 50 node k-regular graphs. Bet-hedger has mean fitness equal to 0.95 with normal-type mean fitness equal to 1. The left-hand figures show the ratio of bet-hedger to normal-type fixation probability, calculated from a single mutant of the invading type. The right-hand figures show the fixation probabilities, with the solid curves indicating the bet-hedger and the dashed-curves indicating the normal-type. Along the x-axis we change the variance of the normal-type fitness distribution, σ 2 R . Moving from the top through the middle to the bottom subgraphs, the variance of the bet-hedger fitness distribution, σ 2 M , increases. When variance is non-zero, we assume fitness is given by a gamma distribution (the parameters of which are uniquely determined by the mean and variance), so changing the variance changes the convex order (and therefore changes the variation in the distribution). On the left-hand figures, the black horizontal line at 1 is used to indicate which strategy is favoured. If the ratio is below 1 the normal-type is favoured, and above 1 the bet-hedger if favoured. The overall critical normal-type variance is the x-coordinate when each ratio crosses 1. The upper bounds are indicated by the dashed vertical lines and the approximate upper bounds are marked by the dotted vertical lines for the bet-hedger to be favoured increases. This is in line with the results from the Taylor approximation (Eq. 5), which suggested that critical normal-type variation is an increasing function of bet-hedger variation.
We argued in Sect. 3.2 that the evenly-mixed critical normal-type variation provides an upper bound on the overall critical normal-type variation. This upper bound in fact provides a good approximation to the overall critical normal-type variation for each graph tested (the dashed lines in Fig. 3 are at a slightly higher normaltype variance than where the ratio crosses 1), which we can use to gain insight into how much variation is required for the bet-hedger to be favoured in regular graphs. Under the gamma distribution, the evenly-mixed critical normal-type variation linearly increases with selection group size when the bet-hedger has no variation in their fitness ("Appendix" C.2), showing that increasing selection group size can quickly suppress selection for bet-hedging strategies. Comparing the Taylor approximation to the computed upper bound (the dotted and dashed lines in Fig. 3, respectively), we observe that this provides a rough approximation to the upper bound when the variance required for the bet-hedger to be favoured is low. However, as the variance required increases (in this case by increasing selection group size or increasing the bet-hedger variation) the discrepancy between the two increases. This is because as the normal-type fitness distribution becomes more variable, the higher order moments increase, which causes the assumptions underpinning the Taylor approximation to no longer hold.

Impact of degree heterogeneity
On k-regular graphs, we have shown that the average degree controls selection for bethedging. Such graphs have no variability in the degree of different nodes, however, in real populations we would expect some level of degree variability. Here, we consider the effect of degree variability on selection for bet-hedging.
We first consider the star graph and the circle, which have the same average degree in the limit of large population size but different degree variability. On the star graph, there is one focal individual who is connected to every other individual. All other individuals are only connected to this focal individual. This graph has high degree variability, with one node having degree N − 1 and all others having degree 1, where N is the population size. On the circle, individuals are connected in a loop, so all nodes have degree 2 and there is no variability.
For the star graph, there are a few possible distinct transitions that can occur. If a bet-hedger is in the central node, the changes that can happen to the system are either this node dying and being replaced by a normal-type from the leaf nodes, or a normal-type leaf node dying and being replaced by a bet-hedger from the central node. Similarly, if the central node is a normal-type, either this node can die and be replaced by a bet-hedger from a leaf node, or a bet-hedger leaf node can die and be replaced by a normal-type from the central node. Due to the symmetry of the leaf nodes, we can group all these events together so that we only have these four possible state transitions to consider. Let p M M i,i+1 denote the probability that the system transitions from a state with a bet-hedger in the central node and i bet-hedgers on the leaves to a state with a bet-hedger on the central node and i + 1 bet-hedgers on the leaves. Let p M R i,i denote the probability that the system transitions from a state with a bet-hedger in the central node and i bet-hedgers on the leaves to a state with a normal-type in the central node and i bet-hedgers on the leaves. From Eqs. (1) and (2), these transition probabilities are given by Selection is only taking place when an individual on a leaf node replaces the central node (Eqs. (7) and (8)). This is because when a leaf node dies only the central node can replace this, so there is no competition-based selection taking place. When the central node is replaced, the selection group size is equal to the number of leaves, which is N −1 for population size N . Therefore, for a sufficiently large population, the impact of within-generational variation on the selection probability rapidly diminishes, resulting in no selection for within-generational bet-hedging on a large star graph. For the circle, suppose there is a single cluster of connected bet-hedger individuals with no normal-type individuals between them. The symmetry of the graph allows us to consider the number of bet-hedger individuals rather than their locations, since the group of bet-hedgers can only change at the two boundaries where they meet normal-types (Broom et al. 2010). Denoting the probability of moving from a state with i bet-hedgers to i + 1 bet-hedgers by p i,i+1 , and the reverse process by p i,i−1 , we can describe the transition probabilities between different states with the following equations where j is arbitrary since the fitness distributions for a given type are independent and identically distributed. From this we can see that on the circle within-generational variation will always have an influence on selection, since there is no dependence on N , potentially paving the way for a bet-hedging strategy to evolve. Although an extreme case, this shows that increasing the variability in the degree distribution of  Fig. 4 The impact of variance in the degree distribution on the overall critical normal-type variation. We consider sixteen 8 node graphs with average degree equal to 4, each with a different variance in their node degree distribution. Along the x-axis we change the variance of the normal-type fitness distribution, σ 2 R . The y-axis shows the ratio between the bet-hedger fixation probability and normal-type fixation probability the graph (by going from no variation on the circle to high variation on the star) may reduce the selection for bet-hedging.
To investigate this further, we generate a sample of graphs with fixed population size and average node degree but different degree variability (measured using the variance of the degree distribution). Generating 1,000,000 random graphs (Erdős and Rényi 1960) with N = 8 and average degree equal to 4 results in 16 unique degree distribution variances being sampled. From these graphs, we select a cohort of 16 graphs by randomly selecting a single graph for each variance. We label these numerically from "Graph 1" to "Graph 16", where increasing the index corresponds to an increase in the degree distribution variance.
For each graph, we assume the bet-hedger has gamma distributed fitness with mean 0.95 and variance 2. Normal-type fitness is gamma distributed with mean 1, and we change the variation to numerically determine the overall critical normal-type variation. For each value of normal-type variation, we perform 30,000,000 stochastic simulations to identify the fixation probability of a single mutant of each type in a resident population of the other, from which we calculate the ratio of fixation probabilities, with the results shown in Fig. 4. Using this, we determine the critical normal-type variation, which gives the ordering: 1, 2, 3, 4, 5, 6, 7, 9, 10, 8, 11, 12, 13, 16, 14, 15. In the majority of cases, increasing variance in the degree distribution increases the overall critical normal-type variation, and therefore decreases selection for bet-hedging. There are however some outliers in this pattern (graphs 8 and 16 in this example). This is a common occurrence in evolutionary graph theory, where it has been found that under the death-birth with selection on birth dynamics considered here, although most random graphs suppress fixation probability relative to a well-mixed population, The impact of population size on the overall critical normal-type variation. We consider three kregular random graphs with degree equal to 4 and population sizes: 50, 100 and 200. We change the normal-type variance, σ 2 R , along the x-axis. The y-axis shows the ratio between the bet-hedger fixation probability and normal-type fixation probability there are a small minority of outliers for which this is reversed (Hindersin and Traulsen 2015).

Population size
We have shown that, for regular graphs, increasing the average degree of the graph increases the critical normal-type variation required for the bet-hedger to be favoured. From Sects. 3 and 3.1, the critical normal-type variation on such graphs should be independent of total population size. Here, we investigate the impact of population size on regular graphs using three populations sizes: N = 50, N = 100, N = 200.
For each population size, we assume that bet-hedgers have gamma distributed fitness with mean 0.95 and variance 2, and that normal-type have gamma distributed fitness with mean 1. To determine the overall critical normal-type variation, we vary the normal-type variation. We perform 1,000,000 stochastic simulations for each value of normal-type variance, first with the bet-hedger invading the normal-type and then with the normal-type invading the bet-hedger, from which we calculate the ratio of bet-hedger to normal-type fixation probabilities. Figure 5 shows that the population size does not have an influence on the critical normal-type variation, which is instead governed by selection group size. We see that larger population sizes amplify selection for the favoured type. This occurs since in a larger population, a rare invader is less likely to be randomly selected for death. Therefore, if the invader has a selective advantage over the resident, it will be more likely to have a chance to reproduce and gain a foothold than it would in smaller populations.

Discussion
Evolutionary bet-hedging refers to the theory that the evolutionary process is sensitive to variation in fitness, with some species potentially accepting a decrease in their mean fitness to reduce this variation. A key area of discussion within evolutionary bet-hedging is the existence of strategies that potentially bet-hedge against withingenerational variation; i.e. variations that affect individuals of the same type differently within each generation. Such strategies have been observed (Fox and Rauter 2003;Root and Kareiva 1984;Sarhan and Kokko 2007;Ward and Dixon 1984;Watson 1991;Yasui 2001), however mathematical theory has widely challenged their existence, instead suggesting that evolution should not select for this type of variation.
Traditional work has been mostly limited to well-mixed populations. Real populations however often exhibit some degree of structure, and this structure can have a significant impact on the evolutionary process. These impacts include amplifying the probability of advantageous mutants taking over a population (Lieberman et al. 2005) and facilitating the evolution of cooperative strategies in social dilemmas (Ohtsuki et al. 2006). Using models with metapopulation structure has demonstrated that within-generational variation can be important when the patches are sufficiently small (Lehmann and Balloux 2007;Shpak 2005;Shpak and Proulx 2007;Yasui and Garcia-Gonzalez 2016). By analysing bet-hedging strategies in graph structured populations, we have shown that within-generational variation can be a key factor in selection, and strategies that bet-hedge against such variation can be favoured in the evolutionary process, regardless of population size. In particular, provided that the average degree of the graph is reasonably low and degree variability is not too high, selection for within-generational bet-hedging is strong.
In such populations, bet-hedging strategies are likely to evolve, underpinning the results of some ecologists who have used bet-hedging against within-generational variation to explain observed strategies (Root and Kareiva 1984;Sarhan and Kokko 2007;Ward and Dixon 1984;Watson 1991). Many real-world population structures will have these properties, since individuals compete with a subset of the whole population and there will not be wide variability in the size of such competition groups. For example, the spread of cancer has been modelled using evolutionary graph theory frameworks (Hindersin et al. 2016). Recent results have shown the potential for between-generational bet-hedging within cancer cells (Gravenmier et al. 2018). Modelling the variable environment experienced by cancer cells with an evolutionary graph theory competition framework could provide evidence for the potential of withingenerational bet-hedging in cancer cells. This scenario would not be directly evidenced by a subdivided population model since there are no clear divisions in the population, only local competition between the cells. This paper has focused on death-birth with selection on birth dynamics. However, other evolutionary dynamics have been suggested for evolution in structured populations, such as birth-death with selection on death (Antal et al. 2006), where first an individual is randomly selected to reproduce, with the offspring replacing a neighbour selected with probability proportional to the inverse of their fitness. Under these dynamics, if fitness is taken to be a measure of survivability rather than birth rate, then adding population structure also allows bet-hedging against within-generational vari-ation to take place. This is because here the selection groups in Eq. (3) only depend on local competition between the immediate neighbours. There are also dynamics that have global rather than local competition, such as birth-death with selection on birth (Lieberman et al. 2005) (where first an individual is selected to reproduce proportional to their fitness, with the offspring replacing a randomly selected neighbour) and death-birth with selection on death (Masuda 2009) (where first an individual is selected for death inversely proportional to their fitness, and is then replaced by a randomly selected neighbour). Within such global update mechanisms, evolution is unlikely to select for bet-hedging against within-generational variation. This is because global competition results in the selection probabilities always involving every individual within the population, so the effect is diminished by the law of large numbers.
Within-generational bet-hedging is facilitated by local competition between subsets of the population.
The evolutionary graph theory framework is quite restrictive, in that it considers asexual reproduction, and many of the bet-hedging examples concern sexual reproduction. However, since our results only depend on the local competition aspect of the dynamics, it is reasonable to extend our conclusions to real-world evolutionary processes in which competition happens between small subsets of the population at any given time, going beyond the restrictions of the evolutionary graph theory framework. For example, in the multiple paternity scenario, although there is interaction between males and females, and males are competing to mate, once offspring are produced, the success of the offspring can be interpreted as competition between distinct females. In such a scenario, our result requires that the competition between these females is local, which is likely to be satisfied since an individual will not interact with all other individuals within their environment. This presented analysis focused on fixed population structures, whereas in real populations individuals may change who they interact with. Since our results only depend on the interaction structure at the time of the event, if the properties of the population structure do not significantly change over time our conclusions will still hold. Using evolutionary graph theory structure therefore provides further evidence that within-generational variation is important in empirical systems and within-generational bet-hedging is likely to be observed. This provides a theoretical basis for the existing observations and can motivate further empirical research to identify within-generational bet-hedging species, which has not been fully explored, perhaps due to the existing theoretical conclusions from well-mixed populations.

Supplementary Information
The online version contains supplementary material available at https://doi. org/10.1007/s00285-021-01597-z. probability of a bet-hedger, before sampling any of the fitness values, is given by P(M reproduces |m type M and n type R) = P where Z ∼ U (0, 1). Defining Y = n j=1 f R j and X = m i=1 f M i , we have where f Z ,X ,Y (z, x, y) is the joint distribution function of Z ,X , and Y , f Z |X ,Y (z|x, y) is the conditional distribution function of Z given X and Y , and f X ,Y (x, y) is the joint distribution function of X and Y .

B.1 Selection probability approximation
Let X and Y be any random variables and f be an infinitely differentiable function of X and Y . We can approximate the expected value of f (X , Y ) by performing a Taylor expansion: where μ X and μ Y are the expected values of X and Y , respectively. Since such pairs are given by solutions to f (θ M , θ R ) = 0. Similarly to the previous case, this is challenging to solve analytically. However, this can again be solved efficiently using numerical minimisation. In particular, assuming either θ M or θ R is known, then this becomes a one dimensional function, which we will denote g(θ ). As before, this will be an increasing function of the remaining θ term, so |g(θ )| has no local minima, and the function can easily be minimised in Matlab to find the critical θ . If θ M is known this will give the corresponding critical θ R , or if θ R is known then this will give θ M .

C.2.1 Case 1: 2 M = 0
Our results from the Taylor approximation suggest that the upper bound on the overall critical normal-type variance required for the bet-hedger to be favoured is given by the evenly mixed scenario, i.e. m = n = k/2. Here we explore how changing selection group size impacts the critical normal-type variance for this scenario (and therefore the upper bound) using the exact selection probability, when normal-type fitness is drawn from a gamma distribution. For the gamma distribution convex order reduces to ordering the variance of the distributions, so we can represent the critical normaltype variation using the variance. We first assume that bet-hedgers have constant fitness equal to μ M and normal-types have fitness f R j ∼ (μ R /θ, θ ), such that the normaltype have mean fitness μ R and variance in fitness given by μ R θ . We consider this case first since the results from the Taylor approximation suggest that in this case critical normal-type variation will increase linearly with selection group size. The selection probability of a bet-hedger is given by Since each f R j is independent and identically distributed we can write Z = m j=1 f R j ∼ (mμ R /θ, θ ). Therefore, we can now write the selection probability as where m = k/2. Changing the selection group size to hk, we are interested in the selection probability with m = hm bet-hedgers. To keep the balance, we need a pair (θ M , θ R ) that satisfies