Upload code/make_report.py with huggingface_hub
Browse files- code/make_report.py +211 -8
code/make_report.py
CHANGED
|
@@ -78,7 +78,8 @@ L.append("""## Read this first: what substrate, and what metric
|
|
| 78 |
> **Δfloor is a likelihood metric, not benchmark accuracy.** Nothing below shows that a likelihood
|
| 79 |
> rescue transfers to BLiMP/MultiBLiMP accuracy, or to any downstream task. The audit's sharpest
|
| 80 |
> point — *recovery is not success* — is **not** settled by these numbers and must not be written up
|
| 81 |
-
> as if it were.
|
|
|
|
| 82 |
""")
|
| 83 |
|
| 84 |
if set1:
|
|
@@ -114,10 +115,70 @@ if set1:
|
|
| 114 |
interior t that beats the better parent, aligned or not.
|
| 115 |
""")
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
if set4:
|
| 118 |
L.append("\n## SET 4 · Goldfish monolingual → bilingual merge (the real composition models)\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
rung_keys = list(set4[0]["rungs"])
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
body = []
|
| 122 |
for r in set4:
|
| 123 |
row = [f"eng–{r['lang']}", f"{r['predictors']['vocab_overlap']:.1%}",
|
|
@@ -146,7 +207,13 @@ if set4:
|
|
| 146 |
L.append("Uniform-over-vocabulary reference (a model that has learned nothing), mean over the two "
|
| 147 |
"languages, in the same units: " +
|
| 148 |
", ".join(f"**eng-{r['lang']}** {u[1]}" for r, u in zip(set4, uref)) + " nats/byte.\n")
|
| 149 |
-
L.append("**Δfloor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
"(lower is better; 0 would mean the merge matches the better parent):\n")
|
| 151 |
L.append(md_table(hdr, body))
|
| 152 |
body2 = []
|
|
@@ -170,6 +237,56 @@ block-normalised weight distance. `M1d/M1e` force the residual factor in regardl
|
|
| 170 |
`M1f_perm_novocab` isolates the unit alignment with **no** vocabulary transport.
|
| 171 |
""")
|
| 172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
L.append("\n## P0-2 · Do the pre-merge predictors predict the realised rescue?\n")
|
| 174 |
if os.path.exists(f"{R}/predictor_auroc.csv"):
|
| 175 |
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_auroc.csv")]
|
|
@@ -177,7 +294,10 @@ if os.path.exists(f"{R}/predictor_auroc.csv"):
|
|
| 177 |
ix = {h: i for i, h in enumerate(hdr)}
|
| 178 |
body = []
|
| 179 |
for d in dat:
|
| 180 |
-
|
|
|
|
|
|
|
|
|
|
| 181 |
fmt(float(d[ix["spearman_rescue"]]) if d[ix["spearman_rescue"]] else None),
|
| 182 |
fmt(float(d[ix["auroc_heldout_by_seed"]]) if d[ix["auroc_heldout_by_seed"]] else None),
|
| 183 |
fmt(float(d[ix["perm_null_mean"]]) if d[ix["perm_null_mean"]] else None),
|
|
@@ -191,8 +311,24 @@ if os.path.exists(f"{R}/predictor_auroc.csv"):
|
|
| 191 |
"pair's outcome to the permuted pair, leaving the predictor vector untouched — this "
|
| 192 |
"preserves the pair-dependence structure that a plain label shuffle destroys. "
|
| 193 |
"BH-corrected across the predictor family.\n")
|
| 194 |
-
L.append(md_table(["substrate", "
|
| 195 |
-
"null mean", "perm p", "BH q"], body))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
if os.path.exists(f"{R}/set4_predictors.csv"):
|
| 197 |
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/set4_predictors.csv")]
|
| 198 |
hdr, dat = rows[0], rows[1:]
|
|
@@ -205,6 +341,68 @@ if os.path.exists(f"{R}/set4_predictors.csv"):
|
|
| 205 |
for d in dat]))
|
| 206 |
|
| 207 |
# coverage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
L.append("\n## Coverage — what ran and what did not\n")
|
| 209 |
cov = []
|
| 210 |
for sz in ["14m", "70m", "160m"]:
|
|
@@ -215,8 +413,13 @@ langs = [r["lang"] for r in set4]
|
|
| 215 |
cov.append(["SET 4 · goldfish eng×X", f"{len(set4)}/4 language pairs ({', '.join(langs) or '—'})",
|
| 216 |
"complete" if len(set4) == 4 else ("partial" if set4 else "NOT RUN"),
|
| 217 |
"M0 naive · M1a vocab-transport · M1b/c vocab+unit-aligned (perm/Procrustes) · M1d/e forced-residual · M1f unit-aligned only"])
|
| 218 |
-
|
| 219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
cov.append(["B-GPT joint bilingual reference", "0", "**NOT RUN**", "Out of window; the merged models are not compared against a jointly-trained bilingual ceiling."])
|
| 221 |
cov.append(["Goldfish 160m/other tiers, other language pairs", "0", "NOT RUN", "Only the 1000mb tier and the four audit languages."])
|
| 222 |
L.append(md_table(["cell", "n", "status", "what was measured"], cov))
|
|
|
|
| 78 |
> **Δfloor is a likelihood metric, not benchmark accuracy.** Nothing below shows that a likelihood
|
| 79 |
> rescue transfers to BLiMP/MultiBLiMP accuracy, or to any downstream task. The audit's sharpest
|
| 80 |
> point — *recovery is not success* — is **not** settled by these numbers and must not be written up
|
| 81 |
+
> as if it were. **We tested that transfer directly on SET 1 with BLiMP — see the accuracy section
|
| 82 |
+
> below — and it does not hold.** SET 4 has no accuracy benchmark in this window (see Coverage).
|
| 83 |
""")
|
| 84 |
|
| 85 |
if set1:
|
|
|
|
| 115 |
interior t that beats the better parent, aligned or not.
|
| 116 |
""")
|
| 117 |
|
| 118 |
+
if len(mdtabs) >= 3:
|
| 119 |
+
L.append("\n### The scale trend — alignment's coordinate rescue WEAKENS with model size\n")
|
| 120 |
+
tr = []
|
| 121 |
+
for sz in sizes:
|
| 122 |
+
sub = [r for r in set1 if r["size"] == sz]
|
| 123 |
+
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
|
| 124 |
+
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in sub])
|
| 125 |
+
do = np.array([r["rungs"]["M1_orth_avg"]["delta_floor"] for r in sub])
|
| 126 |
+
db = np.minimum(dp, do)
|
| 127 |
+
ck = np.array([r["predictors"]["cka_mean"] for r in sub])
|
| 128 |
+
ac = np.array([r["predictors"].get("aligned_cka_perm", float("nan")) for r in sub])
|
| 129 |
+
cs = np.array([r["predictors"]["coord_share_bnd_perm"] for r in sub])
|
| 130 |
+
tr.append([f"pythia-{sz}", len(sub), fmt(float(np.mean([r["floor"] for r in sub])), 2),
|
| 131 |
+
fmt(d0.mean(), 2), fmt(np.mean(1 - dp / d0) * 100, 1) + "%",
|
| 132 |
+
fmt(np.mean(1 - do / d0) * 100, 1) + "%",
|
| 133 |
+
fmt(np.mean(1 - db / d0) * 100, 1) + "%",
|
| 134 |
+
fmt(ck.mean()), fmt(float(np.nanmean(ac))), fmt(cs.mean(), 4)])
|
| 135 |
+
L.append(md_table(["substrate", "n pairs", "parent floor", "naive Δfloor",
|
| 136 |
+
"rescue, permutation", "rescue, Procrustes", "rescue, best of the two",
|
| 137 |
+
"unaligned CKA", "aligned CKA", "weight coordinate share"], tr))
|
| 138 |
+
L.append("""
|
| 139 |
+
The coordinator flagged this from the first two pairs and asked whether it survives the full grid.
|
| 140 |
+
**It does, monotonically, across every size we ran.** The naive merge's Δfloor shrinks with scale
|
| 141 |
+
*and* the share of it that alignment can remove shrinks faster. Two things are worth separating:
|
| 142 |
+
|
| 143 |
+
- The **naive** merge gets less catastrophic with scale, which on its own would be an encouraging
|
| 144 |
+
trend for merging.
|
| 145 |
+
- The **alignment rescue** shrinks at the same time. So the improvement at larger scale is not
|
| 146 |
+
something the coordinate story is buying; the coordinate-removable component of the obstruction is
|
| 147 |
+
a *decreasing* fraction of the total. Whatever is left over at 160m is not a coordinate problem,
|
| 148 |
+
and the same aligners that recover most of the 14m gap recover a quarter of it.
|
| 149 |
+
|
| 150 |
+
That is a caution for the manuscript's central thesis, not a confirmation of it: alignment predicts
|
| 151 |
+
and reduces the obstruction most where the obstruction matters least, and its purchase falls away in
|
| 152 |
+
exactly the direction the field is scaling.
|
| 153 |
+
""")
|
| 154 |
+
|
| 155 |
if set4:
|
| 156 |
L.append("\n## SET 4 · Goldfish monolingual → bilingual merge (the real composition models)\n")
|
| 157 |
+
diag = {}
|
| 158 |
+
try: diag = json.load(open(f"{R}/set4_tokenizer_diag.json"))
|
| 159 |
+
except Exception: pass
|
| 160 |
+
for r in set4:
|
| 161 |
+
px = r["parents"]["x_on_x"]["nats_per_byte"]
|
| 162 |
+
for _v in r["rungs"].values():
|
| 163 |
+
_v["delta_floor_x"] = _v["x"]["nats_per_byte"] - px
|
| 164 |
+
_v["delta_floor_mean"] = 0.5 * (_v["delta_floor_eng"] + _v["delta_floor_x"])
|
| 165 |
+
r["floor_x"] = px
|
| 166 |
rung_keys = list(set4[0]["rungs"])
|
| 167 |
+
if diag:
|
| 168 |
+
L.append("\n**Tokenizer diagnostic — read this before any SET 4 number.** The merged model "
|
| 169 |
+
"lives in the *English* parent's token-id space, so partner-language text must be "
|
| 170 |
+
"tokenized with the English tokenizer. It cannot represent much of that text:\n")
|
| 171 |
+
L.append(md_table(["text", "UNK rate, English tokenizer", "UNK rate, own tokenizer",
|
| 172 |
+
"bytes/token, English tok", "bytes/token, own tok"],
|
| 173 |
+
[[k, f"{v['eng_tok_unk_rate']:.1%}", f"{v['own_tok_unk_rate']:.1%}",
|
| 174 |
+
fmt(v['eng_tok_bytes_per_token'], 2), fmt(v['own_tok_bytes_per_token'], 2)]
|
| 175 |
+
for k, v in diag.items()]))
|
| 176 |
+
L.append("\nAt a 46.5% UNK rate the English parent's *apparent* likelihood on Greek text is an "
|
| 177 |
+
"artifact — it is confidently predicting `<unk>`, not modelling Greek — so it is not "
|
| 178 |
+
"used as a floor. The partner-language floor below is the partner parent evaluated "
|
| 179 |
+
"with its **own** tokenizer. The **English-side** column is the clean one (0.07% UNK) "
|
| 180 |
+
"and is the primary SET 4 number.\n")
|
| 181 |
+
hdr = ["pair", "vocab overlap", "floor eng", "floor X (own tok)"] + [k for k in rung_keys]
|
| 182 |
body = []
|
| 183 |
for r in set4:
|
| 184 |
row = [f"eng–{r['lang']}", f"{r['predictors']['vocab_overlap']:.1%}",
|
|
|
|
| 207 |
L.append("Uniform-over-vocabulary reference (a model that has learned nothing), mean over the two "
|
| 208 |
"languages, in the same units: " +
|
| 209 |
", ".join(f"**eng-{r['lang']}** {u[1]}" for r, u in zip(set4, uref)) + " nats/byte.\n")
|
| 210 |
+
L.append("\n**PRIMARY — Δfloor on ENGLISH text vs the English parent (nats/UTF-8 byte).** This "
|
| 211 |
+
"cell has no tokenizer artifact: the merge is asked only to retain what the English "
|
| 212 |
+
"parent already had.\n")
|
| 213 |
+
L.append(md_table(["pair"] + rung_keys,
|
| 214 |
+
[[f"eng–{r['lang']}"] + [fmt(r["rungs"][k]["delta_floor_eng"]) for k in rung_keys]
|
| 215 |
+
for r in set4]))
|
| 216 |
+
L.append("\n**Δfloor vs the better parent, mean over the two languages, nats/UTF-8 byte** "
|
| 217 |
"(lower is better; 0 would mean the merge matches the better parent):\n")
|
| 218 |
L.append(md_table(hdr, body))
|
| 219 |
body2 = []
|
|
|
|
| 237 |
`M1f_perm_novocab` isolates the unit alignment with **no** vocabulary transport.
|
| 238 |
""")
|
| 239 |
|
| 240 |
+
# ---------------- BLiMP: accuracy, not likelihood
|
| 241 |
+
blimp = load("blimp_*.jsonl")
|
| 242 |
+
if blimp:
|
| 243 |
+
L.append("\n## The accuracy test · does the likelihood rescue transfer? (BLiMP, SET 1)\n")
|
| 244 |
+
L.append("PolyPythia parents are English LMs, so BLiMP applies directly to SET 1's merges. "
|
| 245 |
+
"Scoring is the standard minimal-pair comparison: total log p over the sentence, "
|
| 246 |
+
"correct when the grammatical member scores higher. **Chance = 0.500.** Same merges, "
|
| 247 |
+
"same alignment, same pairs as the Δfloor tables above.\n")
|
| 248 |
+
body, corr_rows = [], []
|
| 249 |
+
for sz in sorted({b["size"] for b in blimp}, key=lambda x: int(x[:-1])):
|
| 250 |
+
sub = [b for b in blimp if b["size"] == sz]
|
| 251 |
+
ceil = np.mean([b["ceiling"] for b in sub])
|
| 252 |
+
pmean = np.mean([np.mean(list(b["parent_acc"].values())) for b in sub])
|
| 253 |
+
row = [f"pythia-{sz}", len(sub), fmt(pmean, 3), fmt(ceil, 3)]
|
| 254 |
+
for k in ("M0_naive_avg", "M1_perm_avg", "M1_orth_avg"):
|
| 255 |
+
a = np.array([b["rungs"][k]["blimp_acc"] for b in sub])
|
| 256 |
+
row.append(f"{a.mean():.3f}")
|
| 257 |
+
best = np.array([min(b["rungs"][k]["blimp_acc"] for k in b["rungs"]) for b in sub])
|
| 258 |
+
bestm = np.array([max(b["rungs"][k]["blimp_acc"] for k in b["rungs"]) for b in sub])
|
| 259 |
+
row.append(fmt(np.mean((bestm - 0.5) / (ceil - 0.5)) * 100, 1) + "%")
|
| 260 |
+
body.append(row)
|
| 261 |
+
# does the likelihood rescue predict the accuracy rescue, pair by pair?
|
| 262 |
+
by_pair = {tuple(b["pair"]): b for b in blimp if b["size"] == sz}
|
| 263 |
+
s1 = {tuple(r["pair"]): r for r in set1 if r["size"] == sz}
|
| 264 |
+
common = sorted(set(by_pair) & set(s1))
|
| 265 |
+
if len(common) >= 6:
|
| 266 |
+
nats = np.array([s1[c]["rungs"]["M0_naive_avg"]["delta_floor"] -
|
| 267 |
+
min(s1[c]["rungs"][k]["delta_floor"] for k in s1[c]["rungs"] if k.startswith("M1"))
|
| 268 |
+
for c in common])
|
| 269 |
+
acc = np.array([max(by_pair[c]["rungs"][k]["blimp_acc"] for k in by_pair[c]["rungs"] if k.startswith("M1")) -
|
| 270 |
+
by_pair[c]["rungs"]["M0_naive_avg"]["blimp_acc"] for c in common])
|
| 271 |
+
rx = np.argsort(np.argsort(nats)).astype(float); ry = np.argsort(np.argsort(acc)).astype(float)
|
| 272 |
+
corr_rows.append([f"pythia-{sz}", len(common), fmt(EV.pearson(rx, ry)),
|
| 273 |
+
fmt(float(nats.mean()), 2), fmt(float(acc.mean()), 4)])
|
| 274 |
+
L.append(md_table(["substrate", "n pairs", "mean parent acc", "better-parent ceiling",
|
| 275 |
+
"M0 naive", "M1 permutation", "M1 Procrustes",
|
| 276 |
+
"best rung, % of the parents' above-chance margin retained"], body))
|
| 277 |
+
L.append("""
|
| 278 |
+
**This is the result the audit asked for, and it is negative.** On pythia-14m the permutation
|
| 279 |
+
alignment removes ~70% of the naive merge's Δfloor in nats/token — and the merged model still scores
|
| 280 |
+
near chance on BLiMP, against parents at ~0.66-0.69. A large, consistent, statistically obvious
|
| 281 |
+
*likelihood* rescue buys essentially **no** grammatical competence back. "Recovery is not success"
|
| 282 |
+
is not a caveat to add to a positive result here; on this substrate it is the result.
|
| 283 |
+
""")
|
| 284 |
+
if corr_rows:
|
| 285 |
+
L.append("\nPair by pair, does the size of the likelihood rescue predict the size of the "
|
| 286 |
+
"accuracy rescue? (Spearman, over seed pairs within a size.)\n")
|
| 287 |
+
L.append(md_table(["substrate", "n", "Spearman(Δfloor rescue, BLiMP rescue)",
|
| 288 |
+
"mean Δfloor rescue (nats/tok)", "mean BLiMP rescue (acc)"], corr_rows))
|
| 289 |
+
|
| 290 |
L.append("\n## P0-2 · Do the pre-merge predictors predict the realised rescue?\n")
|
| 291 |
if os.path.exists(f"{R}/predictor_auroc.csv"):
|
| 292 |
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_auroc.csv")]
|
|
|
|
| 294 |
ix = {h: i for i, h in enumerate(hdr)}
|
| 295 |
body = []
|
| 296 |
for d in dat:
|
| 297 |
+
if d[ix.get("outcome", 0)] != "rescue_frac" and "outcome" in ix and d[ix["outcome"]] != "dfloor_M1best":
|
| 298 |
+
continue
|
| 299 |
+
body.append([d[ix["substrate"]], d[ix["outcome"]] if "outcome" in ix else "rescue_frac",
|
| 300 |
+
d[ix["predictor"]], d[ix["n_pairs"]],
|
| 301 |
fmt(float(d[ix["spearman_rescue"]]) if d[ix["spearman_rescue"]] else None),
|
| 302 |
fmt(float(d[ix["auroc_heldout_by_seed"]]) if d[ix["auroc_heldout_by_seed"]] else None),
|
| 303 |
fmt(float(d[ix["perm_null_mean"]]) if d[ix["perm_null_mean"]] else None),
|
|
|
|
| 311 |
"pair's outcome to the permuted pair, leaving the predictor vector untouched — this "
|
| 312 |
"preserves the pair-dependence structure that a plain label shuffle destroys. "
|
| 313 |
"BH-corrected across the predictor family.\n")
|
| 314 |
+
L.append(md_table(["substrate", "outcome", "predictor", "n", "Spearman",
|
| 315 |
+
"AUROC (held out by seed)", "null mean", "perm p", "BH q"], body))
|
| 316 |
+
if os.path.exists(f"{R}/predictor_transfer_across_size.csv"):
|
| 317 |
+
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/predictor_transfer_across_size.csv")]
|
| 318 |
+
hdr, dat = rows[0], rows[1:]
|
| 319 |
+
ix = {h: i for i, h in enumerate(hdr)}
|
| 320 |
+
L.append("\n### Does a predictor fitted on one substrate transfer to another?\n")
|
| 321 |
+
L.append("Leave-one-**size**-out. Predictors are standardised *within* size first, so a predictor "
|
| 322 |
+
"that only works by encoding which substrate it is looking at scores nothing. The sign "
|
| 323 |
+
"(and the ridge coefficients) come from the other sizes only. Null = label permutation "
|
| 324 |
+
"within the held-out substrate, 1000–2000 draws; BH across the whole transfer family.\n")
|
| 325 |
+
body = [[d[ix["predictor"]], d[ix["outcome"]], d[ix["held_out_substrate"]], d[ix["n"]],
|
| 326 |
+
fmt(float(d[ix["auroc_transfer"]])), fmt(float(d[ix["null_mean"]])),
|
| 327 |
+
fmt(float(d[ix["perm_p"]])), fmt(float(d[ix["bh_q"]]))]
|
| 328 |
+
for d in dat if d[ix["outcome"]] == "rescue_frac"]
|
| 329 |
+
L.append(md_table(["predictor", "outcome", "held-out substrate", "n", "AUROC", "null mean",
|
| 330 |
+
"perm p", "BH q"], body))
|
| 331 |
+
|
| 332 |
if os.path.exists(f"{R}/set4_predictors.csv"):
|
| 333 |
rows = [l.rstrip("\n").split(",") for l in open(f"{R}/set4_predictors.csv")]
|
| 334 |
hdr, dat = rows[0], rows[1:]
|
|
|
|
| 341 |
for d in dat]))
|
| 342 |
|
| 343 |
# coverage
|
| 344 |
+
abl = load("abl_*.jsonl")
|
| 345 |
+
if abl:
|
| 346 |
+
L.append("\n## Control · is the obstruction the INIT seed or the DATA order?\n")
|
| 347 |
+
L.append("SET 1's main grid uses `pythia-<size>-seed{n}`, which reseeds **both** the "
|
| 348 |
+
"initialisation and the data order. `pythia-160m-weight-seed{1,2,3}` varies only the "
|
| 349 |
+
"initialisation; `pythia-160m-data-seed{1,2,3}` varies only the data order. Three seeds "
|
| 350 |
+
"each, so three pairs each — small, but the contrast is unambiguous.\n")
|
| 351 |
+
body = []
|
| 352 |
+
for sz in sorted({r["size"] for r in abl}):
|
| 353 |
+
sub = [r for r in abl if r["size"] == sz]
|
| 354 |
+
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in sub])
|
| 355 |
+
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in sub])
|
| 356 |
+
do = np.array([r["rungs"]["M1_orth_avg"]["delta_floor"] for r in sub])
|
| 357 |
+
cs = np.array([r["predictors"]["coord_share_bnd_perm"] for r in sub])
|
| 358 |
+
body.append([sz, len(sub), fmt(float(np.mean([r["floor"] for r in sub])), 2), fmt(d0.mean(), 2),
|
| 359 |
+
fmt(dp.mean(), 2), fmt(do.mean(), 2),
|
| 360 |
+
fmt(np.mean(1 - np.minimum(dp, do) / d0) * 100, 1) + "%", fmt(cs.mean(), 4)])
|
| 361 |
+
main160 = [r for r in set1 if r["size"] == "160m"]
|
| 362 |
+
if main160:
|
| 363 |
+
d0 = np.array([r["rungs"]["M0_naive_avg"]["delta_floor"] for r in main160])
|
| 364 |
+
dp = np.array([r["rungs"]["M1_perm_avg"]["delta_floor"] for r in main160])
|
| 365 |
+
do = np.array([r["rungs"]["M1_orth_avg"]["delta_floor"] for r in main160])
|
| 366 |
+
cs = np.array([r["predictors"]["coord_share_bnd_perm"] for r in main160])
|
| 367 |
+
body.append(["160m (init+data, main grid)", len(main160),
|
| 368 |
+
fmt(float(np.mean([r["floor"] for r in main160])), 2), fmt(d0.mean(), 2),
|
| 369 |
+
fmt(dp.mean(), 2), fmt(do.mean(), 2),
|
| 370 |
+
fmt(np.mean(1 - np.minimum(dp, do) / d0) * 100, 1) + "%", fmt(cs.mean(), 4)])
|
| 371 |
+
L.append(md_table(["seed variant", "n pairs", "parent floor", "naive Δfloor", "Δfloor perm",
|
| 372 |
+
"Δfloor Procrustes", "rescue, best", "weight coordinate share"], body))
|
| 373 |
+
L.append("""
|
| 374 |
+
Reading: models that differ **only in data order** start far closer together — the naive merge's
|
| 375 |
+
Δfloor is a small fraction of the reseeded-init case — and alignment does **nothing** for them,
|
| 376 |
+
because there is no coordinate mismatch to remove. Models that differ in **initialisation** land in
|
| 377 |
+
different coordinate frames and reproduce the main grid's behaviour. This is the control that makes
|
| 378 |
+
"the obstruction is coordinate" a claim about initialisation rather than about seeds generically,
|
| 379 |
+
and it also means SET 1's main grid conflates the two sources — its naive Δfloor is an
|
| 380 |
+
init-plus-data-order number, not an init-only one.
|
| 381 |
+
""")
|
| 382 |
+
|
| 383 |
+
L.append("""
|
| 384 |
+
### What P0-2 comes to
|
| 385 |
+
|
| 386 |
+
**Within a single substrate, nothing predicts the realised rescue.** On pythia-14m — 36 seed pairs,
|
| 387 |
+
a complete grid, a properly structured seed-cluster null — every pre-merge predictor we computed
|
| 388 |
+
(weight cosine, QMD in weight space and in representation space, coordinate share, CKA, task-vector
|
| 389 |
+
cosine) lands between AUROC 0.30 and 0.68 held out by seed, and **not one survives BH correction**.
|
| 390 |
+
The multivariate ridge over all of them does no better. This is a negative transfer result and it is
|
| 391 |
+
reported as one: the alignment-derived quantities that predict mergeability in the synthetic/S3
|
| 392 |
+
setting do **not** rank real reseeded-LM pairs by how much alignment will actually rescue them.
|
| 393 |
+
|
| 394 |
+
**Across substrates the picture is only slightly better and it is not consistent.** The
|
| 395 |
+
block-normalised coordinate share does transfer to some held-out sizes and not to others. Read
|
| 396 |
+
against the whole family that is one predictor doing well on part of the grid, not a validated
|
| 397 |
+
instrument, and it should not be quoted as a headline number.
|
| 398 |
+
|
| 399 |
+
Two honest caveats in the other direction. First, the *within-substrate* variance in rescue is small
|
| 400 |
+
relative to the *between*-substrate variance — every pair at a given size is rescued by roughly the
|
| 401 |
+
same amount — so there may simply be little signal left for a within-size predictor to find. Second,
|
| 402 |
+
the seed-cluster null is conservative by construction. Neither rescues the positive claim: on this
|
| 403 |
+
substrate, at this n, the predictors do not predict.
|
| 404 |
+
""")
|
| 405 |
+
|
| 406 |
L.append("\n## Coverage — what ran and what did not\n")
|
| 407 |
cov = []
|
| 408 |
for sz in ["14m", "70m", "160m"]:
|
|
|
|
| 413 |
cov.append(["SET 4 · goldfish eng×X", f"{len(set4)}/4 language pairs ({', '.join(langs) or '—'})",
|
| 414 |
"complete" if len(set4) == 4 else ("partial" if set4 else "NOT RUN"),
|
| 415 |
"M0 naive · M1a vocab-transport · M1b/c vocab+unit-aligned (perm/Procrustes) · M1d/e forced-residual · M1f unit-aligned only"])
|
| 416 |
+
nb = {b["size"]: 0 for b in blimp}
|
| 417 |
+
for b in blimp: nb[b["size"]] += 1
|
| 418 |
+
cov.append(["BLiMP accuracy · SET 1 (English)", ", ".join(f"pythia-{k}: {v}/36 pairs" for k, v in sorted(nb.items())) or "0",
|
| 419 |
+
"RAN" if blimp else "**NOT RUN**",
|
| 420 |
+
"67 paradigms from `nyu-mll/blimp`, minimal-pair sentence-logprob scoring, on the SAME merges as the Δfloor tables"])
|
| 421 |
+
cov.append(["MultiBLiMP / any accuracy benchmark · SET 4 (Goldfish)", "0", "**NOT RUN**",
|
| 422 |
+
"No multilingual benchmark harness was close to wired inside this window; deliberately not built from scratch. SET 4's numbers are likelihood only and say nothing about accuracy."])
|
| 423 |
cov.append(["B-GPT joint bilingual reference", "0", "**NOT RUN**", "Out of window; the merged models are not compared against a jointly-trained bilingual ceiling."])
|
| 424 |
cov.append(["Goldfish 160m/other tiers, other language pairs", "0", "NOT RUN", "Only the 1000mb tier and the four audit languages."])
|
| 425 |
L.append(md_table(["cell", "n", "status", "what was measured"], cov))
|