Training Leaves Traces: Centered Residual Signatures for Language Model Lineage Verification
모델 가중치만 보고 '이 모델이 저 모델에서 파생됐는지' 알아내는 방법
오픈웨이트 언어모델은 미세조정, 양자화, 가지치기, 병합을 거치며 원본이 무엇인지 기록이 사라지는 경우가 많다. 이 연구는 학습 데이터나 추론 없이 가중치만 비교해서 두 체크포인트가 같은 조상에서 나왔는지 판별하는 점수를 만들었다. 잔차 블록의 가중치 곱에서 모든 학습된 모델이 공유하는 공통 성분을 제거하고 남은 체크포인트 고유 구조를 비교하는 방식이다.
METAL MEDIA 해설 도표
혈통 점수 계산 흐름
증거 상태측정 결과가 보고됨
1. 잔차 블록 곱 계산각 잔차 블록의 입력-출력 가중치를 곱해 항등 방향으로 쏠린 행렬 M을 얻는다
2. 공통 성분 제거(센터링)모든 학습된 모델이 공유하는 항등 정렬 성분을 빼고 체크포인트 고유의 잔차 E만 남긴다
3. 블록 간 유사도 비교기준 모델과 의심 모델의 잔차 신호를 블록별로 코사인 유사도로 비교하고 헝가리안 알고리즘으로 블록을 짝짓는다
4. 혈통 점수 산출 및 검증짝지어진 블록들의 유사도를 평균해 대칭 점수를 만들고, 독립 학습 모델들의 점수 분포와 비교해 관련/무관을 판정한다
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.
무엇을 했나
잔차 연결(skip connection)이 있는 블록에서 입력-출력 가중치를 곱하면 대각선(항등 방향)으로 에너지가 쏠리는 현상이 나타나는데, 이는 독립적으로 학습된 모델들도 공유하는 일반적 특성이라 그 자체로는 혈통을 증명하지 못한다.
이 공통 성분을 수학적으로 제거(centering)하고 남은 '체크포인트 고유 잔차'를 블록별로 비교해 대칭적인 혈통 점수(lineage score)를 만들었으며, 독립적으로 학습된 모델들의 점수 분포와 비교해 기준선을 정한다.
MLP 벤치마크와 GPT-2 벤치마크에서 미세조정, LoRA 병합, 가지치기, 양자화로 만든 파생 모델과 독립 학습·지식증류 모델을 AUROC=1.0으로 완벽히 구분했다.
뉴런 순서를 섞거나 가중치를 재조정해 겉모습을 위장하는 '체크포인트 세탁' 실험에서도 점수가 그대로 유지된 반면, 기존 가중치 비교 기법들은 성능이 무너지거나 실패했고, GPT-2에서 가장 강력한 대안 기법보다 76배 빠르게 계산됐다.
여섯 개 언어모델 계열과 비전·음성 모델에서도 같은 신호가 나타났으며, LLaMA-2 공개 체크포인트 사례 연구에서 관련 모델 3개와 무관 모델 7개를 정확히 구분했다.
Figure 1: Centered residual signatures for lineage verification. (a) The residual branch product M=WoutWin for a block with skip connection; the normalized trace concentration s(M) measures identity alignment. (b) Training dynamics: score matrices s(i,j) from epoch 0 to 200. ResNet (top row) develops strong identity-aligned structure; PlainNet without skip connections (bottom row) remains random. The structure is learned, not an initialization artifact. (c) Lineage verification: the lineage score ℒ (Eq. 6) on MLP benchmark (Section 4.1) aggregates per-block centered-signature similarity. Descendants (fine-tuned, quantized, pruned, LoRA-merged) score high; non-descendants (independent, distilled) score near zero.
Table 1: Why retroactive lineage verification is hard. Each existing method fails in at least one dimension. Our centered residual signature addresses all key limitations but requires open-weight residual architectures.
Method
Key Limitation
Crypto Hash
Breaks after any weight change
Metadata/Logs
Requires honest distributor
Watermarking
Must insert before release
Behavioral (CKA, etc.)
Needs data and forward passes
Weight Similarity
Breaks under reparameterization
Re-Basin
O(d3) alignment per pair
Ours
Residual architectures only
Figure 2: Evidence for the gradient-coupling mechanism. (a) Gradient diagonality gdiag (blue) stays flat at ∼0.15 while the weight score s (red) rises to ∼4.0: individual gradient updates are not diagonal, but their accumulation is. (b) Shuffling ∇Wout across blocks (orange) reduces the final score by 68% compared to control (blue), providing evidence that within-block coupling contributes to the signal. (c) Injecting synthetic diagonal updates ΔW=−ε⋅ei⊤ directly into weights builds the fingerprint from scratch without backpropagation, showing that coordinated identity-aligned updates can generate the observed structure.
Table 2: Trace concentration in MLP branch products across language model families. Pair accuracy measures correct within-block projection recovery via Hungarian matching. Random-init baselines: ≤4%. See Appendix A.3 for per-path results and Appendix C.2 for GPT-2 scaling.
Model
L
Acc (%)
AUC
GPT-2 (Radford et al. 2019)
12–48
100
1.00
BERT (Devlin et al. 2019)
12
100
0.97
LLaMA-2 (Touvron et al. 2023)
32
100
1.00
Mistral (Jiang et al. 2023)
32
100
1.00
Qwen2.5 (Yang et al. 2024)
28
100
1.00
DeepSeek-R1 (DeepSeek-AI 2025)
32
100
1.00
Figure 3: Block pairing score matrices s(i,j) for GPT-2 models from 124M to 1.5B parameters. Diagonal entries dominate, yielding 100% block pairing accuracy across all scales.
Table 3: Baseline comparison for lineage detection. We test whether each method can distinguish checkpoints that share weight ancestry (fine-tuned, pruned, quantized) from independently trained models. MLP benchmark: 52 checkpoint pairs with known ground truth. GPT-2 benchmark: 45 pairs from 30M-parameter language models. AUROC=1.0 means perfect separation; Gap-Z>3 indicates non-overlapping score distributions. Weight-space methods (✓ = data-free) match or exceed activation-based methods that require forward passes. See Section 4.1.
MLP (52 pairs)
GPT-2 (45 pairs)
Method
Type
Data-free
AUROC↑
Gap-Z↑
AUROC↑
Gap-Z↑
Centered Residual Signature (ours)
Weight
✓
1.00
+53.0
1.00
+31.0
Weight Cosine
Weight
✓
1.00
+76.3
1.00
+30.7
Aligned Frobenius
Weight
✓
1.00
+72.0
1.00
+3.9
Singular Value Distance
Weight
✓
1.00
+7.9
0.73
+0.4
SVCCA (Raghu et al. 2017)
Activation
✗
1.00
+45.4
0.99
+3.7
CKA (Kornblith et al. 2019)
Activation
✗
0.83
+8.6
0.86
+1.9
IPGuard (Cao et al. 2021)
Decision
✗
0.70
−3.5
0.91
+2.1
Figure 4: Distribution of trace values tr(WoutWin) across GPT-2 scales. Blue: negative trace (86% average); orange: positive trace (14% average). The strong skew toward negative values is consistent with the identity-alignment mechanistic account.
Table 4: Public checkpoint case study (LLaMA-2 family). Descendants score ℒ≥0.3; all 7 independent models score |ℒ|<5×10−5.
Suspect
Score (ℒ)
Descendants
Llama-2-7B-chat (Touvron et al. 2023)
0.995
Vicuna-7B (Chiang et al. 2023)
0.996
CodeLlama-7B (Rozière et al. 2023)
0.336
Non-descendants
OpenLLaMA-7B (Geng and Liu 2023)
4e−4
OpenLLaMA-7B-v2 (Geng and Liu 2023)
−2e−5
Amber (Liu et al. 2023)
−3e−5
Baichuan-7B (Yang et al. 2023)
−5e−5
Baichuan2-7B (Yang et al. 2023)
−5e−6
InternLM-7B (Cai et al. 2024)
2e−5
Yi-6B (Young et al. 2024)
2e−5
Figure 5: Block pairing accuracy as model size increases. Normalized trace pairing (blue) maintains 100% projection-pair accuracy; Frobenius matching (orange) degrades from 67% to 52%; random baseline (gray) drops from 8% to 2% as the number of blocks increases.
Table 5: AUROC under function-preserving laundering. P=permutation, Dm/s=mild/strong rescaling, Lat.=latency (ms). Our method and Re-Basin maintain AUROC=1.0 across all conditions; raw baselines collapse. Ours is 2× faster on MLP, 76× faster on GPT-2. †Weight cosine scores collapse 97% (see Appendix D.1).
AUROC
Cond.
Bench
Ours
Re-Basin
Al. Frob
SVD
W. Cos
P
MLP
1.0
1.0
0.50
1.0
0.86
GPT-2
1.0
1.0
1.0
0.76
1.0†
Dm
MLP
1.0
1.0
1.0
0.0
1.0
Ds
MLP
1.0
1.0
0.0
0.0
1.0
PD
MLP
1.0
1.0
0.0
0.0
0.80
PDFT
MLP
1.0
1.0
0.0
0.0
0.80
Lat.
MLP
0.4
0.8
1.3
2.6
1.5
GPT-2
5
388
25
1438
50
Figure 6: GPT-2-Small-Lite lineage benchmark (8 roots, 120 pairs across all splits; Table 7 reports results on the 3 held-out test roots, 45 pairs). (a) Lineage scores by transformation type. Descendants (green) score high; non-descendants (red) score near zero. (b) Distillation modestly improves teacher–student agreement (79% top-1, +1.4 points over independent training) while leaving the weight-lineage score near the independent-root range, confirming that behavioral similarity ≠ weight inheritance.
Table 6: Permutation laundering on public language model derivatives. ΔW.cos = score before − score after for derivatives. Our lineage score Δℒ<10−7 (invariant); weight cosine loses >93% of its signal in all derivative cases. †Raw W.cos score (independently trained).
Base
Suspect
Relation
ΔW.cos
LLaMA-2 7B
Chat
derivative
0.993
LLaMA-3 8B
Instruction-tuned
derivative
0.949
Mistral 7B
Instruction-tuned
derivative
0.934
Qwen2.5 7B
Instruction-tuned
derivative
0.948
LLaMA-2 7B
OpenLLaMA
independent
(0.089)†
LLaMA-3 8B
Mistral 7B
independent
(0.158)†
Figure 7: ROC for lineage verification on depth-24 residual MLPs. The residual-signature score achieves AUROC=1.000; trace concentration alone fails (AUROC=0.417) because it cannot distinguish two trained residual models.
Table 7: Lineage scores under post-training transformations (GPT-2 benchmark from Section 4.1, 3 test roots). The minimum descendant score (0.855 at 70% sparsity) exceeds the maximum non-descendant score (0.004).
Transformation
n
Mean ℒ
Min ℒ
Descendants
Quantized (INT8/6)
6
0.999
0.999
LoRA merge (rank-8)
3
0.998
0.996
Fine-tuned (1 epoch)
3
0.980
0.980
Pruned (30–70%)
9
0.937
0.855
Non-descendants
Distilled student
3
0.002
0.001
Independent
21
0.003
0.000
Table 8: Per-method latency (ms) on GPT-2 benchmark. Ours achieves 76× speedup over Re-Basin+scale.
Method
Mean
Std
Min
Max
Ours
5.1
2.3
4.4
15.1
Re-Basin+scale
387.9
10.9
369.6
424.6
Aligned Frob.
25.0
1.3
23.6
29.2
SVD
1438.2
35.5
1417.7
1585.1
Weight Cos.
50.1
7.7
46.2
83.1
Table 9: Architecture-aware residual branch products. Each M composes the linear maps of one branch (dropping nonlinearities) so it maps the residual stream to itself. Factorization must match the architecture; incomplete products destroy the signal.
Architecture
Residual branch F(x)
Product M
Transformer MLP / BasicBlock
W2σ(W1x)
W2W1
Attention V/O path
WOAttn(x)WVx
WOWV
Attention Q/K path
bilinear x⊤WQWK⊤x
WQWK⊤
Bottleneck ResNet
W3σ(W2σ(W1x))
W3W2W1
SwiGLU MLP
Wdown[σ(Wgatex)⊙Wupx]
WdownWup
Table 10: Per-path pairing accuracy across language model families. The canonical MLP path (down×up) achieves 100% across all models. The alternative SwiGLU factorization (down×gate) shows weaker signal in some architectures (Qwen: 68%, DeepSeek: 84%), likely because the gating path carries less of the residual correction. GPT-2 and BERT use GELU activation with only one MLP factorization (W2W1). Dashes indicate paths not applicable to the architecture. See Table 9 for the exact product M corresponding to each path.
MLP Paths
Attention Paths
Model
L
down×up
down×gate
joint
WOWV
WQWK⊤
Architecture
SwiGLU / GELU
SwiGLU
SwiGLU
Attention
Attention
GPT-2 (124M–1.5B)
12–48
100%
—
—
—
—
BERT-base
12
100%
—
—
100%
100%
LLaMA-2-7B-chat
32
100%
100%
100%
100%
100%
Mistral-7B
32
100%
100%
100%
100%
100%
Qwen2.5-7B
28
100%
68%
100%
100%
100%
DeepSeek-R1-Distill
32
100%
84%
100%
100%
100%
Random-init baseline
—
3–4%
3–4%
4–7%
3–9%
0–6%
Table 11: Lineage score ℒ survival under post-training modification (n=75 related, n=84 unrelated). All related exceed maxℒnull=0.20; AUROC=1.0.
Transformation
Mean
Min
>null
FT / Quant / Noise
0.99
0.97
45/45
FT (diff. target)
0.94
0.84
15/15
Pruning (10–85%)
0.81
0.58
15/15
Indep. / Distilled
0.08
0.01
-
Table 12: Initialization ablation on depth-24 residual MLPs. All schemes show chance-level accuracy before training. The Gaussian σ=0.02 case fails because blocks collapse to near-zero contribution.
Init scheme
Untrained
Trained
AUROC
Orthogonal
0.0%
100%
0.947
Kaiming-normal
2.1%
97%
0.981
Kaiming-uniform
2.1%
98.6%
0.98
Xavier-normal
2.1%
100%
0.990
Xavier-uniform
2.1%
100%
0.99
Uniform
2.1%
93.8%
—
Gaussian σ=0.02
2.1%
13%
0.671
Table 13: Jacobian orthogonality (δJnorm) across GPT-2 scales. Pretrained models are 5–12× less orthogonal than at random init, inconsistent with the hypothesis that trace concentration results from blocks approaching isometry.
Model
d
Pretrained
Rand-init
Ratio
GPT-2-small
768
0.297
0.025
11.7×
GPT-2-medium
1024
0.242
0.026
9.4×
GPT-2-large
1280
0.155
0.025
6.2×
GPT-2-XL
1600
0.122
0.024
5.1×
Table 14: Centering ablation on the GPT-2 benchmark. Both methods perfectly separate related from unrelated pairs, but centering reduces spurious similarity by ∼50×.
Method
AUC
Gap-Z
Unrel. μ
Margin
Uncentered vec(Mℓ)
1.0
+28.7
0.019
0.84
Centered vec(Rℓ)
1.0
+29.2
0.0004
0.86
Table 15: Gap-Z under function-preserving laundering (same experiment as Table 5). Weight cosine collapses from +76.3 to +2.1 under permutation and +1.8 under PD; the margin is razor-thin despite AUROC=0.80–0.86. Our signature maintains Gap-Z≈+53 across all conditions.
Gap-Z
Cond.
Bench
Ours
Re-Basin
Al. Frob
SVD
W. Cos
none
MLP
+53.0
+48.2
+72.0
+7.9
+76.3
P
MLP
+53.0
+48.2
−0.1
+7.9
+2.1
P
GPT-2
+31.0
+29.5
+3.9
+0.4
+0.8
Dm
MLP
+53.0
+48.2
+72.0
−5.2
+76.3
Ds
MLP
+53.0
+48.2
−4.8
−5.2
+76.3
PD
MLP
+53.0
+48.2
−4.8
−5.2
+1.8
PDFT
MLP
+49.1
+45.0
−4.8
−5.2
+1.8
Table 16: Harder-regime benchmark on layer grafts and linear merges (40 pairs). Our method tracks partial overlap monotonically (ρ≥0.96). CKA degrades; IPGuard collapses on grafts; SVD fails merges.
AUROC
Spearman ρ
Method
Graft
Merge
Graft
Merge
Ours
0.98
1.00
+.96
+.96
Aligned Frob.
1.00
1.00
+.99
+.99
Weight cos.
1.00
1.00
+.98
+.96
SVD dist.
1.00
0.45
+.99
+.23
SVCCA
1.00
1.00
+.97
+.99
CKA
0.81
0.78
+.73
+.75
IPGuard
0.05
0.45
−.83
+.22
Table 17: Pareto frontier for suppression attack. The null baseline for this setup is ℒnull=0.084. Reaching the null threshold costs +1.5% utility loss (λ=10−1); driving the score reliably below null (λ=10−2) costs +12%.
λ
Final ℒ
Eval loss
Verdict
0
0.053
39.5
utility destroyed
10−2
0.054
0.77
+12% loss, below null
10−1
0.083
0.70
+1.5% loss, ≈ null
≥1
0.91+
0.69
utility preserved
Table 18: Trace concentration in vision and speech architectures. Pair accuracy measures correct within-block projection recovery via Hungarian matching on s(i,j). Random-init baselines: ≤9%.