DEV Community

Cover image for Fusion Check: a zero-data law that predicts whether merging two fine-tunes preserves behavior (13 pairs, LOOCV 0.81, open source)
Jose Miguel Madueño
Jose Miguel Madueño

Posted on

Fusion Check: a zero-data law that predicts whether merging two fine-tunes preserves behavior (13 pairs, LOOCV 0.81, open source)

I built Fusion Check — a law that tells you, before merging, whether two fine-tuned LLMs are compatible. No data, no gradients, no GPU. Under a second.

The problem it solves: Blind "soup" (weight averaging) always merges — but when two models were trained on different tasks, the fusion dilutes both. The law gives you the necessary and sufficient condition on the task kernel (cosine of weight deltas + effective dimensionality) to know beforehand if the fusion preserves behavior.

The math (one line):
E[e²] = 2(1-α)²(1-cos²)/d_eff — threshold cos² ≥ 1 − δ²·d_eff/(2(1-α)²)

What it gives you:

  • A decision: MERGE / NO_MERGE / PRIORITIZED / REFUSE / VERIFY
  • The optimal mixing coefficient α* = √γ₁/(√γ₁+√γ₂) — closed form, verified symbolically and numerically
  • Per-task retention prediction (calibrated: 13 pairs, LOOCV corr 0.81, MAE 0.072)

Proven three independent ways:

  1. Analytic derivation
  2. Formal verification with z3 (28 theorems)
  3. Empirical validation (147 combinations, max deviation 1.13%, zero violations)

Real result: Two weak, diverse estimators of the same task (0.762/0.756) → merged soup 0.822 (+6–7 points). Two orthogonal specialists? The law says NO_MERGE and prevents dilution.

Links:

Honest limits:

  • Small models (TinyStories-3M), 13 measured pairs, 9/13 correct decisions
  • Out-of-calibration cosines fall back to the pure law with a low-confidence flag
  • Nothing runs on servers — everything is local, open source (MIT), no patents

Author: Jose Miguel Madueño Ortega · MIT · free and open.

Top comments (0)