06: Phase Transition Boundary Analysis

Central Scientific Question: The Basener-Sanford extended Fisher's Theorem predicts that population fitness changes according to d(m-bar)/dt = Var(m) + mu * E_g[s] * b-bar. When the mutational drag term (mu * |E_g[s]| * b-bar) exceeds the selective variance (Var(m)), the population enters irreversible decline. This notebook maps the exact boundary in parameter space where these two forces balance — the computational analog of the error threshold from quasispecies theory. For what combinations of mutation rate and distribution of fitness effects does selection maintain fitness, and where does mutational meltdown begin?

Background: The Error Threshold

The concept of an error threshold originates from Eigen's (1971) quasispecies theory for molecular evolution: there exists a maximum mutation rate above which selection can no longer maintain genetic information. Below this threshold, a population clusters around a well-adapted "master sequence"; above it, the population disperses into a random cloud of genotypes — a phenomenon sometimes called "error catastrophe."

Basener and Sanford (2018, Section 2.2) connect this concept to their extended Fisher's Theorem. In their framework, the error threshold is "the mutation rate separating adaptation from failure to adapt." The critical condition is:

Var(m) = mu * |E_g[s]| * b-bar

When the left side (selective force) exceeds the right side (mutational drag), the population adapts. When the right side dominates, mutations accumulate faster than selection can remove them, and the population enters what Lynch and Gabriel (1990) described as three successive phases: rare mutation accumulation, accelerating decline, and eventual meltdown. This notebook maps the surface in parameter space where the transition occurs, determines whether it is sharp or gradual, and identifies which parameters most strongly control it.

What is a GP Surrogate? (For Biologists)

A Gaussian Process (GP) is a statistical interpolation method. Think of it as fitting a smooth surface through scattered data points — like drawing a topographic map from elevation measurements taken at specific locations.

We run stochastic simulations at 625 grid points (25 x 25), and each simulation tells us whether that parameter combination leads to adaptation or meltdown. The GP then fills in the gaps between these points with smooth predictions. Crucially, the GP also reports how uncertain each prediction is: confident where data points are dense and consistent, uncertain where they are sparse or noisy.

The GP uncertainty map tells us where we would need to run more simulations to improve our boundary estimate — this is analogous to knowing where to focus additional field experiments. High uncertainty near the phase boundary means the transition is hard to pin down precisely, which is itself biologically informative.

1. Raw Simulation Grid

Raw simulation grid scan
Figure 1: Direct simulation scan over mutation rate (mu) vs. DFE scale (gamma_scale) — a 2D slice through the Basener-Sanford critical condition.

A 25 x 25 grid with 5 stochastic replicates per point (3,125 simulations total). Each simulation runs the full stochastic mutation-selection model for 200 generations, starting from identical initial conditions, and measures the net change in mean population fitness.

Left panel — Net fitness change: Blue regions indicate parameter combinations where the selective variance Var(m) exceeds the mutational drag mu * |E_g[s]| * b-bar, so mean fitness increases over 200 generations. Red regions indicate the opposite: mutational drag dominates, and fitness declines. The black contour at zero is the empirical phase boundary — the error threshold. Points on this contour represent the exact parameter combinations where the two forces in the Basener-Sanford theorem are balanced.

Right panel — Discrete regime classification: Each grid point is classified into one of three regimes corresponding to the phases described by Lynch and Gabriel (1990). Green = selection dominates (fitness increasing, the population adapts successfully). Yellow = approximate balance (the two forces nearly cancel, producing slow or ambiguous fitness change). Red = mutational meltdown (fitness declining, deleterious mutations accumulating irreversibly via Muller's ratchet).

Key observation: The transition from green to red is sharp — there is very little yellow "balance" zone. This indicates a genuine phase transition, not a gradual shift. Populations do not slowly slide from adaptation to decline; instead, there is a well-defined threshold above which the system tips decisively into meltdown. This sharpness validates the theorem's prediction that the sign of the combined mutational term determines the qualitative evolutionary outcome.

2. GP Surrogate Model

GP surrogate model
Figure 2: Gaussian Process interpolation of the simulation grid — smooth boundary with uncertainty quantification.

The GP surrogate transforms the discrete 625-point grid into a continuous 100 x 100 map, enabling precise localization of the phase boundary and honest reporting of prediction confidence.

Left panel — GP mean prediction: The smooth, continuous version of Figure 1's fitness change heatmap. The GP has interpolated between the 625 training points, removing grid artifacts and revealing the true shape of the boundary curve (black contour). Compare to Figure 1: the overall structure is preserved, but the contour is now smooth rather than jagged, giving a much more precise estimate of the error threshold's location in parameter space.

Center panel — GP predictive uncertainty (standard deviation): This is one of the most valuable outputs for experimental design. The color scale (viridis: dark = low uncertainty, bright = high uncertainty) shows where the GP is most and least confident. Uncertainty is lowest far from the boundary, where the outcome is clearly adaptation or clearly meltdown and interpolation is straightforward. Uncertainty is highest near the phase boundary itself — exactly where the outcome is most sensitive to small parameter changes and where stochastic variation between replicates is largest. The white dashed contour overlays the boundary for reference. If we wanted to refine our boundary estimate (a Bayesian active learning approach), we would run additional simulations in the high-uncertainty (bright) regions near the boundary.

Right panel — Probabilistic regime classification: Unlike Figure 1's hard classification (each point assigned definitively to green/yellow/red), the GP classifier assigns probabilities to each regime at every point. Far from the boundary, the GP is nearly certain (pure green or pure red). In the transition zone, the GP predicts a mixture — for example, 60% probability of meltdown and 40% probability of selection dominance — shown as blended colors. This probabilistic view is more honest than a hard boundary: it acknowledges that near the phase transition, stochastic fluctuations (genetic drift, lucky beneficial mutations) can tip the outcome either way for any single population.

3. Sensitivity Analysis

Method: One-at-a-time (OAT) sensitivity analysis. Each of five parameters is varied individually across 20 values while all others are held at their defaults. At each value, 10 stochastic replicates measure the net fitness change. The zero-crossing of each curve identifies the critical threshold for that parameter — the value at which the population transitions from adaptation to meltdown, all else being equal.
One-at-a-time sensitivity analysis
Figure 3: Which biological parameters most strongly control the selection/meltdown transition?

Each panel varies one parameter while holding others at default values. The blue curve traces net fitness change; green shading marks the adaptation regime (fitness change > 0), red shading marks the meltdown regime (fitness change < 0). Dotted vertical lines mark the zero-crossing — the critical threshold value for each parameter.

Sensitivity ranking with biological interpretation:

4. Second Boundary: Mutation Rate vs. DFE Shape

Mutation rate vs DFE shape boundary
Figure 4: Phase boundary in mutation rate vs. DFE shape space — how tail heaviness creates escape routes from meltdown.

The DFE shape parameter (gamma_shape) controls the tail heaviness of the distribution of fitness effects. Low values (< 1) produce heavy-tailed distributions where most mutations have very small effects but occasional mutations have very large effects. High values (> 1) concentrate effects near the mean, producing a more uniform distribution with few surprises. This distinction is biologically fundamental: it determines whether evolution is driven primarily by many small mutations or by occasional large ones.

Left panel — GP mean fitness change: The phase boundary (black contour) curves in a biologically meaningful way. At low DFE shape (heavy tails), the population can tolerate higher mutation rates before crossing into meltdown. This is because heavy-tailed DFEs occasionally produce large beneficial mutations that rescue a declining population — a single strongly advantageous mutation can sweep through the population and restore fitness even after many small deleterious mutations have accumulated. At high DFE shape (concentrated effects), all mutations have similar moderate effects, providing no such rescue mechanism. The population is more vulnerable and crosses the error threshold at lower mutation rates.

This curvature connects to Kondrashov's (1995) concept of very slightly deleterious mutations (VSDMs). A heavy-tailed DFE generates many VSDMs (too weak for selection to remove efficiently) alongside occasional large-effect mutations (strong enough for selection to act on decisively). The balance between these two classes of mutation determines whether selection can maintain fitness.

Right panel — GP uncertainty: As in Figure 2, the uncertainty is highest near the phase boundary (bright regions along the white dashed contour), confirming that the transition zone is where predictions are least certain and where additional simulations would be most informative. The curvature of the high-uncertainty band mirrors the curvature of the boundary itself.

Biological Implications

What the boundary analysis tells us

The error threshold is real and sharp. The transition between selection-dominated adaptation and mutational meltdown is not a gradual decline but a genuine phase transition with a well-defined boundary. This validates the central prediction of the Basener-Sanford extended Fisher's Theorem: the sign and magnitude of the mutational effects term determine whether a population thrives or collapses. Populations operating near the boundary are in a precarious state — small changes in mutation rate or DFE parameters can tip them from viability to irreversible decline.

Implications for conservation biology

The sensitivity analysis reveals that mutation rate is the single most important parameter determining a population's vulnerability to meltdown. Conservation biologists should therefore monitor:

How DFE shape creates escape routes from meltdown

The mu vs. gamma_shape boundary (Figure 4) reveals that heavy-tailed DFEs provide a natural buffer against meltdown. Organisms whose DFEs include occasional large-effect beneficial mutations can tolerate higher mutation rates because these rare but potent mutations can sweep through the population and restore fitness. This has several implications:

Connection to Muller's ratchet and Kondrashov's paradox

In the meltdown regime (red regions of our maps), deleterious mutations accumulate irreversibly — this is exactly Muller's ratchet (1964) operating in finite populations. Each "click" of the ratchet removes the least-loaded fitness class from the population, and without recombination or back-mutation, the lost fitness is never recovered. Our phase boundary maps the conditions under which this ratchet engages.

Kondrashov (1995) posed a paradox: given the high genomic deleterious mutation rate observed in many organisms (U > 1 per generation), how do sexual populations avoid mutational meltdown? Our analysis suggests part of the answer lies in the DFE shape: heavy-tailed DFEs, combined with even a small fraction of beneficial mutations, can push the error threshold to higher mutation rates than would be predicted from the mean effect alone. The interplay between DFE shape, beneficial mutation fraction, and mutation rate — all quantified in our sensitivity analysis — determines whether a given organism's mutation rate falls safely below or dangerously near the error threshold.