The Basener-Sanford extension of Fisher's Fundamental Theorem tells us that mean fitness changes as:
The first term (fitness variance driving selection) competes with the second term (mutational drag). Whether a population adapts or undergoes mutational meltdown depends on the precise relationship between five key parameters: the mutation rate μ, the shape and scale of the distribution of fitness effects (DFE), the fraction of beneficial mutations, and the environmental noise level.
A simple point estimate ("best fit") for these parameters would not tell us whether the population is definitively in one regime or ambiguously near the boundary. Bayesian inference gives us a full probability distribution over parameter values — a posterior distribution — that quantifies our uncertainty. This lets us ask not just "what are the best-fit parameters?" but "given the data, what is the probability that this population is above or below the meltdown threshold?"
For the Basener-Sanford simulator, there is no formula for the probability of observing particular data given particular parameter values (the "likelihood"). The simulator is a complex stochastic process — you can run it forward, but you cannot write down a closed-form probability for any specific outcome.
Approximate Bayesian Computation (ABC) sidesteps this problem by using simulation as a substitute for the likelihood:
The Sequential Monte Carlo (SMC) refinement runs this in rounds, progressively tightening the acceptance threshold so that accepted parameters converge toward the true posterior distribution.
Analogy: Imagine trying to figure out a cake recipe by repeatedly baking cakes with different ingredient amounts and keeping the recipes that produce cakes most similar to the target. Each round, you become pickier about what counts as "similar enough," until you converge on the range of recipes that could plausibly produce that cake.
This notebook validates the method on synthetic data with known true parameters (μ = 0.1, gamma_shape = 0.5, gamma_scale = 0.003, p_beneficial = 0.005, sigma_env_ind = 0.008), corresponding to a mutational meltdown regime. If ABC-SMC can recover these known parameters, we can trust it on real data. Implementation uses PyMC.