figures: publication-ready — unified, lettered, codename-free
paper/pnas/make_figs.py re-plots every panel directly from the committed results artifacts into six single-file figures (figs/fig1..fig6.pdf): no experiment codenames or suptitles (interpretation moved to captions), bold panel letters, plain-language axis labels and legend entries, one consistent style (8pt, no top/right spines). Panels: fig1 A-B (grounding equilibrium + MNIST montage with its baked-in title cropped), fig2 A-B (blending cancellation + Fisher-Muller), fig3 A-D (outbreeding, directed recombination, mating breadth champion + diversity), fig4 A-C (society ablation trajectories), fig5 A-F (speciation: analytic curve + cliff, MLP decomposition + conflict sweep, LLM coherence + duration null), fig6 A-D (seed-replicated merging, 7B-hard routing vs averaging, predictive-test scatter, predictor comparison). build.py now places the single PDFs; captions rewritten per lettered panel; in-text panel refs updated (5B->5C-D, 5C->5E-F); stale stacked copies removed. Document 20pp -> 18pp. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkRLcc18rwT2Lysu6PbG7v
This commit is contained in:
parent
6f1f8bf172
commit
96902e87f0
26 changed files with 469 additions and 96 deletions
|
|
@ -1,10 +1,9 @@
|
|||
r"""Build the PNAS-draft PDF from main.md (Markdown stays the source of truth).
|
||||
|
||||
Adapted from paper/arxiv/md2tex.py (same Markdown subset + pipe tables), with one addition: standalone
|
||||
`*(FIG:name)*` markers compose multi-panel figures by stacking existing per-experiment vector PDFs
|
||||
(LaTeX-level consolidation; bespoke unified figures are a submission-time polish, tracked in the work
|
||||
order). Captions define the panel letters positionally (A = top, ...) because the sub-figures carry
|
||||
their own internal panel labels.
|
||||
`*(FIG:name)*` markers place the publication figures produced by make_figs.py (unified, lettered,
|
||||
codename-free panels re-plotted from the committed artifacts). Run make_figs.py before building when
|
||||
results change.
|
||||
|
||||
Usage: python paper/pnas/build.py && (cd paper/pnas && tectonic main.tex)
|
||||
"""
|
||||
|
|
@ -20,62 +19,66 @@ HERE = Path(__file__).resolve().parent
|
|||
SRC = HERE / "main.md"
|
||||
OUT = HERE / "body.tex"
|
||||
|
||||
# figure name -> (list of source PDFs (stacked top->bottom), caption)
|
||||
# figure name -> (single publication PDF from make_figs.py, caption)
|
||||
FIGURES: dict[str, tuple[list[str], str]] = {
|
||||
"fig1": (["results/E2/E2.pdf", "results/mnist_collapse/mnist_montage.pdf"],
|
||||
"Collapse is drift; grounding is immigration. (A, top) The grounding response in the minimal "
|
||||
"model: an operational threshold $g\\!\\approx\\!0.05$ retained most equilibrium diversity in "
|
||||
"the tested setting (the equilibrium is smooth in $g$), while per-item observation obeys "
|
||||
"$1-e^{-m p}$. (B, bottom) "
|
||||
"The same signs on real images: a convolutional VAE retrained each generation on its own "
|
||||
"output collapses to a single blurred mode (rows: generations), while $\\sim$10\\% grounding "
|
||||
"holds all thirty class$\\times$style modes."),
|
||||
"fig2": (["results/E4/E4.pdf", "results/E8/E8.pdf"],
|
||||
"Recombination: blending inheritance and the Fisher--Muller effect. (A, top) Refitting a child "
|
||||
"to the mean of its parents' output distributions conserves expected rare-item mass at the "
|
||||
"single-parent level, cancelling the multi-parent gain to first order in the rare-item "
|
||||
"regime; a strongest-source (union) operator, with renormalisation and an oracle, realises it. (B, bottom) Multi-locus recombination of decorrelated "
|
||||
"specialists assembles a genotype fitter than any parent, climbing to the optimum as parents "
|
||||
"are added, while the best single parent and the blended average plateau below."),
|
||||
"fig3": (["results/E9/E9.pdf", "results/E10/E10.pdf", "results/E14/E14.pdf"],
|
||||
"Rugged (epistatic) landscapes: risk, remedy, and structure. (A, top) Outbreeding depression: "
|
||||
"blind recombination of specialists drops offspring below their parents, worsening with "
|
||||
"ruggedness; the optimal recombination rate shrinks as skills entangle. (B, middle) Directed "
|
||||
"sex --- unbounded parents, chosen mates, verifier-screened offspring --- converts the "
|
||||
"catastrophe into a reliable gain at every ruggedness. (C, bottom) Mating structure: wide "
|
||||
"(promiscuous) mixing maximises the population mean but monotonically destroys diversity; the "
|
||||
"champion-optimal mate-pool breadth narrows as the landscape roughens."),
|
||||
"fig4": (["results/E11/E11.pdf"],
|
||||
"The society: grounded evaluation, recombination, and diversity preservation make complementary "
|
||||
"contributions in the tested model. A finite agent population on a rugged NK landscape, with "
|
||||
"selection weighting true fitness against conformity. Four-arm ablation: the full system "
|
||||
"climbs to near the global optimum; removing grounding collapses the population onto a "
|
||||
"confident, unfit consensus (self-consumption); removing recombination strands it on local "
|
||||
"optima; removing diversity converges it prematurely. Each ablation fails differently."),
|
||||
"fig5": (["results/E12/E12.pdf", "results/speciation_real/speciation_real.pdf",
|
||||
"results/llm_speciation/llm_speciation.pdf"],
|
||||
"Model speciation across three tiers. (A, top) Analytic: hybrid fitness traces compatible "
|
||||
"$\\rightarrow$ outbreeding depression $\\rightarrow$ inviability; the cliff arrives earlier "
|
||||
"the denser the incompatibilities; incompatibility count snowballs with divergence. (B, "
|
||||
"middle) Trained MLPs: the merge barrier decomposed under permutation-and-rescaling alignment --- "
|
||||
"same-task/different-init barriers are coordinate artefacts (removed by alignment); "
|
||||
"conflicting-task barriers survive in full, with hybrid fitness falling 0.97 $\\rightarrow$ "
|
||||
"0.03; divergence without conflict produced no isolation, the merge instead rescuing the "
|
||||
"forgetting specialists. (C, bottom) Language models: conflicting conventions produce "
|
||||
"function-specific hybrid breakdown; over-training disjoint specialists produces none --- at "
|
||||
"every tier tested, isolation had to be provoked by functional conflict."),
|
||||
"fig6": (["results/llm_merge_seeds/llm_seeds.pdf", "results/llm_moe_hard_hpc/llm_moe.pdf",
|
||||
"results/llm_epistasis/llm_epistasis.pdf"],
|
||||
"The language-model tier. (A, top) Seed-replicated recombination claims (fixed test sets, "
|
||||
"training seed varied, 95\\% CI): merges beat every specialist; union-preserving routing and "
|
||||
"directed offspring selection beat the blend in every seed on headroom tasks, including one "
|
||||
"catastrophic blend failure they avoided. (B, middle) The headroom rule at 7B on hard "
|
||||
"(unsaturated) tasks: the weight-average dilutes a fragile specialist below the best single "
|
||||
"parent; routing preserves it. (C, bottom) The controlled predictive test: across a task grid "
|
||||
"with conflict, compatible-overlap, and duration axes decorrelated by construction, pre-merge "
|
||||
"functional disagreement predicts merge penalty (held-out $\\rho \\approx 0.4$) while "
|
||||
"weight-geometry baselines show no detectable association; paired predictor differences are "
|
||||
"not individually significant."),
|
||||
"fig1": (["paper/pnas/figs/fig1.pdf"],
|
||||
"Grounding is immigration. (A) Stationary diversity against the grounding fraction in the "
|
||||
"minimal inheritance model: simulation (points, 95\\% CI) matches the exact immigration--drift "
|
||||
"equilibrium (dashed). The equilibrium is smooth in $g$; $g \\approx 0.05$ marks the "
|
||||
"operational threshold retaining 95\\% of source diversity in this setting (red line, "
|
||||
"bootstrap CI shaded); the hollow point at $g=0$ is a finite-time value (the true equilibrium "
|
||||
"is zero). (B) The same signs on real images: samples from a convolutional VAE retrained each "
|
||||
"generation on its own output (rows: generations 0--15 of an ungrounded lineage) collapse "
|
||||
"toward a single blurred mode; 10\\% grounding holds all thirty modes (quantified in SI)."),
|
||||
"fig2": (["paper/pnas/figs/fig2.pdf"],
|
||||
"Recombination in the minimal model: blending inheritance and the Fisher--Muller effect. "
|
||||
"(A) Expected rare-capability survival in a child refit from $K$ uncorrelated parents: the "
|
||||
"output-mean (blending) stays at the single-parent level --- the first-order cancellation --- "
|
||||
"while the union operator (strongest source per item, renormalised, oracle-identified) rises "
|
||||
"with parent count. (B) Multi-locus recombination of decorrelated specialists produces "
|
||||
"offspring fitter than any parent, approaching the optimum as parents are added; the best "
|
||||
"single parent and the blended average plateau below (mean $\\pm$ 95\\% CI)."),
|
||||
"fig3": (["paper/pnas/figs/fig3.pdf"],
|
||||
"Rugged (epistatic) landscapes: risk, remedy, and population structure. (A) Outbreeding "
|
||||
"depression: the mean offspring of blindly recombined specialist parents falls below the best "
|
||||
"parent, more steeply the more rugged the landscape (NK ruggedness $K$) and the higher the "
|
||||
"recombination rate. (B) Screening candidate offspring against a verifier (directed "
|
||||
"recombination) restores the gain at every ruggedness where blind recombination fails. "
|
||||
"(C) Mating structure: the best champion arises at wide mate-pool breadth on smooth landscapes "
|
||||
"and at intermediate breadth on rugged ones. (D) Wide breadth monotonically erodes population "
|
||||
"diversity at every ruggedness (mean $\\pm$ 95\\% CI, 20 replicates)."),
|
||||
"fig4": (["paper/pnas/figs/fig4.pdf"],
|
||||
"The tested society: grounded evaluation, recombination, and diversity preservation make "
|
||||
"complementary contributions. A finite agent population on a rugged NK landscape; selection "
|
||||
"weights true fitness against conformity to the population consensus. (A) Best real fitness: "
|
||||
"the full system approaches the global optimum; removing grounded evaluation collapses the "
|
||||
"population onto a confident, unfit consensus; removing recombination or diversity "
|
||||
"preservation strands it lower. (B) Population diversity. (C) The self-consumption signature: "
|
||||
"conformity minus true fitness (mean $\\pm$ 95\\% CI, 12 replicates)."),
|
||||
"fig5": (["paper/pnas/figs/fig5.pdf"],
|
||||
"Model speciation at three tiers. (A) Analytic model: hybrid fitness tracks the parents while "
|
||||
"lineages are compatible, then falls to inviability; the denser the incompatibilities, the "
|
||||
"earlier the fall. (B) The isolation cliff: probability of hybrid inviability against "
|
||||
"divergence, by incompatibility density. (C) Trained networks: the merge error barrier between "
|
||||
"two MLPs before and after permutation-and-rescaling alignment --- the same-task/different-"
|
||||
"start barrier is a coordinate artefact (removed by alignment); the conflicting-task barrier "
|
||||
"is left essentially unchanged. (D) Sweeping the fraction of conflicting classes: the residual "
|
||||
"barrier rises while merged-model accuracy falls from 0.97 to 0.03. (E) Language models (0.5B "
|
||||
"LoRA children of a shared base): on shared ambiguous prompts each parent performs under its "
|
||||
"own convention while the merged model falls below both --- function-specific hybrid "
|
||||
"breakdown. (F) Divergence without conflict: over-training disjoint specialists from 1 to 12 "
|
||||
"epochs produces no isolation; the merged model tracks or exceeds the parents throughout."),
|
||||
"fig6": (["paper/pnas/figs/fig6.pdf"],
|
||||
"The language-model tier. (A) Seed-replicated merging (0.5B, five seeds, fixed test sets; mean "
|
||||
"$\\pm$ 95\\% CI): merged specialists exceed the best single specialist overall, and only "
|
||||
"merged models are competent on every task family. (B) Hard, unsaturated tasks at 7B (single "
|
||||
"run): the weight-average dilutes a fragile specialist below the best single parent; routing "
|
||||
"among intact specialists preserves it. (C) The controlled predictive test (13 conditions "
|
||||
"$\\times$ 3 seeds): pre-merge confidence-weighted functional conflict against merge penalty, "
|
||||
"coloured by grid axis --- penalty concentrates on the conflict axis. (D) Predictor "
|
||||
"comparison, $|$Spearman $\\rho|$ against merge penalty over the full grid: functional "
|
||||
"measures carry signal, the tested weight-geometry baselines do not; paired differences "
|
||||
"between predictors are not individually significant."),
|
||||
}
|
||||
|
||||
UNICODE = {"—": "---", "–": "--", "→": r"\(\rightarrow\)", "≈": r"\(\approx\)", "≥": r"\(\geq\)",
|
||||
|
|
@ -112,16 +115,11 @@ def inline(s: str) -> str:
|
|||
|
||||
def figure_env(name: str) -> str:
|
||||
pdfs, caption = FIGURES[name]
|
||||
(HERE / "figs").mkdir(exist_ok=True)
|
||||
lines = [f"\\begin{{figure*}}[p]\\centering % {name}"]
|
||||
for src in pdfs:
|
||||
dst = HERE / "figs" / (name + "_" + Path(src).name)
|
||||
shutil.copyfile(ROOT / src, dst)
|
||||
frac = min(0.98, 3.0 / len(pdfs) * 0.42)
|
||||
lines.append(f"\\includegraphics[width=\\textwidth,height={frac:.2f}\\textheight,"
|
||||
f"keepaspectratio]{{figs/{dst.name}}}\\par\\smallskip")
|
||||
lines.append(f"\\caption{{{caption}}}\\label{{{name}}}")
|
||||
lines.append("\\end{figure*}")
|
||||
src = ROOT / pdfs[0]
|
||||
lines = [f"\\begin{{figure*}}[p]\\centering % {name}",
|
||||
f"\\includegraphics[width=\\textwidth]{{figs/{src.name}}}",
|
||||
f"\\caption{{{caption}}}\\label{{{name}}}",
|
||||
"\\end{figure*}"]
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue