Restructure: descriptive tier and experiment names, paper/manuscript

- paper/pnas -> paper/manuscript (venue-neutral)
- configs/layer1 -> configs/inheritance, src/knowledge -> src/inheritance
  (imported as `inheritance`), make layer1 -> make inheritance; layer2 alias dropped
- inheritance and trained-network bundles named after the manuscript figure
  they feed (fig2_grounding_sweep, figS3_rebaselining, ...), or descriptively
  where they feed none; configs keep their `experiment:` value so parquet
  hashes are unchanged, only output.dir moves
- figure scripts, SI figure sources, notebooks, REPRODUCING.md, README and the
  SI Methods/tables updated; make clean no longer deletes tracked manifests;
  reproduce.sh hashes the s{seed}/ layouts too

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y64o8FKP7rCuXzC48pxpMm
This commit is contained in:
Giorgio Gilestro 2026-09-13 17:00:40 +01:00
parent 84124de143
commit ab3dc10587
240 changed files with 477 additions and 476 deletions

View file

@ -0,0 +1,32 @@
experiment: E1_reproduce_collapse
seed: 20260704
n_replicates: 100
generations: 600
# Null model (blueprint 2.5-E1): no grounding, single teacher, no selection.
# Starting from the truth makes the collapse narrative clean -- the tail is lost first,
# support shrinks to 1, forward-KL diverges, and H decays geometrically at rate 1/n.
# (The decay law E[H_t]=H_0(1-1/n)^t holds from any start; see the validation suite.)
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 1.0e-3
init: truth
dynamics:
n: 100 # distillation sample size = drift strength
teachers: {K_T: 1, rho: 0.0, q: 1.0}
grounding: {m: 0, policy: proportional}
selection: {mode: none, novelty_alpha: 0.0}
remint: {enabled: false, period: null, H_gate: null}
metrics:
kl_floor: 1.0e-9
support_eps: 1.0e-9
# No sweep: a single condition.
output:
dir: results/collapse_null

View file

@ -0,0 +1,36 @@
experiment: E2_grounding_phase_boundary
seed: 20260704
n_replicates: 100
generations: 500 # long enough that the g=0 arm slides toward 0 while g>0 arms plateau
# Headline experiment (blueprint 2.5-E2): sweep the grounding fraction g = m/(n+m);
# single teacher; proportional grounding (Multinomial(m, p*), the immigration model the
# exact H_eq of 2.4-3 is derived for); no selection. R=1 so the sweep tracks the closed
# form. Expect a critical g* << 1 above which stationary H and tail mass stabilise at a
# positive value tracking H_eq = H* * m(2n+m-1)/(n+2nm+m^2), below which they collapse.
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 1.0e-3
init: truth
dynamics:
n: 200
teachers: {K_T: 1, rho: 0.0, q: 1.0}
grounding: {m: 0, policy: proportional} # m is overwritten per g by the sweep
selection: {mode: none, novelty_alpha: 0.0}
remint: {enabled: false, period: null, H_gate: null}
metrics:
kl_floor: 1.0e-9
support_eps: 1.0e-9
sweep:
- param: g
values: [0.0, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.4]
output:
dir: results/fig2_grounding_sweep

View file

@ -0,0 +1,40 @@
experiment: E11
kind: dynamic_society
seed: 20260705
n_replicates: 12
# (The dynamic Lamarckian society — the vertical claim, C3): a finite population of agents (genotypes)
# evolves on a rugged NK fitness landscape that IS reality. The full society composes the four
# operators the whole study built toward — grounding, directed recombination (sex), quality-diversity
# selection, and mutation — and a 4-arm ablation shows each is load-bearing. Grounding is made load-
# bearing via the consensus-conformity (self-consumption) mechanism: selection acts on
# g*true_fitness + (1-g)*conformity, so at g=0 the society optimises agreement with its own majority
# rather than reality and drifts to a fit-looking but actually-poor consensus. Expect: FULL climbs to
# near the global optimum while maintaining diversity longest; NO_GROUNDING collapses to the unfit
# consensus; NO_SEX plateaus (can't recombine to escape local optima); NO_DIVERSITY (greedy) collapses
# diversity fast and stalls at a worse local optimum. Falsifier: an ablation matches the full society,
# or the full society fails to exceed every ablation.
society:
L: 12
K: 8 # landscape ruggedness (epistasis) — rugged enough that diversity + sex matter
N: 60 # population size
g: 0.85 # grounding fraction (overwritten to 0 in the no_grounding arm)
mu: 0.03 # per-locus mutation rate
novelty: 0.5 # quality-diversity weight (0 in the no_diversity/greedy arm)
n_off: 120 # directed-recombination offspring pool per generation
recomb_rate: 0.2 # crossover rate
sex: true # directed recombination on (false in the no_sex arm)
select: qd # quality-diversity survival (greedy in the no_diversity arm)
generations: 80
sweep:
- param: arm
values:
- {name: full, set: {}}
- {name: no_grounding, set: {society.g: 0.0}}
- {name: no_sex, set: {society.sex: false}}
- {name: no_diversity, set: {society.select: greedy, society.novelty: 0.0}}
output: {dir: results/fig4_society_ablation}

View file

@ -0,0 +1,28 @@
experiment: E12
kind: speciation
seed: 12
n_replicates: 15
# E12 — MODEL SPECIATION / reproductive isolation (the merge-compatibility limit of the sexual society).
# The Bateson-Dobzhansky-Muller construction: an ancestor; two lineages each substitute a DISJOINT set
# of loci (each parent adaptive, neither carrying an incompatibility); a fraction `rho` of cross-lineage
# locus pairs are incompatibilities (penalty `s`) that only bite when a recombinant inherits BOTH derived
# alleles. Sweeping the divergence d (total substitutions) gives the predicted signature
# COMPATIBLE -> OUTBREEDING DEPRESSION -> HYBRID INVIABILITY, arriving earlier the denser the epistasis
# (rho), with the Orr-Turelli snowball (# incompatibilities ~ (d/2)^2, so fitness falls super-linearly).
# A merged model is a single recombinant (F2-like: hybrid breakdown / recombination load), so this maps
# to postzygotic isolation, not F1 vigour. Falsifier: no outbreeding-depression/isolation progression as
# d and rho grow. Pure seeded NumPy on the E7-E11 genotype machinery (bitwise-reproducible).
speciation:
landscape: bdm
L: 20
rho: [0.1, 0.25, 0.5] # epistasis DENSITY: fraction of cross-lineage locus pairs that are BDMIs
divergences: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
s: 1.0 # incompatibility penalty per realised BDMI
beta: 1.0 # additive benefit per derived (adaptive) allele — makes parents fit
recomb_rate: 0.5 # free recombination (each locus ~ independent parent)
n_offspring: 500
output:
dir: results/fig5_speciation_bdm

View file

@ -0,0 +1,27 @@
experiment: E9
kind: recomb_landscape
seed: 20260705
n_replicates: 24
# (Landscape robustness / the "why sex?" question — the credibility centerpiece): E8 showed sex wins
# on an ADDITIVE landscape, where recombination trivially helps. Does it survive EPISTASIS? Parents
# are local optima ("trained models") of a Kauffman NK landscape whose ruggedness K (epistatic
# interactions per locus) is swept with the recombination rate. Expect: on smooth/mildly-rugged
# landscapes recombination helps; on rugged ones FREE recombination (rate~0.5) breaks co-adapted
# blocks and offspring fall BELOW the parents (outbreeding depression); and the OPTIMAL recombination
# rate shrinks as ruggedness grows. Design rule: merge freely when skills are complementary/additive;
# merge sparingly when entangled. Falsifier: recombination rate has no effect, or free recombination
# never underperforms the parents on rugged landscapes.
society:
L: 12
n_parents: 6 # trained specialists = local optima of the landscape
pop: 200 # recombinant offspring sampled per (K, rate, replicate)
sweep:
- param: K
values: [0, 2, 4, 6, 8] # landscape ruggedness (epistasis): 0 = additive, high = rugged
- param: rate
values: [0.0, 0.05, 0.1, 0.2, 0.35, 0.5] # clonal -> free recombination
output: {dir: results/figS10_rugged_landscapes}

View file

@ -0,0 +1,27 @@
experiment: E10
kind: directed_sex
seed: 20260705
n_replicates: 24
# (Directed sex beats biological sex — the distinctly-AI superpower): on rugged landscapes, blind
# ("biological") sex suffers outbreeding depression (offspring worse than parents). But an AI can do
# what biology cannot: choose maximally-complementary mates, evaluate MANY recombinant offspring, and
# keep only the fittest, over several rounds (directed sex = iterated recombine-then-select, with no
# two-parent limit). Compare, across ruggedness K: best single parent vs RANDOM sex (blind) vs
# DIRECTED sex. Expect: random sex craters with ruggedness; directed sex avoids the catastrophe and
# matches or exceeds the best parent even when skills are entangled. Falsifier: directed sex does no
# better than random sex, or never recovers the best-parent level on rugged landscapes.
society:
L: 12
n_parents: 6
pop: 200 # offspring evaluated per round (mate choice + offspring selection)
keep: 8 # fittest offspring retained each round
rounds: 5 # rounds of recombine-then-select
rate: 0.2 # directed-sex recombination rate (random-sex uses free rate 0.5)
sweep:
- param: K
values: [2, 4, 6, 8, 10] # landscape ruggedness (all with parent diversity)
output: {dir: results/figS11_directed_recombination}

View file

@ -0,0 +1,39 @@
experiment: E5_qd_vs_greedy
seed: 20260704
n_replicates: 100
generations: 400
# Quality-diversity vs greedy selection (blueprint 2.5-E5). Modest grounding gives a true
# stationary state (so items can be re-introduced); selection then shapes it. Greedy
# (directional, fitness-proportional) drives toward the fittest items -> low H; qd (adds a
# novelty bonus w_i ∝ f_i·p_i^{-alpha}) resists fixation -> higher stationary H. Sweep the
# novelty exponent alpha. Prediction: qd holds higher stationary H (and tail survival)
# than greedy at matched grounding.
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 1.0e-3
init: truth
dynamics:
n: 200
teachers: {K_T: 1, rho: 0.0, q: 1.0}
grounding: {m: 10, policy: proportional} # g ~ 0.048, same for all arms
selection: {mode: none, novelty_alpha: 0.0}
remint: {enabled: false, period: null, H_gate: null}
metrics:
kl_floor: 1.0e-9
support_eps: 1.0e-9
sweep:
- param: dynamics.selection.mode
values: [none, greedy, qd]
- param: dynamics.selection.novelty_alpha
values: [0.5, 1.0, 2.0]
output:
dir: results/figS12_quality_diversity

View file

@ -0,0 +1,34 @@
experiment: E14
kind: mating_system
seed: 20260709
n_replicates: 20
# (Mating systems — monogamy vs promiscuity): a finite population of genotypes evolves on a Kauffman
# NK landscape, recombining sexually, but the MATE-POOL BREADTH is swept. Agents sit on a ring; an
# offspring's second parent is drawn from a window of half-width ~ breadth*N/2 around the focal parent,
# and selection is LOCAL (offspring competes only against the incumbent at its ring position). breadth
# -> 0 is monogamous / structured (local mating, isolation by distance); breadth = 1 is promiscuous /
# panmictic (mate with anyone). Crossed with ruggedness K, this is the mating-system image of the E9
# design rule. Expect: on smooth landscapes (K low) promiscuity maximises the best fitness (spread the
# single good direction fastest); as ruggedness rises the OPTIMAL breadth SHRINKS toward an intermediate
# value (full promiscuity prematurely converges below it); and diversity + occupied local optima are
# monotonically destroyed by breadth at every K, most severely on rugged landscapes. Falsifier: the best
# breadth is independent of K (no crossover), or promiscuity is best at every ruggedness.
mating:
L: 12 # loci (genotype space 2^L)
N: 48 # population size (ring positions)
breadth: 1.0 # mate-pool breadth in [0,1] (overwritten by the sweep)
K: 0 # landscape ruggedness / epistasis (overwritten by the sweep)
recomb_rate: 0.5 # per-gap crossover rate (near-free reassortment within a mating)
mu: 0.003 # per-locus mutation rate
generations: 60
sweep:
- param: mating.K
values: [0, 3, 6, 10]
- param: mating.breadth
values: [0.03, 0.08, 0.17, 0.35, 0.6, 1.0]
output: {dir: results/figS13_mating_breadth}

View file

@ -0,0 +1,29 @@
experiment: kernel_sharpen
kind: lineage
seed: 20260705
n_replicates: 24
# (Learning-kernel bridge, pro-collapse arm): does neutral Wright-Fisher explain the VAE's
# collapse on MNIST? NO -- and that is the point. This matches the MNIST regime (K=30, n=6000,
# Zipf) where drift is nearly inert: neutral (temperature=1.0) barely moves (H stays ~H*, ~all
# modes alive), yet the real VAE collapsed to a SINGLE mode (results/fig2_mnist_collapse). Adding the
# estimator's sharpening / mode-competition (temperature<1: p ~ p^(1/tau)) reproduces the
# catastrophic collapse. tau=0.8 is calibrated to reproduce collapse-to-one-mode. This is the
# axis Riis (2026) names as future work: the estimator, not the sampling, drives VAE collapse.
truth: {K: 30, R: 1, tail: zipf, zipf_s: 1.5, tail_threshold: 0.01, init: truth}
dynamics:
n: 6000 # huge vs K=30 -> neutral drift is essentially inert
grounding: {m: 0, policy: proportional}
kernel: {reset: 0.0, temperature: 1.0, floor: 0.0}
generations: 15
metrics: {kl_floor: 1.0e-9, support_eps: 1.0e-9}
sweep:
- param: dynamics.kernel.temperature
values: [1.0, 0.8] # neutral (no collapse) vs sharpened (catastrophic collapse)
output: {dir: results/figS2_kernel_sharpen}

View file

@ -0,0 +1,32 @@
experiment: kernel_smooth
kind: lineage
seed: 20260705
n_replicates: 24
# (Learning-kernel bridge, anti-collapse arm): neutral Wright-Fisher OVER-predicts the RNN's
# collapse. This matches the RNN grounding regime (K=256, n=200, Zipf): neutral (reset=0) drives
# H all the way to 0, but the real RNN only PARTIALLY collapses -- H plateaus ~0.68 of a possible
# 0.88, forward-KL plateaus ~2 (does not diverge), ~half the tail stays alive (results/figS6_grounding_rnn).
# The estimator's smoothing / regularisation supplies a diversity FLOOR. A mutation-toward-prior
# knob (reset=u: p <- (1-u)p + u*uniform) reproduces the H-floor. reset=0.006 is calibrated to the
# RNN's stationary dry H. Honest caveat carried in the write-up: uniform-mutation matches the
# H-floor but overshoots forward-KL (analytic ~6 vs RNN ~2), evidence the RNN's smoothing target
# is TRUTH-LIKE, not uniform -- a refinement for future work. The sign, though, is unambiguous:
# the estimator here REMOVES collapse pressure (opposite to the VAE's sharpening).
truth: {K: 256, R: 1, tail: zipf, zipf_s: 1.3, tail_threshold: 0.001, init: truth}
dynamics:
n: 200
grounding: {m: 0, policy: proportional}
kernel: {reset: 0.0, temperature: 1.0, floor: 0.0}
generations: 100 # long enough to show neutral -> 0 vs smoothed -> floor clearly
metrics: {kl_floor: 1.0e-9, support_eps: 1.0e-9}
sweep:
- param: dynamics.kernel.reset
values: [0.0, 0.006] # neutral (H -> 0) vs smoothed (H floors, like the RNN)
output: {dir: results/figS2_kernel_smooth}

View file

@ -0,0 +1,46 @@
experiment: E6_remint_gate
seed: 20260704
n_replicates: 100
generations: 400
# Re-minting gate / irreversibility (blueprint 2.5-E6). Re-minting freezes the current
# distribution as the new grounding reference and DISCARDS the original truth. Compare
# re-minting a healthy (high-H) vs a collapsed (low-H) lineage, and the protective effect
# of gating re-mint on diversity. Metric: forward KL to the ORIGINAL truth. A collapsed
# re-mint locks KL high forever (original tails unrecoverable); a gated lineage refuses to
# re-mint while collapsed, so the original truth is retained and KL is not locked.
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 1.0e-3
init: truth
dynamics:
n: 200
teachers: {K_T: 1, rho: 0.0, q: 1.0}
grounding: {m: 3, policy: proportional}
selection: {mode: none, novelty_alpha: 0.0}
remint: {enabled: false, period: 150, H_gate: null}
metrics:
kl_floor: 1.0e-9
support_eps: 1.0e-9
# Arms vary grounding strength (healthy vs collapsing) and remint policy together.
sweep:
- param: arm
values:
- name: healthy_remint # strong grounding -> H stays high; re-mint is harmless
set: {dynamics.grounding.m: 60, dynamics.remint.enabled: true, dynamics.remint.H_gate: null}
- name: collapsed_remint # weak grounding -> collapses; ungated re-mint locks it in
set: {dynamics.grounding.m: 1, dynamics.remint.enabled: true, dynamics.remint.H_gate: null}
- name: collapsed_gated # weak grounding; gate (0.75) blocks re-mint while H is low
set: {dynamics.grounding.m: 1, dynamics.remint.enabled: true, dynamics.remint.H_gate: 0.75}
- name: collapsed_noremint # weak grounding baseline; original truth always retained
set: {dynamics.grounding.m: 1, dynamics.remint.enabled: false}
output:
dir: results/figS3_rebaselining

View file

@ -0,0 +1,40 @@
experiment: E3_region_matched_grounding
seed: 20260704
n_replicates: 100
generations: 400
# Region-matched grounding (blueprint 2.5-E3). Fixed total budget m; the lineage this
# passage exercises region 0 (the target, carrying its own rare tail). Compare:
# uniform -> spread m evenly over all R regions (region 0 gets only m/R)
# matched -> allocate m to the exercised region(s) only (region 0 gets all of m)
# Prediction: under uniform, region 0's tail collapses even though global grounding is
# nonzero; under matched, it persists. Metric: per-region tail-item survival.
truth:
K: 1000
R: 10 # 100 items/region; each region an identical Zipf block
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 1.0e-3
init: truth
dynamics:
n: 200
teachers: {K_T: 1, rho: 0.0, q: 1.0}
grounding:
m: 100 # same total for both arms; uniform => 10/region, matched => 100 to region 0
policy: uniform # overwritten by the sweep
exercised: [0] # region 0 is exercised this passage (matched targets it)
selection: {mode: none, novelty_alpha: 0.0}
remint: {enabled: false, period: null, H_gate: null}
metrics:
kl_floor: 1.0e-9
support_eps: 1.0e-9
sweep:
- param: dynamics.grounding.policy
values: [uniform, matched]
output:
dir: results/figS5_aimed_grounding

View file

@ -0,0 +1,34 @@
experiment: E4_multiteacher_decorrelation
kind: coverage
seed: 20260704
n_replicates: 200
# Multi-teacher recombination (blueprint 2.5-E4 / 2.7.1). Build K_T teachers with exact
# marginal retention q and pairwise retention-correlation rho, form the pupil from their
# mixture (n draws total = matched budget), and report TWO coverages:
# union_coverage -> construction-level U(K_T,rho,q) (must match the closed form)
# surviving_coverage-> tail items that survive the pupil's size-n resampling (+ grounding)
# Expect: both rise with K_T and (1-rho); at rho=1 many teachers give no benefit over one;
# the union-surviving gap shrinks as grounding g rises.
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 2.0e-3
coverage:
n: 300 # pupil sample size (matched budget across teachers)
q: 0.5 # per-teacher marginal tail retention
sweep:
- param: K_T
values: [1, 2, 3, 5]
- param: rho
values: [0.0, 0.25, 0.5, 0.75, 1.0]
- param: g
values: [0.0, 0.02, 0.05]
output:
dir: results/figS8_multiparent_union

View file

@ -0,0 +1,29 @@
experiment: E8
kind: society
seed: 20260705
n_replicates: 40
# (The vertical claim / Fisher-Muller — the society headline): can an offspring recombined from
# MANY decorrelated parents be fitter than ANY parent? Each parent is a specialist: confident-
# correct (hi) on the loci it has mastered, agnostic (~0.5) elsewhere; which loci each masters comes
# from the exact shared-switch construction, so parent count K_T and decorrelation rho are clean
# knobs. Deployed capability = fitness of the MODE genotype. Compare best single parent vs mean-
# mixture ("model soup", combine-but-don't-recombine) vs sexual recombination (assemble the best
# allele of each locus across all parents). Expect: sexual climbs to the optimum (=L, a genotype NO
# parent had) as K_T grows and rho->0, while best-parent and average plateau far below. Unlike
# biological sex there is no two-parent limit. Falsifier: sexual never exceeds the best parent, or
# averaging matches sexual.
society:
L: 12 # loci; the optimum (all-correct) has fitness 12 and no parent possesses it
q: 0.5 # fraction of loci each parent masters (marginal mastery)
hi: 0.9 # correct-allele prob on a mastered locus (confident expert)
lo: 0.45 # correct-allele prob on an unmastered locus (agnostic, slightly wrong)
sweep:
- param: K_T
values: [1, 2, 3, 5, 8, 12] # number of parents (unbounded; grows the recombinant reach)
- param: rho
values: [0.0, 0.5, 1.0] # decorrelated -> identical parents (the control)
output: {dir: results/figS9_specialist_superparent}

View file

@ -0,0 +1,29 @@
experiment: E7
kind: genotype_lineage
seed: 20260705
n_replicates: 20
# (The advantage of sex — the dynamic mechanism behind E8): a single population adapts from all-wrong
# toward a multi-locus optimum under selection + drift + mutation. Beneficial alleles arise in
# different sub-lineages; recombination reassorts them into one genotype, while an asexual lineage
# suffers clonal interference (the alleles compete and cannot combine). Expect the SEXUAL lineage
# (recomb_rate=1) to climb toward the optimum faster than the ASEXUAL one (recomb_rate=0) — the
# classical advantage of sex, and the reason a lone model lineage cannot do what a recombining
# society can. Honest scope: a SPEED advantage, not a dramatic permanent gap (the single-population
# ratchet is subtle); E8 carries the headline. Falsifier: sexual adapts no faster than asexual.
genotype:
L: 12
n: 150 # population/resample size (drift strength)
mu: 0.02 # per-locus mutation (flip) rate
base: 1.3 # multiplicative selection: fitness weight = base^(#correct loci)
recomb_rate: 0.0 # overwritten per arm by the sweep
init: wrong # start all-wrong (load L); adapt upward
generations: 120
sweep:
- param: genotype.recomb_rate
values: [0.0, 1.0] # asexual vs sexual
output: {dir: results/sexual_vs_asexual_lineage}

View file

@ -0,0 +1,22 @@
experiment: E12_nk
kind: speciation
seed: 12
n_replicates: 15
# E12 (NK variant) — the EPISTASIS WEDGE, the paper's distinct falsifiable claim: at matched divergence,
# mergeability is governed by the EPISTASIS (ruggedness K) of the capability landscape, not by divergence
# alone (every existing ML merge predictor is a divergence measure). Parents are LOCAL OPTIMA reached by
# hill-climbing a Kauffman NK landscape from random starts; recombining them exposes broken co-adapted
# blocks. As K rises, recombining two adapted parents flips from a gain (offspring above the worse parent)
# to outbreeding depression (offspring below it). K=0 (additive) is the no-isolation control.
speciation:
landscape: nk
L: 16
K: [0, 2, 4, 6, 8, 10] # ruggedness / epistasis knob
n_pairs: 40 # random parent-pairs (local optima) aggregated per landscape
recomb_rate: 0.5
n_offspring: 200
output:
dir: results/speciation_bdm_nk