Learning to generalize in evolution through annealed population heterogeneity
Federica Ferretti, Mehran Kardar, Arvind Murugan · 2025
Read Learning to generalize in evolution through annealed population heterogeneity by Federica Ferretti, Mehran Kardar, Arvind Murugan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-24602.txt.
Introduction
Federica Ferretti, Mehran Kardar, and Arvind Murugan ask how living groups learn to cope with new stress. In their study, each member of a group meets a slightly unlike set of tests over time. That mix, they argue, can push the group toward broad, safe traits.
Their math shows the mix adds a noise term that punishes traits that work in just one test. Tests in code back up the claim and show when the effect holds. The idea may help in work on drug proof pests, farm strain, and shots that must hold up as germs change.
Catalog record
| CREATOR | Federica Ferretti, Mehran Kardar, Arvind Murugan |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 80 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2510-24602
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Learning to generalize in evolution through annealed population heterogeneity Federica Ferretti, Mehran Kardar, Arvind Murugan Abstract Evolutionary systems must learn to generalize, often extrapolating from a limited set of selective conditions to anticipate future environmental changes. The mechanisms enabling such generalization remain poorly understood, despite their importance to predict ecological robustness, drug resistance, or design future-proof vaccination strategies. Here, we demonstrate that annealed population heterogeneity, wherein distinct individuals in the population experience different instances of a complex environment over time, can act as a form of implicit regularization and facilitate evolutionary generalization. Mathematically, annealed heterogeneity introduces a variance-weighted demographic noise term that penalizes across-environment fitness variance and effectively rescales the population size, thereby biasing evolution toward generalist solutions. This process is indeed analogous to a variant of the mini-batching strategy employed in stochastic gradient descent, where an effective multiplicative noise produces an inductive bias by triggering noise-induced transitions. Through numerical simulations and theoretical analysis we discuss the conditions under which variation in how individuals experience environmental selection can naturally promote evolutionary strategies that generalize across environments and anticipate novel challenges. Darwinian evolution operates without foresight or centralized design: it is driven solely by differential survival and reproduction in the environments that populations actually encounter, not by optimization for unseen challenges. Yet evolved populations can sometimes cope with genuinely novel situations, implying that past selection can yield solutions that function beyond prior experience. This observation has motivated a long-standing line of work that frames evolution as a form of learning from examples Valiant 2013 ; Valiant 2009 ; Vanchurin et al. 2022 : populations experience a sequence of environments analogous to training samples, and mutation and selection update the genotype distribution in response. A concrete illustration comes from antibody evolution: during affinity maturation, B-cell lineages encounter a limited panel of antigens, yet the resulting repertoire may bind future variants by leveraging conserved chemical or structural features while ignoring strain-specific decorations. Generalization, in this view, is assessed by performance in a previously unseen context: a population is said to generalize if it achieves high fitness (or binding/neutralization) despite the novelty of the challenge. This analogy sharpens a concrete question: under what conditions does selection on past challenges yield solutions that extrapolate to new ones? In machine learning, success depends on algorithmic choices such as loss functions, regularization, data partitioning, and inductive biases Mehta et al. 2019 ; Kukačka et al. 2017 ; Srivastava et al. 2014 ; LeCun et al. 2012 ; Bengio et al. 2009 . In evolving systems, the corresponding levers are population dynamics and biological context: which regimes of mutation and recombination rates, effective population size and structure, and environmental and biological heterogeneity most reliably promote generalization? Here we analyze when evolutionary population dynamics provide precisely such a bias toward generalization. We study populations in which different individuals simultaneously occupy distinct microenvironments (e.g., spatial niches, host states, physiological contexts), and across generations lineages are reshuffled across these contexts (“annealed” heterogeneity). In this setting, selection is informed not only by average fitness across the distinct challenges in these microenvironments but also by the variability of fitness across them. We show that population heterogeneity in experiencing selection systematically disfavors genotypes with large across-challenge variance, even when they have moderately higher mean fitness, thereby favoring generalist genotypes with more uniform performance. We map parameter regimes, set by heterogeneity, effective population size, and mutation rate, that bias evolution toward generalist solutions. We then adopt a learning-theoretic perspective that clarifies our results: population heterogeneity in exposure to selection is analogous to structured mini-batching in machine learning. Each generation offers side-by-side samples from distinct microenvironments, enabling selection to directly “see” cross-environment fluctuations. The resulting stochastic dynamics act as an implicit regularizer like mini-batching Keskar et al. 2017 ; Sclocchi and Wyart 2024 , penalizing genotypes with high across-environment variance and biasing the system toward invariant, generalist solutions. Conversely, when there is no microenvironmental structure, training proceeds on aggregated data, removing this variance-based signal and encouraging overfitting to idiosyncrasies of the training set. Numerous prior works have studied conditions that favor the evolution of generalists, most often through temporal changes in the external environment Sachdeva et al. 2020 ; Xue et al. 2019 ; Wang and Dai 2019 ; Cvijović et al. 2015 ; Wang et al. 2015 ; Rao and Leibler 2022 . In contrast, our macro-environment is static; population heterogeneity alone generates the fluctuations needed to select for invariants. Beyond explaining when evolution generalizes, our perspective suggests actionable levers, such as controlling within-generation heterogeneity and population structure in laboratory evolution, immunization protocols, or microbial selection schemes, to steer evolving systems toward invariants. More broadly, our work points to a design principle: by shaping how complex environments are experienced across a population, we can make evolution prepare that population for novel unseen challenges. Model We begin with a linear classification toy problem to isolate the core difficulty of generalization and to motivate the structure of the fitness landscapes used later. Consider inputs \mathbf{x}=(x_{0},x_{1},x_{2},x_{3})\in\mathbb{R}^{4} with four features, and consider unit-norm linear classifiers \mathbf{g} with score s(\mathbf{x})=\mathbf{g}\cdot\mathbf{x} . Training examples arrive from two domains D_{1},D_{2} with domain-specific means \mu_{1}=\mathbb{E}[\mathbf{x}\mid D_{1}]=(2,5,0,0) and \mu_{2}=\mathbb{E}[\mathbf{x}\mid D_{2}]=(2,0,5,0) , while the held-out test domain D_{3} has \mu_{3}=\mathbb{E}[\mathbf{x}\mid D_{3}]=(2,0,0,5) . That is, feature x_{0} is weak but invariant across domains; features x_{1},x_{2},x_{3} are stronger but domain-specific. If we pool D_{1} and D_{2} before training, the pooled mean is \bar{\bm{\mu}}=(2,2.5,2.5,0) . Training on the pooled data therefore favors \mathbf{g} aligned with (0,1,1,0) and largely ignores x_{0} . Such a predictor performs well on D_{1},D_{2} but transfers poorly to D_{3} , where the signal has moved to x_{3} . By contrast, a “generalist” predictor aligned with x_{0} , e.g. \mathbf{g}=(1,0,0,0) , attains a smaller average margin on the training domains but a nonzero margin in every domain, because its signal is invariant; its across-domain performance is flatter (lower mean, much lower variance). How can a learning algorithm be biased toward such invariant features when pooled training data provides no preference for x_{0} ? This question does not fit into standard learning frameworks that assume that test data come from the same distribution as training data (empirical risk minimization) Vapnik 2000 . Instead, this setup, where the generalist feature has lower mean performance than specialists in the context of training data, has been studied in learning theory as out-of-domain generalization or as invariant risk minimization Arjovsky et al. 2020 . One established option is to explicitly regularize, e.g., by augmenting the loss function with a penalty on the variation of domain-wise losses Teney et al. 2020 ; Chaudhari et al. 2017 . However, a more intriguing possibility for evolutionary dynamics is an implicit regularization or bias that arises from using only a subset of the data at a time. Such techniques, called mini-batching, refer to drawing small, randomly chosen groups of training examples, instead of the whole dataset, so that each update of the algorithm is based on just this small slice. When stochastic gradient updates use mini-batches drawn from a single domain at a time and alternate domains, the resulting gradient fluctuations push toward parameters that equalize domain-wise performance, selecting a classifier \mathbf{g} that depends on invariant features. In contrast, drawing mini-batches from the pooled