Recover derivation direction, multi-parent merges and mixing ratios from weights alone — reading a few megabytes over HTTP Range requests, never a full checkpoint.
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?” |
| Direction | not expressible — 50% by construction | signed log-likelihood ratio, with abstention |
| Multi-parent merges | not expressible | sparse non-negative decomposition |
| Mixing ratios | not expressible | recovered coefficients |
| Failure mode | false “related” on architecture twins | abstains rather than guessing |
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.
| Method | AUC | FPR@95TPR | FPR hard controls | Direction | Merge F1 | Mixing MAE |
|---|---|---|---|---|---|---|
| Stemma | 0.994 | 0.000 | 0.000 | 100% on answered | 0.867 | 0.070 |
| cosine | 0.987 | 0.000 | 0.000 | 50% — structural | n/a | n/a |
| CKA / REEF-style | 0.987 | 0.000 | 0.000 | 50% — structural | n/a | n/a |
| HuRef-style | 0.981 | 0.000 | 0.000 | 50% — structural | n/a | n/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.
An aggregate would let the easy scar-bearing edges hide the hard scar-free ones, so the harness refuses to report one.
| Relation | Group | n | Accuracy | Abstained | mean |llr| |
|---|---|---|---|---|---|
| quantisation | scar-bearing | 3 | 100.0% | 0.0% | 2.80 |
| pruning | scar-bearing | 2 | 100.0% | 0.0% | 2.65 |
| vocab extension | scar-bearing | 2 | 100.0% | 0.0% | 4.98 |
| SFT | scar-free | 1 | 0.0% | 100% | 0.02 |
| LoRA | scar-free | 1 | 0.0% | 100% | 0.01 |
| continued pretrain | scar-free | 1 | 0.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.
| Slice | n | Precision | Recall | F1 | Mixing MAE |
|---|---|---|---|---|---|
| all | 4 | 1.000 | 0.792 | 0.867 | 0.070 |
| DARE | 1 | 1.000 | 1.000 | 1.000 | 0.0004 |
| SLERP | 1 | 1.000 | 1.000 | 1.000 | 0.027 |
| TIES | 2 | 1.000 | 0.583 | 0.733 | 0.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.
| Model | Checkpoint | Header only | Full sketch | Reduction |
|---|---|---|---|---|
| SmolLM2-135M-Instruct | 269 MB | 31,397 B (0.012%) | 17.1 MB (6.34%) | 16× |
| Qwen2.5-7B-Instruct | 15.2 GB | 27,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.
These limits were measured, not assumed, and they bound how the results above should be read.
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.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.trace output should be read as ranked hypotheses for a human.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.