Training Leaves Traces: verifying model lineage from weights alone

1 month ago

Somebody releases a model, and you think they built it out of yours. Can you show that from the files? Weights are the millions of numbers training adjusts, and the only thing you get when you download a model. The team compared Llama-2 with ten other models using the weights and nothing else. The three models built from Llama-2 scored near the top of the scale. The seven models trained from scratch scored essentially zero.

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Three of these ten models were built from LLaMA-2, and the weights alone found all three
  2. 0:22Two model files of the same shape, and nothing else, decide the question
  3. 0:46Every layer learns to change its input less and less
  4. 1:20The part every trained model shares is the part that cannot identify one
  5. 2:02Two models reduce to one number, built from every layer’s leftover
  6. 2:38Seven models were trained from scratch with LLaMA-2’s exact configuration, and every one scores under 0.0005
  7. 3:18Two of the four weight comparisons fall to zero under rescaling, and this one holds at 1.0
  8. 3:57A student that copies its teacher’s answers still scores as unrelated on the weights
  9. 4:31The score needs both models’ weights and a matching shape, and it never names the ancestor
  10. 4:55Perfect separation on eight models is not a false-alarm rate
  11. 5:22Read it
Show transcript

Three of these ten models were built from LLaMA-2, and the weights alone found all three

Three of these ten models were built from LLaMA-2, and the weights alone found all three
The other seven have the identical architecture and were trained from scratch
Llama-2-7B-chat 0.995 Vicuna-7B 0.996 seven independent 7B models, all under 0.0005
ModelLineage score
against LLaMA-2-7B
Llama-2-7B-chat0.995
Vicuna-7B0.996
CodeLlama-7B0.336
OpenLLaMA-7B0.0004
OpenLLaMA-7B-v2−0.00002
Amber−0.00003
Baichuan-7B−0.00005
Baichuan2-7B−0.000005
InternLM-7B0.00002
Yi-6B0.00002
Table 4 · every model scored against LLaMA-2-7B, the base model
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Somebody releases a model, and you think they built it out of yours. Can you show that from the files? Weights are the millions of numbers training adjusts, and the only thing you get when you download a model. The team compared Llama-2 with ten other models using the weights and nothing else. The three models built from Llama-2 scored near the top of the scale. The seven models trained from scratch scored essentially zero.

Two model files of the same shape, and nothing else, decide the question

Two model files of the same shape, and nothing else, decide the question
No training data, no prompts, no marker planted before release
Epoch 0
Epoch 200
With shortcuts
Figure 1(b), residual network at epoch 0: the score matrix is noise
Figure 1(b), residual network at epoch 200: a bright diagonal has grown
Without shortcuts
Figure 1(b), plain network at epoch 0: the score matrix is noise
Figure 1(b), plain network at epoch 200: still noise, no diagonal
Figure 1(b), cropped to epoch 0 and epoch 200 of four
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Give this method two model files and nothing more. The two models have to be the same shape: same number of layers, same width. The method tells you whether one model was trained from the other. The signal survives fine-tuning. Fine-tuning is training an existing model a bit further on new material, and it is how most released models are made. The signal also survives when somebody scrambles a model's insides on purpose to hide where it came from.

Every layer learns to change its input less and less

Every layer learns to change its input less and less
Multiply a layer’s two weight matrices and you get one grid that says what the layer adds
the shortcut
spreads the
input out
squeezes it
back
+
multiply them
together
what this layer adds
it leans toward its own diagonal
Our diagram, from section 3.1
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Modern models are built in layers, and each layer adds a small correction on top of what came in, rather than replacing it. The input runs past on a shortcut, untouched, and the layer only decides what to add. Inside one of those corrections sit two blocks of numbers. The first block spreads the input out. The second block squeezes it back down. Multiply those two blocks together and you get one square grid of numbers that says everything this layer adds. Training pushes that grid in one direction: it drifts toward doing almost nothing. Step after step, the grid moves closer to simply passing its input straight through.

The part every trained model shares is the part that cannot identify one

The part every trained model shares is the part that cannot identify one
Subtract it, and what is left is what this training run scratched into this layer
cross out the generic part
keep only
the leftover
this layer’s signature
generic part alone 0.417 a coin flip 0.5 resemblance between independently trained models cut 18 times
Our diagram, from section 3.1
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

So you could measure how far along that drift a model has gone, and compare two models on that one number. That fails, and the failure teaches you the whole paper. A checker built on that measurement scored 0.417, where a coin flip scores 0.5. That is worse than guessing. The reason is that every trained model has this generic part. Drifting toward doing nothing is what training does, so the generic part cannot tell two models apart. The fix is to subtract the generic part and keep only the leftover. The leftover is the pattern this training run scratched into this layer, and that pattern is what a descendant inherits. Throwing the generic part away cut the accidental resemblance between two independently trained models by a factor of eighteen.

Two models reduce to one number, built from every layer’s leftover

Two models reduce to one number, built from every layer’s leftover
Pair each layer with its best match, and the pairing is right 100% of the time across every GPT-2 size
first model
second model
nothing in common
identical
one number for the pair
Our diagram, from section 3.1
Figure 3 · Thakur & Khoury · GPT-2 at 124M, 355M, 774M and 1.5B
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Now the comparison is simple. Take every layer of the first model and every layer of the second, and check how closely their leftovers line up, on a scale from nothing in common to identical. Pair each layer with its best match in the other model, average those matches, and you have a single number. Related models land near one. Unrelated models land near zero. Across GPT-2 models, from a hundred and twenty-four million of those numbers up to one and a half billion, every layer matched its own counterpart, a hundred percent of the time. Plot each layer against each layer and the matches land on the diagonal.

Seven models were trained from scratch with LLaMA-2’s exact configuration, and every one scores under 0.0005

Seven models were trained from scratch with LLaMA-2’s exact configuration, and every one scores under 0.0005
32 layers · width 4096 · intermediate 11008 · SwiGLU, the same configuration in all ten rows
built from
LLaMA-2
trained from
scratch
more than 800x
ModelLineage score
against LLaMA-2-7B
Llama-2-7B-chat0.995
Vicuna-7B0.996
CodeLlama-7B0.336
OpenLLaMA-7B0.0004
OpenLLaMA-7B-v2−0.00002
Amber−0.00003
Baichuan-7B−0.00005
Baichuan2-7B−0.000005
InternLM-7B0.00002
Yi-6B0.00002
Table 4 · every model scored against LLaMA-2-7B, the base model
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Here are those ten models again. Llama-2-7B-chat scores 0.995. Vicuna, a fine-tune of the same base model, scores 0.996. CodeLlama was trained much further, on code, and drifted a long way. CodeLlama scores 0.336, lower, and still unmistakable. Then come the seven models trained independently. Every one of those seven has Llama-2's exact architecture, thirty-two layers and the same width, so on paper they look identical to it. All seven score under 0.0005. CodeLlama, the weakest of the three built from Llama-2, still sits more than eight hundred times above the strongest independent.

Two of the four weight comparisons fall to zero under rescaling, and this one holds at 1.0

Two of the four weight comparisons fall to zero under rescaling, and this one holds at 1.0
Reorder a layer’s units, scale one up and its partner down, and the model’s answers stay identical
Disguise applied to one modelBenchmarkThis
paper
Git
Re-Basin
Aligned
Frobenius
SVDWeight
cosine
neuron permutationMLP1.01.00.501.00.86
neuron permutationGPT-21.01.01.00.761.0 †
mild rescalingMLP1.01.01.00.01.0
strong rescalingMLP1.01.00.00.01.0
permutation and rescalingMLP1.01.00.00.00.80
permutation, rescaling and 5 epochs of fine-tuningMLP1.01.00.00.00.80
† weight cosine keeps its 1.0 here while its scores collapse 97%
Table 5 · 1.0 separates every pair · 0.5 is chance
this method 1.0 in all six conditions aligned Frobenius 0.0 under strong rescaling SVD 0.0 under rescaling
5 ms per pair · Git Re-Basin 388 ms · 76x
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Inside a layer you can reorder the internal units, and you can scale one unit up while scaling its partner down, and the model still computes exactly the same answers. That is what somebody would do to hide a stolen model. The rescaling is what breaks the obvious weight comparisons: at full strength, two of the four methods tested lose all their separating power. This paper's score does not move at all. Across four public model families, shuffling the units changed the score by less than one ten-millionth. One rival holds up too. Git Re-Basin searches for the right reordering and matches this method on the test set, at three hundred and eighty-eight milliseconds a pair against five.

A student that copies its teacher’s answers still scores as unrelated on the weights

A student that copies its teacher’s answers still scores as unrelated on the weights
Figure 6(b) · distilled students sit at about 0.002, where independently trained models sit
agrees with its teacher on 79% of top answers
lineage score about 0.002 · GPT-2 benchmark,
weakest genuine descendant 0.855
Figure 6(b) · Thakur & Khoury
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Distillation is training a fresh model to imitate an existing model's answers, without ever copying its numbers. You would expect a copy to give itself away by behaving like the original. This distilled student agreed with its teacher on seventy-nine percent of its top answers, and its weights still scored about 0.002, deep in the unrelated range. The student and its teacher sit in the GPT-2 benchmark, where the weakest genuine descendant scored 0.855. The score measures how a model was built. How a model answers is a separate question.

The score needs both models’ weights and a matching shape, and it never names the ancestor

The score needs both models’ weights and a matching shape, and it never names the ancestor
Three limits, all of them stated by the authors
What the score cannot do
both sets of weights, or nothing
same depth, same width, or nothing
it says related · it does not say who came first
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Three hard limits, all stated by the authors. You need the actual model files for both sides. A model you can only reach over the internet, by sending it questions and reading its answers, cannot be checked at all. Both models have to be the same shape, the same number of layers and the same width, so there is no comparing a Llama with a GPT-2. And the score is symmetric. It says these two models are related, and it cannot say which one came first.

Perfect separation on eight models is not a false-alarm rate

Perfect separation on eight models is not a false-alarm rate
The controlled benchmark rests on eight independently trained roots
authors’ own results · no independent reproduction published
How far the evidence goes
delete 85% of the numbers · score 0.58
CodeLlama’s real retraining · score 0.336
benchmark noise floor 0.20
one disguise tested · shuffle and rescale,
on one architecture
Thakur & Khoury · “Training Leaves Traces” · arXiv 2608.14929 · CC BY 4.0

Delete eighty-five percent of a model's numbers and the score falls to 0.58. CodeLlama's real retraining brought its score to 0.336. Both stay above the benchmark's noise floor of 0.20, with less room to spare. The controlled benchmark rests on eight independently trained models. That is why the authors report what their own test set showed and leave the false-alarm rate unstated. They tested one disguise, shuffling and rescaling, on one architecture.

Read it

Read it
Aman Singh Thakur, Amazon · Rayan Khoury, MIT
“Training Leaves Traces: Centered Residual Signatures
for Language Model Lineage Verification”

arXiv:2608.14929v1 · 14 August 2026 · preprint, no venue stated

Read it. The mechanism is a page of linear algebra you can follow in one sitting, and the idea under it travels: the part every trained model shares is exactly the part that cannot identify one. Read it rather than build on it. With eight models of calibration and no way to say which model came first, this paper hands you a strong signal and stops there. Aman Singh Thakur, at Amazon, and Rayan Khoury, at MIT. Training Leaves Traces, arXiv two six zero eight point one four nine two nine.