Research prototype · results page

Stemma

Recover derivation direction, multi-parent merges and mixing ratios from weights alone — reading a few megabytes over HTTP Range requests, never a full checkpoint.

This page is static. The interactive analysis runs locally, not here — a Gradio Space needs a Python backend, which Hugging Face gates behind a PRO subscription. Everything below is a real measurement, reproducible with the two commands in Run it yourself.

Why this is different

Existing weight-level fingerprints are symmetric by construction: sim(A,B) == sim(B,A). That is a fine design for the question they ask, and a hard ceiling on the question Stemma asks.

Symmetric fingerprints
(AWM / REEF / HuRef-style)
Stemma
Question“Are these two related?”“Which came first, from which parents, in what proportion?”
Directionnot expressible — 50% by constructionsigned log-likelihood ratio, with abstention
Multi-parent mergesnot expressiblesparse non-negative decomposition
Mixing ratiosnot expressiblerecovered coefficients
Failure modefalse “related” on architecture twinsabstains rather than guessing

Measured results

20 real checkpoints built with actual fine-tuning, quantisation, pruning and merging — 190 labelled pairs, of which 25 are hard same-architecture / different-seed controls. seed=0.

MethodAUCFPR@95TPRFPR hard controlsDirectionMerge F1Mixing MAE
Stemma0.9940.0000.000100% on answered0.8670.070
cosine0.9870.0000.00050% — structuraln/an/a
CKA / REEF-style0.9870.0000.00050% — structuraln/an/a
HuRef-style0.9810.0000.00050% — structuraln/an/a

n/a is not zero: a symmetric fingerprint produces no mixing coefficients at all, so there is nothing to score. 50% is a structural ceiling, not a tuning failure.

Direction, split by relation — the honest view

An aggregate would let the easy scar-bearing edges hide the hard scar-free ones, so the harness refuses to report one.

RelationGroupnAccuracyAbstainedmean |llr|
quantisationscar-bearing3100.0%0.0%2.80
pruningscar-bearing2100.0%0.0%2.65
vocab extensionscar-bearing2100.0%0.0%4.98
SFTscar-free10.0%100%0.02
LoRAscar-free10.0%100%0.01
continued pretrainscar-free10.0%100%0.02

Direction is near-deterministic exactly where an operation is lossy and irreversible — you cannot un-quantise, un-prune, or un-extend a vocabulary, so the scar can only ever appear downstream. Where nothing lossy happened, Stemma abstains rather than guessing.

Merge recovery

SlicenPrecisionRecallF1Mixing MAE
all41.0000.7920.8670.070
DARE11.0001.0001.0000.0004
SLERP11.0001.0001.0000.027
TIES21.0000.5830.7330.126

Precision is 1.000 — no false parent at all. That is deliberately bought with recall: for a provenance tool a false parent asserts something about a model that had nothing to do with the child, which is worse than a miss.

Transfer cost — the reduction grows with model size

ModelCheckpointHeader onlyFull sketchReduction
SmolLM2-135M-Instruct269 MB31,397 B (0.012%)17.1 MB (6.34%)16×
Qwen2.5-7B-Instruct15.2 GB27,752 B (0.0002%)98.1 MB (0.644%)155×

Sampling cost is fixed while checkpoints grow, so the ratio improves with scale. Both figures are live HTTP Range reads against the public Hub; nothing was downloaded.

Figures

Direction accuracy split by ground-truth relation, scar-bearing versus scar-free
The figure to read. Direction accuracy per relation, with the scar-bearing group separated from the scar-free one. The aggregate bar in fig. 1 is the average of these.
Capability matrix: methods against capabilities
Capability matrix. The crosses in the direction, multi-parent and mixing-ratio columns are structural: those statistics are symmetric functions of an unordered pair, so the questions are not merely hard for them — they are unanswerable.
Direction accuracy per method against the 50% chance line
Every baseline sits exactly on the 0.50 chance line, because cosine/CKA/HuRef statistics are symmetric in their two arguments. No amount of tuning moves them.
Recovered versus true mixing coefficients
Recovered vs. true mixing coefficient for every candidate of every ground-truth merge. Points on the y = x line are correctly weighted parents; points on the x-axis are decoys. No symmetric baseline can produce a single point on this plot.
ROC curves for relatedness detection
Relatedness ROC. This axis is where the symmetric baselines are genuinely competitive — the separation appears only in the questions above.
Bytes per decision, log scale
Bytes per decision, log scale. The full-download bar is read from the safetensors header, never downloaded.

What weight geometry cannot do

These limits were measured, not assumed, and they bound how the results above should be read.

  1. Direction is near-deterministic only for lossy operations. Scar-free SFT/LoRA edges are weakly identifiable from two models alone, and the estimator abstains.
  2. Norm growth is recipe-dependent and cannot be a prior. Measured over 8 shared tensors: log‖B‖−log‖A‖ was −0.0171 (0/8 positive) for Qwen2.5-0.5B → Instruct but +0.0113 (8/8 positive) for SmolLM2-135M → Instruct. Both are unambiguously base → instruct-tuned. A hand-set sign would have been right on one family and wrong on the other.
  3. Outgroup rooting is invalid for merge children. Rooting assumes descendants drift monotonically away from the root, but merging is a contraction toward the centroid: 0.6·sft + 0.4·cpt partly cancels two perturbations and lands closer to the root than either parent (root→sft 0.000820, root→cpt 0.001610, root→merge 0.000678). Every correctly chosen sibling outgroup then pushes the answer the wrong way. Direction for a merged model must come from the decomposition, not distance geometry.
  4. Fitting the combiner lost to hand-set priors. On the same held-out split the priors scored 1.000 accuracy on decided pairs against the fit's 0.500 — chance. With 13 features and 21 training pairs the problem is underdetermined, and the fit gave the quantisation-lattice feature a negative weight, asserting that the quantised model is the parent. That is physically impossible.
  5. End-to-end DAG reconstruction is weaker than the pairwise numbers. The benchmark scores pairwise decisions; whole-graph accuracy is not yet scored, and trace output should be read as ranked hypotheses for a human.

Run it yourself

pip install "git+https://github.com/NagaYu/stemma"

# Which of these two came first?
stemma direction Qwen/Qwen2.5-0.5B Qwen/Qwen2.5-0.5B-Instruct

# Recover merge parents and mixing ratios
stemma decompose org/merged --candidates org/a org/b org/c --base org/base

# Full lineage + licence propagation + AI-BOM
stemma trace org/model --universe universe.txt --out bom.json

# The interactive UI, locally
pip install "git+https://github.com/NagaYu/stemma#egg=stemma[app]" && python app.py

Nothing here requires a Hugging Face account or token — the direction priors ship inside the package, and it runs with HF_HUB_OFFLINE=1.

Scope and ethics. Stemma reports statistical evidence with a confidence, and never a determination of infringement or licence non-compliance. Weight-level similarity and derivation direction are inferences from a small sample of tensors and can be wrong. Nothing here establishes provenance as fact. A human must review every finding before any action is taken.