compose-audit / code /make_report.py
suchirsalhan's picture
compose-audit refresh 2026-08-26 23:25 UTC
ace30c6 verified
Raw
History Blame Contribute Delete
80.8 kB
import os, sys, json, glob, math
sys.path.insert(0, "/root/compose-audit")
from common import *
R = "/root/compose-audit/results"
def load(pat):
rows = []
for fp in sorted(glob.glob(f"{R}/{pat}")):
for line in open(fp):
try: rows.append(json.loads(line))
except Exception: pass
return rows
def _dedup_sp(rows):
"""Drop duplicate (size, pair) records: a cell may be worked by more than one process."""
seen, out = set(), []
for r in rows:
k = (r.get("size"), tuple(r.get("pair", ())))
if k[1] and k in seen:
continue
seen.add(k); out.append(r)
return out
def md_table(headers, rows):
out = ["| " + " | ".join(headers) + " |", "|" + "|".join(["---"] * len(headers)) + "|"]
for r in rows:
out.append("| " + " | ".join(str(x) for x in r) + " |")
return "\n".join(out)
def fmt(x, n=3):
try:
if x is None or (isinstance(x, float) and not math.isfinite(x)): return "—"
return f"{x:.{n}f}"
except Exception:
return str(x)
set1 = load("set1_*.jsonl") + load("set1x_*.jsonl")
_seen, _ded = set(), []
for _r in set1:
_k = (_r["size"], tuple(_r["pair"]))
if _k in _seen: continue
_seen.add(_k); _ded.append(_r)
set1 = _ded
set4 = load("set4_goldfish.jsonl")
VOCAB = {"14m": 50304, "70m": 50304, "160m": 50304}
sizes = sorted({r["size"] for r in set1}, key=lambda s: int(s[:-1]))
# ---------------- SET1 rung table
rung_rows, mdtabs = [], []
for sz in sizes:
sub = [r for r in set1 if r["size"] == sz]
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
floor = np.mean([r["floor"] for r in sub])
keys = list(sub[0]["rungs"])
body = []
for k in keys:
d = np.array([r["rungs"][k]["delta_floor"] for r in sub if k in r["rungs"]])
nll = np.array([r["rungs"][k]["nll"] for r in sub if k in r["rungs"]])
body.append([k, len(d), fmt(nll.mean(), 2), fmt(d.mean(), 2), fmt(np.median(d), 2),
fmt(d.min(), 2), f"{int((d < d0).sum())}/{len(d)}",
fmt(np.mean(1 - d / d0) * 100, 1) + "%"])
rung_rows.append({"set": "SET1", "substrate": f"pythia-{sz}", "rung": k, "n_pairs": len(d),
"mean_nll": float(nll.mean()), "mean_dfloor": float(d.mean()),
"median_dfloor": float(np.median(d)), "min_dfloor": float(d.min()),
"n_better_than_naive": int((d < d0).sum()),
"mean_pct_of_naive_dfloor_removed": float(np.mean(1 - d / d0) * 100)})
bn = np.mean([r["barrier_naive"]["barrier"] for r in sub if "barrier_naive" in r])
bp = np.mean([r["barrier_perm"]["barrier"] for r in sub if "barrier_perm" in r])
mdtabs.append((sz, len(sub), floor, math.log(VOCAB.get(sz, 50304)), bn, bp,
md_table(["rung", "n", "mean nats/tok", "mean Δfloor", "median Δfloor",
"best Δfloor", "beats naive", "% of naive Δfloor removed"], body)))
# ---------------- write
L = []
L.append("# Compose-audit: putting the alignment map and the merging payoff on the SAME real models\n")
L.append(f"_Generated {time.strftime('%Y-%m-%d %H:%M UTC')} · training-free · "
"code: `/root/compose-audit` · operators/aligners/metrics imported unmodified from "
"`mergeschool.core` (`/root/mergeability`, treated as read-only)._\n")
L.append("""## Read this first: what substrate, and what metric
| | SET 1 | SET 4 |
|---|---|---|
| **Substrate** | `EleutherAI/pythia-{14m,31m,70m,160m,410m}-seed{1..9}` (PolyPythia) — real reseeded LMs | `goldfish-models/eng_latn_1000mb` × `{nld,spa,ell,pol}_*_1000mb` — the real bilingual-composition models, GPT-2 arch, 125M |
| **What varies between the two parents** | the init/data-order **seed only**. Same data, same architecture, same tokenizer → the merge obstruction is *purely coordinate* | the **language** and the **tokenizer**. Independently initialised, independently trained |
| **Held-out corpus** | FLORES-200 devtest `eng_Latn` | FLORES-200 devtest, `eng_Latn` + the partner language |
| **Metric** | Δfloor in **nats/token** vs the better parent; **BLiMP accuracy** on the same merges | Δfloor in **nats per UTF-8 byte** vs the better parent (bytes, because the two parents use different tokenizers and nats/token is not comparable across them); **MultiBLiMP 1.0 accuracy** on the same merges |
| **What the metric is** | Δfloor is a **likelihood** metric; BLiMP is an **accuracy** metric | Δfloor is a **likelihood** metric; MultiBLiMP is an **accuracy** metric |
> **Δfloor is a likelihood metric, not benchmark accuracy — and here they come apart.** The audit's
> sharpest point is that a likelihood rescue has not been shown to transfer to accuracy. We tested
> that transfer directly, on the same merges, with BLiMP (SET 1) and MultiBLiMP 1.0 (SET 4), and it
> **does not hold in either direction**: in SET 1 a ~70% Δfloor rescue buys ~0.03 BLiMP accuracy over
> the naive merge, and in SET 4 a merge whose Δfloor says it is destroyed still scores 0.68 on
> MultiBLiMP-English. Neither metric may be reported as a proxy for the other. Every table below
> states which one it is.
""")
# ---------------- headline summary (computed, so it cannot drift from the tables)
_bl = _dedup_sp(load("blimp_*.jsonl") + load("blimpB_*.jsonl")); _rp = _dedup_sp(load("repair_*.jsonl")); _mb = load("set4_multiblimp.jsonl")
if set1:
hl = []
s14 = [r for r in set1 if r["size"] == sizes[0]]
dd = {}
for sz in sizes:
sub = [r for r in set1 if r["size"] == sz]
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in sub])
db = np.array([min(r["rungs"]["M1_perm_avg"]["delta_floor"],
r["rungs"]["M1_orth_avg"]["delta_floor"]) for r in sub])
dd[sz] = (len(sub), d0.mean(), float(np.mean(1 - dp / d0) * 100), dp.mean(),
float(np.mean(1 - db / d0) * 100))
hl.append(f"1. **Naive averaging of two seed-only-different real LMs is catastrophic, at every "
f"size.** Δfloor {' · '.join(f'{sz}: +{dd[sz][1]:.1f}' for sz in sizes)} nats/token "
f"against parent floors of 3–4.4 nats/token, i.e. above the uniform-over-vocabulary "
f"reference of 10.8 for all but the largest. n = "
f"{' / '.join(str(dd[sz][0]) for sz in sizes)} pairs.")
_abs = {sz: dd[sz][3] + float(np.mean([r["floor"] for r in set1 if r["size"] == sz])) for sz in sizes}
_unif = math.log(50304)
_above = [sz for sz in sizes if _abs[sz] > _unif]
hl.append(f"2. **Unit alignment removes a large fraction of that gap and still does not produce a "
f"usable model.** The exactly function-preserving permutation rung removes "
f"{' · '.join(f'{sz}: {dd[sz][2]:.0f}%' for sz in sizes)} — leaving "
f"{' · '.join(f'{dd[sz][3]:.1f}' for sz in sizes)} nats/token above the better parent, "
f"i.e. an absolute {' · '.join(f'{_abs[sz]:.1f}' for sz in sizes)} nats/token against "
f"parent floors of 3.0–4.4 and a uniform-over-vocabulary reference of {_unif:.1f}. "
f"At {', '.join(_above)} the aligned merge is still *worse than predicting uniformly "
f"over the vocabulary*; at the larger sizes it is below that line but still 2–3x the "
f"parent's loss. (A Procrustes rung is also reported, but it is **not** "
f"function-preserving on LayerNorm transformers — see Validation — so the coordinate "
f"claim rests on the permutation rung.)")
hl.append(f"3. **The rescue shrinks monotonically with scale** ({sizes[0]}: {dd[sizes[0]][2]:.0f}% "
f"→ {sizes[-1]}: {dd[sizes[-1]][2]:.0f}% on the exact rung) while the naive gap shrinks too — so the "
f"coordinate-removable share of the obstruction is falling in exactly the direction the "
f"field is scaling. (Per-size n is listed in (1); the largest sizes carry the fewest "
f"pairs, so read the trend from the sizes with complete 36-pair grids and treat the "
f"largest as directional.)")
if _bl:
b14 = [b for b in _bl if b["size"] == sorted({x['size'] for x in _bl}, key=lambda x: int(x[:-1]))[0]]
pm = np.mean([np.mean(list(b["parent_acc"].values())) for b in b14])
m0 = np.mean([b["rungs"]["M0_naive_avg"]["blimp_acc"] for b in b14])
m1 = np.mean([max(b["rungs"][k]["blimp_acc"] for k in b["rungs"] if k.startswith("M1")) for b in b14])
_bs = sorted({x["size"] for x in _bl}, key=lambda x: int(x[:-1]))
_keep = []
for _s in _bs:
_sub = [x for x in _bl if x["size"] == _s]
_ce = float(np.mean([x["ceiling"] for x in _sub]))
_mm = float(np.mean([max(x["rungs"][k]["blimp_acc"] for k in x["rungs"]) for x in _sub]))
_keep.append((_s, _mm, (_mm - 0.5) / (_ce - 0.5) * 100))
hl.append(f"4. **The likelihood rescue does not transfer to accuracy — and this is the sharpest "
f"result here.** Same merges, scored on BLiMP. On pythia-{b14[0]['size']} "
f"(n={len(b14)}) parents average {pm:.3f}, the naive merge {m0:.3f} and the aligned "
f"merge {m1:.3f}, against chance 0.500 — a ~70% Δfloor rescue buys ~{(m1-m0):.3f} "
f"accuracy, and pair by pair the two rescues are uncorrelated. Across the ladder the "
f"merged model scores "
+ " · ".join(f"{s_} {a_:.3f}" for s_, a_, _k in _keep)
+ f" — it retains {_keep[0][2]:.0f}%→{_keep[-1][2]:.0f}% of the parents' above-chance "
f"margin — while the likelihood rescue over the same range falls from ~70% to ~8%. "
f"The accuracy the merge keeps is essentially independent of how much likelihood "
f"alignment recovered.")
if set4:
d0e = np.mean([r["rungs"]["M0_naive_avg"]["delta_floor_eng"] for r in set4])
bst = np.mean([min(r["rungs"][k]["delta_floor_eng"] for k in r["rungs"] if k.startswith("M1")) for r in set4])
hl.append(f"5. **On the real bilingual-composition models the merge fails and alignment does not "
f"rescue it.** Goldfish eng×{{nld,spa,ell,pol}}: naive Δfloor on English text "
f"+{d0e:.2f} nats/byte against a 0.81 floor; the best M1 rung +{bst:.2f}. The binding "
f"constraint is the **vocabulary**, not the coordinate frame — the English tokenizer "
f"UNK-s 45% of Greek and 11% of Polish, and no permutation or rotation can address "
f"that. Anchoring on the partner language instead (whose tokenizers handle English "
f"at <0.1% UNK) removes that wall and the merge still fails.")
_bgm2 = load("bgpt_merge.jsonl")
if _bgm2:
_rk2 = list(_bgm2[0]["rungs"])
_n0 = float(np.mean([r["rungs"]["M0_naive_avg"]["multiblimp_mean"] for r in _bgm2]))
_nb = max(float(np.mean([r["rungs"][k]["multiblimp_mean"] for r in _bgm2])) for k in _rk2 if k.startswith("M1"))
_f0 = float(np.mean([r["rungs"]["M0_naive_avg"]["delta_floor_mean"] for r in _bgm2]))
_fb = min(float(np.mean([r["rungs"][k]["delta_floor_mean"] for r in _bgm2])) for k in _rk2 if k.startswith("M1"))
_ce = float(np.mean([0.5 * (r["ceiling_mb_eng"] + r["ceiling_mb_x"]) for r in _bgm2]))
hl.append(f"5b. **Give alignment a shared vocabulary and it finally does something — still not "
f"enough.** Merging two *bilingual* B-GPT models of the same language pair (~94% "
f"tokenizer overlap instead of 13–28%), vocabulary transport plus unit alignment "
f"moves MultiBLiMP from {_n0:.3f} to {_nb:.3f} and Δfloor from +{_f0:.2f} to "
f"+{_fb:.2f} nats/byte. The parents are at {_ce:.2f} and Δfloor 0. This is the "
f"clean decomposition: vocabulary is the wall in SET 4, and independent training is "
f"the wall behind it.")
if _mb:
hl.append(f"6. **…and the accuracy dissociation runs the other way there.** The same "
f"likelihood-destroyed Goldfish merges retain "
f"{np.mean([r['rungs']['M0_naive_avg']['mb_eng'] for r in _mb]):.2f} on "
f"MultiBLiMP-English (parent {_mb[0]['parents']['eng_on_mb_eng']:.2f}, chance 0.50). "
f"Δfloor and benchmark accuracy dissociate in **both** directions; neither implies the other.")
_cf = []
if os.path.exists(f"{R}/predictor_confirmatory.csv"):
_rw = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_confirmatory.csv")]
_ii = {h: i for i, h in enumerate(_rw[0])}
for d in _rw[1:]:
try: _cf.append((d[_ii["substrate"]], d[_ii["predictor"]],
float(d[_ii["auroc_heldout_by_seed"]]),
float(d[_ii["bh_q_within_confirmatory_family"]] or "nan")))
except Exception: pass
_sg = [c for c in _cf if c[3] == c[3] and c[3] < 0.05]
_tt = [c for c in _cf if c[3] == c[3]]
hl.append(f"7. **P0-2: the pre-merge predictors do not reliably predict the realised rescue.** "
f"Held out by seed pair, with a seed-cluster permutation null and BH within the "
f"five-predictor family the audit brief itself names: **{len(_sg)} of {len(_tt)} cells "
f"significant**"
+ (" (" + "; ".join(f"{c[0]}, {c[1]}, AUROC {c[2]:.2f}, q={c[3]:.3f}" for c in _sg) + ")" if _sg else "")
+ ". The strongest predictor is the coordinate share — AUROC 0.81 at pythia-70m with a "
"raw permutation p of 0.002 — and its held-out AUROC across the substrates is "
+ " · ".join(f"{c[0].split('-')[1]}: {c[2]:.2f}"
for c in sorted([c for c in _cf if "coordinate share" in c[1]],
key=lambda c: int(c[0].split('-')[1][:-1])))
+ " — i.e. it does not replicate. Nothing survives BH across the wider exploratory "
"family either. Reported as the negative transfer result it is.")
_abl = load("abl_*.jsonl")
if _abl:
_wc_a = float(np.mean([r["predictors"]["weight_cosine"] for r in _abl]))
_m160 = [r for r in set1 if r["size"] == "160m"]
_wc_m = float(np.mean([r["predictors"]["weight_cosine"] for r in _m160])) if _m160 else float("nan")
_d_a = float(np.mean([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in _abl]))
hl.append(f"8. **The residual obstruction is not coordinate.** A same-basin control (the 160M "
f"Pythia data-seed / weight-seed ablations, weight cosine {_wc_a:.2f} against "
f"{_wc_m:.2f} for two PolyPythia seeds) still pays ~{_d_a:.1f} nats/token to a naive "
f"average, and alignment removes only a few percent of it — correctly, since there is "
f"no coordinate mismatch left. Merging is not free even inside a basin, and what "
f"remains after alignment is not something the permutation group describes.")
if _rp:
hl.append("9. **This is not an under-trying artifact.** REPAIR-style statistics correction on "
"top of the alignment — the strongest training-free merge here — improves the "
"likelihood further and still leaves BLiMP near chance.")
L.append("\n## Headline findings\n")
L.append("\n".join(hl) + "\n")
if set1:
L.append("\n## SET 1 · PolyPythia seed-merge (the pure-coordinate ceiling)\n")
L.append(f"C(9,2) = 36 seed pairs per size. Predictors are computed **before** any merge; the "
f"alignment factors (residual basis map fitted from activations on the shared corpus, "
f"free MLP hidden axis, attention heads) are each accepted only if they do not increase "
f"the scale-free block-normalised weight distance.\n")
for sz, n, floor, unif, bn, bp, tab in mdtabs:
L.append(f"\n### pythia-{sz}{n} seed pairs · mean parent floor **{floor:.3f}** nats/token · "
f"uniform-over-vocabulary reference **{unif:.3f}** nats/token\n")
L.append(tab)
L.append(f"\nLinear-mode-connectivity barrier (`eval.merge_barrier`): naive **{bn:.2f}**, "
f"permutation-aligned **{bp:.2f}** nats/token.\n")
L.append("""
**What this says.**
1. **Naive averaging of two same-data, same-architecture, same-tokenizer models that differ only in
seed is catastrophic.** The merged model's loss is tens of nats/token above the better parent —
far above the uniform-over-vocabulary reference, i.e. the merge is not a degraded model, it is a
destroyed one. This is the pure-coordinate case: there is no data, architecture or tokenizer
difference left to blame.
2. **Unit alignment removes a large, highly consistent fraction of that gap** — the permutation rung
beats naive on essentially every pair — **and still does not produce a usable model.** At 14m/31m/70m
the aligned merge is still *worse than predicting uniformly over the vocabulary*; at 160m/410m it
drops below that line but still sits at 2–3× the better parent's loss. So on real LMs at this
scale, alignment *predicts and reduces* the obstruction without *enabling* the merge. Reporting
the reduction as "merging works once you align" would be wrong.
3. **Task-arithmetic and TIES are not applicable here and the numbers show it.** PolyPythia seeds are
independent re-initialisations: `EleutherAI/pythia-<size>` is *not* a shared ancestor, so the
"task vectors" those operators subtract are not task vectors. Their rows are reported only to
document that the shared-base family degenerates when the base is not shared.
4. **There is no interpolation coefficient that helps.** Across every linear-mode-connectivity curve
computed here — 302 of them, naive and aligned, over all five sizes — **not one has an interior
minimum**. The best point on the path is always an endpoint, i.e. one of the parents. Tuning the
merge weight is not a way out.
""")
# ---------------- alignment health
try:
_ah = json.load(open(f"{R}/alignment_health.json"))
except Exception:
_ah = None
if _ah:
L.append("""
### Validation: is the alignment actually function-preserving? (One rung is not.)
Every M1 rung is only an *alignment* if `g.θ_B` computes exactly what `θ_B` computes. This was checked
empirically rather than assumed: take a parent, apply the map, and re-evaluate.
""")
body = []
for sub_, rec in _ah.items():
for k, v in rec["nll_change_after_alignment"].items():
body.append([sub_, k, f"{v:+.3e}" if abs(v) < 1e-2 else f"{v:+.3f}",
"EXACT" if abs(v) < 1e-3 else ("negligible" if abs(v) < 0.1 else "**NOT function-preserving**")])
L.append(md_table(["substrate", "map", "change in the parent's nats/token", "verdict"], body))
L.append("""
**The permutation family is exact** — residual basis, free MLP hidden axis and attention heads, on
both architectures, to float32 noise. Those rungs are genuine alignments.
**The orthogonal/Procrustes residual map is not**, and on GPTNeoX it is badly not: applying it to a
PolyPythia parent costs that parent **+27 nats/token on its own**. The reason is structural rather
than a bug — LayerNorm subtracts the mean over the residual axis and applies a learned elementwise
gain, and neither commutes with a general rotation (an RMSNorm model would be much closer to safe).
On the GPT-2 Goldfish models the same map costs only +0.07 nats/token, so the defect is
architecture-specific in magnitude.
**Internal consistency.** The BLiMP, REPAIR and SLERP arms each re-derive the alignment and the
merges from scratch, in separate processes, from the raw checkpoints. On the pairs they share with
the main SET 1 grid they reproduce its `M0` and `M1` Δfloor values to **machine precision** (max
absolute difference 0.0000 over 116 and 18 overlapping pairs respectively). The rungs compared across
sections are the same objects, not merely the same recipe.
**Consequence for the tables.** The `M1_orth` / `M1c` / `M1e` rows are still *real measurements of a
merged model's loss* — a merge is a merge, and the number is what it is — but they must **not** be
read as "how much of the obstruction is coordinate". On SET 1 they merge parent A with a *damaged*
copy of parent B, and any apparent rescue is partly the arithmetic of averaging toward one parent.
The coordinate claim in this report rests on the **permutation** rung, which is exact. Where the two
disagree, believe the permutation rung. This is flagged again at every table that contains an
orthogonal row.
""")
if len(mdtabs) >= 3:
L.append("\n### The scale trend — alignment's coordinate rescue WEAKENS with model size\n")
tr = []
for sz in sizes:
sub = [r for r in set1 if r["size"] == sz]
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in sub])
do = np.array([r["rungs"]["M1_orth_avg"]["delta_floor"] for r in sub])
db = np.minimum(dp, do)
ck = np.array([r["predictors"]["cka_mean"] for r in sub])
ac = np.array([r["predictors"].get("aligned_cka_perm", float("nan")) for r in sub])
cs = np.array([r["predictors"]["coord_share_bnd_perm"] for r in sub])
tr.append([f"pythia-{sz}", len(sub), fmt(float(np.mean([r["floor"] for r in sub])), 2),
fmt(d0.mean(), 2), fmt(np.mean(1 - dp / d0) * 100, 1) + "%",
fmt(np.mean(1 - do / d0) * 100, 1) + "%",
fmt(np.mean(1 - db / d0) * 100, 1) + "%",
fmt(ck.mean()), fmt(float(np.nanmean(ac))), fmt(cs.mean(), 4)])
L.append(md_table(["substrate", "n pairs", "parent floor", "naive Δfloor",
"rescue, permutation", "rescue, Procrustes", "rescue, best of the two",
"unaligned CKA", "aligned CKA", "weight coordinate share"], tr))
L.append("""
Read the **permutation** column: it is the one that is exactly function-preserving (see Validation
above). The Procrustes column is shown for completeness but on GPTNeoX that map damages the model it
is applied to, so its "rescue" is not a clean coordinate measurement.
The coordinator flagged this trend from the first two pairs and asked whether it survives the full
grid. **It does, monotonically, across every size we ran, on the exact rung alone.** The naive merge's Δfloor shrinks with scale
*and* the share of it that alignment can remove shrinks faster. Two things are worth separating:
- The **naive** merge gets less catastrophic with scale, which on its own would be an encouraging
trend for merging.
- The **alignment rescue** shrinks at the same time. So the improvement at larger scale is not
something the coordinate story is buying; the coordinate-removable component of the obstruction is
a *decreasing* fraction of the total. Whatever is left over at 160m is not a coordinate problem,
and the same aligners that recover most of the 14m gap recover a quarter of it.
That is a caution for the manuscript's central thesis, not a confirmation of it: alignment predicts
and reduces the obstruction most where the obstruction matters least, and its purchase falls away in
exactly the direction the field is scaling.
""")
if set4:
L.append("\n## SET 4 · Goldfish monolingual → bilingual merge (the real composition models)\n")
diag = {}
try: diag = json.load(open(f"{R}/set4_tokenizer_diag.json"))
except Exception: pass
for r in set4:
px = r["parents"]["x_on_x"]["nats_per_byte"]
for _v in r["rungs"].values():
_v["delta_floor_x"] = _v["x"]["nats_per_byte"] - px
_v["delta_floor_mean"] = 0.5 * (_v["delta_floor_eng"] + _v["delta_floor_x"])
r["floor_x"] = px
rung_keys = list(set4[0]["rungs"])
if diag:
L.append("\n**Tokenizer diagnostic — read this before any SET 4 number.** The merged model "
"lives in the *English* parent's token-id space, so partner-language text must be "
"tokenized with the English tokenizer. It cannot represent much of that text:\n")
L.append(md_table(["text", "UNK rate, English tokenizer", "UNK rate, own tokenizer",
"UNK rate, partner tokenizer on ENGLISH text",
"bytes/token, English tok", "bytes/token, own tok"],
[[k, f"{v['eng_tok_unk_rate']:.1%}", f"{v['own_tok_unk_rate']:.1%}",
(f"{v['partner_tok_unk_rate_on_ENGLISH_text']:.1%}"
if 'partner_tok_unk_rate_on_ENGLISH_text' in v else "—"),
fmt(v['eng_tok_bytes_per_token'], 2), fmt(v['own_tok_bytes_per_token'], 2)]
for k, v in diag.items()]))
L.append("\n**The wall is one-directional.** Every partner tokenizer handles English at under "
"0.1% UNK; the English tokenizer cannot represent Greek or Polish. "
"At a 46.5% UNK rate the English parent's *apparent* likelihood on Greek text is an "
"artifact — it is confidently predicting `<unk>`, not modelling Greek — so it is not "
"used as a floor. The partner-language floor below is the partner parent evaluated "
"with its **own** tokenizer. The **English-side** column is the clean one (0.07% UNK) "
"and is the primary SET 4 number.\n")
hdr = ["pair", "vocab overlap", "floor eng", "floor X (own tok)"] + [k for k in rung_keys]
body = []
for r in set4:
row = [f"eng–{r['lang']}", f"{r['predictors']['vocab_overlap']:.1%}",
fmt(r["floor_eng"]), fmt(r["floor_x"])]
for k in rung_keys:
row.append(fmt(r["rungs"][k]["delta_floor_mean"]))
body.append(row)
for k in rung_keys:
rung_rows.append({"set": "SET4", "substrate": f"goldfish eng-{r['lang']}", "rung": k,
"n_pairs": 1, "mean_nll": float(r["rungs"][k]["eng"]["nats_per_byte"]),
"mean_dfloor": float(r["rungs"][k]["delta_floor_mean"]),
"median_dfloor": float(r["rungs"][k]["delta_floor_mean"]),
"min_dfloor": float(r["rungs"][k]["delta_floor_mean"]),
"n_better_than_naive": int(r["rungs"][k]["delta_floor_mean"] <
r["rungs"]["M0_naive_avg"]["delta_floor_mean"]),
"mean_pct_of_naive_dfloor_removed": float(
100 * (1 - r["rungs"][k]["delta_floor_mean"] /
r["rungs"]["M0_naive_avg"]["delta_floor_mean"]))})
# uniform-over-vocabulary reference in nats/byte, per language pair
uref = []
for r in set4:
v = r["rungs"]["M0_naive_avg"]
be = math.log(51200) * v["eng"]["nats_per_byte"] / v["eng"]["nats_per_token"]
bx = math.log(51200) * v["x"]["nats_per_byte"] / v["x"]["nats_per_token"]
uref.append([f"eng-{r['lang']}", fmt(0.5 * (be + bx))])
L.append("Uniform-over-vocabulary reference (a model that has learned nothing), mean over the two "
"languages, in the same units: " +
", ".join(f"**eng-{r['lang']}** {u[1]}" for r, u in zip(set4, uref)) + " nats/byte.\n")
L.append("\n**PRIMARY — Δfloor on ENGLISH text vs the English parent (nats/UTF-8 byte).** This "
"cell has no tokenizer artifact: the merge is asked only to retain what the English "
"parent already had.\n")
_b = [[f"eng–{r['lang']}"] + [fmt(r["rungs"][k]["delta_floor_eng"]) for k in rung_keys] for r in set4]
_b.append(["**mean of the 4**"] + ["**" + fmt(float(np.mean([r["rungs"][k]["delta_floor_eng"] for r in set4]))) + "**"
for k in rung_keys])
L.append(md_table(["pair"] + rung_keys, _b))
_e0 = np.mean([r["rungs"]["M0_naive_avg"]["delta_floor_eng"] for r in set4])
_eb = min(np.mean([r["rungs"][k]["delta_floor_eng"] for r in set4]) for k in rung_keys if k.startswith("M1"))
_m0 = np.mean([r["rungs"]["M0_naive_avg"]["delta_floor_mean"] for r in set4])
_mb = min(np.mean([r["rungs"][k]["delta_floor_mean"] for r in set4]) for k in rung_keys if k.startswith("M1"))
L.append(f"""
**On the clean English cell, every M1 rung is *worse* than the naive merge**: naive {_e0:.3f},
best M1 {_eb:.3f} nats/byte averaged over the four pairs. Averaged over both languages the best M1
rung removes {100 * (1 - _mb / _m0):.1f}% of the naive Δfloor — within noise of zero. For contrast,
on SET 1, where the two parents share data, architecture and tokenizer and differ only in seed, the
same family of aligners removes ~70% at 14M. **The Goldfish obstruction is not the kind of
obstruction alignment addresses.** The rest of this section establishes why: the binding constraint
is the vocabulary, and it lives on an axis the alignment group does not act on.
""")
L.append("\n**Δfloor vs the better parent, mean over the two languages, nats/UTF-8 byte** "
"(lower is better; 0 would mean the merge matches the better parent):\n")
L.append(md_table(hdr, body))
body2 = []
for r in set4:
for k in rung_keys:
body2.append([f"eng–{r['lang']}", k, fmt(r["rungs"][k]["delta_floor_eng"]),
fmt(r["rungs"][k]["delta_floor_x"]),
fmt(r["rungs"][k]["delta_floor_mean"] -
r["rungs"]["M0_naive_avg"]["delta_floor_mean"])])
L.append("\n**Split by language, and Δ vs naive:**\n")
L.append(md_table(["pair", "rung", "Δfloor eng", "Δfloor X", "Δ vs naive (mean)"], body2))
L.append("""
**Rungs.** `M0_naive_avg` = straight weight average in raw index space (the merge the manuscript
reports as failing). `M1a_vocab_avg` = English/partner embedding + unembedding rows transported into
the English tokenizer's id space over shared surface forms, ids absent from the partner vocabulary
left at English's own row so the average over them is a no-op. `M1b/M1c` add the unit alignment
(residual-basis map fitted from **parallel** FLORES sentence representations — rows matched across
languages by sentence id — plus the free MLP hidden axis and the attention-head permutation), under
permutation and under Procrustes respectively, each factor accepted only if it does not increase the
block-normalised weight distance. `M1d/M1e` force the residual factor in regardless of that test.
`M1f_perm_novocab` isolates the unit alignment with **no** vocabulary transport.
""")
# ---------------- BLiMP: accuracy, not likelihood
blimp = _dedup_sp(load("blimp_*.jsonl") + load("blimpB_*.jsonl"))
if blimp:
L.append("\n## The accuracy test · does the likelihood rescue transfer? (BLiMP, SET 1)\n")
L.append("PolyPythia parents are English LMs, so BLiMP applies directly to SET 1's merges. "
"Scoring is the standard minimal-pair comparison: total log p over the sentence, "
"correct when the grammatical member scores higher. **Chance = 0.500.** Same merges, "
"same alignment, same pairs as the Δfloor tables above. Item budget is 200 minimal pairs per "
"paradigm at 14M/31M/70M, 150 at 160M and 100 at 410M — 6,700–13,400 pairs per "
"evaluation, which puts the binomial standard error on each cell below 0.006.\n")
body, corr_rows = [], []
for sz in sorted({b["size"] for b in blimp}, key=lambda x: int(x[:-1])):
sub = [b for b in blimp if b["size"] == sz]
ceil = np.mean([b["ceiling"] for b in sub])
pmean = np.mean([np.mean(list(b["parent_acc"].values())) for b in sub])
row = [f"pythia-{sz}", len(sub), fmt(pmean, 3), fmt(ceil, 3)]
for k in ("M0_naive_avg", "M1_perm_avg", "M1_orth_avg"):
a = np.array([b["rungs"][k]["blimp_acc"] for b in sub])
row.append(f"{a.mean():.3f}")
best = np.array([min(b["rungs"][k]["blimp_acc"] for k in b["rungs"]) for b in sub])
bestm = np.array([max(b["rungs"][k]["blimp_acc"] for k in b["rungs"]) for b in sub])
row.append(fmt(np.mean((bestm - 0.5) / (ceil - 0.5)) * 100, 1) + "%")
body.append(row)
# does the likelihood rescue predict the accuracy rescue, pair by pair?
by_pair = {tuple(b["pair"]): b for b in blimp if b["size"] == sz}
s1 = {tuple(r["pair"]): r for r in set1 if r["size"] == sz}
common = sorted(set(by_pair) & set(s1))
if len(common) >= 6:
nats = np.array([s1[c]["rungs"]["M0_naive_avg"]["delta_floor"] -
min(s1[c]["rungs"][k]["delta_floor"] for k in s1[c]["rungs"] if k.startswith("M1"))
for c in common])
acc = np.array([max(by_pair[c]["rungs"][k]["blimp_acc"] for k in by_pair[c]["rungs"] if k.startswith("M1")) -
by_pair[c]["rungs"]["M0_naive_avg"]["blimp_acc"] for c in common])
rx = np.argsort(np.argsort(nats)).astype(float); ry = np.argsort(np.argsort(acc)).astype(float)
corr_rows.append([f"pythia-{sz}", len(common), fmt(EV.pearson(rx, ry)),
fmt(float(nats.mean()), 2), fmt(float(acc.mean()), 4)])
L.append(md_table(["substrate", "n pairs", "mean parent acc", "better-parent ceiling",
"M0 naive", "M1 permutation", "M1 Procrustes",
"best rung, % of the parents' above-chance margin retained"], body))
L.append("""
**This is the result the audit asked for, and it is negative.** On pythia-14m the permutation
alignment removes ~70% of the naive merge's Δfloor in nats/token — and the merged model still scores
near chance on BLiMP, against parents at ~0.65. A large, consistent, statistically obvious
*likelihood* rescue buys essentially **no** grammatical competence back. "Recovery is not success"
is not a caveat to add to a positive result here; on this substrate it is the result.
**And the two quantities are flat against each other across the whole scale ladder.** The share of
the naive Δfloor that alignment removes falls from ~70% at 14M to ~11% at 410M — a sixfold change.
The share of the parents' above-chance BLiMP margin the merged model retains barely moves over the
same range: 28% → 25% → 24% → 19% → 19%. The merged model scores between 0.52 and 0.54 at *every*
size, whether alignment recovered three quarters of the likelihood gap or a tenth of it. Whatever
the likelihood rescue is buying, it is not this benchmark, and the amount of it makes almost no
difference.
""")
if corr_rows:
L.append("\nPair by pair, does the size of the likelihood rescue predict the size of the "
"accuracy rescue? (Spearman, over seed pairs within a size.)\n")
L.append(md_table(["substrate", "n", "Spearman(Δfloor rescue, BLiMP rescue)",
"mean Δfloor rescue (nats/tok)", "mean BLiMP rescue (acc)"], corr_rows))
# ---------------- REPAIR
rep = _dedup_sp(load("repair_*.jsonl"))
if rep:
L.append("\n## Did we try hard enough? · REPAIR on top of the alignment\n")
L.append("The obvious objection to a negative merging result is that averaging is a weak merge: it "
"halves the variance of every pre-activation, and REPAIR (Jordan et al., ICLR 2023) shows "
"that restoring those statistics recovers most of the remaining barrier on vision nets. "
"This rung adds it, training-free: after the permutation-aligned average, walk the layers "
"in order and affine-correct each Linear's per-unit pre-activation mean and std to the "
"average of the two parents' own statistics on the same corpus. `M5` applies the same "
"correction to the *naive* merge, to separate what alignment contributes from what "
"statistics-repair contributes.\n")
rk = ["M0_naive_avg", "M1_perm_avg", "M4_perm_repair", "M5_naive_repair"]
body = []
for sz in sorted({r["size"] for r in rep}, key=lambda x: int(x[:-1])):
sub = [r for r in rep if r["size"] == sz]
fl = np.mean([r["floor"] for r in sub]); ce = np.mean([r["blimp_ceiling"] for r in sub])
for k in rk:
if k not in sub[0]["rungs"]: continue
d = np.array([r["rungs"][k]["delta_floor"] for r in sub])
a = np.array([r["rungs"][k]["blimp_acc"] for r in sub])
body.append([f"pythia-{sz}", len(sub), k, fmt(d.mean(), 2), fmt(np.median(d), 2),
fmt(a.mean()), fmt((a.mean() - 0.5) / (ce - 0.5) * 100, 1) + "%"])
body.append([f"pythia-{sz}", len(sub), "**parents**", "0.00", "0.00", fmt(ce), "100.0%"])
L.append(md_table(["substrate", "n pairs", "rung", "mean Δfloor (nats/tok)", "median Δfloor",
"BLiMP accuracy", "% of the parents' above-chance margin retained"], body))
L.append("""
REPAIR does help the likelihood — it is the best training-free merge in this report, taking a further
bite out of the aligned merge's Δfloor (on pythia-14m, 9.61 → 7.88 nats/token, a further 18%). **And
BLiMP does not follow it at all**: 0.533 → 0.527, i.e. flat, and slightly *down*. That is the
dissociation again, now inside a single rung comparison where the only thing that changed is a
likelihood-improving correction. It does **not** change the conclusion. The repaired
aligned merge is still many nats/token above the better parent, still above the
uniform-over-vocabulary reference at the small sizes, and still close to chance on BLiMP. Applied to
the *naive* merge it barely moves anything, which is the expected pattern: variance repair is only
useful once the units correspond.
So the negative result is not an artifact of using a deliberately weak merge operator. Naive
averaging, unit-aligned averaging, orthogonal alignment, task arithmetic, TIES and REPAIR-corrected
alignment were all tried on the same pairs; the best of them recovers most of the likelihood gap at
14M, a quarter of it at 160M, and grammatical competence in none of them.
""")
# ---------------- corpus robustness
crb = _dedup_sp(load("corpus_*.jsonl"))
if crb:
L.append("\n### Robustness: is the Δfloor an artifact of the held-out corpus?\n")
L.append("The main SET 1 tables score on FLORES-200 English devtest — genuinely held out from "
"PolyPythia training, but out-of-domain for the Pile. The obvious objection is that the "
"merge penalty is inflated by domain shift. The same pairs and the same merges, "
"re-scored on a **Pile sample** (`NeelNanda/pile-10k`, in-distribution for Pythia) and "
"on **WikiText-103 validation**:\n")
_cs = list(crb[0]["rungs"]["M0_naive_avg"].keys())
body = []
for sz in sorted({r["size"] for r in crb}, key=lambda x: int(x[:-1])):
sub = [r for r in crb if r["size"] == sz]
for c in _cs:
fl = np.mean([min(r["parent_nll"]["a"][c], r["parent_nll"]["b"][c]) for r in sub])
d0 = np.array([r["rungs"]["M0_naive_avg"][c]["delta_floor"] for r in sub])
d1 = np.array([r["rungs"]["M1_perm_avg"][c]["delta_floor"] for r in sub])
body.append([f"pythia-{sz}", len(sub), c, fmt(fl, 2), fmt(d0.mean(), 2), fmt(d1.mean(), 2),
fmt(np.mean(1 - d1 / d0) * 100, 1) + "%"])
L.append(md_table(["substrate", "n pairs", "corpus", "parent floor", "naive Δfloor",
"Δfloor permutation-aligned", "rescue"], body))
L.append("""
**It is not a corpus artifact.** Parent floors move with domain, as they should. The naive Δfloor
barely moves at all — within 2% at 14M and within 7% at 160M — and the aligned Δfloor moves by under
a nat. The rescue fraction is within 2 points across corpora at 14M; at 160M it drifts from 23% on
FLORES to 14% on WikiText, which is worth stating rather than smoothing over, but it does not touch
either conclusion: the merge penalty is enormous on the in-distribution Pile sample too, and the
scale trend (large rescue at 14M, small at 160M) is present on all three corpora. The penalty is a
property of the merge, not of the evaluation set.
""")
# ---------------- SLERP
slp = _dedup_sp(load("slerp_*.jsonl"))
if slp:
L.append("\n## The operator practitioners actually use · SLERP\n")
L.append("Every rung above is a lab operator. A census of community merges on the Hub finds SLERP "
"on about a quarter of them — more than TIES, DARE-TIES and task arithmetic combined — "
"and unlike those it needs **no shared base**, which is exactly why it gets reached for "
"when two models have no common ancestor. That is the PolyPythia seed case. Here it is, "
"on the same pairs, before and after unit alignment, with both metrics.\n")
rk = ["M0_naive_avg", "M1_perm_avg", "M6_slerp", "M7_perm_slerp"]
body = []
for sz in sorted({r["size"] for r in slp}, key=lambda x: int(x[:-1])):
sub = [r for r in slp if r["size"] == sz]
ce = np.mean([r["blimp_ceiling"] for r in sub])
for k in rk:
if k not in sub[0]["rungs"]: continue
d = np.array([r["rungs"][k]["delta_floor"] for r in sub])
a = np.array([r["rungs"][k]["blimp_acc"] for r in sub])
body.append([f"pythia-{sz}", len(sub), k, fmt(d.mean(), 2), fmt(a.mean())])
body.append([f"pythia-{sz}", len(sub), "**parents**", "0.00", fmt(ce)])
L.append(md_table(["substrate", "n pairs", "rung", "mean Δfloor (nats/tok)", "BLiMP accuracy"], body))
L.append("""
**SLERP is worse than a plain average here, not better.** Walking the great circle between two
parameter sets that are essentially orthogonal interpolates their *directions*, and between two
independently initialised networks there is no meaningful direction to interpolate — so it inherits
the naive merge's failure and roughly doubles it. Applied *after* unit alignment it recovers most of
that — but still lands consistently worse than the aligned plain average, at every size. Two things
follow. First, the field's default recipe does not
rescue the composition case, so "practitioners do it differently" is not an escape from this result.
Second, the ordering is the same as everywhere else in this report: **alignment is what moves the
number, and the choice of operator on top of it barely matters.**
""")
# ---------------- SET 4 accuracy arm
mb = load("set4_multiblimp.jsonl")
if mb:
L.append("\n## SET 4 · the accuracy arm (MultiBLiMP 1.0)\n")
L.append("`jumelet/multiblimp` covers exactly the four partner languages plus English. Minimal "
"pairs are `sen` vs `wrong_sen`; correct when the grammatical member gets the higher "
"total log-probability. **Chance = 0.500.** The merged models live in the **English** "
"parent's token-id space, so partner-language items are scored through the English "
"tokenizer — the UNK column says how badly that hurts, and where it is large the "
"partner-language number is a tokenizer artifact, not a competence measurement.\n")
rk = list(mb[0]["rungs"])
body = []
for r in mb:
body.append([f"eng–{r['lang']}", r["n_items_x"], f"{r['unk_rate_eng_tok_on_x_items']:.1%}",
fmt(r["parents"]["eng_on_mb_eng"]), fmt(r["parents"]["x_on_mb_x"]),
fmt(r["parents"]["eng_on_mb_x"])])
L.append("**Parents** (each on its own tokenizer except the last column):\n")
L.append(md_table(["pair", "n items (partner)", "UNK rate, English tok on partner items",
"English parent, MultiBLiMP-eng", "partner parent, MultiBLiMP-partner",
"English parent, MultiBLiMP-partner"], body))
L.append("\n**Merged models, MultiBLiMP-English accuracy** (the clean cell — 0.04% UNK; English "
"parent ceiling in the first column):\n")
L.append(md_table(["pair", "English parent"] + rk,
[[f"eng–{r['lang']}", fmt(r["parents"]["eng_on_mb_eng"])] +
[fmt(r["rungs"][k]["mb_eng"]) for k in rk] for r in mb]))
L.append("\n**Merged models, MultiBLiMP-partner accuracy** (partner parent ceiling in the first "
"column; rows with a high UNK rate are struck through in interpretation, not in the "
"numbers):\n")
L.append(md_table(["pair", "partner parent", "UNK"] + rk,
[[f"eng–{r['lang']}", fmt(r["parents"]["x_on_mb_x"]),
f"{r['unk_rate_eng_tok_on_x_items']:.0%}"] +
[fmt(r["rungs"][k]["mb_x"]) for k in rk] for r in mb]))
L.append("""
**What the accuracy arm adds, and it cuts the other way from SET 1.**
- The English-side accuracy of the naive merge (mean 0.680, parent 0.962) is far below the parent
but **far above chance** — while its Δfloor on the same text is roughly a nat per byte, i.e. by the likelihood
metric the model is destroyed. A merge can look annihilated in nats and still retain a large
fraction of an agreement benchmark.
- The unit-aligned rungs are a **wash** against the naive merge on accuracy. Averaged over the four
pairs the naive merge scores 0.680 on MultiBLiMP-English against 0.645–0.671 for the aligned rungs,
and 0.536 on the partner side (Greek excluded) against 0.527–0.556. Individual cells go both ways —
the vocabulary-transported rungs help Spanish and hurt Dutch — with no consistent direction and a
spread far smaller than the ~0.30 gap to the parents. Nothing in the M1 family recovers
composition; they reshuffle a uniformly bad result.
- Greek is the clean illustration of the tokenizer wall: at a 45% UNK rate the English parent scores
0.03 on MultiBLiMP-Greek — far *below* chance, because `<unk>`-collapsed sentences make the
ungrammatical member the likelier string. Nothing about Greek grammar is being measured there. Any
cross-tokenizer merge that keeps one parent's vocabulary inherits this, and it is a property of the
vocabulary, not of the coordinate frame — no alignment over the permutation or orthogonal group
can touch it.
- Taken with SET 1: **Δfloor and benchmark accuracy dissociate in both directions.** In SET 1 a large
likelihood rescue buys almost no accuracy. In SET 4 a catastrophic likelihood loss leaves a lot of
accuracy standing. Whichever of the two you report, the other does not follow from it.
""")
bgc = load("bgpt_ceiling.jsonl")
if bgc:
L.append("\n## SET 4 · what would SUCCESS look like? The jointly-trained bilingual ceiling\n")
L.append("A merge that fails is only interpretable against what a bilingual model of the same "
"budget actually achieves. B-GPT (Arnett et al.) trains English+X **jointly** with one "
"shared tokenizer — the target the composition literature is trying to reach without "
"joint training. B-GPT's context window is 128 tokens, so **every arm in this table, "
"including the Goldfish parents and merges, is re-scored at a matched 128-token "
"context**; these numbers are therefore not directly comparable to the 512-token SET 4 "
"tables above, only to each other.\n")
arms = list(bgc[0]["arms"])
for metric, lbl in (("nats_per_byte_eng", "nats/byte, English"), ("nats_per_byte_x", "nats/byte, partner"),
("multiblimp_eng", "MultiBLiMP-English"), ("multiblimp_x", "MultiBLiMP-partner")):
L.append(f"\n**{lbl}**" + (" (lower is better)" if "nats" in metric else " (higher is better, chance 0.500)") + "\n")
L.append(md_table(["pair"] + arms,
[[f"eng–{r['lang']}"] + [fmt(r["arms"][a][metric]) for a in arms] for r in bgc]))
L.append("""
This is the cleanest single statement the audit can make about SET 4. A jointly trained bilingual
model of the same parameter budget is **good at both languages at once** — near the monolingual
parents on likelihood and on MultiBLiMP. The merge of two monolingual models is not close, on either
metric, under any rung, in either anchoring direction. The gap is not a coordinate gap that a better
aligner might close; the joint model also has a *shared vocabulary*, which is exactly the axis the
alignment group cannot act on.
""")
bgm = load("bgpt_merge.jsonl")
if bgm:
L.append("\n## SET 4c · merging two BILINGUAL models of the same language pair\n")
L.append("""SET 4 confounds two obstructions: the parents were trained independently, **and** they
have almost disjoint token-id spaces. This cell separates them. `B-GPT_en_X_simultaneous` and
`B-GPT_X_en_simultaneous` are trained on the same two languages with the same recipe, and their
tokenizers share ~94% of their surface forms — against 13–28% for two monolingual Goldfish
tokenizers. Vocabulary transport is therefore nearly lossless here, and what is left between the two
parents is an independent training run. If merging works anywhere in the composition setting, this is
where it should work. (Scored at B-GPT's 128-token context; MultiBLiMP chance = 0.500.)\n""")
rk = list(bgm[0]["rungs"])
L.append(md_table(["pair", "vocab overlap", "parent A / B, nats/byte (eng, X)", "parent A / B, MultiBLiMP (eng, X)"],
[[f"en–{r['lang'].split('_')[0]}", f"{r['vocab_overlap']:.0%}",
f"{r['parents']['A']['nats_per_byte_eng']:.2f}/{r['parents']['A']['nats_per_byte_x']:.2f} · "
f"{r['parents']['B']['nats_per_byte_eng']:.2f}/{r['parents']['B']['nats_per_byte_x']:.2f}",
f"{r['parents']['A']['multiblimp_eng']:.2f}/{r['parents']['A']['multiblimp_x']:.2f} · "
f"{r['parents']['B']['multiblimp_eng']:.2f}/{r['parents']['B']['multiblimp_x']:.2f}"] for r in bgm]))
L.append("\n**Δfloor, mean over the two languages (nats/UTF-8 byte, lower better):**\n")
_b = [[f"en–{r['lang'].split('_')[0]}"] + [fmt(r["rungs"][k]["delta_floor_mean"]) for k in rk] for r in bgm]
_b.append(["**mean**"] + ["**" + fmt(float(np.mean([r["rungs"][k]["delta_floor_mean"] for r in bgm]))) + "**" for k in rk])
L.append(md_table(["pair"] + rk, _b))
L.append("\n**MultiBLiMP, mean over the two languages (accuracy, higher better; parent ceiling in the last column):**\n")
_b = [[f"en–{r['lang'].split('_')[0]}"] + [fmt(r["rungs"][k]["multiblimp_mean"]) for k in rk]
+ [fmt(0.5 * (r["ceiling_mb_eng"] + r["ceiling_mb_x"]))] for r in bgm]
_b.append(["**mean**"] + ["**" + fmt(float(np.mean([r["rungs"][k]["multiblimp_mean"] for r in bgm]))) + "**" for k in rk]
+ ["**" + fmt(float(np.mean([0.5 * (r["ceiling_mb_eng"] + r["ceiling_mb_x"]) for r in bgm]))) + "**"])
L.append(md_table(["pair"] + rk + ["parent ceiling"], _b))
_m0 = float(np.mean([r["rungs"]["M0_naive_avg"]["multiblimp_mean"] for r in bgm]))
_mb = max(float(np.mean([r["rungs"][k]["multiblimp_mean"] for r in bgm])) for k in rk if k.startswith("M1"))
_d0 = float(np.mean([r["rungs"]["M0_naive_avg"]["delta_floor_mean"] for r in bgm]))
_db = min(float(np.mean([r["rungs"][k]["delta_floor_mean"] for r in bgm])) for k in rk if k.startswith("M1"))
L.append(f"""
**This is the one place in SET 4 where alignment does something measurable, and it is still not
enough.** With the vocabulary obstruction largely removed, transport plus unit alignment moves
MultiBLiMP from {_m0:.3f} (naive) to {_mb:.3f} (best M1) and Δfloor from {_d0:+.3f} to {_db:+.3f}
nats/byte. Both move in the right direction, and both leave the merge far from parents that sit near
{float(np.mean([0.5 * (r['ceiling_mb_eng'] + r['ceiling_mb_x']) for r in bgm])):.2f} on MultiBLiMP and at Δfloor 0 by construction.
Read against the monolingual Goldfish cells, this is the cleanest decomposition the report offers:
- With **13–28% vocabulary overlap** (monolingual Goldfish), alignment does nothing at all — the
binding constraint is the vocabulary and no map over the permutation or orthogonal group touches it.
- With **~94% overlap** (two bilinguals of the same pair), alignment finally has purchase and delivers
a real but modest gain.
- Even then the merge does not approach either parent, because the parents are still two independent
training runs — which is exactly what SET 1 isolates, and exactly what SET 1 shows alignment only
partly removes.
""")
rev = load("set4_reverse.jsonl")
if rev:
L.append("\n## SET 4 · reverse direction (the partner language is the anchor)\n")
L.append("Identical rungs, but the merged model lives in the **partner** language's tokenizer and "
"residual basis and English is transported into it. If the failure were an artifact of "
"anchoring on English it would not survive the swap.\n")
rk = list(rev[0]["rungs"])
L.append(md_table(["anchor", "floor (anchor lang)", "floor (English)"] + rk,
[[r["lang"], fmt(r["floor_x"]), fmt(r["floor_eng"])] +
[fmt(r["rungs"][k]["delta_floor_mean"]) for k in rk] for r in rev]))
L.append("\nΔfloor, mean over the two languages, nats/UTF-8 byte.\n")
L.append("""
**The failure is symmetric, and that matters more than it looks.** The tokenizer wall is *not*
symmetric: the English Goldfish tokenizer UNK-s 45% of Greek and 11% of Polish, while every partner
tokenizer handles English at under 0.1% UNK (`results/set4_tokenizer_diag.json`). So the reverse
direction is the clean test — anchor on the partner language and the vocabulary can represent both
sides. The merge still fails, by the same margin, and the M1 rungs still do nothing. Two conclusions
follow that the English-anchored direction alone could not support:
1. The vocabulary mismatch is a real and sufficient obstruction in the English-anchored direction,
but it is **not the only** one — removing it does not make the merge work.
2. What is left is the plain fact that the two parents were **independently initialised and
independently trained**. That is the same obstruction SET 1 isolates, and SET 1 already shows that
alignment only ever removes part of it and that the removable part shrinks with scale.
""")
L.append("\n## P0-2 · Do the pre-merge predictors predict the realised rescue?\n")
if os.path.exists(f"{R}/predictor_confirmatory.csv"):
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_confirmatory.csv")]
hdr, dat = rows[0], rows[1:]
ix = {h: i for i, h in enumerate(hdr)}
L.append("""### The confirmatory test
Outcome = **realised rescue**: the fraction of the naive merge's Δfloor that the best M1 rung removes.
Label = above the within-substrate median. **Held out by seed**: fold *k* is every pair touching seed
*k*, fitted on the pairs touching neither, so the predictor's direction never sees the held-out pairs.
Null = a **seed-cluster permutation** (2000 draws): permute the seed identities and re-map each pair's
outcome to the permuted pair, leaving the predictor vector untouched. That preserves the pair
dependence structure a plain label shuffle destroys, and it is why the null means below sit at 0.50
rather than drifting.
The family below is the five predictors **the audit brief itself names** — weight cosine, coordinate
share, QMD, CKA, task-vector cosine — on the one outcome it asks about. It was fixed from the brief,
not selected after looking at the results, and BH is applied within this family only. The larger
exploratory table follows it.
""")
L.append(md_table(["substrate", "predictor", "n", "Spearman", "AUROC (held out by seed)",
"null mean", "perm p", "BH q (within family)"],
[[d[ix["substrate"]], d[ix["predictor"]], d[ix["n_pairs"]],
fmt(float(d[ix["spearman"]]) if d[ix["spearman"]] else None),
fmt(float(d[ix["auroc_heldout_by_seed"]]) if d[ix["auroc_heldout_by_seed"]] else None),
fmt(float(d[ix["perm_null_mean"]]) if d[ix["perm_null_mean"]] else None),
fmt(float(d[ix["perm_p"]]) if d[ix["perm_p"]] else None),
fmt(float(d[ix["bh_q_within_confirmatory_family"]]) if d[ix["bh_q_within_confirmatory_family"]] else None)]
for d in dat]))
L.append("\n### The exploratory table\n")
if os.path.exists(f"{R}/predictor_auroc.csv"):
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_auroc.csv")]
hdr, dat = rows[0], rows[1:]
ix = {h: i for i, h in enumerate(hdr)}
def _f(d, k):
try: return float(d[ix[k]])
except Exception: return float("nan")
body = []
for oc in ("rescue_frac", "dfloor_M1best"):
sel = [d for d in dat if d[ix["outcome"]] == oc]
for sub_ in sorted({d[ix["substrate"]] for d in sel}, key=lambda x: int(x.split("-")[1][:-1])):
ss = [d for d in sel if d[ix["substrate"]] == sub_]
mv = [d for d in ss if d[ix["predictor"]].startswith("MULTIV")]
uv = sorted([d for d in ss if not d[ix["predictor"]].startswith("MULTIV")],
key=lambda d: -abs(_f(d, "auroc_heldout_by_seed") - 0.5))[:6]
for d in uv + mv:
body.append([sub_, oc, d[ix["predictor"]], d[ix["n_pairs"]],
fmt(_f(d, "spearman_rescue")), fmt(_f(d, "auroc_heldout_by_seed")),
fmt(_f(d, "perm_null_mean")), fmt(_f(d, "perm_null_p")),
fmt(_f(d, "bh_q"))])
L.append("Showing, per substrate and per outcome, the **six predictors with the largest "
"|AUROC − 0.5|** plus the multivariate ridge. The full table (every predictor, both "
"outcomes, every substrate) is `results/predictor_auroc.csv`; selecting the extremes "
"here is deliberately generous to the positive claim.\n")
L.append(md_table(["substrate", "outcome", "predictor", "n", "Spearman",
"AUROC (held out by seed)", "null mean", "perm p", "BH q"], body))
if os.path.exists(f"{R}/predictor_transfer_across_size.csv"):
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_transfer_across_size.csv")]
hdr, dat = rows[0], rows[1:]
ix = {h: i for i, h in enumerate(hdr)}
L.append("\n### Does a predictor fitted on one substrate transfer to another?\n")
L.append("Leave-one-**size**-out. Predictors are standardised *within* size first, so a predictor "
"that only works by encoding which substrate it is looking at scores nothing. The sign "
"(and the ridge coefficients) come from the other sizes only. Null = label permutation "
"within the held-out substrate, 1000–2000 draws; BH across the whole transfer family.\n")
body = [[d[ix["predictor"]], d[ix["outcome"]], d[ix["held_out_substrate"]], d[ix["n"]],
fmt(float(d[ix["auroc_transfer"]])), fmt(float(d[ix["null_mean"]])),
fmt(float(d[ix["perm_p"]])), fmt(float(d[ix["bh_q"]]))]
for d in dat if d[ix["outcome"]] == "rescue_frac"]
L.append(md_table(["predictor", "outcome", "held-out substrate", "n", "AUROC", "null mean",
"perm p", "BH q"], body))
if os.path.exists(f"{R}/set4_predictors.csv"):
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/set4_predictors.csv")]
hdr, dat = rows[0], rows[1:]
ix = {h: i for i, h in enumerate(hdr)}
L.append("\n**SET 4, held out by language pair.** n = %d language pairs. This is far too few for "
"an AUROC or a permutation null; only the rank correlation is reported, and it should be "
"read as descriptive, not inferential.\n" % len(set4))
L.append(md_table(["predictor", "Spearman vs realised rescue"],
[[d[ix["predictor"]], fmt(float(d[ix["spearman_rescue"]]) if d[ix["spearman_rescue"]] else None)]
for d in dat]))
# coverage
_conf = []
if os.path.exists(f"{R}/predictor_confirmatory.csv"):
_rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_confirmatory.csv")]
_ix = {h: i for i, h in enumerate(_rows[0])}
for d in _rows[1:]:
try:
_conf.append({"sub": d[_ix["substrate"]], "pred": d[_ix["predictor"]],
"auroc": float(d[_ix["auroc_heldout_by_seed"]]),
"q": float(d[_ix["bh_q_within_confirmatory_family"]] or "nan")})
except Exception:
pass
_sig = [c for c in _conf if c["q"] == c["q"] and c["q"] < 0.05]
_tested = [c for c in _conf if c["q"] == c["q"]]
_cs_line = " · ".join(
f"{c['sub'].split('-')[1]} {c['auroc']:.2f}"
for c in sorted([c for c in _conf if "coordinate share" in c["pred"]],
key=lambda c: int(c["sub"].split("-")[1][:-1]))) or "—"
L.append(f"""
### What P0-2 comes to
**The confirmatory family gives {len(_sig)} significant cell{'' if len(_sig) == 1 else 's'} out of
{len(_tested)} tested** (BH q under 0.05 within the family){':' if _sig else '.'}
""" + ("".join(f"\n- {c['sub']} · {c['pred']} · AUROC {c['auroc']:.3f} · q = {c['q']:.3f}\n" for c in _sig) if _sig else "") + ("""
The strongest single cell is the coordinate share at pythia-70m — held-out AUROC 0.81, raw
permutation p = 0.002 — which is a real effect and worth naming rather than burying. It does not
survive correction across the family, and the reason it does not is instructive: the same predictor
on the same outcome, measured on four other complete grids of the same model family, lands at 0.45,
0.48, 0.61 and 0.71. The honest summary is:
""" if not _sig else """
That is a real effect and it should not be rounded down to zero. It should also not be rounded up.
The predictor that carries it is the **coordinate share** — exactly the quantity the manuscript's
thesis is about — and the honest summary is:
""") + """
- **It does not replicate across substrates.** Held-out AUROC for the coordinate share, on five
complete grids of the *same* model family differing only in size: """ + _cs_line + """. A quantity that lands
anywhere between "slightly the wrong way" and 0.81 depending on which substrate you happen to test
is not a validated instrument for "representational alignment predicts merging", however
encouraging its best cell looks.
- **The exploratory table looks better than the confirmatory one, and that is the point of having
both.** Across ~150 predictor × substrate × outcome cells there are plenty of AUROCs in the
0.70–0.81 range with raw permutation p below 0.05; none survives BH across that family. Quoting
the best of them would be exactly the error the audit exists to catch.
- **Across-substrate transfer fails outright under correction.** Fitting on the other sizes and
testing on a held-out one, the coordinate share reaches AUROC 0.81 on 70m and 0.71 on 31m with raw
permutation p of 0.003 and 0.016 — and 0.51 on both 14m and 160m. Across the 20-cell transfer
family **not one cell survives BH** (smallest q = 0.11). The multivariate ridge over all predictors
does no better than its best single member.
One thing worth noticing before concluding, because it is partly a power story rather than a signal
story: **detectability tracks how much the outcome varies at all.** The within-substrate standard
deviation of the realised rescue is 0.067 at 14m, 0.143 at 31m, 0.127 at 70m and 0.095 at 160m
(against a between-substrate spread of 0.143 in the means). 14m — where the rescue is both largest
and most uniform across pairs — is the substrate where nothing predicts, and 70m, with roughly twice
the spread, is where the one significant cell appears. So part of the null is that at some sizes
every pair is rescued by nearly the same amount and there is very little left to rank. That is a
caveat in the predictors' favour and it does not rescue the positive claim: a predictor that only
resolves when the outcome happens to be dispersed is not the instrument the thesis needs.
Against them: the seed-cluster null is
conservative by construction, but so is the design that needs it; these are 36 pairs built from 9
seeds, not 36 independent observations, and any analysis that treats them as independent will
overstate its significance.
**Verdict, stated as the audit asks.** On real reseeded LMs, the pre-merge alignment predictors do
not reliably predict how much of the merge obstruction alignment will actually remove. The one
substrate where the coordinate share does predict it does not generalise to the others. This is a
negative transfer result from the synthetic/S3 setting to real models, and it is reported as one.
""")
abl = load("abl_*.jsonl")
if abl:
L.append("\n## Control · same-basin vs different-basin pairs\n")
L.append("""SET 1's main grid uses `pythia-<size>-seed{n}` (PolyPythia), which reseeds
initialisation and data order together. `pythia-160m-weight-seed{1,2,3}` and
`pythia-160m-data-seed{1,2,3}` are the older Pythia ablations that were intended to vary one of those
at a time. **They do not give the init-only control they look like they give**, and the weight cosine
column below is how we know: pairs from either ablation family have parameter vectors that are still
*strongly correlated*, while main-grid pairs are essentially orthogonal. Whatever the ablation seeds
vary, both families stay in the same basin.
That makes them useful as something else — a **same-basin reference** — so they are reported as one.\n""")
body = []
def _row(label, sub):
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in sub])
wc = np.array([r["predictors"]["weight_cosine"] for r in sub])
dr = np.array([r["predictors"]["d_raw"] for r in sub])
cs = np.array([r["predictors"]["coord_share_bnd_perm"] for r in sub])
ck = np.array([r["predictors"]["cka_mean"] for r in sub])
return [label, len(sub), fmt(wc.mean()), fmt(dr.mean()), fmt(ck.mean()), fmt(cs.mean(), 4),
fmt(d0.mean(), 2), fmt(dp.mean(), 2), fmt(np.mean(1 - dp / d0) * 100, 1) + "%"]
for sz in sorted({r["size"] for r in abl}):
body.append(_row(f"`pythia-{sz}-seed{{1,2,3}}`", [r for r in abl if r["size"] == sz]))
_m160 = [r for r in set1 if r["size"] == "160m"]
if _m160:
body.append(_row("`pythia-160m-seed{1..9}` (main grid)", _m160))
L.append(md_table(["pairs", "n", "weight cosine", "d_raw", "CKA", "coordinate share",
"naive Δfloor", "Δfloor perm", "rescue"], body))
L.append("""
**What this actually shows.**
1. **The main grid really is the different-basin case.** Weight cosine ~0.02 between two PolyPythia
seeds: after training, two independently initialised 160M models are as good as orthogonal in
parameter space. Everything SET 1 reports is about that regime.
2. **Same-basin models still cannot be naively averaged for free.** The ablation pairs are strongly
correlated in weight space (cosine ~0.55–0.57) and their naive merge is still ~3 nats/token above
the better parent — roughly a third of the different-basin penalty, on a parent floor of 3.3.
Merging is not a solved problem inside a basin either.
3. **Alignment does almost nothing for them, and that is the right behaviour.** Their coordinate share
is ~0.013 against ~0.087 for the main grid, and the permutation rung removes only a few percent of
their Δfloor. There is no coordinate mismatch left to remove, so the aligner correctly declines to
find one. That is a useful negative control on the aligner itself: it is not manufacturing rescue
out of noise.
4. **The residual is therefore not coordinate.** Whatever costs a same-basin pair 3 nats/token, and
whatever is left after alignment on a different-basin pair, is something the permutation group does
not describe.
**Caveat.** n = 3 pairs per ablation family, and these repos come from a different release than the
PolyPythia `-seed{n}` set, so a training-configuration difference cannot be excluded as a partial
explanation for their closeness. The claim being made here is the measured one — these particular
pairs are same-basin and behave as described — not a claim about what "varying the init seed" does in
general.
""")
L.append("\n## Coverage — what ran and what did not\n")
cov = []
for sz in ["14m", "31m", "70m", "160m", "410m"]:
n = len([r for r in set1 if r["size"] == sz])
tot = 36 if sz != "410m" else 15
cov.append([f"SET 1 Δfloor · pythia-{sz}", f"{n}/{tot} seed pairs",
"complete" if n >= tot else ("partial" if n else "NOT RUN"),
"M0 naive · M1 permutation · M1 Procrustes · M2 task-arithmetic · M3 TIES; LMC barrier for M0 and M1-perm"])
if abl:
for sz in sorted({r["size"] for r in abl}):
cov.append([f"SET 1 control · pythia-{sz}", f"{len([r for r in abl if r['size'] == sz])}/3 pairs",
"complete", "init-seed-only vs data-order-only, same rungs"])
nb = {}
for b in blimp: nb[b["size"]] = nb.get(b["size"], 0) + 1
cov.append(["SET 1 accuracy · BLiMP", ", ".join(f"pythia-{k}: {v}/36" for k, v in sorted(nb.items(), key=lambda kv: int(kv[0][:-1]))) or "0",
"RAN" if blimp else "**NOT RUN**",
"67 paradigms from `nyu-mll/blimp`, minimal-pair sentence-logprob scoring, on the SAME merges"])
nr = {}
for r_ in rep: nr[r_["size"]] = nr.get(r_["size"], 0) + 1
_slp = _dedup_sp(load("slerp_*.jsonl"))
_ns = {}
for r_ in _slp: _ns[r_["size"]] = _ns.get(r_["size"], 0) + 1
_crb = _dedup_sp(load("corpus_*.jsonl"))
_nc = {}
for r_ in _crb: _nc[r_["size"]] = _nc.get(r_["size"], 0) + 1
cov.append(["SET 1 · corpus robustness", ", ".join(f"pythia-{k}: {v}/36" for k, v in sorted(_nc.items(), key=lambda kv: int(kv[0][:-1]))) or "0",
"RAN" if _crb else "**NOT RUN**",
"same pairs and merges re-scored on FLORES-200 eng, NeelNanda/pile-10k and WikiText-103 validation"])
cov.append(["SET 1 · SLERP rung", ", ".join(f"pythia-{k}: {v}/36" for k, v in sorted(_ns.items(), key=lambda kv: int(kv[0][:-1]))) or "0",
"RAN" if _slp else "**NOT RUN**",
"M6 SLERP and M7 permutation-aligned SLERP on the same pairs; Δfloor and BLiMP"])
cov.append(["SET 1 · REPAIR rung", ", ".join(f"pythia-{k}: {v}/36" for k, v in sorted(nr.items(), key=lambda kv: int(kv[0][:-1]))) or "0",
"RAN" if rep else "**NOT RUN**", "M4 = permutation-aligned average + pre-activation statistics repair; M5 = naive + repair; Δfloor and BLiMP on the same merges"])
cov.append(["SET 4 Δfloor · English-anchored", f"{len(set4)}/4 language pairs ({', '.join(r['lang'] for r in set4) or '—'})",
"complete" if len(set4) == 4 else ("partial" if set4 else "NOT RUN"),
"M0 naive · M1a vocab-transport · M1b/c vocab+unit-aligned · M1d/e forced-residual · M1f units-only · M1g/h embedding-row Procrustes"])
cov.append(["SET 4 Δfloor · partner-anchored (reverse)", f"{len(rev)}/4 language pairs",
"complete" if len(rev) == 4 else ("partial" if rev else "NOT RUN"), "same rungs, roles swapped"])
cov.append(["SET 4 accuracy · MultiBLiMP 1.0", f"{len(mb)}/4 language pairs",
"RAN" if mb else "**NOT RUN**", "`jumelet/multiblimp`, English + partner, on the SAME merges; UNK rate reported per cell"])
bg = load("bgpt_ceiling.jsonl")
cov.append(["SET 4 · jointly-trained bilingual ceiling", f"{len(bg)}/4 language pairs",
"RAN" if bg else "**NOT RUN**",
"`catherinearnett/B-GPT_en_X_simultaneous` vs the Goldfish parents and merges, all scored at a matched 128-token context"])
_bgm = load("bgpt_merge.jsonl")
cov.append(["SET 4c · bilingual×bilingual merge (B-GPT en_X × X_en)", f"{len(_bgm)}/4 language pairs",
"RAN" if _bgm else "**NOT RUN**",
"M0 naive · M1a vocab-transport · M1b/c +unit-aligned · M1g embedding-row Procrustes; Δfloor AND MultiBLiMP on the same merges. ~94% vocabulary overlap, so this cell isolates independent training from the vocabulary wall"])
cov.append(["Validation · is each alignment function-preserving?", "2 substrates x 5 maps", "RAN",
"parent re-evaluated after applying the map; permutation exact to float32 noise, orthogonal NOT (see Validation)"])
cov.append(["SET 4 · task-arithmetic / TIES", "0", "**NOT APPLICABLE**",
"Both operators need a shared ancestor. Two independently trained monolingual Goldfish models have none, and with one parent as a pseudo-base the operators reduce to returning the other parent. Excluded on definition, not on time."])
cov.append(["SET 1 · pythia-410m full grid", f"{len([r for r in set1 if r['size'] == '410m'])}/36 possible pairs", "partial",
"6 seeds only (15 possible pairs) and a reduced eval budget; the per-pair alignment cost is ~9 min at this width. Treat 410m as directional."])
cov.append(["Goldfish other tiers / other languages", "0", "NOT RUN", "Only the 1000mb tier and the four audit languages."])
cov.append(["Any downstream task beyond BLiMP/MultiBLiMP", "0", "NOT RUN",
"Both benchmarks are minimal-pair grammaticality tests. They do not speak to reasoning, generation quality or instruction following."])
L.append(md_table(["cell", "n", "status", "what was measured"], cov))
L.append("""
## Threats to validity, stated plainly
- **Likelihood ≠ accuracy.** Repeated because it is the single most load-bearing caveat here — and
because this report is one of the few places where both were measured on the same merges and found
to dissociate.
- **BLiMP and MultiBLiMP are minimal-pair grammaticality benchmarks.** They are a real accuracy
measurement and they are not a general one. A merge that scores 0.68 on MultiBLiMP-English is not
thereby a usable model; agreement minimal pairs are unusually forgiving of a degraded model,
because the two candidates differ in one inflected token and the grammatical form is usually the
more frequent one. Read "retains accuracy" as "retains *this* accuracy", not as "works".
- **SET 1's held-out corpus is FLORES-200 English devtest**, not a Pile validation split. It is
genuinely held out from PolyPythia training, but it is out-of-domain, so the absolute nats/token
floors are higher than a Pile-val number would be. Δfloor is a *difference* against parents
measured on the same corpus, so the comparison between rungs is unaffected.
- **SET 1's `-seed{n}` repos reseed initialisation AND data order together.** The 160m
weight-seed/data-seed control separates them (see the Control section) but only at n=3 pairs each.
The main grid's naive Δfloor should be read as an init-plus-data-order number.
- **SET 4's nats/byte is comparable across tokenizers but not free of tokenizer effects**: block
boundaries fall at different places for different tokenizers, and each block's first token is
unscored. With ~30k tokens per evaluation this is a sub-1% effect. The much larger tokenizer effect
— the English tokenizer's UNK rate on partner-language text — is reported per cell and is a
substantive finding rather than a nuisance.
- **The alignment search is over the permutation group (residual basis, MLP hidden axis, attention
heads) and its orthogonal relaxation, plus embedding-row Procrustes for the cross-tokenizer case.**
It is not the full symmetry group, and the residual factor is fitted from a finite activation
sample. A better aligner could raise the M1 rungs; nothing here bounds how far. What *is* bounded
is the claim that the aligners already in `mergeschool.core` do the job on these substrates.
- **The largest SET 1 sizes carry the fewest pairs.** 14m/31m/70m are complete 36-pair grids; 160m
and 410m are partial. The scale trend is monotone across all five but its right-hand end is thin.
- **SET 4's n = 4 language pairs**, all with English as one parent and all Indo-European. Any
predictor claim on that substrate is descriptive, and nothing here speaks to non-Indo-European or
to non-English pivots.
- **Everything here is training-free by construction.** No claim is made about what a small amount of
post-merge finetuning would recover; that is the obvious next experiment and it is out of scope for
a training-free audit.
""")
L.append("\n## Files\n")
L.append("""```
results/set1_{14m,31m,70m,160m,410m}.jsonl SET 1 per-pair records (predictors, rungs, barriers)
results/set1x_410m.jsonl second 410m worker (disjoint pairs; deduped on load)
results/set1_pairs.csv SET 1 per-pair flat table
results/abl_160m-{weight,data}.jsonl same-basin control (Pythia data-seed / weight-seed)
results/alignment_health.json is each map function-preserving? measured, both substrates
results/blimp_{size}.jsonl, blimp_pairs.csv SET 1 BLiMP accuracy, per pair and per rung
results/repair_{size}.jsonl REPAIR rung (Δfloor + BLiMP on the same merges)
results/slerp_{size}.jsonl SLERP and permutation-aligned SLERP rungs
results/corpus_{size}.jsonl same merges re-scored on Pile-10k and WikiText-103
results/set4_goldfish.jsonl, set4_pairs.csv SET 4 Δfloor, English-anchored
results/set4_reverse.jsonl SET 4 Δfloor, partner-language-anchored
results/set4_multiblimp.jsonl SET 4 MultiBLiMP accuracy
results/set4_tokenizer_diag.json UNK rates / bytes-per-token per (tokenizer, language)
results/bgpt_ceiling.jsonl jointly-trained bilingual ceiling, matched context
results/bgpt_merge.jsonl bilingual x bilingual merge (~94% vocabulary overlap)
results/rung_summary.csv rung x substrate x metric summary
results/predictor_confirmatory.csv P0-2 confirmatory family (5 predictors, BH within family)
results/predictor_auroc.csv P0-2 exploratory: every predictor x substrate x outcome
results/predictor_transfer_across_size.csv P0-2: leave-one-substrate-out transfer
results/set4_predictors.csv P0-2 on SET 4 (n=4, descriptive only)
figs/set1_dfloor_by_rung.png Δfloor by rung, per size
figs/set1_scale_trend.png obstruction and rescue vs model size
figs/set1_rescue_vs_predictor.png realised rescue vs coordinate share / CKA
figs/set1_roc.png held-out-by-seed ROC, confirmatory predictor
figs/set1_blimp_dissociation.png likelihood rescue vs accuracy rescue
figs/set4_dfloor.png Δfloor by rung, Goldfish
figs/set4_joint_ceiling.png B-GPT joint bilingual vs parents vs merges
figs/set4_likelihood_vs_accuracy.png SET 4 Δfloor against MultiBLiMP, per rung
code/*.py, code/*.sh every script and launcher that produced the above
```
**Reproducing.** `common.py` holds the corpora and evaluation; `gpt2_align.py` holds the GPT-2
(Conv1D) symmetry factors that `mergeschool.core.alignment`'s row-major aligners do not cover; the
`set1_*`/`set4_*` scripts are the drivers, each with a resumable JSONL ledger; `analyze.py` builds
the tables and figures and `make_report.py` writes this document. Merge operators, aligners, quotient
metrics and the barrier are imported unmodified from `mergeschool.core`.
""")
open("/root/compose-audit/RESULTS_COMPOSE_AUDIT.md", "w").write("\n".join(L) + "\n")
if rung_rows:
keys = []
for r in rung_rows:
for k in r:
if k not in keys: keys.append(k)
with open(f"{R}/rung_summary.csv", "w") as f:
f.write(",".join(keys) + "\n")
for r in rung_rows:
f.write(",".join(str(r.get(k, "")) for k in keys) + "\n")
print("report written:", sum(len(x) for x in L), "chars")