WorksComputer Science
SetPrint: Black-Box LLM Fingerprinting via Setwise Correspondence of Response Changes
Abstract
Black-box LLM fingerprinting aims to determine whether a target model was derived from a source model when only the output responses to input queries are observable. One way to reveal this relationship is to perturb each query and observe the resulting responses of both models, yielding two corresponding sets of response variations. These sets provide two complementary sources of information: the relations among response changes within each set, and the correspondence of response changes between the two sets. Existing approaches, however, have not fully exploited both. We introduce SetPrint, a training-free method that jointly captures both within-set relations and between-set correspondence. SetPrint expresses each response change relative to the mean change of its own set, and then compares changes from the two models that were induced by the same perturbation. On LeaFBench, SetPrint consistently outperforms existing training-free black-box fingerprinting methods. Further analyses attribute these gains to both within-set relations and between-set correspondence.
Introduction
Large language models (LLMs) are routinely fine-tuned [1], quantized [2], or otherwise adapted and then redistributed [3, 4]. Such redistribution makes it difficult to determine whether a deployed target model was derived from a given source model [3, 5]. Identifying the target model’s origin is important for tracing model provenance and auditing model reuse [4].
LLM fingerprinting identifies a model’s origin from patterns in its responses or internal representations [3, 5]. One family of methods embeds such a pattern into the source model so that it can later be recovered from a derived model [6, 7]. Such methods require the provider to modify the model in advance, and cannot be applied to models that have already been released. A second family instead exploits patterns that an unmodified model already exhibits [5, 8, 9]. It is further divided by how much access to the model is available: white-box methods use model parameters or hidden states [5, 10], whereas black-box methods rely only on the responses returned for a query [8, 11, 12, 13]. This makes black-box methods applicable to real-world closed-API deployment, but identifying a model’s origin from generated text alone remains challenging [5, 14].
One of the simplest approaches in the black-box setting is to compare the responses that both source and target models produce for the same query set [3, 5, 15, 16]. However, plain response similarity is not by itself reliable evidence, since independently developed models can still produce similar responses [3, 14]. One can instead obtain additional evidence by observing how a model’s response changes when the query is modified [4, 17]. Each modified version is given to the model, and its response is compared with the response to the original query [4, 17]. Applying the same query modifications to the source and target models yields two sets of response changes, one for each model [4].
There are two types of information in the two sets of response changes (Figure 1). One is relations among changes within each set (within-set relations) [18, 19] and the other is pairings defined by the same modification across models (between-set correspondence) [20]. Existing methods capture only part of this information. One approach compares responses to each query separately, without accounting for within-set relations [20]. Another compares summary representations of the two sets, without directly comparing changes paired by between-set correspondence [4]. Neither fully exploits both types of information and can overlook cues to the target model’s origin.
Figure 1. Concept of SetPrint. The same query perturbations yield two corresponding sets of response changes. SetPrint uses both (1) within-set relations and (2) between-set correspondence, which pairs the changes induced by the same perturbation in the two models.
We propose SetPrint, a training-free black-box LLM fingerprinting method that jointly captures within-set relations and between-set correspondence. SetPrint first perturbs the same queries to obtain two corresponding sets of response changes. Within each set, every response change is expressed relative to the set mean, thereby capturing its relationship to the other responses. Across the two sets, each relative change is compared with the one induced by the same perturbation in the other model. SetPrint aggregates these comparisons into a single score for judging whether the target model was derived from the source.
On LeaFBench [5], SetPrint scores highest on AUROC, TPR@1%FPR, and pAUC among the evaluated training-free black-box baselines. Further analyses show that both within-set relations and between-set correspondence contribute to performance.
Method
Construction of Response Change Sets
Let and denote the source and target models, respectively. We input the same base queries and perturbed versions of each to both models. To reduce the effect of sampling randomness, we represent the response of model to query by averaging sampled response embeddings:
where is the -th sampled response and is a fixed text encoder. Using the same encoder for both models places their responses in a common embedding space. We measure each response change by subtracting the mean response embedding for the base query from that for its perturbed version, and normalize the difference so that perturbations with large changes do not dominate the comparison:
where prevents division by zero. Enumerating the pairs by a single index , we collect the response changes of each model into a set , where and arise from the same perturbed query.
Setwise Correspondence
SetPrint uses two kinds of information: within-set relations and between-set correspondence. For the former, it uses the average difference between one response change and all response changes in the same set:
where is the set mean. Subtracting removes the component common to all response changes in the set, so the relative change retains only the part that varies with the perturbation.
For between-set correspondence, SetPrint takes the inner product between the corresponding relative changes and , and averages over all :
In this way, measures between-set correspondence while accounting for within-set relations. A derived model inherits much of its source’s behavior, so for a given perturbation, the two models should produce similar response changes. Subtracting each model’s set mean removes what is common to all its responses, leaving the perturbation-specific part that the two models should share. Thus, is larger for a target derived from the source than for an unrelated target, and SetPrint declares that is derived from if exceeds a threshold .
Expanding Eq. (4) shows how SetPrint differs from scoring each perturbation separately:
The first term separately aggregates the score of each perturbation, so it measures between-set correspondence without considering within-set relations. By including the second term, which is the inner product of the two set means, the within-set relations of Eq. (3) are brought into the score. This term averages the similarity over all pairs , including the pairs with that do not correspond. Thus, the score is how far the similarity between corresponding changes exceeds that between arbitrary pairs. § 4.2 measures the contribution of each term of Eq. (5).
Experimental Setup
Setup
We evaluate on LeaFBench [5], using 13 source models and 149 target model instances. The targets include variants obtained through fine-tuning, quantization, or changes to decoding settings, as well as unrelated models to the source model.
For each source-target pair, we send the same base and perturbed queries to both models. We use HumanEval [21] queries truncated to the first 20 words, following [4]. We use base queries and construct perturbations per base query by randomly swapping adjacent characters in five words. For each base and perturbed query, we sample responses. This requires responses per model and yields normalized response changes. We use temperature 0.7, top-p 0.9, and top-k 50 unless otherwise specified by LeaFBench. At most 512 new tokens were generated per response. We use all-mpnet-base-v2 [22, 23] as the text encoder in Eq. (1).
We report mean sample standard deviation over five runs for AUROC, TPR@1%FPR (maximum empirical TPR at FPR ), and standardized pAUC over FPR . None of these metrics depends on a particular choice of .
Baselines and Ablations
Baselines. We compare SetPrint with fingerprinting methods spanning the white-box (REEF [10]), supervised black-box (LLMmap [8], LLM DNA with SVM classification [15]), and unsupervised black-box (MET [11], SEF [5], ZeroPrint [4]) settings.
Alternative set comparison measures. To evaluate how the choice of set comparison measure affects fingerprinting performance, we replace the SetPrint score with alternative measures while keeping the response changes fixed. MMD [24] and Wasserstein distance [25] (with squared Euclidean distance) treat the two sets as unordered samples and thus ignore the between-set correspondence. RSA [18] (with Pearson correlation between pairwise-distance matrices) and CKA [19] (alignment of centered Gram matrices) use only the correspondence to align within-set relations entry by entry, never comparing corresponding changes directly. Average Cosine is the mean cosine similarity between corresponding changes without mean subtraction, i.e., the first term of Eq. (5). For MMD and CKA, we report results with a linear kernel and with an RBF kernel whose bandwidth is the median pairwise distance among all response changes.
Kernel variants of SetPrint. The inner product in Eq. (5) is one of the simplest choices of similarity between two response changes. To check whether this simplicity misses anything a nonlinear similarity would capture, we replace the inner product in Eq. (5) with a kernel , keeping the same two-term structure so that both within-set relations and between-set correspondence are retained:
The inner product recovers Eq. (5). SetPrint (Cubic), SetPrint (Exponential), and SetPrint (Arcsine) denote Eq. (6) with , , and , respectively.
Results and Analysis
Fingerprinting Performance
Table 1 compares SetPrint with the baseline fingerprinting methods. Among the black-box methods without supervision, SetPrint shows the highest AUROC, TPR@1%FPR, and pAUC.
We next assess whether SetPrint’s scoring rule offers an advantage over alternative measures on the same response change sets. Table 2 reports the results for the measures described in § 3.2. All measures use the same response change sets and differ in the scoring rule. MMD and Wasserstein, which ignore the between-set correspondence, fall below SetPrint. Average Cosine directly compares corresponding response changes and outperforms CKA and RSA, which compare within-set relations. SetPrint further improves both AUROC and TPR@1%FPR over Average Cosine.
Replacing the inner product with a nonlinear kernel (last block of Table 2) yields similar performance with the exponential and arcsine kernels and lower performance with the cubic kernel. We therefore keep the simpler inner product.
Analysis
To test the contributions of between-set correspondence and within-set relations, we alter one term of Eq. (5) while holding the other fixed.
Contribution of between-set correspondence. We shuffle the target changes, replacing with in Eq. (4). This leaves both response change sets and their means unchanged, so only the first term of Eq. (5) is affected. Within-base permutation shuffles target changes among perturbations of the same base query, whereas full-set permutation shuffles them across all indices. For each setting, we average AUROC and TPR@1%FPR over 128 random permutations within each run. As shown in Table 3, within-base permutation lowers AUROC, and full-set permutation reduces it to near chance. These results show that preserving between-set correspondence for individual perturbations improves fingerprinting performance.
| Permutation | AUROC ↑ | TPR@1%FPR ↑ |
| None (matched) | 0.776 ± 0.008 | 0.403 ± 0.002 |
| Within-base | 0.746 ± 0.006 | 0.335 ± 0.013 |
| Full-set | 0.494 ± 0.004 | 0.050 ± 0.004 |
Table 3. Contribution of between-set correspondence in SetPrint. The target changes are left in their original order (None), shuffled among perturbations of each base query (Within-base), or shuffled across the full set (Full-set).
| Method | Access | Supervised | AUROC ↑ | TPR@1%FPR ↑ | pAUC ↑ |
| REEF† | White box | No | 0.896 ± 0.021 | 0.634 ± 0.021 | 0.832 ± 0.019 |
| LLMmap† | Black box | Yes | 0.632 ± 0.009 | 0.253 ± 0.032 | 0.635 ± 0.009 |
| LLMDNA + SVM‡ | Black box | Yes | 0.806 ± 0.011 | 0.292 ± 0.066 | 0.678 ± 0.023 |
| MET† | Black box | No | 0.661 ± 0.003 | 0.329 ± 0.004 | 0.658 ± 0.003 |
| SEF† | Black box | No | 0.581 ± 0.008 | 0.282 ± 0.012 | 0.646 ± 0.004 |
| ZeroPrint† | Black box | No | 0.720 ± 0.013 | 0.366 ± 0.009 | 0.683 ± 0.005 |
| ZeroPrint‡ | Black box | No | 0.721 ± 0.024 | 0.320 ± 0.023 | 0.667 ± 0.009 |
| SetPrint | Black box | No | 0.776 ± 0.008 | 0.403 ± 0.002 | 0.704 ± 0.004 |
Table 1. Fingerprinting results on LeaFBench (mean±std). Methods are grouped by required model access and supervision. †: reported in [4]; ‡: our runs. Bold: best among black-box, unsupervised methods.
| Measure | AUROC ↑ | TPR@1%FPR ↑ |
| MMD (Linear) | 0.711 ± 0.008 | 0.323 ± 0.010 |
| MMD (RBF) | 0.713 ± 0.007 | 0.330 ± 0.011 |
| Wasserstein | 0.719 ± 0.011 | 0.331 ± 0.011 |
| CKA (Linear) | 0.620 ± 0.027 | 0.089 ± 0.015 |
| CKA (RBF) | 0.610 ± 0.025 | 0.104 ± 0.019 |
| RSA (Pearson) | 0.623 ± 0.025 | 0.095 ± 0.014 |
| Average Cosine | 0.755 ± 0.010 | 0.333 ± 0.028 |
| SetPrint | 0.776 ± 0.008 | 0.403 ± 0.002 |
| SetPrint (Cubic) | 0.758 ± 0.010 | 0.377 ± 0.019 |
| SetPrint (Exponential) | 0.776 ± 0.008 | 0.398 ± 0.008 |
| SetPrint (Arcsine) | 0.776 ± 0.008 | 0.404 ± 0.005 |
Table 2. Alternative set comparison measures on the same response change sets. Bold: proposed method. Last block: kernel variants of SetPrint.
Contribution of within-set relations. We test the contribution of within-set relations while keeping all products of corresponding changes fixed. In the second term of Eq. (5), we replace the target changes at randomly chosen indices only in the products with . For each model pair and each draw, we select one replacement model that shares the target’s base model, excluding the source and target. We use this model’s change at each selected index . Within each run, we average AUROC over 48 random draws of replacement indices and models. AUROC decreases as the replaced fraction grows (Figure 2), although every product of corresponding changes is preserved. The within-set relations thus contribute to fingerprinting performance as well.
Figure 2. Contribution of within-set relations in SetPrint. In the products with , target changes are progressively replaced by changes at the same indices from other models sharing the target’s base model. The products with remain fixed. The line shows the mean AUROC across the five runs. The shaded band shows sample standard deviation across these runs.
Conclusion
We introduced SetPrint, a training-free black-box LLM fingerprinting method that compares two models by how each responds to the same perturbed queries. SetPrint centers each response change against the mean change of its own set, so that corresponding changes are compared in the context of the rest of the set. This combines between-set correspondence with within-set relations in a single score. On LeaFBench, SetPrint outperforms the evaluated training-free black-box baselines, and our analyses show that both kinds of information contribute.
References
References
- [1]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen, “LoRA: Low-rank adaptation of large language models,” in International Conference on Learning Representations, 2022.arxiv.org/abs/2106.09685
- [2]Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh, “OPTQ: Accurate post-training quantization for generative pre-trained transformers,” in International Conference on Learning Representations, 2023.arxiv.org/abs/2210.17323
- [3]Ivica Nikolic, Teodora Baluta, and Prateek Saxena, “Model provenance testing for large language models,” Advances in Neural Information Processing Systems, vol. 38, pp. 34126–34153, 2025.arxiv.org/abs/2502.00706
- [4]Shuo Shao, Yiming Li, Hongwei Yao, Yifei Chen, Yuchen Yang, and Zhan Qin, “Reading between the lines: Towards reliable black-box llm fingerprinting via zeroth-order gradient estimation,” in Proceedings of the ACM Web Conference, 2026, pp. 2637–2648.DOI
- [5]Shuo Shao, Yiming Li, Yu He, Hongwei Yao, Wenyuan Yang, Dacheng Tao, and Zhan Qin, “Sok: Large language model copyright auditing via fingerprinting,” arXiv:2508.19843, 2025.arxiv.org/abs/2508.19843
- [6]Jiashu Xu, Fei Wang, Mingyu Ma, Pang Wei Koh, Chaowei Xiao, and Muhao Chen, “Instructional fingerprinting of large language models,” in Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), 2024, pp. 3277–3306.arxiv.org/abs/2401.12255
- [7]Shojiro Yamabe, Futa Kai Waseda, Tsubasa Takahashi, and Koki Wataoka, “MergePrint: Merge-resistant fingerprints for robust black-box ownership verification of large language models,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 6894–6916.
- [8]Dario Pasquini, Evgenios M. Kornaropoulos, and Giuseppe Ateniese, “LLMmap: Fingerprinting for large language models,” in 34th USENIX Security Symposium (USENIX Security 25), 2025, pp. 299–318.arxiv.org/abs/2407.15847
- [9]M. Gubri, D. Ulmer, H. Lee, S. Yun, and S. J. Oh, “TRAP: Targeted random adversarial prompt honeypot for black-box identification,” in Findings Assoc. Comput. Linguistics: ACL, 2024, pp. 11496–11517.
- [10]Jie Zhang, Dongrui Liu, Chen Qian, Linfeng Zhang, Yong Liu, Yu Qiao, and Jing Shao, “REEF: Representation encoding fingerprints for large language models,” in International Conference on Learning Representations, 2025.arxiv.org/abs/2410.14273
- [11]Irena Gao, Percy Liang, and Carlos Guestrin, “Model equality testing: Which model is this API serving?,” in International Conference on Learning Representations, 2025.arxiv.org/abs/2410.20247
- [12]Xiaofan Bai, Pingyi Hu, Xiaojing Ma, Linchen Yu, Dongmei Zhang, Qi Zhang, and Bin Benjamin Zhu, “ESF: Efficient sensitive fingerprinting for black-box tamper detection of large language models,” in Findings of the Association for Computational Linguistics: ACL 2025, 2025, pp. 10477–10494.DOI
- [13]Zhenzhen Ren, GuoBiao Li, Sheng Li, Zhenxing Qian, and Xinpeng Zhang, “Cotsrf: Utilize chain of thought as stealthy and robust fingerprint of large language models,” arXiv:2505.16785, 2025.arxiv.org/abs/2505.16785
- [14]Ziqing Yang, Yixin Wu, Yun Shen, Wei Dai, Michael Backes, and Yang Zhang, “The challenge of identifying the origin of black-box large language models,” in Proceedings of the Seventh Workshop on Privacy in Natural Language Processing, 2026, pp. 7–25.arxiv.org/abs/2503.04332
- [15]Zhaomin Wu, Haodong Zhao, Ziyang Wang, Zizhou Guo, Qian Wang, and Bingsheng He, “LLM DNA: Tracing model evolution via functional representations,” in International Conference on Learning Representations, 2026.arxiv.org/abs/2509.24496
- [16]Nicolas Yax, Pierre-Yves Oudeyer, and Stefano Palminteri, “PhyloLM: Inferring the phylogeny of large language models and predicting their performances in benchmarks,” in International Conference on Learning Representations, 2025.arxiv.org/abs/2404.04671
- [17]Paulius Rauba, Qiyao Wei, and Mihaela van der Schaar, “Statistical hypothesis testing for auditing robustness in language models,” in International Conference on Machine Learning, 2025.arxiv.org/abs/2506.07947
- [18]Nikolaus Kriegeskorte, Marieke Mur, and Peter Bandettini, “Representational similarity analysis—connecting the branches of systems neuroscience,” Frontiers in Systems Neuroscience, vol. 2, pp. 4, 2008.DOI
- [19]Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton, “Similarity of neural network representations revisited,” in International Conference on Machine Learning, 2019.arxiv.org/abs/1905.00414
- [20]Yutong Wu, Xiaofan Bai, Shixin Li, Pingyi Hu, Ziqi Zhou, Zilong Wang, Xiaojing Ma, Songfeng Lu, Yuhong Li, Jin Xuan, et al., “Targeted counterfactual fingerprinting for black-box llm ownership verification,” arXiv:2608.08195, 2026.arxiv.org/abs/2608.08195
- [21]Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al., “Evaluating large language models trained on code,” arXiv:2107.03374, 2021.arxiv.org/abs/2107.03374
- [22]Nils Reimers and Iryna Gurevych, “Sentence-BERT: Sentence embeddings using Siamese BERT-networks,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019, pp. 3982–3992.arxiv.org/abs/1908.10084
- [23]Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu, “MPNet: Masked and permuted pre-training for language understanding,” Advances in Neural Information Processing Systems, vol. 33, pp. 16857–16867, 2020.arxiv.org/abs/2004.09297
- [24]Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander Smola, “A kernel two-sample test,” Journal of Machine Learning Research, vol. 13, no. 25, pp. 723–773, 2012.DOI
- [25]Peyré Gabriel and Cuturi Marco, “Computational optimal transport with applications to data sciences,” Foundations and trends® in machine learning, vol. 11, no. 5-6, pp. 355–607, 2019.

