컴백부터 K-뷰티까지 — K-컬쳐의 모든 것을 메일로 받아보세요메일로 받아보기

METAL MEDIA

모델 가중치만 보고 '이 모델이 저 모델에서 파생됐는지' 알아내는 방법

arXiv:2608.149292026-08-13

Training Leaves Traces: Centered Residual Signatures for Language Model Lineage Verification

모델 가중치만 보고 '이 모델이 저 모델에서 파생됐는지' 알아내는 방법

오픈웨이트 언어모델은 미세조정, 양자화, 가지치기, 병합을 거치며 원본이 무엇인지 기록이 사라지는 경우가 많다. 이 연구는 학습 데이터나 추론 없이 가중치만 비교해서 두 체크포인트가 같은 조상에서 나왔는지 판별하는 점수를 만들었다. 잔차 블록의 가중치 곱에서 모든 학습된 모델이 공유하는 공통 성분을 제거하고 남은 체크포인트 고유 구조를 비교하는 방식이다.

METAL MEDIA 해설 도표

혈통 점수 계산 흐름

증거 상태측정 결과가 보고됨

  1. 1. 잔차 블록 곱 계산각 잔차 블록의 입력-출력 가중치를 곱해 항등 방향으로 쏠린 행렬 M을 얻는다
  2. 2. 공통 성분 제거(센터링)모든 학습된 모델이 공유하는 항등 정렬 성분을 빼고 체크포인트 고유의 잔차 E만 남긴다
  3. 3. 블록 간 유사도 비교기준 모델과 의심 모델의 잔차 신호를 블록별로 코사인 유사도로 비교하고 헝가리안 알고리즘으로 블록을 짝짓는다
  4. 4. 혈통 점수 산출 및 검증짝지어진 블록들의 유사도를 평균해 대칭 점수를 만들고, 독립 학습 모델들의 점수 분포와 비교해 관련/무관을 판정한다
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.

무엇을 했나

  1. 잔차 연결(skip connection)이 있는 블록에서 입력-출력 가중치를 곱하면 대각선(항등 방향)으로 에너지가 쏠리는 현상이 나타나는데, 이는 독립적으로 학습된 모델들도 공유하는 일반적 특성이라 그 자체로는 혈통을 증명하지 못한다.
  2. 이 공통 성분을 수학적으로 제거(centering)하고 남은 '체크포인트 고유 잔차'를 블록별로 비교해 대칭적인 혈통 점수(lineage score)를 만들었으며, 독립적으로 학습된 모델들의 점수 분포와 비교해 기준선을 정한다.
  3. MLP 벤치마크와 GPT-2 벤치마크에서 미세조정, LoRA 병합, 가지치기, 양자화로 만든 파생 모델과 독립 학습·지식증류 모델을 AUROC=1.0으로 완벽히 구분했다.
  4. 뉴런 순서를 섞거나 가중치를 재조정해 겉모습을 위장하는 '체크포인트 세탁' 실험에서도 점수가 그대로 유지된 반면, 기존 가중치 비교 기법들은 성능이 무너지거나 실패했고, GPT-2에서 가장 강력한 대안 기법보다 76배 빠르게 계산됐다.
  5. 여섯 개 언어모델 계열과 비전·음성 모델에서도 같은 신호가 나타났으며, LLaMA-2 공개 체크포인트 사례 연구에서 관련 모델 3개와 무관 모델 7개를 정확히 구분했다.
Figure 1: Centered residual signatures for lineage verification. (a) The residual branch product M=Wout​Win 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.
Figure 1: Centered residual signatures for lineage verification. (a) The residual branch product M=Wout​Win 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.
MethodKey Limitation
Crypto HashBreaks after any weight change
Metadata/LogsRequires honest distributor
WatermarkingMust insert before release
Behavioral (CKA, etc.)Needs data and forward passes
Weight SimilarityBreaks under reparameterization
Re-BasinO⁡(d3) alignment per pair
OursResidual 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.
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.
ModelLAcc (%)AUC
GPT-2 (Radford et al. 2019)12–481001.00
BERT (Devlin et al. 2019)121000.97
LLaMA-2 (Touvron et al. 2023)321001.00
Mistral (Jiang et al. 2023)321001.00
Qwen2.5 (Yang et al. 2024)281001.00
DeepSeek-R1 (DeepSeek-AI 2025)321001.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.
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)
MethodTypeData-freeAUROC↑Gap-Z↑AUROC↑Gap-Z↑
Centered Residual Signature (ours)Weight1.00+53.01.00+31.0
Weight CosineWeight1.00+76.31.00+30.7
Aligned FrobeniusWeight1.00+72.01.00+3.9
Singular Value DistanceWeight1.00+7.90.73+0.4
SVCCA (Raghu et al. 2017)Activation1.00+45.40.99+3.7
CKA (Kornblith et al. 2019)Activation0.83+8.60.86+1.9
IPGuard (Cao et al. 2021)Decision0.70−3.50.91+2.1
Figure 4: Distribution of trace values tr⁡(Wout​Win) 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.
Figure 4: Distribution of trace values tr⁡(Wout​Win) 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.
SuspectScore (ℒ)
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)4​e−4
OpenLLaMA-7B-v2 (Geng and Liu 2023)−2​e−5
Amber (Liu et al. 2023)−3​e−5
Baichuan-7B (Yang et al. 2023)−5​e−5
Baichuan2-7B (Yang et al. 2023)−5​e−6
InternLM-7B (Cai et al. 2024)2​e−5
Yi-6B (Young et al. 2024)2​e−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.
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.BenchOursRe-BasinAl. FrobSVDW. Cos
PMLP1.01.00.501.00.86
GPT-21.01.01.00.761.0†
DmMLP1.01.01.00.01.0
DsMLP1.01.00.00.01.0
PDMLP1.01.00.00.00.80
PDFTMLP1.01.00.00.00.80
Lat.MLP0.40.81.32.61.5
GPT-2538825143850
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.
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).
BaseSuspectRelationΔW.cos
LLaMA-2 7BChatderivative0.993
LLaMA-3 8BInstruction-tunedderivative0.949
Mistral 7BInstruction-tunedderivative0.934
Qwen2.5 7BInstruction-tunedderivative0.948
LLaMA-2 7BOpenLLaMAindependent(0.089)†
LLaMA-3 8BMistral 7Bindependent(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.
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).
TransformationnMean ℒMin ℒ
Descendants
Quantized (INT8/6)60.9990.999
LoRA merge (rank-8)30.9980.996
Fine-tuned (1 epoch)30.9800.980
Pruned (30–70%)90.9370.855
Non-descendants
Distilled student30.0020.001
Independent210.0030.000
Table 8: Per-method latency (ms) on GPT-2 benchmark. Ours achieves 76× speedup over Re-Basin+scale.
MethodMeanStdMinMax
Ours5.12.34.415.1
Re-Basin+scale387.910.9369.6424.6
Aligned Frob.25.01.323.629.2
SVD1438.235.51417.71585.1
Weight Cos.50.17.746.283.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.
ArchitectureResidual branch F⁡(x)Product M
Transformer MLP / BasicBlockW2​σ​(W1​x)W2​W1
Attention V/O pathWO​Attn​(x)​WV​xWO​WV
Attention Q/K pathbilinear x⊤​WQ​WK⊤​xWQ​WK⊤
Bottleneck ResNetW3​σ​(W2​σ​(W1​x))W3​W2​W1
SwiGLU MLPWdown​[σ⁡(Wgate​x)⊙Wup​x]Wdown​Wup
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 (W2​W1). Dashes indicate paths not applicable to the architecture. See Table 9 for the exact product M corresponding to each path.
MLP PathsAttention Paths
ModelLdown×updown×gatejointWO​WVWQ​WK⊤
ArchitectureSwiGLU / GELUSwiGLUSwiGLUAttentionAttention
GPT-2 (124M–1.5B)12–48100%
BERT-base12100%100%100%
LLaMA-2-7B-chat32100%100%100%100%100%
Mistral-7B32100%100%100%100%100%
Qwen2.5-7B28100%68%100%100%100%
DeepSeek-R1-Distill32100%84%100%100%100%
Random-init baseline3–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.
TransformationMeanMin>null
FT / Quant / Noise0.990.9745/45
FT (diff. target)0.940.8415/15
Pruning (10–85%)0.810.5815/15
Indep. / Distilled0.080.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 schemeUntrainedTrainedAUROC
Orthogonal0.0%100%0.947
Kaiming-normal2.1%97%0.981
Kaiming-uniform2.1%98.6%0.98
Xavier-normal2.1%100%0.990
Xavier-uniform2.1%100%0.99
Uniform2.1%93.8%
Gaussian σ=0.022.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.
ModeldPretrainedRand-initRatio
GPT-2-small7680.2970.02511.7×
GPT-2-medium10240.2420.0269.4×
GPT-2-large12800.1550.0256.2×
GPT-2-XL16000.1220.0245.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×.
MethodAUCGap-ZUnrel. μMargin
Uncentered vec⁡(Mℓ)1.0+28.70.0190.84
Centered vec⁡(Rℓ)1.0+29.20.00040.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.BenchOursRe-BasinAl. FrobSVDW. Cos
noneMLP+53.0+48.2+72.0+7.9+76.3
PMLP+53.0+48.2−0.1+7.9+2.1
PGPT-2+31.0+29.5+3.9+0.4+0.8
DmMLP+53.0+48.2+72.0−5.2+76.3
DsMLP+53.0+48.2−4.8−5.2+76.3
PDMLP+53.0+48.2−4.8−5.2+1.8
PDFTMLP+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.
AUROCSpearman ρ
MethodGraftMergeGraftMerge
Ours0.981.00+.96+.96
Aligned Frob.1.001.00+.99+.99
Weight cos.1.001.00+.98+.96
SVD dist.1.000.45+.99+.23
SVCCA1.001.00+.97+.99
CKA0.810.78+.73+.75
IPGuard0.050.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 lossVerdict
00.05339.5utility destroyed
10−20.0540.77+12% loss, below null
10−10.0830.70+1.5% loss, ≈ null
≥10.91+0.69utility 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%.
ModelLPair AccAUC
ViT-B/1612100%1.00
Whisper (tiny/base/sm)4–12100%0.85
ResNet-50/101/1525–3591–100%0.96

실제로 확인된 결과

  • MLP·GPT-2 벤치마크에서 미세조정, LoRA 병합, 가지치기, 양자화 파생 모델을 독립·증류 모델과 AUROC=1.0으로 구분했다.
  • 체크포인트 세탁(순열, 재조정) 실험에서 이 방법과 Re-Basin 기법만 AUROC=1.0을 유지했고, 기존 가중치 코사인 유사도나 프로베니우스 거리 등은 성능이 붕괴하거나 실패했으며, 이 방법이 GPT-2에서 76배 더 빨랐다.
  • 여섯 개 언어모델 계열(및 ViT, ResNet, Whisper)에서 정답 블록 짝짓기 정확도가 대표 경로 기준 100%에 달했고, 무작위 초기화 기준선은 최대 4%였다.
  • LLaMA-2 공개 체크포인트 사례에서 관련 파생 모델 3개는 높은 점수(0.336~0.996)를, 독립 모델 7개는 모두 5x10^-5 미만의 점수를 받았다.
  • 지식증류로 학생 모델의 행동이 교사와 비슷해져도(top-1 일치율 +1.4점 상승) 혈통 점수는 독립 모델 수준(약 0.002)에 머물러, 행동 유사성과 가중치 상속이 다르다는 점을 확인했다.

어디에 쓸 수 있나

  • 공개된 언어모델 체크포인트가 특정 원본 모델에서 파생됐는지 감사하는 공급망 검증 도구
  • 라이선스나 재배포 조건 위반이 의심되는 모델의 출처 조사 보조 수단
  • 모델 병합이나 미세조정 이력이 문서화되지 않은 경우 혈통 관계를 재구성하는 참고 자료

한계와 남은 검증

  • 같은 층 수와 은닉 차원을 가진 호환 가능한 잔차 구조 모델끼리만 비교할 수 있고, 서로 다른 아키텍처(예: LLaMA vs GPT-2) 간 비교는 지원하지 않는다.
  • 점수가 대칭적이라 어느 쪽이 조상인지 방향을 알 수 없고, 여러 단계를 거친 계보나 가계도 재구성은 다루지 않는다.
  • 강한 가지치기(85% 희소성)나 광범위한 추가 사전학습에서는 점수가 낮아지며(각각 0.58, 0.336), 여전히 기준선보다는 높지만 신호가 약해진다.
  • 학습된 스케일 파라미터가 있는 LayerNorm/RMSNorm 구조에서는 잔차 흐름의 직교 회전 변형에 대해 불변성이 보장되지 않는다.
  • 적대적으로 점수를 낮추려는 공격(예: 그래디언트 기반 억제)에 대한 강건성은 제한적인 실험(깊이 24 MLP)에서만 검증됐고, 다른 아키텍처나 공격 방식에 대한 일반화는 확인되지 않았다.

왜 중요한가

지금은 공개된 모델이 어떤 원본에서 파생됐는지 확인할 표준적인 방법이 없어서, 라이선스 위반이나 출처 위장을 걸러내기 어렵다. 이 방법은 학습 데이터나 실행 없이 가중치만으로 확인할 수 있어 오픈웨이트 모델 공급망을 감시하는 실용적 도구가 될 수 있다.

이 논문의 용어

  • 잔차 연결(residual/skip connection) · 레이어를 건너뛰어 입력을 그대로 다음 층에 더해주는 신경망 구조로, 학습을 안정시키는 데 쓰인다
  • AUROC · 분류기가 두 그룹을 얼마나 잘 구분하는지 나타내는 지표로 1.0이면 완벽한 구분
  • 센터링(centering) · 모든 학습된 모델이 공통으로 갖는 성분을 빼서 체크포인트 고유의 차이만 남기는 절차
  • 체크포인트 세탁 · 뉴런 순서를 바꾸거나 가중치를 재조정해 모델의 출력은 그대로 두면서 내부 구조만 위장하는 조작
  • 혈통 점수(lineage score) · 두 모델 체크포인트가 같은 가중치 조상을 공유하는지 나타내는 대칭 점수

저자 · Aman Singh Thakur

arXiv에서 원문 보기

최신 논문

논문 전체 보기 →

METAL MEDIA 최신 기사

그림 출처: Aman Singh Thakur et al., arXiv:2608.14929, CC BY 4.0