epistasis_predicts: functional conflict, not weight geometry, predicts merge failure pre-merge

The decisive experiment from the external review. 39 LoRA parent pairs
(0.5B, 3 seeds) on three axes decorrelated by construction: conflict
(contradictory conventions on shared prompts, private budgets fixed),
compat (same prompts, SAME convention — overlap without conflict), and
duration (weight divergence, zero conflict). Six pre-merge predictors;
primary outcome = merge penalty (parent potential − merged achieved).

League table (Spearman vs penalty, n=39): functional measures predict
(dis_raw +0.460, epi_conf +0.446, p<0.005); geometry collapses
(delta_cos +0.03, delta_l2 +0.17 n.s.); gradient alignment weak (−0.35);
performance ~0. The first grid's apparent geometry win (+0.60) was an
overlap/volume artifact — the compat control axis (added for exactly
this) exposed and killed it: same overlap and data volume, zero penalty.
Honest riders in the README: confidence weighting does not beat raw
disagreement as a rank predictor (pre-registered internal prediction not
confirmed; it does double the conflict/compat level contrast), and
|rho|~0.45 is bounded by 0.5B merge-outcome noise (7B is the firm-up).

Also: micro-batched gradient accumulation (OOM fix on the shared 16GB
GPU), exact r-space LoRA-delta geometry (brute-force-verified test,
151 green), systemd-run runbook lesson (tmux dies with the SSH session
scope on this box).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkRLcc18rwT2Lysu6PbG7v
This commit is contained in:
Giorgio Gilestro 2026-09-06 17:19:46 +01:00
parent 5a23ddaf2a
commit 287d2326cc
16 changed files with 622 additions and 3 deletions

View file

@ -126,3 +126,15 @@ def test_convention_tasks_conflict_only_between_conventions():
# deterministic: prompts and answers are a pure function of (seed, convention)
again = make_convention_tasks(20, seed=5, convention="asc")
assert [t.answer for t in again] == [t.answer for t in asc]
def test_lora_delta_inner_matches_brute_force():
# The r-space Frobenius inner product <B1@A1, B2@A2> must equal the materialised computation.
import torch
from llm.epistasis import lora_delta_inner
g = torch.Generator().manual_seed(0)
A1, B1 = torch.randn(4, 20, generator=g), torch.randn(12, 4, generator=g)
A2, B2 = torch.randn(4, 20, generator=g), torch.randn(12, 4, generator=g)
brute = float(((B1 @ A1) * (B2 @ A2)).sum())
assert abs(lora_delta_inner(A1, B1, A2, B2) - brute) < 1e-3