Drift in individual behavioral phenotype as a strategy for unpredictable worlds
eLife Assessment
Maloney et al. offer an important contribution to understanding the potential ecological mechanisms behind individual behavioral variation. By providing compelling theoretical and experimental data, the study bridges the gap between individual, apparently stochastic behavior with its evolutionary purpose and consequences. The work further provides a testable and generalizable model framework to explore behavioral drift in other behaviors.
https://doi.org/10.7554/eLife.103585.3.sa0Important: Findings that have theoretical or practical implications beyond a single subfield
- Landmark
- Fundamental
- Important
- Valuable
- Useful
Compelling: Evidence that features methods, data and analyses more rigorous than the current state-of-the-art
- Exceptional
- Compelling
- Convincing
- Solid
- Incomplete
- Inadequate
During the peer-review process the editor and reviewers write an eLife Assessment that summarises the significance of the findings reported in the article (on a scale ranging from landmark to useful) and the strength of the evidence (on a scale ranging from exceptional to inadequate). Learn more about eLife Assessments
Abstract
Individuals, even with matched genetics and environment, show substantial phenotypic variability. This variability may be part of a bet-hedging strategy, where populations express a range of phenotypes to ensure survival in unpredictable environments. In addition, phenotypic variability between individuals (‘bet-hedging’), individuals also show variability in their phenotype across time, even absent external cues. There are few evolutionary theories that explain random shifts in phenotype across an animal's life, which we term drift in individual phenotype. We use individuality in locomotor handedness in Drosophila melanogaster to characterize both bet-hedging and drift. We use a continuous circling assay to show that handedness spontaneously changes over timescales ranging from seconds to the lifespan of a fly. We compare the amount of drift and bet-hedging across a number of different fly strains and show independent strain-specific differences in bet-hedging and drift. We show manipulation of serotonin changes the rate of drift, indicating a potential circuit substrate controlling drift. We then develop a theoretical framework for assessing the adaptive value of drift, demonstrating that drift may be adaptive for populations subject to selection pressures that fluctuate on timescales similar to the lifespan of an animal. We apply our model to real-world environmental signals and find patterns of fluctuations that favor random drift in behavioral phenotype, suggesting that drift may be adaptive under some real-world conditions. These results demonstrate that drift plays a role in driving variability in a population and may serve an adaptive role distinct from population-level bet-hedging.
Introduction
No two organisms of the same species, even when genetically identical, behave precisely the same. Individuality has been observed and measured in organisms ranging from bacteria (Beaumont et al., 2009) to plants (Cohen, 1966), flies (Buchanan et al., 2015; Linneweber et al., 2020; Honegger et al., 2020; Kain et al., 2015; de Bivort et al., 2022) to humans (Sanchez-Roige et al., 2018), even in the absence of genetic or environmental differences. This variability poses two major questions in biology—how does it arise and what, if any, evolutionary role does it serve.
Heritable phenotypic variation in a population allows for adaptive tracking, that is when alleles change in frequency as the selective pressure of the environment changes (Pfenninger and Foucault, 2022). A complementary strategy for fluctuating environments is phenotypic plasticity, in which organisms change their behavior (or morphology) in direct response to environmental changes. These two adaptive strategies share a basic outcome: the phenotype they produce matches the current or recent environment. Organisms that fail to match the environment can suffer deadly consequences.
Random differences in phenotype may reflect a ‘bet-hedging’ strategy for species to deal with unpredictability in their environment (Cohen, 1966; Hopper, 1999; Weissman et al., 2023; Ogura et al., 2017; Starrfelt and Kokko, 2012; Xue and Leibler, 2017; Müller et al., 2013; Sekajova et al., 2023). Under this theory, variability allows some individuals to survive no matter what future environment arrives, increasing the odds that a population avoids extinction. Thus, bet-hedging species accept a lower arithmetic mean fitness for a higher geometric mean fitness (which equals zero if there is a single generation of no fitness). Theoretical work shows that bet-hedging strategies relying on random non-heritable variation outperform adaptive tracking in some environments (Kain et al., 2015; Sekajova et al., 2023; Xue et al., 2019). In particular, bet-hedging outperforms adaptive tracking when the environment fluctuates on timescales similar to the lifespan, as adaptive tracking requires multiple generations to respond to environmental cues (Müller et al., 2013; Botero et al., 2015), and can lag behind fluctuating selective pressures. While phenotypic plasticity occurs on faster timescales, the ability to adapt and learn can be metabolically costly and provides limited buffer against sudden changes in selective pressures (Murren et al., 2015). Intrinsic variability in genetic control (Beaumont et al., 2009) has been identified as a source of phenotypic variation in microbes. In multicellular organisms, stochastic processes in development underlie variation (Honegger and de Bivort, 2018), and, in the case of behavior, stochastic neuronal wiring (Linneweber et al., 2020; Churgin et al., 2025; Mellert et al., 2016; Lillvis et al., 2022) has been shown to predict persistent individual differences.
Individuals, however, do not express a singular behavioral phenotype across their life. Individual biases in multiple behavioral settings are only partially consistent over time (Buchanan et al., 2015; Werkhoven et al., 2021; Honegger et al., 2020; Laskowski et al., 2022; Nakayama et al., 2016; Laskowski et al., 2022; Bierbach et al., 2017), showing spontaneous changes even in the absence of macroscopic cues that could trigger plasticity. These observations raise two questions: to what degree does individuality arise due to developmental differences versus spontaneous fluctuations within the lifetime of the animal, and do fluctuations across the lifetime of an animal provide an evolutionary benefit? To answer these questions, we used near-isogenic animals to measure (1) the extent of variation present at the start of adulthood (‘bet-hedging’) and (2) the amount of behavioral phenotypic change over time (‘behavioral drift’). We use locomotor handedness in Drosophila melanogaster as a model to measure how behavior drifts over time and show that the extent of behavioral drift is influenced by genes and the neuromodulator serotonin. We then use a life-history model to test the hypothesis that random change in phenotype (‘phenotypic drift’, as a more general form of behavioral drift) can be adaptive and assess whether real-world environmental fluctuations may drive the evolution of phenotypic drift. Taken together, these experiments and analyses suggest that phenotypic drift is plausibly an adaptive strategy to cope with environmental fluctuations within an organism’s lifespan.
Results
Individual behavioral biases drift over time
To investigate the timescales on which individual preference spontaneously changes, we placed 252 flies in individual circular arenas and continuously tracked them for up to 30 days. At each time point, we computed the direction of circling (Figure 1A), a measure that exhibits idiosyncratic variation when averaged over long timescales (Buchanan et al., 2015). To look for slow changes in bias, we examined the turning bias of individual flies at different timescales: first, we averaged their direction of circling over each hour and second we low-pass filtered their continuous turning behavior to discard frequency components faster than 24 hr (Figure 1B). Comparing both of these measures to the experiment-wide average preference for each fly shows substantial long-duration changes from their experiment-wide circling tendency. To quantify this across all flies, we calculated the average power spectrum of the raw turning data across flies (Figure 1C), showing substantial power in lower frequencies corresponding to hours- to days-long fluctuations in turning preferences. Interestingly, we did not see peaks at any specific frequencies (e.g. circadian), although there was a broad shoulder of power between 10-4 and 10-2 Hz. The overall trend across six orders of magnitude bore some resemblance to a power-law relationship between frequency and power. We saw similar patterns in other measures of behavior from this experiment, including speed, heading velocity, and distance from the center of the arena (Figure 1—figure supplement 1A-D).
Characterizing changes in individual preferences in Drosophila melanogaster.
(A) 2 hr sample of centroid-tracking data for a fly in a circular arena. Each point is colored based on whether it is moving CCW, CW, or radially in the arena. (B) Sample of 100 hr of continuous recording for 4 individual flies (colors). Hourly means of turning indices are shown in light lines. Dashed lines are low-pass filtered with a timescale cutoff of 24 hr. Solid lines are low-pass filtered shuffled data showing the average tendency across the experiment. (C) Mean power spectrum of turning data for all continuously monitored flies (n=252) for actual and shuffled data. Shaded areas represent 95% confidence intervals generated via bootstrapping (n=1000). (D) Schematic of Y-maze assay. Flies make either a left or right turn each time they walk through the intersection. (E) Standard deviation of daily right biases vs average right bias across days for individual flies (points). Colors indicate DGRP genotype (n=48–235 for each genotype (see Table 1)). (F) Mean individual handedness per day across all DGRP lines, a random subset are thickened to show representative changes in individual handedness over time. (G) Autoregressive model of individual right bias over time with parameters to estimate the initial right bias variability () and rate of daily change in right bias (). (H) Posterior estimates of , , and (the autoregressive parameter characterizing the rate of reversion to zero bias), for each DGRP genotype. Grey bars represent 95% credible intervals. Lines indicate the smallest q value between populations. (I) As in H, posterior estimates of right bias variability parameters for flies treated with 5-HTP, AMW, and controls, as well as mutant flies with a missense mutation in trh generated by in vivo CRISPR. n=98 or 192 for each condition (see Table 1). q values <.05 are indicated.
Genes regulate the rate of behavioral drift
The extent of behavioral variability in a population differs between genotypes (Ayroles et al., 2015; Akhund-Zade et al., 2019; Akhund-Zade et al., 2020). We next looked to see if the rate of behavioral drift also differs between genotypes. This is a prerequisite if behavioral drift can evolve as a trait under natural selection. We used 10 different lines from the Drosophila Genetic Resource Panel (DGRP) (Mackay et al., 2012). Using a Y-maze assay (Figure 1D) that measures left-right choices that correlate with locomotor handedness in circling (Buchanan et al., 2015), we measured the locomotor handedness of flies in each of these lines three times weekly for 3 weeks. As in the circling assay (Figure 1A–C), individual flies exhibited substantial variation in their daily average turn biases (consistent with drifting biases) in all genotypes, as measured by the standard deviation in the daily fraction of right turns for each fly, showing substantial variation from their experiment-wise average (Figure 1E), and evident in plotting the fraction right turns for each day of all flies (Figure 1F). We used a hierarchical Bayesian autoregressive model (Figure 1G) to estimate the initial variability in turn bias for each genotype (), the extent to which turn bias changed each day (), and the tendency of turn bias to persist over time (; Figure 1G). We observed large differences in all three parameters between genotypes, as evidenced by minimally overlapping posterior distributions of estimates of these parameters (Figure 1H). All genotypes showed above zero, demonstrating some level of persistence in individual biases over time, consistent with our circling experiments and previous studies of Y-maze handedness (Buchanan et al., 2015). Interestingly, we saw independent variation across genotypes in the posteriors for and , suggesting that different genetic mechanisms regulate behavioral bet-hedging and drift.
Manipulating serotonin modulates the rate of behavioral drift
Neuromodulators have been shown to play an important role in regulating individuality in a large range of organisms (Pantoja et al., 2020; Stern et al., 2017; Harel et al., 2024; Maloney, 2021; Sanchez-Roige et al., 2018), including flies (Kain et al., 2012; Honegger et al., 2020; Krams et al., 2021). To test whether serotonin affects the rate of behavioral drift (and/or bet-hedging), we fed adult, isogenized Oregon-R flies food supplemented with either the serotonin synthesis inhibitor aMW or the serotonin precursor 5HTP and measured their locomotor handedness for 3 days each week for 3 weeks, as in the previous experiment. While and were similar in all three treatment groups, both pharmacological manipulations of serotonin decreased the stability of behavior over time, increasing and decreasing (Figure 1I, Figure 1—figure supplement 1F). This was also evident in decreased correlation coefficients between handedness on successive days (Figure 1—figure supplement 1H-J) compared to control flies.
To assess the role of serotonin as a modulator of behavioral drift by a second approach, we generated a constitutive mutation in the tryptophan hydroxylase gene (trh), which is involved in the synthesis of serotonin. This approach also controls for off-target pharmacological effects and, unlike the previous experiment, deprives the animals of serotonin during development as well as after eclosion. We used in vivo CRISPR (Zirin et al., 2020) to knock out trh in an isogenized Oregon R background, yielding control flies of a closely matched genetic background. We did not see clear evidence of difference from control flies in the marginal distributions of , , or in our hierarchical model (Figure 1I, Figure 1—figure supplement 1G), although we did see a significant decrease of day-to-day correlation between control and trh null flies (Figure 1—figure supplement 1K-M).
A theoretical adaptive advantage for phenotypic drift
The variation we see in between genotypes suggests that behavioral drift can potentially evolve to provide fitness advantages in some situations. To build an intuition for the ideal phenotypic drift strategy and explore possible theoretical foundations, we formulated a simple two-state model (Figure 2A). Imagine an organism in an environment that shifts probabilistically between two states. The organism can exhibit two behavioral phenotypes. If the chosen phenotype matches the environment, the organism survives; if not, it dies. What is the optimal strategy for changing its behavior to survive probabilistic shifts in the environment that occur with probability ? We can prove, through methods analogous to classic findings on optimal betting solutions (Breiman, 1962; Kelly, 1956) and previous analytical work on generational bet-hedging (Tal and Tran, 2020; Bergstrom, 2014), that in this two-state model, the optimal fraction of the population that should shift their behavioral phenotype in order to maximize long-term population growth equals . This result extends to both the case of an arbitrary number of possible states as well as a continuous distribution of environmental states and behavioral phenotypes for all cases where the fitness narrowly depends on a tight match to a given environment (see Appendix 1 for proofs). Interestingly, this holds true even when the fitness associated with successfully matching phenotype to environment A differs from matching environment B – in other words, matching the environment as much as possible is the most important thing, independent of the quality of specific environments.
Modeling adaptive scenarios of phenotypic drift.
(A) In a simplified model in which both phenotypes and environments have two states, the optimal fraction of the population that should change preference () over a period of time equals the probability the environment changes (). See Appendix 1. (B) Model for the number of individuals with a particular continuous preference as a function of time in a fluctuating environment and individual age. , is the number of individuals with preference , age at day in the simulation. Two different cases determine this value, one for flies surviving from the previous timestep (), and one for flies born in a particular timestep (). The number of flies of a particular behavioral phenotype surviving on each successive day is determined by a function of how far that preference is from the ideal preference on that day (orange), the total number of flies that already have, or drift into having that phenotype on that day (red), and a bounding term (purple) that stops the distribution of preferences from diffusing away from the general range of what is adaptive (adding some degree of reversion to the mean consistent with our observed values of , and via the Wiener-Khinchin theorem, consistent with the power spectrum observed in Figure 1C). The key behavioral strategy parameter from these terms is , which determines the rate at which flies’ preferences drift over time. The number of new flies born each day is given by the total number of flies above the age of reproductive maturity (red) times the birth rate . New flies are born with an initial preference from a normal distribution centered on the long-term environmental mean with a standard deviation given by (blue) (C) Example environmental fluctuations and corresponding fitness landscape showing the change in population over 100 simulation days for differing amounts of phenotypic drift and bet-hedging. Green dot indicates ideal strategy (ii) (D) Population over time for strategies marked with Roman numerals in (C). (E, F) As in (C) for two additional example environmental fluctuation patterns.
A flexible model of phenotypic drift shows a potential adaptive role under some patterns of environmental change
To model the effect of more realistic environmental fluctuations, we added dynamic environments, fitness effects, and life history to the auto-regressive model we used to fit the experimental behavioral data (Figure 2B). In this model, individuals, tracked at the population level, exhibit different behavioral preferences that can potentially vary over their lifespans. The environment fluctuates, and the survival probability of an individual increases as the difference between their preference and the environment decreases. Two parameters determine the phenotypic strategy: , captures the initial variability of the population, and , captures the amount each fly’s preference changed per day. By integrating this model over time, we estimated the fold-change in population size with varying levels of and (Figure 2C-D, Figure 2—figure supplement 1), thereby determining the optimal variability strategy for a given pattern of environmental fluctuations. Sampling a few randomly generated environments quickly revealed that different patterns of fluctuation favored different strategies (Figure 2E–F), so we began to systematically assess what characteristics of the environment and life history might favor phenotypic drift, bet-hedging, or combinations of both.
Phenotypic drift is an effective response at shorter timescale fluctuations than bet-hedging
To characterize the adaptive value of bet-hedging and phenotypic drift strategies as a function of statistics of environmental fluctuations, we created randomized environmental dynamics by filtering white noise in the time domain, leading to random fluctuations with a given temporal frequency content. We normalized and scaled the resulting environmental patterns and used them in simulations of population survival for a range of bet-hedging () and phenotypic drift () values. From these simulations, we constructed a fitness landscape over the four dimensions of , , environmental fluctuation period, and environmental fluctuation amplitude (Figure 3A). At very high-frequency fluctuations, the most successful strategy was , reflecting an optimal strategy of all individuals tightly matching the average conditions of the environment (Figure 3C). Similarly, low amplitude fluctuations favored low bet-hedging and low drift. These findings make sense: low amplitude fluctuations are effectively a static environment that does not require a variable phenotypic strategy, and very rapid fluctuations changing within the timescale of organismic response are averaged away (Kain et al., 2015; Müller et al., 2013; Botero et al., 2015). However, as the amplitude of the fluctuations increased and the frequency decreased, the optimal strategy showed increased amounts of drift and bet-hedging, as producing individuals with a preference far from the environmental mean became increasingly necessary for survival. While both drift and bet-hedging are preferred over no variability in these situations, higher frequency fluctuations favor drift, while lower frequency fluctuations favor bet-hedging. Increasing the time to sexual maturity increases the advantage of drift, suggesting that varying a phenotype dynamically provides a mechanism for organisms to survive long enough to reproduce. These results suggest that the relative benefit of a drift or bet-hedging strategy depends on the rate of fluctuation of the environment compared to the development time of an organism. These relationships hold for a wide range of birthrates (Figure 3—figure supplement 1A) and ages of reproductive maturity (Figure 3—figure supplement 1B-C).
Effects of amplitude of environmental fluctuation, frequency of fluctuation, and age of reproductive maturity on ideal amounts of bet-hedging and phenotypic drift.
(A) Fitness landscapes over combinations of environmental fluctuation amplitude and frequency. Each heatmap shows the geometric mean of the log change in population for each combination of drift and bet-hedging over 100 randomized environments. Heatmaps are normalized to their maximum and minimum values. Rows of heatmaps have the same environmental fluctuation frequency, and columns have the same environmental fluctuation amplitude (as measured by the standard deviation of all timepoints ). The nine amplitude and frequency combinations in this panel correspond to values denoted with white boxes in (C). (B) As (A), except columns of heat maps have the same age of reproductive maturity, as determined by . (C) Optimal amounts of bet-hedging (warm color scale; left) and drift (cool color scale; right) for each combination of environmental fluctuation amplitude and frequency. White squares indicate values associated with heatmaps in A. Dotted blue line corresponds to an environmental fluctuation period of 20 days, which is twice the age of reproductive maturity in these simulations. (D) As (C), except for optimal amounts of bet-hedging and drift for each combination of environmental fluctuation frequency and . Dotted blue line corresponds to environmental fluctuations of twice the age of reproductive maturity. White squares indicate values associated with heatmaps in (B).
Real-world environmental fluctuations may favor phenotypic drift
To predict the adaptive value of phenotypic drift strategies in somewhat less synthetic circumstances, we collected 43 types of environmental time series from publicly available National Oceanography and Atmospheric Administration (NOAA; Menne et al., 2012) and National Ecological Observatory Network (NEON, 2022), National Ecological Observatory Network (NEON) datasets across 118,618 sites. We randomly sampled contiguous 1000-day time series from each of these datasets from the past 20 years, z-scored each time series, then scaled them to have standard deviations to represent different amplitudes of selective pressure. We then used these time series as model inputs to calculate the optimal amounts of phenotypic drift and bet-hedging as a function of and (Figure 4A–B). Different patterns of environmental fluctuation, across differing measurement types and locales, showed differing optimal amounts of phenotypic drift and bet-hedging. As in our previous analyses, increasing increased the optimal and (Figure 3), and increasing the increased the optimal magnitude of phenotypic drift (Figure 4A, Figure 4—figure supplement 1B,D).
Optimal bet-hedging and phenotypic drift strategies for real-world environmental fluctuations.
(A) 1000 days of relative humidity data from the Arikaree River in Colorado, USA (left panels) were used to generate an environmental selection filter with low (top-left) or high (bottom-left) amplitude fluctuations ( in Figure 2B). Fitness landscape heatmaps over bet-hedging and drift strategies for different ages of reproductive maturity (). (B) As in (A), using average daily temperature data from Longreach, Australia. (C) Pipeline for comparing the optimal variability strategies of organisms subject to real-world environmental fluctuations. Daily environmental time series from many sites were collected, normalized, and used in the model to produce fitness landscapes over and . All landscapes were then subject to principal components analysis. These simulations held and constant. See Methods. The loadings of PC1 (97.8% of the variance; top-right) indicate that this component encodes the optimal amount of bet-hedging, while PC2 (1.9% of the variance; bottom-right) encodes optimal drift. (D) Environmental time series from specific locations, plotted on PC2 vs PC1 axes, colored by optimal amount of bet-hedging. (E) As in (D), except color indicates optimal amount of drift. (F) As in (D), except color indicates the type of environmental measurement. (G) As in (D), except color indicates the Köppen climate classification of their location.
To relate optimal strategies of phenotypic drift and bet-hedging to climate and environmental factors, we used principal components analysis (PCA) to study variation in fitness landscapes over and (Figure 4C). The first principal component of variability strategy landscapes had the vast majority of the variance (97.8%) and encoded the extent of bet-hedging; the second component (1.9%) encoded the extent of drift. Across time series, we observed a variety of optimal amounts of phenotypic drift and bet-hedging. A substantial minority (12%) of environmental signals favored non-zero drift (Figure 4D and E), particularly those reflecting temperature and wind-speed measurements and a subset of locations with tropical, sub-tropical, Mediterranean, and continental climates (Figure 4F and G). These results depend on the in our model, with higher ages of reproductive maturity favoring more phenotypic drift (Figure 4—figure supplement 1).
Discussion
We found that individual behavioral biases are not stable over an animal’s lifetime, and that the degree of stability in behavioral bias is influenced by genetics and neuromodulation. Inspired by these findings, we provide a theoretical rationale for how instability in preferences could be adaptive for the long-term survival of individuals and species.
The behavioral preferences of individual flies change continuously over their life on days-long timescales (Figure 1A–C; Figure 1—figure supplement 1A-D). While indications of this phenomenon have been seen previously (Buchanan et al., 2015; Honegger et al., 2020; Werkhoven et al., 2021; Yu et al., 2023; Bialek and Shaevitz, 2023; McKenzie-Smith et al., 2023), these studies examined a small number of time points or recorded behavior continuously for up to a week. By measuring behavior continuously for up to 4 weeks (roughly the lifespan of a fly), we were able to estimate the complete power spectrum of behavior: the continuous distribution of timescales at which it changes. Across multiple behaviors (Figure 1C, Figure 1—figure supplement 1A-D), we show that there is no specific timescale over which behavioral preferences change (e.g. we did not see a circadian cadence to behavioral changes), and our data suggest that individuality shifts on a number of different time scales.
Examining several different inbred strains derived from a natural fly population, we found that the stability of preferences depends on genotype (Figure 1H). This implies that there is natural allelic variation that affects the rate of behavioral drift. In turn, this suggests that behavioral drift is not strongly maladaptive, in which case we would expect alleles involved in promoting behavioral drift to have been selected out of the population. Genetic variation for behavioral drift implies that the rate of drift could evolve to increase the fitness of animals subject to different kinds of environmental fluctuations. However, genetic variation for behavioral drift does not, per se, demonstrate that drift is subject to selection; drift could be a neutral epiphenomenon of some other trait under selection.
Importantly, some lines with differing magnitudes of initial preference variability () exhibited similar amounts of preference stability (; e.g. lines DGRP 819 and 426). This suggests that mechanisms that drive differences in population preferences developmentally incompletely overlap with mechanisms that drive stability in preferences as adults.
Serotonin has been implicated as a regulator of the extent of individuality in fly behavior (Kain et al., 2012; Honegger et al., 2020; Krams et al., 2021) and stability of idiosyncratic preferences in C. elegans (Stern et al., 2017; Ali Nasser et al., 2023). Bidirectional pharmacological perturbation of serotonin signaling (increasing it with serotonin precursors, or decreasing it with synthesis inhibitors or genetic perturbations) decreases the stability of preferences over time (or conversely increases the amount of behavioral drift; Figure 1I, Figure 1—figure supplement 1F-M). Our results from constitutive mutations in the serotonin synthesis pathway are less compelling (although we still see a significant difference in the strength of day-to-day correlations). The more modest impact of constitutive mutation may reflect compensatory effects playing out across development. Together, our serotonin manipulation experiments suggest that this neuromodulator reinforces stability in idiosyncratic individual behavior. Further study is necessary to determine if serotonin regulates drift through its role in synaptic plasticity or some other widespread effect on the Drosophila melanogaster nervous system.
The combination of genetic and neuromodulatory control suggests that the extent of behavioral drift could evolve if it confers a fitness advantage in natural settings. The bet-hedging framework provides a theoretical basis for the adaptive value of stable idiosyncrasy in behavior (Cohen, 1966; Simons, 2011): namely, that variability in progeny phenotypes increases the chances that at least some offspring are fit when the environment fluctuates unpredictably. We hypothesize that behavioral drift may be advantageous for similar reasons, but operating within the lifespan of each individual. We provide two arguments in support of this hypothesis. First, we show in several analytically tractable cases (Figure 2A, Appendix 1) that it is evolutionarily optimal for an individual to switch behavioral preference phenotypes with a probability equal to the probability of the environment changing to favor those behavioral phenotypes.
This analytical result matches what we find using a more biologically realistic computational model of drifting individual preferences in fluctuating environments. We find that phenotypic drift is beneficial when the environment changes faster than the time to reproductive maturity of an animal. This finding suggests that behaviors that confer fitness with respect to aspects of the environment that change quickly should correspondingly change more quickly. Conversely, stable behavioral preferences may confer fitness with respect to stable aspects of the environment. This is borne out by simulating populations in different environments: quickly changing environmental parameters such as relative humidity (Figure 4A, Figure 4—figure supplement 1D) favor a drift strategy, while environments that vary at longer (e.g. seasonal) time scales, such as average daily temperature, favor a bet-hedging strategy (Figure 4B, Figure 4—figure supplement 1D). A key parameter of this model is the age of reproductive maturity (). Phenotypic drift provides a mechanism for organisms with slow development times to survive fluctuating environments long enough to reproduce. Thus, a key quantity is the time scale of environmental fluctuations relative to maturation time. We predict that organisms with more delayed onsets of reproduction will be more likely to exhibit phenotypic drift compared to organisms with more rapid development (subject to the same environmental fluctuations).
Organisms employ many strategies to survive changing environments. While our study focused on the respective advantages of bet-hedging (stable variability at the individual level) and phenotypic drift (variability within an individual’s lifespan), these findings complement previous work comparing bet-hedging and adaptive tracking (selection-induced changes in allelic frequency over time Machado et al., 2021). Previous work on thermal preference in flies suggested that adaptive tracking offers an advantage when the environment fluctuates on approximately years-long time scales, whereas bet-hedging offers an advantage for months-long fluctuations (Kain et al., 2015; Akhund-Zade et al., 2020). These time scales roughly correspond to several fly lifespans and one lifespan, respectively. This study finds that phenotypic drift may be an adaptive strategy for environmental fluctuations within a lifespan. Thus, adaptive tracking, bet-hedging, and phenotypic drift appear to be complementary strategies for the challenges of environmental fluctuation over a wide range of time scales.
Importantly, random phenotypic drift and bet-hedging come at potentially high costs. If organisms could detect (or predict) environmental fluctuations and deterministically change their phenotype to be optimal for the realized environment, they could avoid the losses of randomly choosing the wrong phenotypes. Nonetheless, drift may play an adaptive role in some systems for two key reasons. Firstly, sensing and predicting future environments may be metabolically costly (Murren et al., 2015), especially for all possible environments. Random changes in preferences may therefore be more efficient than evolving the ability to reliably adapt to any fluctuation.
Second, random strategies may be inherently optimal. In a game-theoretic context, finite games always have an optimal strategy (a Nash equilibrium), but this strategy may have to be random. For instance, playing randomly in Rock Paper Scissors is optimal in so far as your opponent cannot learn to predict your play and exploit it. The randomness of stochastic evolutionary strategies, such as bet-hedging and phenotypic drift, may thus be truly optimal (Tal and Tran, 2020; Bergstrom, 2014). This may be particularly likely if the fitness effect of a particular behavioral phenotype depends on fluctuating game-theoretic interactions.
The interaction between behavioral drift and learning is likely complicated. Studies have observed idiosyncratic differences in learning that help shape the population-level distribution (Smith et al., 2022; Manna et al., 2025). Specifically, variability in response to identical cues may lead to variation in the population. Similarly, non-adaptive plasticity in response to unrelated cues has been shown to be a mechanism for generating differences in a population as part of a bet-hedging strategy (Maxwell and Magwene, 2017). While we limit our analysis in this paper to random shifts in phenotype rather than adaptive plasticity and learning, all these mechanisms of change likely co-exist in natural behaviors.
This paper characterizes changes in individual behavior within a fly’s lifetime and proposes a theoretical framework in which such changes are evolutionarily adaptive. Together, these results motivate continued study of the biological mechanisms underpinning behavioral drift as well as empirical studies to test the hypothesis that behavioral drift helps organisms survive rapidly changing environments.
Methods
Fly care
Flies were grown on standard cornmeal/dextrose medium as previously described Honegger et al., 2020. Flies were kept on a 12:12 hr light:dark cycle at room temperature (20-23°). All behavioral experiments (excepting continual tracking experiments) were done during the animals’ subjective day. Unless otherwise mentioned, all flies were 3–6 days post eclosion at the time of their first use in a behavior experiment. Fly stocks used in this experiment are described in Table 1. To maintain individual identity across experiments, flies were either stored alone in standard media vials or in individual housing fly plates (modified 96 well plates Alisch et al., 2018; FlySorter, LLC).
Drosophila melanogaster genotypes used in this paper.
| Genotype | Source | Figure | n | Citation |
|---|---|---|---|---|
| Canton-S | BDSC 64349 | 1 A-C, S1A-D | 250 (24hr) 252 (2hr) | |
| DGRP 45 | BDSC 28128 | 1E, 1 G, S1E | 55 | Mackay et al., 2012 |
| DGRP 85 | BDSC 28274 | 1E, 1 G, S1E | 22 | Mackay et al., 2012 |
| DGRP 105 | BDSC 28139 | 1E, 1 G, S1E | 91 | Mackay et al., 2012 |
| DGRP 208 | BDSC 25174 | 1E, 1 G, S1E | 111 | Mackay et al., 2012 |
| DGRP 426 | BDSC 28196 | 1E, 1 G, S1E | 235 | Mackay et al., 2012 |
| DGRP 535 | BDSC 28208 | 1E, 1 G, S1E | 115 | Mackay et al., 2012 |
| DGRP 703 | BDSC 28218 | 1E, 1 G, S1E | 48 | Mackay et al., 2012 |
| DGRP 796 | BDSC 28233 | 1E, 1 G, S1E | 140 | Mackay et al., 2012 |
| DGRP 819 | BDSC 28242 | 1E, 1 G, S1E | 145 | Mackay et al., 2012 |
| DGRP 907 | BDSC 28262 | 1E, 1 G, S1E | 141 | Mackay et al., 2012 |
| Isod1 (Oregon R) | Clandinin Lab | 1H-I S(H-M) | 192 each (1 H: AMW, 5HTP, Control), 98 (1I: Control) | Silies et al., 2013 |
| trhn | This study | 1I, S1 G,K-M | 98 | |
| GS01997 | BDSC 91886 | |||
| Act-Cas9 | BDSC 54590 |
Continuous circling experiments
For continuous circling experiments, circular arenas were fabricated from three layers of laser-cut acrylic (floor, wall, and lid-holder layers) (Werkhoven et al., 2021). Lids were cut from 3-mm-thick clear acrylic. Wall layers were made from black acrylic and defined arenas of radius 28 mm and depth of either 1.6 mm or 10 mm. The latter arenas were filled with standard fly food until 1.6 mm of clearance remained. Flies were anesthetized by CO2 and loaded singly into arenas, allowing 30 min of acclimation post-anesthetization. Transparent lids coated in sigmacote (Sigma-Aldrich) were placed on top of arenas to prevent fly escape and ceiling walking. Flies were recorded using a PointGrey Blackfly BFLY-PGE 12A2M camera at 30 frames per second for up to 14 days: either twice daily for 2 hr per session, or continuously for 24 hr. In the former experiment, fly identity was maintained between sessions by individual storage as described above. In the continuous experiment, flies were transferred to arenas with fresh food after anesthetization with CO2. In 2 hr experiments, flies were given 30 min to recover before experiments. We used MARGO (Werkhoven et al., 2019) to record fly centroids in real time. All assays were conducted under 12:12 hr light and dark cycle conditions (9 AM:9 PM).
Power spectra were calculated using Lomb-Scargle periodograms (VanderPlas and Ivezic´, 2015) to accommodate gaps in data due to lack of fly activity and periods when behavior was not recorded. Daily low-pass filtered data (Figure 1B) were created using a Blackman filter (Blackman and Tukey, 1958) with a window size of 51 hr, omitting missing data.
Y-maze experiments
Y maze experiments were performed as described previously (Buchanan et al., 2015; Werkhoven et al., 2019). Briefly, flies were loaded individually into symmetrical y-maze arenas and their centroid locations were tracked using MARGO (Werkhoven et al., 2019), which detected each turn (moving from one arm of the y-maze to another) and calculated the fraction of right turns. All experiments were performed in white LED light in order to increase the activity of flies during the flies’ subjective day photoperiod. Flies were anesthetized with CO2 prior to loading into arenas; flies were allowed to acclimate for 20 min in the arenas prior to the beginning of the experiment. Handedness was computed based on the turns made in a 2-hr period each day; turns were scored based on the decision made each time the fly entered the center of the y-maze. Flies were cold-anesthetized for removal from the arenas, and identity was maintained as described above.
Bayesian inference
Estimates for , , and were generated using MCMC sampling in STAN 2.35 (Carpenter et al., 2017) according to the model in Figure 1F. Weakly informative priors were used as follows: =Inverse Gamma(=3, =1); =Inverse Gamma(=3, =1); =Normal(µ=0, =10) =Normal(µ=0, =10). MCMC was performed with four chains, with the first 1000 draws discarded, posteriors were determined based on the subsequent 2000 draws. Inferred posteriors were robust to the choice of weakly informative priors.
Q values in 1 H,I were estimated based on the minimum posterior probability of the measured parameter having a difference of zero or less relative to the observed relationships based on the MCMC draws in STAN. In the case where the full simulated distribution had no overlap (Figure 1H, Phi), q values were given as q<1e-7.
Pharmacology
For experiments where flies were treated with aMW, flies were collected as pupae and allowed to eclose on either treated or untreated food. Food was prepared and concentrations chosen based on previous reports (Kain et al., 2012; Dierick and Greenspan, 2007). For the aMW condition, aMW was added at a concentration of 20 mM with ascorbic acid used as a stabilizer (25 mg of ascorbic acid for every 100 mL of fly food). For the 5-HTP condition, 5-HTP was added at a concentration of 50 mM. Experiments (and corresponding control flies) were limited to flies who were at least 4 days post-eclosion at the start of the first timepoint. Food was replaced weekly.
Generation of trhn mutant
To generate a trhn mutant in a defined genetic background, we used in vivo CRISPR (Zirin et al., 2020) to create trhn mutants in the Isod1 background (an isogenized Oregon-R derivative; Silies et al., 2013). Briefly, Act-Cas9; Bl/CyO; TM2/TM6b flies were crossed to y/Y;U6-sgRNA flies (BDSC 91886) to produce +/y; +/CyO;trhn/Tm6B flies. Mutations were verified via Sanger sequencing to generate a frame shift mutation at the targeted site, which were crossed back to +(Isod1);+(Isod1);Tm2/TM6b flies for multiple generations to produce +(Isod1);+(Isod1);trhn flies, where all chromosomes except for the third chromosome (with the null mutant trh) were identical to IsoD1 controls. Putative mutant lines were genotyped via Sanger sequencing; trhn lines used in this study were selected based on verification that non-homologous end joining induced a frame-shift mutation at the targeted point.
Simulations
Simulations were implemented in Python 3 based on the model described in Figure 2a. All scripts are available at http://lab.debivort.org/drift-in-individual-preference/ and at https://zenodo.org/doi/10.5281/zenodo.13698148 and https://github.com/Maloney-Lab/Drift-in-Individual-Preference copy archived at Maloney, 2026. Changes in population were evaluated at steps corresponding to one day, and continuous distributions of preference were approximated with 200 preference bins ranging from an arbitrary scaling of -1 to 1. Variations in the amount of daily drift (), dispersion of initial preferences (), the bounding envelope (), the size of fluctuations in the environment (), and the width of the environmental filter () are all calculated on this [-1,1] range. Flies were assumed to have a maximum lifespan of 10 days plus twice the age of reproductive maturity for computational efficiency. Increasing maximum lifespan past this point did not quantitatively change the results of the simulations. Results for most simulations presented in the manuscript are available at the above URLs. For some results, only the environments are provided for space reasons, as the simulation is deterministic and can be rerun.
Environmental time-series () were created by generating random white noise time series and band-pass filtering them to the specified frequency bands in Python using the np.fft library. Resulting filtered time series were normalized to have a mean of zero and a standard deviation of .
Detailed parameters of simulations used in figures are shown in Table 2.
Model parameters.
| Figure | et (Environment series) | et scaling time | σe | σD | σB | σmax | amin | β (Birth Rate) | Sim. length (days) |
|---|---|---|---|---|---|---|---|---|---|
| Figure 2C-2, Figure 3—figure supplement 1 | Temporally filtered white noise | 0.3 | 0.125 | 0–3 | 0–3 | 3 | 10 | 40 | 100 |
| Figure 2E | Temporally filtered white noise | 0.3 | 0.125 | 0–3 | 0–3 | 3 | 10 | 40 | 100 |
| Figure 2F | Temporally filtered white noise | 0.3 | 0.125 | 0–3 | 0–3 | 3 | 10 | 40 | 100 |
| Figure 3A,C | Temporally filtered white noise | 0–3 | 0.125 | 0–0.05 | 0–0.01 | 3 | 10 | 40 | 1001 |
| Figure 3B,D | Temporally filtered white noise | 0.3 | 0.125 | 0–0.05 | 0–0.01 | 3 | 2–72 | 40 | 1001 |
| Figure 4A | RH, Arikarree River (NEON) | 0.1, 0.3 | 0.125 | 0–0.1 | 0–0.1 | 3 | 10, 60, 360 | 40 | 1001 |
| Figure 4B | Avg. Temp, Longreach AU (NOAA) | 0.1, 0.3 | 0.125 | 0–0.1 | 0–0.1 | 3 | 10, 60, 360 | 40 | 1001 |
| Figure 4C-G, Figure 3—figure supplement 1A | NOAA/NEON | 0.2 | 0.125 | 0–0.1 | 0–0.5 | 3 | 10 | 40 | 1001 |
| Figure 3—figure supplement 1B-C | Temporally filtered white Noise | 0.3 | 0.125 | 0–0.1 | 0–0.1 | 3 | 2–1024 | 40 | 1001 |
| Figure 4—figure supplement 1B,D | NOAA/NEON | 0.1, 0.2, 0.3 | 0.125 | 0–3 | 0–3 | 3 | 10, 60, 360 | 40 | 1001 |
Real-world data collection
Real-world time series with 1-day (or better) resolution were collected from the Global Historical Climatology Network daily (GHCNd) and National Ecological Observatory Network (NEON) datasets. The GHCNd that is produced by the National Oceanic and Atmospheric Association (NOAA; Menne et al., 2012). Timeseries were collected from available stations across the world from 1998 to 2018. We also used data from the National Ecological Observatory Network (NEON, 2022), National Ecological Observatory Network (NEON). Data was accessed using the neonUtilities package (Lunch et al., 2024; see Table 3).
List of NEON datasets used.
| Product ID / DOI / data product name | Site IDs | Dates / date accessed |
|---|---|---|
| DP1.20217.001 https://doi.org/10.48443/br51-rd19 Temperature of groundwater | WLOU, WALK, TOOK, TOMB, SYCA, SUGG, REDB, PRPO, PRLA, PRIN, POSE, OKSR, MCDI, MAYF, MART, LIRO, LEWI, KING, HOPB, GUIL, FLNT, CRAM, COMO, CARI, BLWA, BLUE, BLDE, BIGC, BARC, ARIK | 2016-03-04 to 2022-04-30 DA: 06/28/2022 |
| DP1.00024.001 https://doi.org/10.48443/51ss-fm81 Photosynthetically active radiation (PAR) | WLOU, WALK, TOOK, TOMB, TECR, SYCA, SUGG, REDB, PRPO, PRLA, PRIN, POSE, OKSR, MCRA, MCDI, MAYF, MART, LIRO, LEWI, LECO, KING, HOPB, GUIL, FLNT, CUPE, CRAM, COMO, CARI, BLWA, BLUE, BLDE, BIGC, BARC, ARIK | 2016-03-04 to 2022-03-31 DA: 05/04/2022 |
| DP1.20261.001 https://doi.org/10.48443/jnwy-xy08 Photosynthetically active radiation below water surface | TOOK, TOMB, SUGG, PRPO, PRLA, LIRO, FLNT, CRAM, BLWA, BARC | 2017-07-28 to 2022-03-31 DA: 05/04/2022 |
| DP1.00004.001 https://doi.org/10.48443/rt4v-kz04 Barometric pressure | YELL, WREF, WOOD, WALK, UNDE, UKFS, TREE, TOOL, TOOK, TECR, TEAK, TALL, SYCA, SUGG, STER, STEI, SRER, SOAP, SJER, SERC, SCBI, RMNP, REDB, PUUM, PRPO, PRLA, PRIN, POSE, OSBS, ORNL, ONAQ, OKSR, OAES, NOGP, NIWO, MOAB, MLBS, MCRA, MCDI, MAYF, MART, LIRO, LEWI, LENO, LECO, LAJA, KONZ, KONA, KING, JORN, JERC, HOPB, HEAL, HARV, GUIL, GUAN, GRSM, FLNT, DSNY, DELA, DEJU, DCFS, CUPE, CRAM, CPER, COMO, CLBJ, CARI, BONA, BLUE, BLDE, BLAN, BIGC, BART, BARR, BARC, ARIK, ABBY | 2013-09-12 to 2022-01-31 DA: 03/13/2022 |
| DP1.00098.001 https://doi.org/10.48443/k9vk-5k27 Relative humidity | ABBY, ARIK, BARC, BARR, BART, BIGC, BLAN, BLDE, BLUE, BONA, CARI, CLBJ, COMO, CPER, CRAM, CUPE, DCFS, DEJU, DELA, DSNY, FLNT, GRSM, GUAN, GUIL, HARV, HEAL, HOPB, JERC, JORN, KING, KONA, KONZ, LAJA, LECO, LENO, LEWI, LIRO, MART, MAYF, MCDI, MCRA, MLBS, MOAB, NIWO, NOGP, OAES, OKSR, ONAQ, ORNL, OSBS, POSE, PRIN, PRLA, PRPO, PUUM, REDB, RMNP, SCBI, SERC, SJER, SOAP, SRER, STEI, STER, SUGG, SYCA, TALL, TEAK, TECR, TOOK, TOOL, TREE, UKFS, UNDE, WALK, WLOU, WOOD, WREF, YELL | 2013-09-12 to 2022-02-28 DA: 03/14/2022 |
| DP1.00023.001 https://doi.org/10.48443/9qpc-5v70 Shortwave and longwave radiation (net radiometer) | BART, UKFS, TALL, YELL, WREF, WOOD, WLOU, WALK, UNDE, TREE, TOOL, TOOK, TECR, TEAK, SYCA, SUGG, STEI, SRER, SOAP, SJER, SERC, SCBI, RMNP, REDB, PUUM, PRPO, PRLA, PRIN, POSE, OSBS, ORNL, ONAQ, OKSR, OAES, NOGP, NIWO, MOAB, MLBS, MCRA, MCDI, MAYF, MART, LIRO, LEWI, LENO, LECO, LAJA, KONZ, KONA, KING, JORN, JERC, HOPB, HEAL, HARV, GUIL, GUAN, GRSM, FLNT, DSNY, DELA, DEJU, DCFS, CUPE, CRAM, CPER, COMO, CLBJ, CARI, BONA, BLUE, BLDE, BLAN, BIGC, BARR, BARC, ARIK, ABBY | 2013-09-12 to 2022-05-31 DA: 06/07/2022 |
| DP1.00005.001 https://doi.org/10.48443/jqb2-vy96 IR biological temperature | YELL, WREF, WOOD, UNDE, UKFS, TREE, TOOL, TEAK, TALL, STER, STEI, SRER, SOAP, SJER, SERC, SCBI, RMNP, PUUM, OSBS, ORNL, ONAQ, OAES, NOGP, NIWO, MOAB, MLBS, LENO, LAJA, KONZ, KONA, JORN, JERC, HEAL, HARV, GUAN, GRSM, DSNY, DELA, DEJU, DCFS, CPER, CLBJ, BONA, BLAN, BART, BARR | 2013-09-12 to 2022-01-31 DA: 03/14/2022 |
| DP1.20288.001 https://doi.org/10.48443/t7rj-pk25 Water quality | TOOK, TOMB, SUGG, PRPO, PRLA, LIRO, FLNT, CRAM, BLWA, BARC, ARIK, MART, WALK, TECR, SYCA, REDB, PRIN, POSE, OKSR, MCRA, MCDI, MAYF, WLOU, LEWI, LECO, KING, HOPB, GUIL, CUPE, COMO, CARI, BLUE, BLDE, BIGC | 2014-01-11 to 2022-03-16 DA: 05/04/2022 |
Time series used to run simulations were selected based on having at least 1000 days of continuous data with no gaps larger than 5 days: gaps were filled via linear interpolation. Time series with sampling more often than once per day were used to create average, maximum, and minimum daily value time series. Starting dates for sampled time series were chosen randomly among possible dates that met the above criteria such that no data point was used more than once. Due to the heterogeneous nature of the observation sites with respect to time active, available sensors, and data quality, most data types were only available at a subset of sites.
Average Power Spectral Density in Figure 4—figure supplement 1C was calculated via Lomb-Scargle and averaged across all available time series.
Appendix 1
Proof of optimal rate of switching phenotypes for two-state model
Consider a population facing the possibility of a shift in the environment with a probability . Each individual can choose to adopt a behavioral phenotype, a new behavioral phenotype, or stick with its current phenotype. If the phenotype that it chooses does not match the forthcoming environment, it will die. Otherwise, it will survive and reproduce with rate . Evolution will maximize the long-term geometric growth rate.
Proposition 1
In the case of two environments, the optimal fraction of progeny to shift to a phenotype adaptive to the different environment () is equal to the probability of the environment changing to the other state ().
Proof
The total change in population , conditional on whether the environment shifts or stays, depends on the fraction of animals that shift or stay in their behavioral phenotype.
Since population growth is multiplicative, the long-term change in population over generations, of which have a change in the environment and have no change is given by:
and the long-term geometric average growth rate as
In the limit of large ,
We can then write in terms of and :
and the logarithm of average growth becomes
We can find the value of where is maximized by taking the partial derivative of with respect to to get
which equals zero when . As , the second derivative is negative for all values of and , thus maximizes .
Proof of optimal distribution of phenotypes for discrete states
Consider the discrete-time stochastic process as a simple model of some fluctuating environmental signal. For the moment, we assume a finite set of possible environmental states. Further, we suppose that the process is strictly stationary, so that all can be regarded as i.i.d. draws from the same categorical distribution over environmental states .
Suppose that an organism expresses exactly one phenotype from birth, according to the categorical distribution over phenotypes . Let be the fitness of phenotype under environmental state , that is the subpopulation expressing phenotype will grow by a factor of during generation . After generations (and assuming that the population size is so large as to be infinitely divisible), the total population will have changed by a factor of
Diagonal fitness
Suppose that the fitness matrix is diagonal (), and, for simplicity, square (), so that only phenotype has nonzero fitness in a given environment . We then have
Kelly, 1956 made the following crucial observation:
Proposition 2 (Kelly)
The phenotype distribution that maximizes the expected population fold change over a single generation is simply , where .
In other words, the strategy that maximizes the expected population increase over any finite time horizon is for all individuals to express the unique phenotype adapted to the maximally likely environment. This strategy will result in certain extinction as soon as a different environment occurs, which will happen almost surely in the limit that . For this reason, Kelly introduced an alternative measure of population fitness: namely, the time-averaged exponent of growth Kelly, 1956.
Definition 1
We define the asymptotic growth rate to be
and we say that any phenotype distribution that maximizes is Kelly-optimal.
The following theorem due to Breiman, 1961 justifies the use of the Kelly criterion.
Theorem 1 (Breiman)
A Kelly-optimal phenotype distribution is superior to all other betting strategies in two senses:
The growth rate of a Kelly-optimal strategy asymptotically dominates that of any other strategy almost surely.
A Kelly-optimal strategy minimizes the expected time for the population size to increase by an arbitrarily large amount.
Proposition 3
The Kelly-optimal phenotype distribution for the case of a diagonal fitness matrix is , independent of .
Proof
Using the law of large numbers, we can replace the time average in (3) by an expected value:
Which can be rearranged as follows:
These three terms are the expected value of , the negative entropy of , and the Kullback–Leibler divergence of from , respectively. Only the third term depends on the phenotype distribution . Since , with equality if and only if , is maximized when .
The expression for given in (8) has a very intuitive interpretation. To see this, we note that the first term is simply the asymptotic growth rate for a population whose members all perfectly match the environment at every generation. However, a population will in general do worse than this upper bound for two reasons: (1) the intrinsic unpredictability of the environment (reflected by a penalty of magnitude , the entropy of the environment), and (2) incomplete knowledge of the true environmental distribution (reflected by a penalty of magnitude , the K–L divergence between the phenotype and environment distributions).
Yet another way of understanding the intuition behind Proposition 3 is motivated by considering the worst-case value of under the Kelly-optimal phenotype distribution: that is by minimizing w.r.t. the environment distribution . Using a Lagrange multiplier to enforce the normalization of , one obtains
where is a normalizing constant. Evidently, the asymptotic growth rate is minimized when the probability of a given environment is inversely proportional to the fitness of the matching phenotype, so that the organism thrives only in low-probability environments. Using (9), we may then rewrite (8) in the form
Thus, the fitness achieved by an organism reflects two opposing K-L divergences corresponding to how far the environmental distribution is from one that minimizes the Kelly-optimal growth rate () and how far the environmental distribution is from the organisms’ phenotypic distribution (). By analogy, fitness depends on the respective degrees to which an organism and its ‘antagonists’ (i.e. the forces that conspire to determine the fitness landscape ) are maximally informed about the distribution of environmental states. In the case that , the overall growth rate is positive exactly when the organism ‘knows’ more about the environment than the antagonists, in the sense that the environment distribution more closely matches the organism’s phenotype distribution than it does the inverse fitness landscape. Moreover, we may regard the term as a measure of ‘excess fitness’, or the degree to which the environment overall is biased in favor of the organism: if it is negative (), then the organism has to do better than the antagonists just to break even (i.e. to achieve ), while if it is positive (), then the organism can still achieve net positive growth even under the worst-case scenario that .
Constant baseline fitness
Suppose that , corresponding to the case of a fitness matrix of the form
where is the (small) baseline fitness in the case of a phenotype–environment mismatch. The asymptotic growth rate is then given by
Claim 1
To leading order in , the Kelly-optimal phenotype distribution in the case of constant baseline fitness is given by
where as above.
Proof
We seek a first-order solution to the following constrained optimization problem:
Applying the method of Lagrange multipliers to the Lagrangian function
we obtain the following set of equations:
Linearizing (Equation 18) yields
which we may solve to obtain
We reject the solution on grounds of non-normalizability. Plugging into (19) then yields
from which it follows that
as desired.
As expected, this asymptotic solution reduces to that of Proposition 3 in the limit of . However, at finite , we find that the optimal probability allocated to phenotype is now reduced by an amount inversely proportional to that phenotype’s on-diagonal fitness . Thus, unlike in the fully diagonal case, the optimal phenotype distribution under an assumption of nonzero baseline fitness depends on the precise fitness landscape. In particular, relatively low-fitness phenotypes should now occur less frequently than their matching environments. The corresponding Kelly-optimal growth rate is
where is the optimal growth rate (Equation 10) in the case of purely diagonal fitness.
A continuum of states
We consider the case in which the state space is uncountably infinite, indexed by a single scalar , so that the environment becomes a real-valued (though still discrete-time and stationary) stochastic process. We assume that the phenotype space is continuous and isomorphic to , such that it, too, can be indexed by . Then the categorical distributions and of environments and phenotypes, respectively, become density functions and . Likewise, the fitness matrix becomes a continuous function whose bandwidth controls the ‘sharpness’ or ‘fuzziness’ of the correspondence between environmental states and phenotypes. By analogy to Equation 1, we have
where are i.i.d. samples from the distribution with density . One possible form of is proportional to a Gaussian with standard deviation centered at :
When is small, we may use Laplace’s method (equivalent to considering the limit ) to write
We have thus reduced the problem to the discrete case of (2) treated above, so that the analogue of Proposition 3 follows trivially.
Claim 2
For small, the phenotype distribution that maximizes the asymptotic growth rate is just , independent of the fitness landscape .
Data availability
All raw data, data acquisition software, and analysis scripts areavailableare available at http://lab.debivort.org/drift-in-individual-preference/ and https://zenodo.org/doi/10.5281/zenodo.13698148. Analysis scripts are available at https://github.com/Maloney-Lab/Drift-in-Individual-Preference (copy archived at Maloney, 2026). National Ecological Observatory Network (NEON) datasets used are listed in Table 3.
-
ZenodoData and Analysis Scripts for "Drift in Individual Behavioral Phenotype as a Strategy for Unpredictable Worlds".https://doi.org/10.5281/zenodo.13698148
References
-
The effect of environmental enrichment on behavioral variability depends on genotype, behavior, and type of enrichmentThe Journal of Experimental Biology 222:jeb202234.https://doi.org/10.1242/jeb.202234
-
The measurement of power spectra from the point of view of communications engineering — Part IThe Bell System Technical Journal 37:185–282.https://doi.org/10.1002/j.1538-7305.1958.tb03874.x
-
Optimal gambling systems for favorable gamesThe Kelly Capital Growth Investment Criterion 1:47–60.https://doi.org/10.1142/9789814293501_0005
-
ConferenceOptimal gambling systems for favorable gamesBerkeley Symposium on Mathematical Statistics and Probability.https://doi.org/10.21236/ad0402290
-
Stan: a probabilistic programming languageJournal of Statistical Software 76:1.https://doi.org/10.18637/jss.v076.i01
-
Optimizing reproduction in a randomly varying environmentJournal of Theoretical Biology 12:119–129.https://doi.org/10.1016/0022-5193(66)90188-3
-
Precise quantification of behavioral individuality from 80 million decisions across 183,000 fliesFrontiers in Behavioral Neuroscience 16:836626.https://doi.org/10.3389/fnbeh.2022.836626
-
Stochasticity, individuality and behaviorCurrent Biology 28:R8–R12.https://doi.org/10.1016/j.cub.2017.11.058
-
Risk-spreading and bet-hedging in insect population biologyAnnual Review of Entomology 44:535–560.https://doi.org/10.1146/annurev.ento.44.1.535
-
Variability in thermal and phototactic preferences in Drosophila may reflect an adaptive bet-hedging strategyEvolution; International Journal of Organic Evolution 69:3171–3185.https://doi.org/10.1111/evo.12813
-
A new interpretation of information rateBell System Technical Journal 35:917–926.https://doi.org/10.1002/j.1538-7305.1956.tb03809.x
-
Serotoninergic modulation of phototactic variability underpins a bet-hedging strategy in Drosophila melanogasterFrontiers in Behavioral Neuroscience 15:659331.https://doi.org/10.3389/fnbeh.2021.659331
-
The emergence and development of behavioral individuality in clonal fishNature Communications 13:6419.https://doi.org/10.1038/s41467-022-34113-y
-
Neuromodulation and IndividualityFrontiers in Behavioral Neuroscience 15:777873.https://doi.org/10.3389/fnbeh.2021.777873
-
SoftwareDrift-in-individual-preference, version swh:1:rev:2ddc250d670e0e58d022ab406c3b363cea2eb1e1Software Heritage.
-
When sensing is gambling: An experimental system reveals how plasticity can generate tunable bet-hedging strategiesEvolution; International Journal of Organic Evolution 71:859–871.https://doi.org/10.1111/evo.13199
-
An overview of the global historical climatology network-daily databaseJournal of Atmospheric and Oceanic Technology 29:897–910.https://doi.org/10.1175/JTECH-D-11-00103.1
-
Bet-hedging in stochastically switching environmentsJournal of Theoretical Biology 336:144–157.https://doi.org/10.1016/j.jtbi.2013.07.017
-
Rapid effects of selection on brain-wide activity and behaviorCurrent Biology 30:3647–3656.https://doi.org/10.1016/j.cub.2020.06.086
-
Population genomic time series data of a natural population suggests adaptive tracking of fluctuating environmental changesIntegrative and Comparative Biology 62:1812–1826.https://doi.org/10.1093/icb/icac098
-
The genetics of human personalityGenes, Brain, and Behavior 17:e12439.https://doi.org/10.1111/gbb.12439
-
Modes of response to environmental change and the elusive empirical evidence for bet hedgingProceedings. Biological Sciences 278:1601–1609.https://doi.org/10.1098/rspb.2011.0176
-
Idiosyncratic learning performance in fliesBiology Letters 18:20210424.https://doi.org/10.1098/rsbl.2021.0424
-
Bet-hedging--a triple trade-off between means, variances and correlationsBiological Reviews of the Cambridge Philosophical Society 87:742–755.https://doi.org/10.1111/j.1469-185X.2012.00225.x
-
Adaptive bet-hedging revisited: considerations of risk and time horizonBulletin of Mathematical Biology 82:50.https://doi.org/10.1007/s11538-020-00729-8
-
Periodograms for multiband astronomical time seriesThe Astrophysical Journal 812:18.https://doi.org/10.1088/0004-637X/812/1/18
-
Bet hedging against demographic fluctuationsPhysical Review Letters 119:108103.https://doi.org/10.1103/PhysRevLett.119.108103
Article and author information
Author details
Funding
National Institute of Neurological Disorders and Stroke (R01NS121874-01)
- Benjamin L de Bivort
Harvard Brain Institute (Postdoctoral Pioneers Award)
- Ryan T Maloney
The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Acknowledgements
We thank M Miyagi, S Lavopulo, S Lall, D Lavrentovich, and other members of the de Bivort lab for helpful comments on this manuscript. This work was funded by NIH R01NS121874-01 to BdB and a Harvard Brain Institute Postdoctoral Pioneers grant to RM.
Ethics
This study was exempt from review by the institutional IACUC committee as all work was done in the invertebrate Drosophila melanogaster.
Version history
- Preprint posted:
- Sent for peer review:
- Reviewed Preprint version 1:
- Reviewed Preprint version 2:
- Version of Record published:
Cite all versions
You can cite all versions using the DOI https://doi.org/10.7554/eLife.103585. This DOI represents all versions, and will always resolve to the latest one.
Copyright
© 2024, Maloney et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics
-
- 1,102
- views
-
- 54
- downloads
-
- 3
- citations
Views, downloads and citations are aggregated across all versions of this paper published by eLife.
Citations by DOI
-
- 1
- citation for umbrella DOI https://doi.org/10.7554/eLife.103585
-
- 2
- citations for Reviewed Preprint v1 https://doi.org/10.7554/eLife.103585.1