Skip to main content
  • Loading metrics

Epigenetic switching as a strategy for quick adaptation while attenuating biochemical noise

  • Mariana Gómez-Schiavon ,

    Roles Conceptualization, Formal analysis, Investigation, Writing – original draft, Writing – review & editing

    Current address: Department of Biochemistry and Biophysics, UCSF, San Francisco, California, United States of America

    Affiliations Program in Computational Biology & Bioinformatics, Duke University, Durham, North Carolina, United States of America, Center for Genomic & Computational Biology, Duke University, Durham, North Carolina, United States of America, Department of Biology, Duke University, Durham, North Carolina, United States of America

  • Nicolas E. Buchler

    Roles Conceptualization, Funding acquisition, Supervision, Writing – review & editing

    Current address: Department of Molecular Biomedical Sciences, North Carolina State University, North Carolina, United States of America

    Affiliations Center for Genomic & Computational Biology, Duke University, Durham, North Carolina, United States of America, Department of Biology, Duke University, Durham, North Carolina, United States of America, Department of Physics, Duke University, Durham, North Carolina, United States of America


Epigenetic switches are bistable, molecular systems built from self-reinforcing feedback loops that can spontaneously switch between heritable phenotypes in the absence of DNA mutation. It has been hypothesized that epigenetic switches first evolved as a mechanism of bet-hedging and adaptation, but the evolutionary trajectories and conditions by which an epigenetic switch can outcompete adaptation through genetic mutation remain unknown. Here, we used computer simulations to evolve a mechanistic, biophysical model of a self-activating genetic circuit, which can both adapt genetically through mutation and exhibit epigenetic switching. We evolved these genetic circuits under a fluctuating environment that alternatively selected for low and high protein expression levels. In all tested conditions, the population first evolved by genetic mutation towards a region of genotypes where genetic adaptation can occur faster after each environmental transition. Once in this region, the self-activating genetic circuit can exhibit epigenetic switching, which starts competing with genetic adaptation. We show a trade-off between either minimizing the adaptation time or increasing the robustness of the phenotype to biochemical noise. Epigenetic switching was superior in a fast fluctuating environment because it adapted faster than genetic mutation after an environmental transition, while still attenuating the effect of biochemical noise on the phenotype. Conversely, genetic adaptation was favored in a slowly fluctuating environment because it maximized the phenotypic robustness to biochemical noise during the constant environment between transitions, even if this resulted in slower adaptation. This simple trade-off predicts the conditions and trajectories under which an epigenetic switch evolved to outcompete genetic adaptation, shedding light on possible mechanisms by which bet-hedging strategies might emerge and persist in natural populations.

Author summary

Epigenetic switches regulate cell fate decisions during development in multicellular organisms, but their origin predates multicellularity because they are found in viruses, bacteria, and unicellular eukaryotes. It has been suggested that epigenetic switches first evolved as a mechanism of bet-hedging and adaptation to fluctuating environments. To discern the evolutionary pressures that select for epigenetic switches, we used computer simulations to evolve a mechanistic, biophysical model of a self-activating genetic circuit, which can both adapt genetically and exhibit epigenetic switching. Unlike laboratory evolution experiments, this in silico experiment was run many times over a range of evolutionary parameters (population size, selection pressure, mutation step-size, fluctuation frequency) and different model assumptions to uncover statistical regularities in the evolutionary trajectories. Using this computational approach, we could elucidate simple principles that predict the conditions that favor adaptation by epigenetic switching over genetic mutation in a fluctuating environment.


Populations often need to adapt to environmental changes in order to survive. Classic models of genetic adaptation presume that random genetic mutations generate novel phenotypes that can be selected by the environment [1]. Under some circumstances, e.g. small populations or fast fluctuating environments, the spontaneous appearance of a beneficial mutation might be too infrequent and, thus, some organisms may induce genetic variation to accelerate adaptation to a new environment. Examples include adaptive mutation, where genetic variation occurs in response to the environment [2], directed mutation, where non-random and useful mutations are induced [3], and cryptic variation, where non-neutral mutations accumulate and are buffered without phenotypic consequences until the environment changes [4].

Alternatively, many organisms have evolved biochemical networks that directly sense environmental cues and induce phenotypic responses to the new environment (known as “phenotypic plasticity”). The frequency of environmental change, the accuracy of cues, the penalty of non-adaptation, as well as the cost of producing the sensing machinery will determine the advantage of phenotypic plasticity [5, 6].

A third option is to generate spontaneous phenotypic variation (i.e. not in response to the environment) but restrict this variation to specific phenotypic states. This is possible through the evolution of epigenetic switches, where multiple stable phenotypic states (e.g. level of gene expression) are possible in a genetically identical population and stochastic transitions between these states occur without genetic mutations [7]. This corresponds to the original definition of “epigenetics” by Waddington [8], and epigenetic switches have been proposed as one mechanism of bet-hedging to deal with fluctuating environments [9]. Epigenetic switches can emerge through self-reinforcing feedback loops in biochemical or genetic networks, and the epigenetic phenotypes are heritable from mother to daughter cells [10]. Examples of epigenetic switches include heritable gene regulation by self-reinforcing transcription factor activity, DNA methylation, chromatin modification, non-coding RNAs, and prions [11]. Spontaneous transitions between epigenetic states (an “epimutation”) can occur due to biochemical fluctuations and noisy gene expression, where the epimutation rate is usually much faster than genetic mutation [12]. Epimutation generates phenotypic diversity and quick adaptation when one of the new states is favored in the changed environment; on the other hand, these frequent epimutations impose a cost in the population when the environment remains unchanged. As such, epigenetic switches represent a bet-hedging strategy, and an alternative to slower genetic adaptation and costly phenotypic plasticity. Epigenetic switches have been shown to occur in natural populations [13], and to evolve as an adaptation to fluctuating selection during laboratory evolution of microbes [14, 15]. Nevertheless, the specific evolutionary conditions that lead to the emergence and selection of epigenetic switches remain to be elucidated.

The advantage of phenotypic plasticity over epigenetic switches in fluctuating environments has been extensively studied using mathematical models and simulations [5, 1636]. Phenotypic plasticity was almost always advantageous when the associated cost was low (i.e. small induction delays, environmental cues reliably switch cells to optimal adapted phenotypes, small metabolic burden of biochemical network). In conditions where phenotypic plasticity was disfavored or not available, the authors showed that an epigenetic switch conferred an advantage when the spontaneous epimutation rates matched the environmental fluctuation rate and when selection pressures on fit/unfit phenotypes were symmetric between the two different environments (see S1 Appendix for details).

Many of the models used in these studies did not include genetic adaptation through mutation, a competing process that occurs in all organisms. Genetic mutations can modify biophysical parameters of protein-DNA and protein-protein interactions, and thus affect the levels and dynamics of gene expression. To better understand the evolutionary dynamics of an epigenetic switch in a fluctuating environment, we used computer simulation to evolve a self-activating gene in a fluctuating environment where genetic mutations changed biophysical parameters and, thus, modified gene expression (i.e. phenotype). A self-activating gene is the simplest mechanistic model of a genetic network that can simultaneously adapt genetically and exhibit epigenetic switching. In a specific region of the biophysical parameter space, the expression of a self-activating gene can be bistable (e.g. two stable states) and biochemical noise could spontaneously induce a transition between these two stable states (e.g. epimutation).

We evaluated the evolutionary dynamics of this simple circuit over a broad range of evolutionary parameters (population size, selection pressure, mutation step-size, environmental fluctuation frequency) and tested different model assumptions. In all tested conditions, populations initially evolved by genetic mutation to genotypes (parameter space) with high nonlinearity, even in the absence of biochemical noise, in agreement with previous work [28, 37]. We developed a simple predictive model to show that the circuit’s genetic potential under fluctuating selection increases in this region of parameter space. Briefly, an adapted genotype has a large genetic potential if a short mutational path exists to another genotype that is well-adapted to the alternative environment, thus facilitating the genetic adaptation after an environmental transition [38]. Once in the high-nonlinearity regime, we show that a trade-off exists where the adaptation time after each environmental transition –adaptation potential– and the cost imposed by the biochemical noise –noise load– cannot be simultaneously optimized. Moreover, the balance of this trade-off depends on the specific nonlinearity value (as measured by the Hill coefficient nH). By tracking genotypes and individual lineages that persisted –with or without mutations– across generations, we show that epigenetic switching was in fact selected in fast fluctuating environments, where the benefit of the adaptation potential is maximized. As the environmental fluctuation frequency decreases, genetic adaptation was favored and selected even higher nonlinearity values optimizing the noise load. Also, lineage tracking allowed us to identify a hybrid strategy where a bistable population would adapt genetically, which can optimally balance the described trade-off when the mutation step-size (M) was small in slowly fluctuating environments. Finally, by estimating the expected noise load, and the associated epimutation probability, for each genotype, we show that the evolutionary advantage of epigenetic switching is that it allows for quick adaptation while still attenuating the biochemical noise level.


A self-activating gene can display a unimodal distribution (monostable) or a bimodal distribution of protein number (bistable), depending on the underlying biophysical parameters (Fig 1 and S1 Fig). The spontaneous transitions (i.e. epimutation) between bistable phenotypes are driven by stochastic gene expression. Genetic mutations change the biophysical parameters (i.e. genotype) and will modify both the distribution of protein number (i.e. phenotype, ρ(A)) and the stochastic transition rate between bistable phenotypes. Two qualitatively different strategies of evolutionary adaptation could emerge from a self-activating gene. The population could evolve from one monostable distribution to another by mutating its biophysical parameters after each environmental change (i.e. genetic adaptation). Alternatively, the population could reside at a bistable solution where each bimodal state is optimal in one of the environments and epimutations from one bistable state to another occur over time without an underlying genetic mutation (i.e. epigenetic switching). In both cases, the phenotypic distribution of the population P(A) expands each generation due to gene expression noise and mutations, but natural selection keeps it centered on the optimal protein number as determined by the fitness function of the current environment. After an environmental change, the fitness function changes and the tail of the phenotypic distribution with higher fitness will be selected every generation. In the case of genetic adaptation, this selection will gradually shift the population towards the new optimal phenotype through the accumulation of new mutations until the population is well-adapted again. The speed of genetic adaptation depends on the rate of arrival of fitter mutations, as well as the selection pressure. When the population applies epigenetic switching, the phenotypic noise also includes epimutations, which increase the maladapted fraction in the population (epimutational load). However, after the environment and the fitness function change, the “epimutated” individuals rapidly overtake the population, quickly shifting the distribution to the new optimal value. Thus, genetic adaptation and epigenetic switching can directly compete as two strategies of adaptation to a fluctuating environment.

Fig 1. Genetic adaptation and epigenetic switching of a self-activating gene.

(A) Diagram of a self-activating gene that considers two biochemical events: protein synthesis with a rate that increases with number of proteins A (i.e. positive feedback loop) and protein degradation. On the right, a cartoon of the biophysical parameter space or genotypes (θ) of this gene circuit with two characteristic regions: monostable (white) and bistable (pink) phenotypes. In the monostable region, a genotype (θL or θH) might be optimal in either one environment (e.g. LOW protein numbers) or the other (e.g. HIGH protein numbers). Genetic mutations are required to change from one solution the other (blue arrow). In the bistable region, a single genotype (θB) can display two different phenotypes with each phenotype potentially optimal in both environments. (B) Cartoon of the protein number (A) dynamics in an individual cell with each of the genotypes described in (A). Monostable genotypes (θL and θH) exhibit a unimodal distribution of protein expression (ρ(A)), whereas a bistable genotype (θB) exhibits a bimodal distribution having spontaneous transitions between phenotypic states over time (i.e. epimutations) triggered by stochastic gene expression. Cartoon of the population dynamics using (C) genetic adaptation or (D) epigenetic switching to adapt after an environmental change. The fitness score function (ω; orange dashed line) and the phenotype distribution of the population (P(A); blue line) are shown for each generation (g), and the fraction of the population expected to be selected in the next generation (i.e. individuals with higher fitness scores) are highlighted (blue area). The environment changes from selecting HIGH protein numbers (light green) to select LOW protein numbers (dark green).

Stochastic dynamics of a self-activating gene

For simplicity, we considered two biochemical events (protein synthesis or degradation) that either increase or decrease the number of proteins A by one molecule: (1) (2)

The synthesis rate f(A), which describes the probability per unit time that protein synthesis occurs and that A is increased by one, is a nonlinear function of activator A: (3) where k (number of proteins/unit time) represent the maximum synthesis rate, α is the basal synthesis rate relative to k, KD (number of proteins) is related to the protein-DNA dissociation constant, and nH is the degree of molecular cooperativity (i.e. Hill coefficient). The degradation rate γA, which describes the probability per unit time that protein degradation occurs and that A is decreased by one, is a linear function of activator A where γ (1/unit time) is the protein degradation rate constant. With no loss of generality, we defined the unit of time as τ = tγ, which allows us to substitute time t with a time-dimensionless variable (see Methods). We used the Gillespie algorithm, a kinetic Monte Carlo method that explicitly simulates the probabilistic dynamics of a defined set of biochemical events [39], to simulate the stochastic dynamics of our gene circuit (see Methods).

Evolutionary model

For simplicity, we evolved a haploid, asexual population with non-overlapping generations in a fluctuating environment (Fig 2). The underlying biophysical parameters depend on protein stability, protein-protein, protein-RNA, and protein-DNA interactions, which can change through genetic mutations. For simplicity, we allowed mutations on the maximum synthesis rate (k), Hill coefficient (nH) and DNA dissociation constant (KD) during our evolutionary simulations, while keeping basal activity (α = 0.25) and degradation rate (rescaled, γ = 1) fixed. The set of variable parameters {k, nH, KD} are the genotype (θ). The environment fluctuated periodically with frequency ν between LOW (selects for optimal phenotype A(L) = 20 proteins) and HIGH (selects for optimal phenotype A(H) = 80 proteins). The number of generations spent in a constant environment (“epoch”) was equal to 1/ν generations. The selective environment switched to the alternative state at the end of an epoch. Starting from an isogenic population, we ran each evolutionary simulation for 10,000 generations. We implemented the following algorithm each generation:

  1. Simulate stochastic gene dynamics of a self-activating gene in each cell given its biophysical parameters (i.e. genotype) and initial protein level inherited from its parent in the previous generation for 4 units of time (the cell “life span”).
  2. Evaluate the fitness of each cell i based on the protein level at the end of its life span (Ai, phenotype). The individual fitness function (ωi) is: (4) where E = {L, H} is the current environment, A(E) is the optimal phenotype for each environment, and ϵ2 = 0.2 ⋅ A(E) is the width of the Lorentzian function. We define the population fitness (w) as the average over all cells.
  3. Select the next generation using tournament selection [40, 41], where st cells are chosen randomly from the population. The cell with highest fitness within the chosen cohort is cloned into the new population. This “tournament” is repeated N times with replacement to create a new population. The tournament size (st) modulates the selection pressure, where small st is weak selection (e.g. for st = 1, there is no selection pressure and only genetic drift because any randomly selected individual is the tournament winner). Increasing st leads to stronger selection and a faster selective sweep of fitter cells (e.g. for st = N, only the fittest individual in the entire population will be cloned into the next generation).
  4. Allow random mutations with a fixed probability (u) in each cloned cell. If a mutation occurs, the parameter values in the cell genotype are updated as follows: (5) (6) (7) where M is the maximum fold change (mutation step-size), rU(0, 1), ϕ1U(−1, 1), and ϕ2U(0, 2π) are uniformly distributed random values between 0 and 1, -1 and 1, and 0 and 2π, respectively (see Methods). This spherically symmetric 3D mutation scheme permits co-variation in biophysical parameters in a single mutational step, with the “distance” to the parental genotype uniformly distributed (in the logarithmic scale) in the range defined by the mutation step-size. Unlike additive mutation, multiplicative mutation better reflects how mutations affect thermodynamics of protein stability, protein-DNA and protein-protein interactions [42, 43]. All mutated parameters were constrained to lie within a physiological range that is typical for a bacterial transcription factor (see Methods).
  5. If the evolutionary simulation is at the end of an epoch, then change to other environment; otherwise keep the same environment. Return to Step 1 to simulate next generation.
Fig 2. Evolutionary model.

The environment fluctuates periodically with frequency ν. The total number of generations spent in a constant environment (epoch) has the same length (1/ν) and each environment (HIGH or LOW) selects for a different distribution of protein levels (phenotypes). Each generation, we simulated the stochastic protein dynamics of a self-activating gene in each cell across a population of size N. At the end of each simulation, the population phenotypes varied because gene expression is stochastic and because cells can have different underlying biochemical parameters (genotypes). The current environment in each generation assigned a fitness (ωi) to each cell (i) based on its final protein level. We used tournament selection (where st determines the strength of selection) to determine the next generation of cells according to their fitness. Each cell in the next generation was mutated with probability u, where the current set of biophysical parameters were multiplied or divided up to a maximum step-size of M.

Populations adapt to the fluctuating environment

The evolutionary model was simulated over a range of population size (N = [100, 10000]), selection pressure (st = [3, 250]), environmental fluctuation frequency (ν = [0.01, 0.1]), mutation rate (u = [0.01, 0.1]), and mutation step-size (M = [1.1, 5]). We restricted these parameters to regions where our simulations were feasible and where epigenetic switching and genetic adaptation were competitive with one another. For example, we only considered uN ≥ 1; otherwise, mutations were too infrequent for genetic adaptation to compete with epigenetic switching. We verified that our results presented below were robust to alternative assumptions, such as different models of selection, non-periodic environmental fluctuations, a Moran model of reproduction, and alternative mutation schemes (see Methods).

To control for the possibility that bistability could be selected for reasons other than epigenetic switching [28], we also ran a parallel deterministic simulation (CONTROL) of the expression of the auto-activating gene in Step 1 (see Methods). Given that there is no biochemical noise in our CONTROL simulations, cells in the bistable region display hysteresis and stay in the stable state closest to the inherited parental state and never stochastically switch to the other state (i.e. no epigenetic switching).

All populations started with a monostable genotype θ0 that was adapted to one environment but not the other. These populations all evolved to a higher fitness solution. Initially, populations had a slightly higher geometric mean fitness per cycle because it accrued benefits by being adapted to the HIGH environment despite being maladapted to the LOW environment (Fig 3A). We consider geometric mean fitness per cycle rather than fitness per generation (w) because it better reflects the long-term growth of fitter phenotypes in natural populations [44], but analogous results are obtained considering the arithmetic mean instead. During the LOW epoch that follows the HIGH epoch, the populations shifted towards higher w(L) values. The epoch was too short and mutation too weak for the populations to perfectly adapt to the new environment before it changed again. In all cases, we observed that the evolutionary dynamics in early epochs were dominated by noisy genetic adaptation of a population maladapted to at least one of the environments, even if this implied decreasing Wcycle. The “no-response” behavior, i.e. being adapted to one environment and “ignoring” the alternative state, is not a stable solution for this system. Consistent with previous work, this illustrates the importance of considering the full population dynamics in the adaptation process and not only the long-term average fitness [45, 46].

Fig 3. Evolutionary trajectory of a population adapting to a fast fluctuating environment displays selection for high nonlinearity.

The initial population started from a non-optimal genotype (θ0) where k = 80, nH = 1, KD = 10 with evolutionary parameters N = 10000, ν = 0.1, st = 40, u = 0.03, and M = 1.1 both under (A) the original model and (B) in the absence of biochemical noise (CONTROL). The average KD (〈KDcycle) versus the average Hill coefficient (〈nHcycle) are shown for each environmental cycle simulated, colored given the geometric mean of the population fitness per environmental cycle (), and the marker size corresponds to the average percentage of bistable genotypes in the population (see legend). The traces of other nine replicas are shown in gray as a reference. Each cycle spans a LOW (dark green) and HIGH (light green) epoch and there are 500 environmental cycles over 10,000 generations for each of these simulations. The population fitness w per generation for the first and last cycles, as well as the cycle with the minimum and maximum Wcycle are shown in the bottom for comparison, and colored according to their Wcycle value. In both simulations (A-B), the population evolved to higher nonlinearity values 〈nHcycle and Wcycle.

Sub-optimal populations eventually increased the nonlinearity in gene expression 〈nHcycle. For example, in a fast-fluctuating environment (ν = 0.1) with small mutation step size (M = 1.1), the population evolved to a bistable genotype θB that used epigenetic switching (Fig 3A); nevertheless, high nH values appear in the population before transitioning from a monostable to a bistable genotype (e.g. 〈nH〉 ∈ [2, 3.3] and less than 10% bistable individuals per generation). In this case, the bistable genotype was a global optimum in Wcycle and adaptation occurred in a few generations after each environmental change due to epigenetic switching. We verified that this bistable genotype was globally optimal by re-running evolutionary simulations for different initial genotypes (θ0) and for more generations. The CONTROL simulations, where epigenetic switching was not available, also evolved high nonlinearity in gene expression 〈nHcycle, but kept monostable genotypes (Fig 3B).

Selecting for genetic potential

Meyers et al. [38] have shown that populations in variable environments can stably evolve to higher genetic potential, i.e. genotypes with a higher sensitivity to mutations. To explore this possibility in our model, we took advantage of the defined mechanistic model, where for a given steady state A* (i.e. deterministic solution of the gene expression system, ), and each value of KD and nH, the synthesis rate value k* is uniquely defined as follows: (8)

Then, the optimal synthesis rate can be calculated for each environment E with an optimal phenotype (Fig 4A and 4B).

Fig 4. Genetic potential increases around the bistable region at high nonlinearity.

(A) The f(A) function for some solution genotypes are shown (see row and column titles) exemplifying cases where (1) both and are monostable (i.e. the associated f(A) and γA intersect only once; all examples with nH = 1, and {nH = 16, KD = 1}), (2) a bistable solution genotype with ({nH = 16, KD = 50}, f(A) and γA intersect both in A = 20 and A = 80, with an unstable steady state between these steady states), and (3) only is bistable, and not a solution for the LOW environment ({nH = 16, KD = 120}). (B) Solution genotypes per environment were calculated (Eq 8). (C) The maximum genetic potential for different values of KD and nH (i.e. ) is shown in the colormap. As reference, the bistable solution genotypes for each environment are delimited by the green lines: as dark green, and as light green. Additionally, we show as an example the population average KD and nH per cycle for ten simulations over 10000 generations with k = 80, nH = 1, and KD = 10 as the initial genotype (red circle, θ0), and evolutionary parameters N = 10000, u = 0.03, M = 1.1, ν = 0.10, and st = 40 (black lines), and the equivalent CONTROL simulations (i.e. without biochemical noise; gray lines). The colorbar shows the one-mutation distance corresponding to each value of M.

For each solution genotype, , we calculate the genetic potential as the minimum genetic distance to adapt after an environmental transition, i.e. to reach any solution genotype in the alternative environment: (9) (10) When (i.e. for both environments), bistability arises and adaptation can occur with a noise-induced epimutation (Fig 4). If there is no noise (e.g. deterministic CONTROL), then the bistable region exhibits hysteresis and the system can only switch when genetic adaptation forces the genotype to leave the bistable region (usually through KD mutations).

We observed that starting from an arbitrary initial genotype θ0, populations always migrated to a region of higher genetic potential, until the solution to the alternative state is reachable in just one genetic mutation, if this is available. This occurred regardless of the specific evolutionary conditions (e.g. selection pressure st or environmental fluctuation frequency ν), or the absence of noise (i.e. CONTROL simulations). In the gene expression model described here (Eqs (1) and (2)), the genetic potential increases around the bistable region, which occurs at high nonlinearity nH (Fig 4C). We also analyzed the double negative feedback loop (“toggle switch”), an alternative system with the ability to display bistability and epigenetic switching. The genetic potential of the toggle switch also increases with higher nonlinearity and particularly around the bistable region (S2 Fig). This supports the generality of our observations, as each of these systems (positive versus double negative feedback loops) produce different bifurcation types [47]. These results show that the initial selection for high genetic potential can drive the population to a genotypic space where bistability is available, suggesting a potential mechanism for the initial emergence of epigenetic switches in fluctuating environments.

Notably, the region where the alternative solution is reachable in one genetic mutation depends directly on the mutation step-size M (Eqs (9) and (10); Fig 4C). Congruently, CONTROL simulations with higher M values showed a higher diversity, with no obvious selection pressure once the population is inside this optimal genetic potential region (S3 Fig). Nevertheless, simulations with biochemical noise resulted in more constraint genotype distributions regardless of the specific mutation step-size.

Trade-off between adaptation time and phenotypic robustness

In all evolutionary conditions tested here, the optimal Wcycle was obtained in the high nonlinearity regime. Nevertheless, the average Hill coefficient increased as the environmental fluctuation frequency decreased (Fig 5; S3 Fig). In order to explore the evolutionary advantage of the distinct Hill coefficient values here, we took a closer look to the population fitness.

Fig 5. Trade-off between minimizing adaptation time and maximizing phenotypic robustness correlates with nonlinearity.

Contour plot of the bi-variate histogram of the average Hill coefficient per epoch 〈nHepoch and the population fitness at the (A) first generation w+1g and (B) ninth generation w+9g after an environmental transition are shown grouped by the environmental fluctuation frequency (ν). (C) An analogous plot but grouped by the mutation step-size value (M; three example values) shows that the observed trend is related to the ν value. In all cases, the last 100 epochs of ten independent replicas were considered, each simulation running for 10,000 generations with evolutionary parameters N = 10000, st = 40, u = 0.03 and k = 80, nH = 6 and KD = 45 as the initial genotype (θ1; this initial genotype sped up evolutionary simulations by being closer to final selected genotypes in all simulations). In each group, the shade area shows the bins with at least 1% of cases, and at least 5% of cases in the darker area.

The population fitness is always low and maladapted when the environment first changes. Selection favors those genotypes which produce phenotypes that better match the selection pressure in the new environment. In this first phase (the “adaptation phase”), the population fitness one generation after each environmental change (w+1g) display higher values for faster environmental fluctuations (i.e. large ν; Fig 5A). However, all populations eventually reach a higher fitness and become adapted to the new environment. In this second phase (the “constant phase”), purifying selection maintains the optimal phenotype against perturbations from gene expression noise, mutations, and/or epimutation. The population fitness nine generations after each environmental change (w+9g) display higher values for slowly fluctuating environments (i.e. small ν; Fig 5B). The population spends proportionally more time in the constant phase as the epoch length increases (i.e. ν decreases), which favors those strategies with robust phenotypes (i.e. minimize frequent, maladapted phenotypes that arise from biochemical noise and epigenetic switching). Noteworthy, higher mutation step size (M) favors a slightly higher w+1g, while slightly decreasing w+9g, but with very similar distributions between groups and no obvious correlation with the selected Hill coefficient (nH; Fig 5C).

These results indicate a trade-off in the evolutionary process between minimizing the adaptation time during the adaptation phase and increasing the robustness of the phenotype during the constant phase. Further, the distribution of Hill coefficient values (〈nHepoch) as a function of epoch length suggests that natural selection tunes this trade-off via this biophysical parameter. We additionally corroborated the relationship between Hill coefficient value and the expected fitness in an infinite, isogenic population (E[w(E)]); we observed that in the region of interest in the biophysical parameter space (k ≈ 80), E[w(E)] increases as nH increases regardless of the value of KD (S4 Fig). In the following section, we explore the relationship between this fitness trade-off and the selected adaptation strategy.

Lineage analysis shows the selection of epigenetic switching in fast fluctuating environments

In order to determine the selected adaptation strategy for each evolutionary condition, it was informative to analyze the genealogy (i.e. lineages) of each population (see Methods). We tracked the evolutionary history of each individual in the population to identify those lineages that persisted with or without mutations over one full environmental cycle (i.e. LOW epoch + HIGH epoch; S5 Fig). More than one lineage can persist over a cycle, but fewer than expected from coalescent theory because our population is evolving under selection and faces a selective sweep at each environmental transition [48]. If a particular adaptation strategy is successful, then we expect those lineages using that strategy to have a higher fitness and a larger number of progeny. The weight of each persisting lineage is proportional to the number of progeny at the end of the cycle.

An epigenetic switch can adapt with no mutation; thus, lineages with a bistable genotype and no mutations during a cycle were classified as following an epigenetic switching (ES) strategy. On the other hand, those lineages that had at least one monostable genotype and accumulated mutations during a cycle were classified as following a genetic adaptation (GA) strategy. Lineages with only bistable genotypes that accumulated mutations during a cycle were classified as following a hybrid bistable adaptation (BA) strategy. Although some of these mutations can be neutral, we found that most of them modulated the DNA dissociation constant (KD) and directly affected the rate of epigenetic switching (i.e. epimutation; Fig 6A). Thus, the mutation can be adaptive in the hybrid BA strategy, although the circuit remained bistable and ultimately adapted through epigenetic switching.

Fig 6. Each adaptation strategy is favored under different evolutionary conditions and the transition between selected strategies is gradual.

(A) Illustration of epigenetic switching (ES), bistable adaptation (BA), and genetic adaptation (GA) strategies and underlying genotypes with fixed synthesis rate (k = 80). The bistable region of genotypic space is highlighted in pink. The phenotype stationary distribution ρ(A, τ = ∞) for each genotype (θ) is shown in the inset, both in linear and logarithmic scale. BA is bistable, as seen in logarithmic scale, but appears effectively monostable in linear scale. This arises because KD evolves each epoch to favor one mode over the other by decreasing the relative rates of epigenetic switching between the largest and smallest mode. (B) Each colormap shows the fraction of parental lineages using specific adaptation strategy (ES, BA, or GA) averaged over all cycles and ten independent replica simulations for the corresponding mutation step-size (M) and environmental fluctuation frequency (ν). Each simulation ran for 10,000 generations with evolutionary parameters N = 10000, st = 40, u = 0.03 and k = 80, nH = 6 and KD = 45 as the initial genotype (θ1). (C) Results of the CONTROL simulations where gene expression dynamics are deterministic and no stochastic epigenetic switching can occur. All lineages exhibited GA and neither bistable strategy (ES or BA) was ever selected. (D) The corresponding bistable fraction (〈fBsim) averaged over all cycles and ten independent replica simulations for the stochastic simulations (top) and deterministic CONTROL (bottom; same simulations than B-C, respectively).

Our lineage analysis demonstrated two propositions: (1) epigenetic switching (ES) effectively allows for adaptation to fluctuating environments, outcompeting genetic adaptation, with lineages persisting for multiple environmental cycles without mutations (S5 Fig); and (2) distinct strategies were favored in different evolutionary conditions (Fig 6B). Consistently with previous works, ES was the preferred strategy when the environment fluctuated frequently (i.e. high ν values); in slowly fluctuating environments, GA was favored if the mutation step-size (M) was large enough, otherwise BA was the dominant adaptation strategy. These trends persisted over a range of different evolutionary parameters, although the boundaries shifted. For example, increasing the selection pressure (st) or the mutation rate (u) shifted boundaries to favor GA, whereas increasing population size (N) favored ES (S6 Fig).

Noteworthy, the fraction of bistable genotypes (〈fBsim) as a function of evolutionary parameters did not reflect the favored adaptation strategy (Fig 6D). The 〈fBsim never fell to zero even when GA was the optimal lineage strategy (e.g. low ν, high M). These results arise because of the increased seeding of genetic mutants (which is facilitated by higher M) from the monostable to bistable subpopulation. Conversely, we expect more cases of neutral or nearly neutral mutations in the bistable region for smaller mutational step-sizes (M). It is exactly in this regime where the fraction of ES parental lineages decreased whereas BA increased. However, most lineages displaying BA in this regime also persisted into the next cycle without accumulating any mutations and, thus, automatically switched to ES (S7 Fig).

The dominant adaptation strategy trend (Fig 6B) highly correlates with the observed fitness trade-off (Fig 5). Moreover, we observed a mixture of strategies across lineages, and the transition between preferred adaptation strategies as a function of ν and M was gradual. This is expected if the described trade-off is the driving selection force. If each adaptation strategy favors distinct aspects of the trade-off, whenever these fitness costs have similar values, genetic drift will dominate during the selection process. As expected, the simulations in regimes with co-dominant strategies showed high temporal variation in the fraction of adaptation strategies each evolutionary cycle (S7 Fig).

Finally, in our CONTROL simulations with deterministic dynamics (where no stochastic epigenetic switching can occur even if the system is bistable), none of the parental lineages exhibit ES or BA (Fig 6C). This corroborates that the selection of ES as adaptation strategy requires the presence of biochemical noise. In the following section, we show that, in addition of generating epimutations, biochemical noise is also an important fitness component which must be optimized.

The role of the noise load

The observed trade-off suggests that the cost of biochemical noise on the population plays a fundamental role in the evolutionary dynamics. For each genotype, we define the associated noise load as the expected decline in fitness by the end of the cell life span: (11) given an optimal initial phenotype (i.e., ρ(A = A(E), τ = 0) = 1 and ; see Methods). Noteworthy, corresponds to the estimated fitness for an isogenic population after one generation in a given environment excluding the cost of genetic drift (i.e. assuming infinite population) and mutation (i.e. assuming perfect selection), then exposing the effect of the biochemical noise. In our system, we observed a significant noise load for all solution genotypes for both environments (as defined in Eq 8; Fig 7A), with an expected fitness decay of more than 60% (, depending on the specific genotype θ). Moreover, around and within the bistable region –where the genetic potential is higher– the minimum noise load for each environment occurs at higher nH values (Fig 7A), especially when the two environments are considered (Fig 7B). Interestingly, the noise load is lower in both environments right at the center of the bistable region, where the same genotype has steady state solutions optimal in both environments (i.e. ).

Fig 7. Increasing nonlinearity reduces the noise load in the bistable region, decreasing also the epimutation rate.

(A) The noise load (Eq 11) is calculated for the solution genotypes for each environmental state, LOW and HIGH. (B) The maximum noise load comparing in both environmental states for each value of nH and KD (with depending on the environment being considered). (C) The probability of an individual with a solution genotype (or ) and initial phenotype A(L) (or A(H)) has a good fitness score ω in the alternative environment at the end of the generation, i.e. ω(H)(Aτ=4) ≥ 0.5 (or ω(L)(Aτ=4) ≥ 0.5), which is considered as a LOWHIGH “epimutation” (or HIGHLOW “epimutation”). (D) The minimum probability of “epimutation” comparing in both directions, LOWHIGH and HIGHLOW, for each value of nH and KD (with depending on the environment being considered). Values less or equal to 10−6 are omitted. Same range of values and bistable region lines as in Fig 4.

How can the fitness be maximized in both environments in a bistable system? Even if the associated stationary phenotype distribution (i.e. at long time scales, ρ(A, τ = ∞)) is bimodal and well-balanced (i.e. ∼50% of chance of being around each mode), the genotypes with high nonlinearity can display strong memory, and retain the parental phenotype for multiple generations. Increasing the memory on bistable systems increases the expected fitness once the individual displays the optimal phenotype. But this memory also directly decreases the epimutation rate (Fig 7C and 7D). Consequently, there is a fundamental trade-off between minimizing noise load and maximizing adaptation potential in bistable genotypes. Moreover, the balance between these properties depends once more on the Hill coefficient value. To further explore this theory, we run some experiments where the environment was stopped after 1,000 generations (S8 Fig). As expected, populations in constant environment still can display bistable genotypes with very high nonlinearity, resulting in low noise load and high population fitness (S8 Fig).

Similarly, this trade-off also affects the genetic adaptation strategy. In the optimal solution space, the population requires to effectively cross the bistable region by genetic mutations (usually mutations on KD value for our system) to adapt genetically. The width of the bistable region increases as nH increases, reducing the probability of a beneficial mutation, and then the genetic potential.


Selection for higher genetic potential allows the emergence of epigenetic switching

Starting from an arbitrary initial condition and different evolutionary conditions, all populations evolved to a similar region of the genotypic space with higher fitness (see examples in Fig 3). These final genotypes often had 20 < KD < 80, and large nH (S3 Fig). To help understand the forces that select for large nonlinearity, we calculated the genetic potential for the distinct genotypes available in our gene expression model (Fig 4). We observed that both in the presence or absence of biochemical noise, all populations initially selected for high genetic potential, i.e. genotypes more sensitive to genetic mutation, allowing for efficient adaptation after each environmental transition. In our gene expression model, the genetic potential increases around the bistable region (Fig 4), which can explain the de novo selection or emergence of epigenetic switching starting from a non-regulated (constitutive) gene.

Nonlinearity modulates the trade-off between adaptation potential and phenotypic robustness

The average population fitness was mostly determined by the environmental fluctuation frequency (ν), where fitness decreased as the epoch length decreased. This agrees with previous theoretical work, which showed that the evolutionary dynamics are governed by environmental dynamics [16, 31]. In our simulations, the correlation between fitness and epoch length arises from the balance between two competing fitness costs: reducing the time required to adapt every time the environment changes (adaptation phase; Fig 5A) and increasing the phenotypic robustness when the environment is fixed (constant phase; Fig 5B). Our work suggests that the trade-off between adaptation time and phenotypic robustness is mostly modulated by the nonlinearity level (Fig 5).

To fully understand this relationship, we estimated the noise load, defined here as the expected decay in the fitness arising just from the biochemical noise, for the distinct genotypes available in our gene expression model (Eq 11; Fig 7A and 7B). We show that around the region where the genetic potential is higher, the noise load is lower for higher Hill coefficient values (nH) regardless of the specific environmental state (LOW or HIGH), or whether the genotype is bistable. Nevertheless, in this region of the genotypic space, a fundamental trade-off exists between minimizing the noise load in a population (Fig 7A and 7B) and maximizing the adaptation potential, either through genetic adaptation (i.e. genetic potential; Fig 4) or epigenetic switching (i.e. epimutation probability; Fig 7C and 7D).

Epigenetic switches are superior in fast fluctuating environments

Previous theoretical work established that optimal long-term growth occurs when the phenotype switching rate matches the environmental switching rate [1619]. The phenotype could switch either due to genetic adaptation with a rate that depends on the mutation rate and mutation step-size, or due to epigenetic switching (epimutation) with a rate determined by the underlying molecular system. In the natural world, epimutation rates are often faster than genetic mutation rates [12], which suggests that fast fluctuating environments might select for epigenetic switching (ES) over genetic adaptation (GA). Previous models did not integrate and evaluate these two competing processes in a population of cells evolving in a fluctuating environment.

Our simulations confirmed that ES consistently emerges in fast fluctuating environments (Fig 6). In agreement with Soyer and colleagues [28, 37], our populations evolved to genotypes with high nonlinearity (Fig 5; S3 Fig). However, we found that bistable genotypes (ES and BA) were only favored in the presence of biochemical noise, and in CONTROL simulations only GA was observed (Fig 6C). Moreover, the trade-off highlighted above reliably predicts the conditions under which an epigenetic switch was able to outcompete genetic adaptation. The ES strategy is selected at high ν (when the population spends proportionally more time in the adaptation phase) because it has a faster adaptation time (Fig 5A) at the cost of lower phenotypic robustness (Fig 5B). Nevertheless, the genetic potential map (Fig 4) shows that GA can potentially adapt quickly (especially for larger mutation step-size M), but these trajectories lie in noisy regions of the genotypic space, resulting in an even higher noise load (Fig 7). Therefore, we conclude that ES is selected over GA in fast fluctuating environments because this strategy minimizes adaptation time through epimutation while still reducing the noise load in the system.

Lineages reveal hidden selection forces & epigenetic switching persistence

All evolved bistable and monostable genotypes were relatively close to each other (Fig 6A). Our simulations had a relatively high mutation rate (u) such that bistable genotypes could mutate to monostable genotypes, and vice versa. The elevated rate of seeding between these subpopulations made it challenging to distinguish whether ES (bistable) was being selected for. It has been shown previously that individual history or genealogy can efficiently reveal hidden selection forces. For example, Kussell and colleagues [34, 49] demonstrated that selective pressures on a population, such as those imposed by a fluctuating environment, can be efficiently quantified by measurements on the surviving lineages. More recently, Cerulus et al. [50] used life-history traits of cellular growth to show that high single-cell variance in growth rate can be beneficial for the population, and that this benefit depends on the epigenetic inheritance of the growth rate between mother and daughter cells.

To this end, we analyzed the strategy of lineages across multiple cycles during our simulations. Lineage analysis demonstrated that apparent coexistence of bistable and monostable subpopulations was a transient phenomenon, and one type of strategy was typically dominant across lineages (Fig 6B and 6C). Moreover, the persistence of well-adapted lineages without genetic mutations effectively proved that epigenetic switching can outcompete genetic adaptation in fluctuating environments. Our analysis suggests that population snapshots (e.g. bimodal versus unimodal distribution of phenotypes) can miss the contribution of epigenetic switching (Fig 6D). Future experimental studies on the evolution of epigenetic switches might consider analyzing lineages using time-lapse microscopy, as done by Balaban et al. [13].

Model limitations and future directions

We verified that our observations were robust to many alternative model assumptions (S9 Fig). Nevertheless, our simple model of a haploid, asexual population [51] omits some features of the evolutionary process. For example, variable population size, diploid genetics, sexual reproduction and linkage disequilibrium could all affect the evolutionary dynamics and selection of epigenetic switches in a fluctuating environment. Our model also fixed the mutation rate (u) and step-size (M), which imposes a mutational load when the population is adapted to a constant environment. Future simulations could allow natural selection to mutate and tune these parameters, which might favor genetic adaptation over epigenetic switching [52]. Our model also did not consider the case where mutations (e.g. adaptive mutation) or biophysical parameters (e.g. phenotypic plasticity) directly respond to changes in the environment. Last, we assumed that mutations continuously increase or decrease the biochemical parameters. This overlooked an important class of mutations, such as indels (i.e. rapid loss or abrupt change of function), gene duplication, and gene recruitment, which could abruptly change the topology of the gene network.

We considered the simplest genetic circuit that can exhibit epigenetic switching. However, alternative gene regulatory networks could generate different dynamics and phenotypes that are even better adapted to the fluctuating environment. For example, adding a negative feedback loop could reduce gene expression noise [53, 54] or generate oscillations [55, 56]. An oscillatory gene circuit (e.g. circadian clock) might anticipate and respond to an environment that fluctuates regularly (e.g. day/night). Future research will explore more complicated gene regulatory circuits to understand the specific environmental dynamics and evolutionary conditions that favor oscillation versus epigenetic switching in the context of genetic adaptation. This should be of broad relevance to evolutionary biologists and systems biologists.


Biophysical parameters

The maximum synthesis rate k and the degradation rate γ depend on time. With no loss of generality, we reduced the number of free parameters in our model by substituting time t with a time-dimensionless variable τ = tγ. Many proteins in bacteria are not actively degraded and are diluted through cell growth and division. Thus, τ and k are in units of cell cycle time. With no loss of generality, we used τ = 4 in all our stochastic simulations. All mutated parameters were constrained to lie within a physiological range (10−2k ≤ 103, 10−2nH ≤ 16, 10−2KD ≤ 120) for a bacterium such as E. coli. The number of molecules for a transcription factor ranges between 0 − 103 proteins per bacterium or concentration range 0 − 103 nM for a bacterial volume of 1 fL [57, 58]. The DNA dissociation constant (KD) has a similar range to the underlying transcription factors [58, 59].

Gillespie algorithm

The propensity or probability rate (rj) of chemical reaction j occurring during the next interval dt is related to the rates of mass-action chemical kinetics in a constant chemical reactor volume V. In our simple biochemical network, the propensity of protein synthesis is f(A) and the propensity of protein degradation is γA. Each step, given the current number of chemical species, Gillespie’s direct algorithm first calculates the propensities rj and then calculates when the next reaction occurs and which one occurred. The waiting time of the next reaction is drawn from an exponential distribution with parameter Σjrj, where the cumulative distribution function of any reaction occurring before time τ* is . Given that a reaction has occurred at time τ*, the probability that the event is reaction i is equal to ri/(Σj rj). Thus, for each iteration, two random numbers are required to determine τ* and i as drawn from the probability distributions. The random numbers are generated using the “Minimal” random number generator of Park and Miller with Bays-Durham shuffle and added safeguards [60].

Deterministic CONTROL simulations

The dynamic of the mean concentration (A) obeys a first-order ordinary differential equation: (12)

The cell life span was assumed to be long enough for steady state (where Eq 12 equals 0) to be reached before selection. We used numerical methods to calculate the steady state solution (phenotype) for any genotype and initial protein level inherited from the parent. All Gillespie, deterministic, and evolution simulations were implemented in C++ (, and all the analyses and figures were done using MATLAB.

Alternative model assumptions

We tested the robustness of our results to alternative choices and assumptions in the evolutionary model.

Environmental fluctuations.

Our fluctuations were regular and periodic with frequency ν. We tested whether stochastic fluctuations with frequency ν produced different results, even though previous work demonstrated little difference between the two types of fluctuations [5, 17, 19, 20]. Our simulations confirmed that periodic and stochastic environmental fluctuations generate the same qualitative trends (S9 Fig).

Selection algorithms.

We used tournament selection to select the next generation of cells based on the fitness of the individuals in the current generation. Other common selection schemes are Truncation, Proportional, and Weighted selection [61]. These selection schemes produced similar results to tournament selection (S9 Fig). We also obtained similar results with a Moran model (S9 Fig), where the birth and death events are treated as continuous, stochastic events instead of non-overlapping generations (as in our modified Wright-Fisher model).

Fitness of phenotypes.

Our simulations evaluated the protein number (phenotype) at the end of Gillespie simulation (individual life span) to calculate a fitness score given by a Lorentzian function centered at the optimal phenotype. We also used the average protein number or the distribution of protein numbers over the individual life span as phenotypes; our results did not qualitatively change (S9 Fig). We also changed the shape of the fitness function from a Lorentzian to a Gaussian or a step-like function with similar width; the results did not qualitatively change (S9 Fig).


Our simulations used a spherically symmetric 3D mutation scheme to permit co-variation in biophysical parameters in a single mutational step. The mutation step size was determined by the radius of the spherical mutation, which was a uniformly distributed random value between 0 and 1 (rU(0, 1)). Such a radial density produces a non-uniform density of mutations with highest densities close to the parental phenotype because volume scales as r3. We tested homogeneous spherical mutation by substituting r in Eqs (5)–(7)) with and a homogeneous cubic mutation where three uniformly distributed random value between -1 and 1 (riU(−1, 1)) for each biophysical parameter. Both mutation schemes produced the same qualitative results (S9 Fig). We also verified that mutating only one parameter at a time (1D mutation) and increasing the range of biophysical parameters to allow higher nonlinearity (10−2nH ≤ 24) and weaker DNA dissociation constants (10−2KD ≤ 103) did not fundamentally change our results.

Timescales of epimutation and stochastic gene expression.

The rate of epimutation is sensitive to the frequency and magnitude of stochastic events. The magnitude of stochastic events is inversely proportional to the total number of molecules. Thus, we expect a higher rate of epimutation for smaller numbers of molecules. The rate of epimutation should also increase as the two modes become closer. Thus, we expect a higher rate of epimutation for larger α. Last, the protein degradation rate (γ) sets the timescale between stochastic events (i.e. faster protein degradation leads to more stochastic events per unit time during a Gillespie simulation). Thus, we expect a higher rate of epimutation for larger γ. In all tested cases, a higher rate of epimutation favored ES over GA (S9 Fig).

Matching α and the ratio of optimal phenotypes.

At high levels of nonlinearity, the lowest protein level is kα and the highest protein level is k. A bistable, epigenetic switch has two solutions, each well-adapted to one of the environments only when the ratio R = A(L)/A(H) = α (S1 Fig). Any mismatch between α and R will disfavor epigenetic switching because an epimutation from an adapted mode will jump to a maladapted mode, after which the descendants must accumulate genetic mutations to further adapt. Although our simulations fixed R = α = 0.25, we verified that variable α evolved to ES with αR in fast fluctuating environments (high ν; S10 Fig).

Lineage analysis

An unfit mutant could arise at the end of a cycle or a fit genotype might go extinct due to genetic drift and gene expression noise. To obtain insights on the evolutionary stability of different strategies, we focused our analysis on lineages that have persisted –with or without mutations– through at least one full environmental cycle (i.e. LOW epoch + HIGH epoch). We maintained genealogical records and traced the lineage and ancestral genotype of all cells over 2 cycles (S5 Fig). If any genotype between the 1-cycle and 2-cycle ancestors was monostable, then we classified the evolutionary strategy of that lineage as genetic adaptation (GA). If all genotypes between the 1-cycle and 2-cycle ancestors were bistable, then we classified the evolutionary strategy as either epigenetic switching (ES) or bistable adaptation (BA). The lineage was BA only if the 1-cycle bistable ancestor had accumulated at least one mutation since the 2-cycle bistable ancestor. At the end of each cycle, we calculated the fraction of surviving cells whose ancestors had one of these 3 strategies (GA, ES, BA) and averaged over all cycles (Fig 6). Each individual ancestral lineage was counted regardless of whether it was shared with other individuals or not.

To determine the transition rate between evolutionary strategies, we analyzed lineages back to the 3-cycle ancestor. We calculated the statistics of transitions between adaptation strategies by comparing strategies in 1-cycle and 2-cycle ancestors (current adaptation strategy) versus 2-cycle and 3-cycle ancestors (previous adaptation strategy) and averaged over all cycles (S7 Fig).

Noise load and “epimutation” probability

The Finite State Projection (FSP) method [62] allows the estimation of a probability distribution ρ(A, τ) at any specific time τf having an initial distribution ρ(A, 0) and state reaction matrix B(θ): (13)

Assuming an individual with genotype θ was selected in the previous generation with the optimal phenotype for the environment ES, i.e. ρ(A = A(ES), 0) = 1, ρ(A, τ = 4) reflects the phenotype probability distribution of the individual at the end of the following generation. This phenotype distribution can be used to calculate the expected fitness of a genotype θ with perfect selection and no genetic mutation, isolating the effect of biochemical noise. Then, we define the genotype’s noise load as the expected decay on fitness at the end of the cell life span (Eq 11; Fig 7A and 7B). Additionally, the probability that an individual selected in one environment ES displays high fitness in the alternative environment EA (e.g. ) was used as an approximation of the epimutation probability of epigenetic switches (Fig 7C and 7D).

Supporting information

S1 Fig. Deterministic steady states and stochastic stationary distributions of protein numbers given the biophysical parameters of a self-activating gene.

(A) The effect of the maximum synthesis rate (k) and the affinity constant (KD) over the deterministic steady state solutions of the protein expression of a self-activating gene (i.e. , where ) in the limit of high Hill coefficients (nH → ∞). If KD < αk the system is monostable HIGH with the protein expression steady state (A*) equal to k; on the other hand, if KD > k then the system is monostable LOW with A* = αk. When αkKDk is intermediate, these two steady states coexist and the system is bistable. (B) Bifurcation diagram of the protein steady states as the Hill coefficient (nH) varies while keeping the rest of the biophysical parameters fixed. As nH value increases, the system goes from monostable (blue dots) to bistable (violet and pink dots). As nH → ∞, the stable steady states monotonically approach their limiting values, αk and k (dashed gray lines), and the unstable steady state asymptotically approaches KD (dotted gray line). We show a few examples of the stationary distribution of the protein expression (ρ(A, τ = ∞)) for stochastic simulations with intrinsic biochemical noise (bottom). As nH approaches the bifurcation point (where the system passes from being monostable to bistable) the stationary distribution becomes wider (i.e. the phenotype is more variable). In the bistable region, even if the two modes of the stationary distribution do not change much, their relative weights can be significantly affected by the value of the unstable steady state, as stochastic transitions from one stable mode to the other become more or less probable.


S2 Fig. Genetic potential increases around the bistable region at high nonlinearity for a toggle switch model.

Here we consider an alternative model that can produce bistability and then epigenetic switching based on a toggle switch: with αA = 0.25, kB = 50, αB = 0.2, KB = 20, nB = 5, γ = 1, and A is still the molecule to be regulated and selected. In this model , with . Analogous to the main model (Eq 8), the solution genotype can be calculated as the values of KA and nA vary: (A) The f(A) function for some solution genotypes are shown (see row and column titles), exemplifying cases where (1) both and are monostable (i.e. the associated f(A) and γA intersect only once; all cases with nA = 1 and {nA = 16, KA = 1}), (2) a bistable solution genotype with ({nA = 16, KA = 12}; f(A) and γA intersect both in A = 20 and A = 80), and (3) only is bistable, and not a solution for the HIGH environment ({nA = 16, KA = 44}). (B) The solution genotypes per environment are shown. (C) The maximum genetic potential for different values of KA and nA (i.e. ) is shown in the colormap. As reference, the bistable solution genotypes for each environment are delimited by the green lines: as dark green, and as light green. The colorbar shows the one-mutation distance corresponding to each value of M.


S3 Fig. Distribution of population average Hill coefficient values as mutation step-size M and environmental fluctuation frequency ν varies.

Each line corresponds to the occurrence of the population average Hill coefficient 〈nH〉 in the last 5,000 generations of ten replicas of 10,000 generations simulation with evolutionary parameters: N = 10000, u = 0.03, st = 40, and k = 80, nH = 6, and KD = 45 as the initial genotype (θ1). The color determines the M value used, each row corresponds to different values of ν, and the right column shows the equivalent CONTROL simulations (i.e. without biochemical noise).


S4 Fig. Increasing nH increases the expected fitness in both environments.

(A) Contour plots as a function of biophysical parameters with fixed k = 80 where the steady states (A*) for LOW are A(L) ± 1% (dark green) and for HIGH are A(H) ± 1% (light green). (B) Effect of nH in the expected fitness at the end of the cell life span (), starting with the optimal phenotype for each environment, k = 80 and KD as shown in the legend. In all cases, increased as nH increases. Noteworthy, for bistable solution genotypes (e.g. k = 80 and KD = {40, 50}), increases for both environments (even if at different rates) as nH increases. The expected phenotype distribution ρ(A, τ = 4) was estimated numerically for each set of biophysical parameters (see Methods).


S5 Fig. Lineage analysis of cells evolving in a fluctuating environment.

At the end of each cycle (LOW epoch + HIGH epoch), we analyzed the genealogy of cells over the past two cycles. All cells were classified based on the evolutionary strategy used by their 2-cycle ancestor over a full cycle (bigger dots). The top bars show the environmental state per epoch (dark green for LOW, light green for HIGH). We plot the number (#) of distinct lineages (solid line) and genotypes (dotted line) as a function of past generations on the top row. The middle rows plot the corresponding genotypes θ and the bottom shows the individual ancestral lineages. Ancestral genotypes can be bistable (violet) or monostable (blue). (A) Example of lineage analysis of cells that use epigenetic switching (ES) strategy for ν = 0.1 and M = 5, i.e. their 2-cycle ancestors were fully bistable and persisted a full cycle without mutations. Note that there are distinct lineages with identical genotypes. (B) Example of lineage analysis of cells that use bistable adaptation (BA) strategy for ν = 0.04 and M = 1.4, i.e. their 2-cycle ancestors were fully bistable but accumulated mutations over the next cycle. (C) Example of lineage analysis of cells that use genetic adaptation (GA) strategy for ν = 0.01 and M = 5, i.e. their 2-cycle ancestors had monostable genotypes and accumulated mutations over the next cycle. In all cases, we used N = 4000, st = 40, and u = 0.03.


S6 Fig. Increasing selection pressure or mutation rate favors genetic adaptation, where as increasing population size favors epigenetic switching.

Each colormap shows the average fraction of parental lineages using each adaptation strategy (epigenetic switching, ES; bistable adaptation, BA; genetic adaptation, GA) for the same range of mutation step-size (M) and environmental fluctuation frequency (ν) as Fig 6. Evolutionary parameters used in main text (st = 40, N = 10000, u = 0.03) are highlighted in red boxes. (A) The effect of only changing the selection pressure (st) over three evolutionary replicas (N = 10000, u = 0.03). (B) The effect of only changing the population size (N) over three evolutionary replicas (st = 40, u = 0.03). (C) The effect of only changing the mutation rate (u) over three evolutionary replicas (st = 40, N = 10000). All simulations ran 10,000 generations with k = 80, nH = 6, KD = 45 as the initial genotype θ1.


S7 Fig. Transitions between adaptation strategies as a function of evolutionary parameters.

The colormaps show the percentage of ancestral lineages that displayed one adaptation strategy (current adaptation strategy) and other adaptation strategy in the preceding ancestral lineage (previous adaptation strategy). These statistics were calculated for ten evolutionary replicas for mutation step-size (M) and environmental fluctuation frequency (ν). Each simulation was run 10,000 generations with evolutionary parameters N = 10000, st = 40, u = 0.03 and k = 80, nH = 6, and KD = 45 as the initial genotype θ1. For fast fluctuating environments (large ν) and large mutation step size (M), most lineages displaying bistable adaptation (BA) as the current adaptation strategy used epigenetic switching (ES) in the previous cycle; this suggests that the stochasticity of the evolutionary dynamics is constantly feeding this subgroup. Moreover, most of the lineages using BA in the previous cycle that persisted another full cycle did it without accumulating any new mutation (i.e. using ES), suggesting the mutations occurring in the previous cycle were actually neutral. For slow fluctuating environments (small ν) and small mutation step size (M), most of the lineages used BA as the current and previous strategy, or transitioned between strategies (i.e. values not in the diagonal), suggesting the occurrence of the other strategies was just transitive, and constantly fed by the stochasticity of the process. Finally, in the “borders” between the regions where each strategy was dominant (e.g. intermediate M values for small ν), high transition rates as well as higher numbers in the diagonal occurred, congruently with the hypothesis that in these conditions the strategies have similar fitness cost and then a similar probability of being selected.


S8 Fig. Minimizing noise load drives selection in constant environment.

A simulation exemplifying the evolutionary dynamics of a population if the environment suddenly stops fluctuating. The simulation was run for 10,000 generations with evolutionary parameters N = 10000, st = 40, u = 0.03, M = 1.1, and k = 80, nH = 6, and KD = 45 as the initial genotype θ1; the environment fluctuates the first 1,000 generations with frequency ν = 0.1, and then remains constant in the LOW state (A(L) = 20). (A) The population fitness (w) and fraction of bistable genotypes (fB) for each generation (g) are shown. Once the environment stops fluctuating (g ≥ 1000), w value increases with respect to the maximum value observed in the fluctuating environment (compared to both LOW —dark green bar— or HIGH —light green bar— environment epochs; see inset); nevertheless, once in the constant environment, fB values vary widely between generations with no major effect on w. (B-D) Phenotype distributions for the average genotype (〈k〉, 〈nH〉, 〈KD〉; see boxes) in the population at several time points in the simulation (see legend) at (B) stationary state, or at the end of the life time (τ = 4) assuming the initial phenotype is either (C) A0 = 20 (the optimal value for the constant environment in this example) or (D) A0 = 80. In general, the population moves towards even higher nonlinearity values (nH) once the environment stops fluctuating, displaying sharper unimodal phenotype distributions around the optimal phenotype (C), which results in the higher population fitness w observed. Noteworthy, this observation holds for both monostable and bistable underlying genotypes, and regardless of the potential memory of the bistable genotypes if the initial genotype was in the alternative steady state (A(H) = 80; see panel D). Similar results were obtained for different evolutionary conditions. If the population starts in a monostable genotype (θ0 = {k = 80, nH = 1, KD = 10}), as expected the population often keeps monostable genotypes faraway from the bistable region when the environment stops (particularly for small M values).


S9 Fig. The same qualitative trends on the selection of adaptation strategies per evolutionary condition is maintained in a wide variety of alternative model assumptions.

Each colormap shows the population average fraction of parental lineages using each adaptation strategy (epigenetic switching, ES; bistable adaptation, BA; genetic adaptation, GA) for the same range of mutation step-size (M) and environmental fluctuation frequency (ν) as in Fig 6. Differences in assumptions or parameters are listed above each plot. All values are the average of three evolutionary replicas of simulations run 10,000 generations with N = 4000, st = 40, u = 0.03 and k = 80, nH = 6, and KD = 45 as the initial genotype θ1. The exceptions are the weighted and proportional selection schemes where the selection pressure (st) cannot be tuned. When the basal activity (α) was changed, we adjusted the low optimal phenotype such that A(L) = αA(H), where A(H) = 80. See S2 Appendix for an explicit description of assumptions or parameters.


S10 Fig. Allowing basal activity (α) to evolve does not qualitatively change our results.

(A) Each colormap shows the fraction of parental lineages using a specific adaptation strategy (ES, BA, or GA) averaged over all cycles and three independent replica simulations for the corresponding mutation step-size (M) and environmental fluctuation frequency (ν). Each simulation ran for 10,000 generations with evolutionary parameters N = 10000, st = 40, u = 0.03 and k = 80, nH = 6, KD = 45 and α = 0.25 as the initial genotype (θ1). The corresponding (B) bistable fraction (〈fBsim) and (C) basal activity parameter (〈αsim) averaged over all cycles and three independent replica simulations (same simulations than in panel A). For some examples, the dynamics over time for the geometric mean fitness per cycle (Wcycle), and the average basal activity (〈αcycle), as well as the fraction of parental lineages using either ES or BA as the adaptation strategy per cycle, are shown: (D) ν = 0.1 and M = 5; (E) ν = 0.04 and M = 1.1; (F) ν = 0.01 and M = 5; and (G) ν = 0.01 and M = 1.7. When a bistable system is selected (for either ES or BA adaptation strategies), α ≈ 0.25. On the other hand, α does not show a clear selection pressure when GA is the selected adaptation strategy.


S1 Appendix. Supplementary table: Previous works.



We thank Ryan Baugh, Kathleen Donohue, Sur Herrera Paredes, Katia Koelle, Mark Rausher, Joshua Socolar, and Marcy Uyenoyama for helpful feedback.


  1. 1. Luria SE, Delbrück M. Mutations of Bacteria from Virus Sensitivity to Virus Resistance. Genetics. 1943;28(6):491–511. pmid:17247100
  2. 2. Perfeito L, Fernandes L, Mota C, Gordo I. Adaptive Mutations in Bacteria: High Rate and Small Effects. Science. 2007;317(5839):813–815. pmid:17690297
  3. 3. Sniegowski PD, Lenski RE. Mutation and Adaptation: The Directed Mutation Controversy in Evolutionary Perspective. Annual Review of Ecology and Systematics. 1995;26(1):553–578.
  4. 4. Rohner N, Jarosz DF, Kowalko JE, Yoshizawa M, Jeffery WR, Borowsky RL, et al. Cryptic Variation in Morphological Evolution: HSP90 as a Capacitor for Loss of Eyes in Cavefish. Science. 2013;342(6164):1372–1375. pmid:24337296
  5. 5. Jablonka E, Oborny B, Molnar I, Kisdi E, Hofbauer J, Czaran T. The Adaptive Advantage of Phenotypic Memory in Changing Environments. Philosophical Transactions of the Royal Society B: Biological Sciences. 1995;350(1332):133–141.
  6. 6. Meyers LA, Bull JJ. Fighting change with change: adaptive variation in an uncertain world. Trends in Ecology & Evolution. 2002;17(12):551–557.
  7. 7. Jablonka E, Lamb MJ. Evolution in Four Dimensions: Genetic, Epigenetic, Behavioral, and Symbolic Variation in the History of Life. Bradford books. MIT Press; 2005.
  8. 8. Waddington CH. The Epigenotype. Endeavour. 1942;1:18–20.
  9. 9. Jablonka E, Lachmann M, Lamb MJ. Evidence, mechanisms and models for the inheritance of acquired characters. Journal of Theoretical Biology. 1992;158(2):245–268.
  10. 10. Casadesus J, Low D. Epigenetic Gene Regulation in the Bacterial World. Microbiology and Molecular Biology Reviews. 2006;70(3):830–856. pmid:16959970
  11. 11. Grossniklaus U, Kelly B, Ferguson-Smith AC, Pembrey M, Lindquist S. Transgenerational epigenetic inheritance: how important is it? Nature Reviews Genetics. 2013;14(3):228–235. pmid:23416892
  12. 12. Rando OJ, Verstrepen KJ. Timescales of Genetic and Epigenetic Inheritance. Cell. 2007;128(4):655–668. pmid:17320504
  13. 13. Balaban NQ, Merrin J, Chait R, Kowalik L, Leibler S. Bacterial persistence as a phenotypic switch. Science. 2004;305(5690):1622–5. pmid:15308767
  14. 14. Beaumont HJE, Gallie J, Kost C, Ferguson GC, Rainey PB. Experimental evolution of bet hedging. Nature. 2009;462(7269):90–93. pmid:19890329
  15. 15. Gallie J, Libby E, Bertels F, Remigi P, Jendresen CB, Ferguson GC, et al. Bistability in a Metabolic Network Underpins the De Novo Evolution of Colony Switching in Pseudomonas fluorescens. PLOS Biology. 2015;13(3):e1002109. pmid:25763575
  16. 16. Lachmann M, Jablonka E. The Inheritance of Phenotypes: an Adaptation to Fluctuating Environments. Journal of Theoretical Biology. 1996;181(1):1–9. pmid:8796186
  17. 17. Thattai M, van Oudenaarden A. Stochastic Gene Expression in Fluctuating Environments. Genetics. 2004;167(1):523–530. pmid:15166174
  18. 18. Kussell E, Kishony R, Balaban NQ, Leibler S. Bacterial Persistence: A Model of Survival in Changing Environments. Genetics. 2005;169(4):1807–1814. pmid:15687275
  19. 19. Kussell E, Leibler S. Phenotypic Diversity, Population Growth, and Information in Fluctuating Environments. Science. 2005;309(5743):2075–2078. pmid:16123265
  20. 20. Wolf DM, Vazirani VV, Arkin AP. Diversity in times of adversity: probabilistic strategies in microbial survival games. Journal of Theoretical Biology. 2005;234(2):227–253. pmid:15757681
  21. 21. Ribeiro A. Dynamics and evolution of stochastic bistable gene networks with sensing in fluctuating environments. Physical Review E. 2008;78(6):061902.
  22. 22. Salathe M, Van Cleve J, Feldman MW. Evolution of Stochastic Switching Rates in Asymmetric Fitness Landscapes. Genetics. 2009;182(4):1159–1164. pmid:19474199
  23. 23. Gaal B, Pitchford JW, Wood AJ. Exact Results for the Evolution of Stochastic Switching in Variable Asymmetric Environments. Genetics. 2010;184(4):1113–1119. pmid:20100938
  24. 24. Visco P, Allen RJ, Majumdar SN, Evans MR. Switching and growth for microbial populations in catastrophic responsive environments. Biophysical journal. 2010;98(7):1099–108. pmid:20371309
  25. 25. Liberman U, Van Cleve J, Feldman MW. On the Evolution of Mutation in Changing Environments: Recombination and Phenotypic Switching. Genetics. 2011;187(3):837–851. pmid:21212229
  26. 26. Libby E, Rainey PB. Exclusion rules, bottlenecks and the evolution of stochastic phenotype switching. Proceedings Biological sciences / The Royal Society. 2011;278(1724):3574–83.
  27. 27. Carja O, Feldman M. An equilibrium for phenotypic variance in fluctuating environments owing to epigenetics. J R Soc Interface. 2012;9(August 2011):613–623. pmid:21849387
  28. 28. Kuwahara H, Soyer OS. Bistability in feedback circuits as a byproduct of evolution of evolvability. Molecular Systems Biology. 2012;8(564):564. pmid:22252387
  29. 29. Carja O, Liberman U, Feldman MW. Evolution with stochastic fitnesses: A role for recombination. Theoretical Population Biology. 2013;86:29–42. pmid:23517905
  30. 30. Furrow RE, Feldman MW. Genetic Variation and the Evolution of Epigenetic Regulation. Evolution. 2014;68(3):673–683. pmid:24588347
  31. 31. Carja O, Liberman U, Feldman MW. The evolution of phenotypic switching in subdivided populations. Genetics. 2014;196(4):1185–1197. pmid:24496012
  32. 32. Carja O, Liberman U, Feldman MW. Evolution in changing environments: Modifiers of mutation, recombination, and migration. Proceedings of the National Academy of Sciences. 2014;111(50):17935–17940.
  33. 33. Botero Ca, Weissing FJ, Wright J, Rubenstein DR. Evolutionary tipping points in the capacity to adapt to environmental change. Proceedings of the National Academy of Sciences. 2015;112(1):184–189.
  34. 34. Lin WH, Rocco MJ, Bertozzi-Villa A, Kussell E. Populations adapt to fluctuating selection using derived and ancestral allelic diversity. Evolution. 2015;69(6):1448–1460. pmid:25908222
  35. 35. Belete MK, Balázsi G. Optimality and adaptation of phenotypically switching cells in fluctuating environments. Physical Review E. 2015;92(6):62716.
  36. 36. Garcia-Bernardo J, Dunlop MJ. Noise and Low-Level Dynamics Can Coordinate Multicomponent Bet Hedging Mechanisms. Biophysical Journal. 2015;108(1):184–193. pmid:25564865
  37. 37. Steinacher A, Bates DG, Akman OE, Soyer OS. Nonlinear Dynamics in Gene Regulation Promote Robustness and Evolvability of Gene Expression Levels. Plos One. 2016;11(4):e0153295. pmid:27082741
  38. 38. Ancel Meyers L, Ancel FD, Lachmann M. Evolution of Genetic Potential. PLoS Computational Biology. 2005;1(3):e32.
  39. 39. Gillespie DT. Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry. 1977;81(25):2340–2361.
  40. 40. Goldberg DE, Deb K. Analysis of Selection A Comparative Used in Genetic Algorithms Schemes. Foundations of Genetic Algorithms. 1991; p. 69–93.
  41. 41. Blickle T. Theory of Evolutionary Algorithms and Application to System Synthesis. Swiss Federal Institute of Technology Zurich; 1996.
  42. 42. Wells JA. Additivity of mutational effects in proteins. Biochemistry. 1990;29(37):8509–8517. pmid:2271534
  43. 43. Yoshikuni Y, Keasling JD. Pathway engineering by designed divergent evolution. Current Opinion in Chemical Biology. 2007;11(2):233–239. pmid:17353138
  44. 44. Orr HA. Fitness and its role in evolutionary genetics. Nature Reviews Genetics. 2009;10(8):531–539. pmid:19546856
  45. 45. Cvijović I, Good BH, Jerison ER, Desai MM. Fate of a mutation in a fluctuating environment. Proceedings of the National Academy of Sciences. 2015;112(36):E5021–E5028.
  46. 46. Good BH, McDonald MJ, Barrick JE, Lenski RE, Desai MM. The dynamics of molecular evolution over 60,000 generations. Nature. 2017;551(7678):45–50. pmid:29045390
  47. 47. Ferrell JE. Bistability, Bifurcations, and Waddington’s Epigenetic Landscape. Current Biology. 2012;22(11):R458–R466. pmid:22677291
  48. 48. Nei M, Maruyama T, Chakraborty R. The Bottleneck Effect and Genetic Variability in Populations. Evolution. 1975;29(1):1–10. pmid:28563291
  49. 49. Lambert G, Kussell E. Quantifying Selective Pressures Driving Bacterial Evolution Using Lineage Analysis. Physical Review X. 2015;5(1):011016. pmid:26213639
  50. 50. Cerulus B, New AM, Pougach K, Verstrepen KJ. Noise and Epigenetic Inheritance of Single-Cell Division Times Influence Population Fitness. Current Biology. 2016;26(9):1138–1147. pmid:27068419
  51. 51. Schiffels S, Szollosi GJ, Mustonen V, Lassig M. Emergent Neutrality in Adaptive Asexual Evolution. Genetics. 2011;189(4):1361–1375. pmid:21926305
  52. 52. Desai MM, Fisher DS. The Balance Between Mutators and Nonmutators in Asexual Populations. Genetics. 2011;188(4):997–1014. pmid:21652523
  53. 53. Becskei A, Serrano L. Engineering stability in gene networks by autoregulation. Nature. 2000;405(6786):590–3. pmid:10850721
  54. 54. Rosenfeld N, Elowitz MB, Alon U. Negative autoregulation speeds the response times of transcription networks. J Mol Biol. 2002;323(5):785–793. pmid:12417193
  55. 55. Novak B, Tyson JJ. Design principles of biochemical oscillators. Nat Rev Mol Cell Biol. 2008;9(12):981–991. pmid:18971947
  56. 56. Tsai TYC, Choi YS, Ma W, Pomerening JR, Tang C, Ferrell JE. Robust, tunable biological oscillations from interlinked positive and negative feedback loops. Science. 2008;321(5885):126–129. pmid:18599789
  57. 57. Li GW, Burkhardt D, Gross C, Weissman JS. Quantifying absolute protein synthesis rates reveals principles underlying allocation of cellular resources. Cell. 2014;157(3):624–635. pmid:24766808
  58. 58. Milo R, Phillips R. Cell Biology by the Numbers. Garland Science; 2015.
  59. 59. Buchler NE, Gerland U, Hwa T. On schemes of combinatorial transcription logic. Proceedings of the National Academy of Sciences. 2003;100(9):5136–5141.
  60. 60. Press WH, Teukolsky SA, Vetterling WT. Numerical recipes in C++: the art of scientific computing. Cambridge University Press; 2002.
  61. 61. Blickle T, Thiele L. A mathematical analysis of tournament selection. In: Genetic Algorithms: Proceedings of the Sixth International Conference; 1995. p. 1–6.
  62. 62. Munsky B, Khammash M. The finite state projection algorithm for the solution of the chemical master equation. The Journal of Chemical Physics. 2006;124(4):044104. pmid:16460146