DistDNA: Language Model Fingerprinting under Stochastic Decoding
Organizations: Department of Computer Science, National University of Singapore
Abstract
Behavioral fingerprints identify a large language model (LLM) from its responses to a shared set of prompts, enabling applications such as verifying whether a deployed model corresponds to the checkpoint it claims to be. Deployed models, however, are commonly served with stochastic decoding, under which the same model may produce different responses to an identical prompt, depending on an unknown temperature and top- setting. Existing representations such as LLM DNA provide limited treatment of this variation. A natural remedy is to characterize models by their response distributions, which, however, raises two challenges. First, each distribution must be estimated from only a small number of sampled responses. Second, a change in decoding setting can alter responses to the same extent as a change of checkpoint. Consequently, fingerprint distances alone provide an incomplete basis for model identity, and identification typically relies on a classifier trained jointly on fingerprints from many checkpoints. We propose DistDNA, which represents a model by its prompt-conditional response distributions and compares models by promptwise maximum mean discrepancy (MMD). The model under examination is assigned to the known checkpoint whose reference fingerprints, collected at several decoding settings, lie nearest to its own, without training a classifier. We show that finite sampling adds variance-dependent terms to the expected squared fingerprint distance, with these terms decreasing as for equal response counts, where is the number of responses per prompt. Experiments across 115 model checkpoint entries demonstrate that DistDNA improves identification accuracy over the strongest baseline, LLM DNA, by 10.36%.
Figures & tables
| Method | Behavioral unit | Repeated draws | Response distribution | Decoding shift | Unknown setting | Exact ID | Readout |
|---|---|---|---|---|---|---|---|
| LLM-DNA | Prompt vectors | — | — | Distance / classifier | |||
| PhyloLM | Output counts | — | — | — | Distance | ||
| LLMmap | Query traces | — | — | Classifier | |||
| McGovern | Text features | — | — | — | — | Classifier | |
| ESF | Token sets | — | — | — | Set test | ||
| MergePrint | Implanted pairs | — | — | — | — | — | Match |
| Method | Supervised (SVM) | Nearest Reference | ||||
|---|---|---|---|---|---|---|
| Top-1 (%) | Top-3 (%) | Macro F1 | Top-1 (%) | Top-3 (%) | Macro F1 | |
| Random | N/A | N/A | N/A | 0.87 0.02 | 2.61 0.05 | 0.0086 0.0002 |
| LLM-DNA | 84.20 7.03 | 93.61 4.31 | 0.8422 0.0756 | 73.66 5.26 | 86.07 5.37 | 0.7259 0.0601 |
| PhyloLM-4char | 80.39 5.98 | 93.50 3.96 | 0.8015 0.0636 | 61.28 3.51 | 75.80 4.32 | 0.5814 0.0397 |
| LLMmap † | 82.52 4.52 | 93.12 3.52 | 0.8251 0.0563 | 63.55 19.85 | 76.88 17.63 | 0.6246 0.2187 |
| DistDNA -Linear | 89.42 6.26 | 96.39 3.21 | 0.8921 0.0722 | 80.37 7.04 | 91.51 4.64 | 0.8002 0.0769 |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Comparison | Original 32 | Independent 32 | Pooled 64 |
|---|---|---|---|
| , | 0.9094 | 0.8763 | 0.8277 |
| , | 0.9752 | 0.9695 | 0.9522 |
| , | 0.9922 | 0.9909 | 0.9852 |
| , | 0.9958 | 0.9964 | 0.9932 |
| , | 0.9985 | 0.9986 | 0.9973 |
| , | 0.7662 | 0.7425 | 0.6038 |
| Coordinates | Top-1 (%) | Top-3 (%) | Macro F1 |
|---|---|---|---|
| 128 | 83.27 0.83 | 95.80 0.40 | 0.8502 0.0041 |
| 512 | 94.94 1.27 | 99.50 0.10 | 0.9555 0.0077 |
| 1024 | 90.12 0.80 | 92.56 0.25 | 0.9169 0.0051 |
| Calls | RBF | Linear | LLM-DNA | PhyloLM-4char | |
|---|---|---|---|---|---|
| 20 | 83.43 | 84.18 | 77.38 | 58.59 | |
| 20 | 77.47 | 77.12 | 67.82 | 52.96 | |
| 20 | 73.73 | 72.38 | 56.58 | 49.35 | |
| 40 | 94.34 | 94.61 | 89.63 | 69.56 | |
| 40 | 92.42 | 92.45 | 79.65 | 68.59 | |
| 80 | 98.96 | 98.96 | 95.31 | 86.62 |
| Calls | RBF | Linear | |
|---|---|---|---|
| 5 | 41.98 (34.15) | 41.02 (33.19) | |
| 10 | 66.73 (58.90) | 66.29 (58.46) | |
| 20 | 85.17 (77.34) | 84.97 (77.14) | |
| 10 | 57.03 (49.20) | 55.92 (48.09) | |
| 20 | 80.99 (73.15) | 80.61 (72.77) | |
| 40 | 95.36 (87.53) | 95.41 (87.58) |
| Calls | Linear | RBF | LLM-DNA | PhyloLM-4char | |
|---|---|---|---|---|---|
| 5 | 38.72 | 37.96 | 35.90 | 22.33 | |
| 10 | 62.34 | 63.74 | 57.06 | 41.83 | |
| 10 | 54.07 | 54.00 | 47.15 | 34.70 | |
| 20 | 82.54 | 82.45 | 79.74 | 57.65 | |
| 20 | 78.76 | 78.61 | 71.44 | 50.85 | |
| 20 | 73.18 | 74.25 | 60.30 | 43.10 |
| Calls | Linear | RBF | LLM-DNA | PhyloLM-4char | |
|---|---|---|---|---|---|
| 5 | 26.81 | 26.04 | 23.99 | 10.42 | |
| 10 | 50.42 | 51.82 | 45.15 | 29.92 | |
| 10 | 42.15 | 42.09 | 35.24 | 22.79 | |
| 20 | 70.62 | 70.54 | 67.82 | 45.74 | |
| 20 | 66.85 | 66.70 | 59.52 | 38.93 | |
| 20 | 61.26 | 62.34 | 48.39 | 31.18 |
| Method | Procedural (30) | Random CFG (30) | Plain (13) | Chat (13) |
|---|---|---|---|---|
| DistDNA-Linear | 96.44 | 89.52 | 99.74 | 100.00 |
| DistDNA-RBF | 95.88 | 87.91 | 99.74 | 100.00 |
| LLM-DNA | 92.30 | 77.29 | 99.80 | 100.00 |
| PhyloLM-4char | 90.30 | 64.75 | 100.00 | 100.00 |
| ID | Company / org. | Checkpoint | Revision prefix |
|---|---|---|---|
| 1 | ahxt | LiteLlama-460M-1T | 77b8a976440e |
| 2 | akhauriyash | DeepSeek-R1-Distill-Qwen-1.5B-SpeculativeReasoner | 130021037bab |
| 3 | Azurro | APT3-1B-Base | a9dbe5e7cc05 |
| 4 | bigscience | bloom-1b1 | eb3dd7399312 |
| 5 | bigscience | bloom-560m | ac2ae5fab2ce |
| 6 | bigscience | bloomz-1b1 | 3c4e8ecc1fbe |
| Figure ID | Checkpoint repository |
|---|---|
| 1 | HuggingFaceTB/SmolLM2-135M |
| 2 | HuggingFaceTB/SmolLM2-135M-Instruct |
| 3 | HuggingFaceTB/SmolLM2-360M |
| 4 | HuggingFaceTB/SmolLM2-360M-Instruct |
| 5 | HuggingFaceTB/SmolLM2-1.7B |
| 6 | HuggingFaceTB/SmolLM2-1.7B-Instruct |
| Readout | Contrast | Gain | Pointwise 95% |
|---|---|---|---|
| Nearest | DistDNA-RBF DistDNA-Linear | 0.92 | [0.06, 1.98] |
| Nearest | DistDNA-RBF LLM-DNA | 7.63 | [5.17, 10.23] |
| Nearest | DistDNA-Linear LLM-DNA | 6.71 | [4.50, 8.99] |
| SVM | DistDNA-RBF DistDNA-Linear | 0.51 | [ 0.04, 1.17] |
| SVM | DistDNA-RBF LLM-DNA | 5.72 | [3.64, 8.12] |
| SVM | DistDNA-Linear LLM-DNA | 5.22 | [3.13, 7.56] |
| Fresh Draws Readout | DistDNA-Linear (%) | DistDNA-RBF (%) | Delta (RBF Linear) |
|---|---|---|---|
| Nearest-reference | 76.67 | 72.06 | 4.61 |
| SVM | 83.44 | 80.17 | 3.27 |
| Construction | Compression / representation operator | Width | Nearest (%) | SVM (%) |
|---|---|---|---|---|
| LLM-DNA | Gallery-blind Gaussian sketch (Appendix B.2) | 512 | 73.66 | 82.22 |
| DistDNA-Linear | Unlabeled enrollment-span PCA (Corollary A.2) | 512 | 80.31 | 86.79 |
| DistDNA-RBF | Unlabeled enrollment-kernel Nyström (Corollary A.2) | 512 | 82.87 | 87.47 |
| LLM-DNA | wider gallery-blind Gaussian sketch | 15,360 | 73.97 | 84.17 |
| DistDNA-Linear | Exact uncompressed promptwise MMD (Eq. 6) | 15,360 | 80.37 | 89.42 |
| DistDNA-RBF | Exact sample-based RBF-MMD (Eq. 5; coords.) | 15,360 † | 81.29 | 89.93 |
| Design | Fingerprint / gallery | Build complexity | Match complexity | Build (s) | Match + rank (s) |
|---|---|---|---|---|---|
| LLM-DNA (512-d) | 4 KiB / 3.59 MiB | 1.54 / 1.66 | 0.18 / 0.19 | ||
| DistDNA-Linear | 120 KiB / 107.81 MiB | 1.29 / 1.27 | 35.08 / 2.33 | ||
| DistDNA-RBF | 480 KiB / 431.25 MiB | 0.78 / 0.77 | 46.40 / 39.41 |
| Method | Representation | Size (KiB) | Responses (Q / E) | Top-1 (%) |
|---|---|---|---|---|
| LLMmap | 384 coordinates | 3 | 80 / 640 | 63.55 |
| PhyloLM-4char | 80 prefixes | 0.31 | 80 / 640 | 61.28 |
| LLM-DNA | 512 coordinates | 4 | 80 / 640 | 73.66 |
| DistDNA-Linear | 15,360 coordinates | 120 | 80 / 640 | 80.37 |
| DistDNA-RBF | 61,440 coordinates | 480 | 80 / 720 | 81.29 |
| Diagnostic regime | DistDNA-Linear (%) | DistDNA-RBF (%) |
|---|---|---|
| Equal means, orthogonal variation | 58.30 | 91.60 |
| Equal means, random noise ( ) | 58.40 | 91.05 |
| Nearby means ( ), distinct variations | 61.27 | 90.22 |
| Stronger noise ( ) | 52.37 | 73.38 |
| Separated-mean control ( ) | 92.33 | 91.67 |
| Identical-distribution null control | 49.50 | 49.75 |
| Benchmark scenario | Real-query slice (115-checkpoint bank) | Linear (%) | RBF (%) | RBF gain |
|---|---|---|---|---|
| Overall gallery | All 4,140 unmodified queries across 36 cells (nearest) | 80.37 | 81.29 | +0.92 pp |
| Crowded-rival boundary | Hardest 20% slice by smallest Linear rival margin ( , nearest) | 37.14 | 41.00 | +3.86 pp |
| Zero-mean-gap (all ) | All 4,140 queries, mean-invariant response residuals (SVM) | 0.87 | 27.28 | +26.41 pp |
| Zero-mean-gap (high ) | High-temperature stochastic slice, mean-invariant residuals (SVM) | 0.87 | 42.68 | +41.81 pp |
| Ten-split summary | Split 1: nearest / SVM (%) | |||||
|---|---|---|---|---|---|---|
| Construction | Nearest mean | A/B gap | SVM mean | A/B gap | Panel A | Panel B |
| DistDNA-Linear | 84.68 | 2.66 | 93.84 | 1.84 | 85.32 / 93.20 | 83.14 / 92.87 |
| DistDNA-RBF | 85.11 | 2.57 | 94.01 | 1.61 | 85.71 / 93.12 | 83.61 / 93.65 |
| Construction | Rule | Target | FAR | FRR | Correct+accepted |
|---|---|---|---|---|---|
| LLMmap | Official detector | Default | 53.00 | 47.58 | 43.00 |
| Linear | Distance | 95% | 82.25 | 5.02 | 83.27 |
| Linear | Learned gate | 95% | 57.83 | 3.75 | 86.44 |
| RBF | Distance | 95% | 83.50 | 4.96 | 83.04 |
| RBF | Learned gate | 95% | 52.17 | 3.79 | 86.35 |
| Linear | Distance | 90% | 74.58 | 11.33 | 78.98 |
| Construction | Constant Brier | Fitted Brier | Paired 95% Brier gain | 5-bin ECE |
|---|---|---|---|---|
| DistDNA-Linear | 0.0915 | 0.0738 | [0.0061, 0.0329] | 0.0410 |
| DistDNA-RBF | 0.0843 | 0.0680 | [0.0055, 0.0306] | 0.0353 |
| Prompt panel | Linear nearest (%) | RBF nearest (%) | Linear SVM (%) | RBF SVM (%) |
|---|---|---|---|---|
| Dolly | 84.03 | 84.03 | 90.97 | 90.97 |
| BBH | 88.89 | 88.19 | 90.28 | 88.89 |
| MMLU-Pro | 84.72 | 85.42 | 90.28 | 87.50 |
| Query cohort | Construction | Nearest reference | SVM |
|---|---|---|---|
| All services ( ) | DistDNA-Linear | 446/516 (86.43%) | 456/516 (88.37%) |
| All services ( ) | DistDNA-RBF | 448/516 (86.82%) | 455/516 (88.18%) |
| Reasoning requested ( ) | DistDNA-Linear | 318/384 (82.81%) | 328/384 (85.42%) |
| Reasoning requested ( ) | DistDNA-RBF | 320/384 (83.33%) | 328/384 (85.42%) |
Language Model Fingerprinting
Language model fingerprinting identifies and verifies models or their lineage from distinctive outputs, internal representations, or embedded signals.
See all 92 papers