Manuscript Offprint
arXiv:2611.07610Embedding-Space Fingerprinting of LoRA Fine-Tunes: Recovering the Training-Data Domain from the Model Artifact Alone
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Shivesh Rane¹
Goa College of Engineering, Farmagudi, Ponda, Goa, India shiveshrane04@gmail.com
Abstract. When a base language model is fine-tuned with Low-Rank Adaptation (LoRA), how much of the training-data domain leaks into the resulting artifact? This paper studies whether a simple classifier can recover the domain of a fine-tune given only the model artifact (weight deltas, internal activations on a fixed probe set, or generated text) without ever observing the training data. Using one base model (Qwen3.5-0.8B), 36 LoRA fine-tunes are produced over 18 public datasets in five domains (medical, code, mathematics, non-English text, narrative prose), and three feature families are extracted at decreasing levels of access: white-box weights, gray-box activations, and black-box outputs. A leave-one-dataset-out (LODO) protocol, frozen before any result was seen, tests whether the domain of a fine-tune trained on a previously unseen dataset can be identified. The domain is recoverable well above chance (20%) from gray-box activations (61%) and black-box outputs (64%); white-box weight statistics reach 42%. Contrary to the pre-registered hypothesis that signal decays monotonically from weights to activations to outputs, activations and outputs were more informative than the weight-delta statistics. The black-box result holds unchanged (64%) when only generated text is used, without token probabilities. Domain accuracy is also stable when a third run per dataset is trained on an independently drawn data subsample, and black-box predictions are unaffected by the LoRA rank (8-64). All code and per-run feature vectors are released.
Keywords: LoRA · model fingerprinting · data provenance · dataset inference · parameter-efficient fine-tuning.
1 Introduction
Parameter-efficient fine-tuning, and LoRA [7] in particular, has made it cheap to specialize a shared base model to a particular data distribution and to distribute the resulting adapter as a small artifact; quantized variants such as QLoRA [2] bring this within reach of a single commodity GPU, and adapter libraries are routinely shared and composed [8]. This raises a provenance question with both
S. Rane
auditing and privacy dimensions: given only the artifact, can one infer what kind of data the adapter was trained on?
The study is organized around three research questions, in decreasing order of access to the model:
RQ1 (per-dataset). Can a classifier identify which dataset produced a fine-tune? (a re-identification baseline)
RQ2 (per-domain, the headline). Can it identify the domain of a fine-tune trained on a dataset from which it has seen no examples, i.e., does the fingerprint generalize across datasets within a domain?
RQ3 (signal decay). How does recoverability change as access degrades from weight deltas, to activations on a fixed probe set, to generated outputs?
The contributions are: (i) a formulation of training-domain inference for LoRA adapters along an explicit white/gray/black-box access axis (Sect. 3); (ii) an end-to-end empirical study on a modern hybrid base model under an evaluation protocol frozen before any fine-tune was trained (Sects. 4 and 5); (iii) a clearly characterized outcome, including a refuted sub-hypothesis (RQ3), with dataset-clustered confidence intervals; and (iv) robustness checks on the black-box access assumption (Sect. 6.1), the LoRA rank (Sect. 6.2), and independently resampled training data (Sect. 6.3).
Membership, dataset, and property inference. Membership inference [15] asks whether a specific example was used for training; for large language models (LLMs) it is often barely above chance [3], and token-probability heuristics such as Min-K% Prob [14] target pretraining-data detection. Dataset inference [10] aggregates weak per-example signals to decide whether a given dataset was used, and has been extended to LLMs [11]. Property inference on fine-tuned LLMs recovers dataset-level statistics such as patient demographics [9]. All of these assume a candidate dataset or a known property; the present question is coarser and requires no candidate data: which domain the adapter was trained on.
Model fingerprinting. Fingerprinting usually identifies which model an artifact derives from, either by implanting a secret fingerprint [18] or by exploiting natural fingerprints left by training dynamics, which make models trained on identical data distinguishable [16]. The latter is directly relevant to RQ1, where same-dataset runs are re-identified almost perfectly (Sect. 5). Here the target of the fingerprint is the training data, not the model lineage.
3 Problem Formulation
Let be a fixed base model and a set of datasets, each mapped to one of domains by a labeling (here ). For dataset and random seed a fine-tune is obtained as
under one fixed training recipe (Sect. 4.2). For an access level a feature map turns the artifact alone into a fixed-length vector
using no access to . The three access levels are defined by what may query:
– White-box (w): the adapter parameters (the LoRA factors).
– Gray-box (g): hidden states of every layer of on chosen inputs, but not its parameters.
– Black-box (b): the generated text for chosen inputs together with the per-step next-token probability distribution (as exposed by APIs that return log-probabilities). A strictly text-only variant, which drops every feature that needs token probabilities, is evaluated separately (Sect. 6.1).
The goal is a classifier that predicts the domain . The headline question (RQ2) requires generalization across datasets: is evaluated on fine-tunes of datasets whose examples never appear in its training set (Sect. 4.4).
4 Method
4.1 Pipeline Overview
The study proceeds in four stages, each fully scripted and released:
S. Rane
Table 1. Datasets per domain (Hugging Face identifiers abbreviated). Entries in parentheses were excluded before any of their features reached a classifier (Sect. 7).
| Domain | Datasets |
|---|---|
| Medical | PubMedQA, MedMCQA, ChatDoctor-HealthCareMagic, MedQA-USMLE |
| Code | Python-code-instructions-18k, Evol-Instruct-Code-80k, SQL-create-context, Code-instructions-122k |
| Mathematics | MetaMathQA, MathInstruct, Orca-Math-200k, (camel-ai/math) |
| Multilingual | IITB English–Hindi, OPUS-100 de–en, Aya (non-English slice), (Alpaca-GPT4-Japanese) |
| Creative | WritingPrompts, TinyStories, Opus-WritingPrompts, Instruction-Poems |
-
Freeze the evaluation: commit the dataset-to-domain map, the 200 probe prompts, the LODO folds, and the scoring script before any training.
-
Train: fine-tune once per (dataset, seed) with an identical LoRA recipe (Eq. (1)), saving only the adapter.
-
Extract: compute the feature vectors of Eq. (2) for every fine-tune, as described in Sect. 4.3.
-
Score: run the frozen script once (Sect. 4.4).
4.2 Population of Fine-Tunes
All fine-tunes share one base model, Qwen3.5-0.8B (a hybrid linear-attention vision-language model, used text-only), loaded in 4-bit NF4 quantization [2]. Table 1 lists the five domains and their datasets. Every run uses the same recipe: LoRA with rank and on all linear projections inside the token-mixing and MLP blocks (introspected rather than hard-coded, so that the gated-delta projections of the hybrid architecture are included); a fixed budget of 1.5M training tokens, so that dataset size is not a confound (one exception: the pipeline-validation run, PubMedQA seed 0, was trained on 2.0M tokens before the budget was fixed and was kept; see Sect. 7); maximum sequence length 1024 with packing; learning rate with linear decay; effective batch size 16; one epoch; fp32 compute; two random seeds per dataset. Everything except the training dataset is held constant. Two of the twenty intended datasets were excluded before any of their features reached a classifier (Sect. 7), leaving 18 datasets seeds = 36 fine-tunes. Within a dataset, both seeds draw the same token subsample and differ only in initialization and data order; Sect. 6.3 relaxes this.
4.3 Feature Families
The same 200 probe prompts are used for the gray- and black-box families. They are deliberately domain-neutral (no medical, code, numeric, non-English, or narrative vocabulary, e.g., “Describe your morning routine.”) so that any recovered signal reflects the fine-tune and not leakage from the prompt. Probes are formatted with the model’s chat template.
White-box (weights, ). For each adapted module m the LoRA update is
is never materialized. With thin QR factorizations and ,
and because and in Eq. (4) have orthonormal columns, the singular values of equal those of the core . The Frobenius norm follows as
Per module the norm (Eq. (5)) and the top-8 singular values are kept and aggregated into a fixed-length vector: mean, standard deviation, maximum, and sum of the norms per block type (token-mixing, MLP, other; 12 values); the normalized layer profile
resampled to 24 points; the normalized mean top-8 spectrum (8 values); and four global scalars (log total norm, token-mixing:MLP norm ratio, early:late layer norm ratio, and module count).
Gray-box (activations, ). For probe p with tokens and hidden states at layer , the per-layer mean and within-prompt spread are averaged over the probe set P:
From Eq. (7), three layer curves, , the mean of , and the mean of , are each resampled to 24 points (72 values), plus six global scalars (curve means and spreads, layer count, and the relative depth of the peak activation norm).
Black-box (outputs, ). Each probe is answered by greedy decoding (at most 64 new tokens). With the next-token distribution at generation step t, the mean predictive entropy per probe is
S. Rane
Table 2. Frozen LODO results (36 runs). RQ2 predicts the domain of a fine-tune from datasets never seen in training (chance = 0.20); the row CI resamples individual predictions and the clustered CI resamples whole datasets. RQ1 re-identifies the dataset across seeds (chance = 0.056).
| Access level | RQ2: domain of an unseen dataset | RQ1 Acc. | |||
|---|---|---|---|---|---|
| Acc. | 95% CI (row) | 95% CI (clustered) | Macro-F1 | ||
| White-box (weights) | 0.417 | 0.250–0.583 | 0.194–0.639 | 0.404 | 1.000 |
| Gray-box (activations) | 0.611 | 0.444–0.778 | 0.417–0.806 | 0.643 | 1.000 |
| Black-box (outputs) | 0.639 | 0.499–0.778 | 0.417–0.861 | 0.640 | 0.944 |
The feature vector concatenates the mean, standard deviation, and median of over probes (3 values, the only features requiring token probabilities); response-length statistics (4); a 64-bucket hashed histogram of the 200 most frequent generated token ids (64); and the centroid of the Sentence-BERT [13] embeddings (all-MiniLM-L6-v2) of the generations (384).
4.4 Frozen Evaluation Protocol
The evaluation was frozen before any fine-tune was trained: the dataset-to-domain map, the probes, the folds, and the scoring script were committed and never altered. For RQ2, leave-one-dataset-out (LODO) is used. Writing for all runs and for the classifier trained on every run except those of dataset , the pooled LODO accuracy is
so the domain of must be inferred purely from other datasets of that domain. Each is a standardized logistic regression (inverse regularization strength 1). RQ1 instead uses leave-one-seed-out and predicts the dataset identity. Reported metrics are top-1 accuracy, macro-F1, and a 1000-resample bootstrap 95% percentile confidence interval (CI) over pooled predictions. Because the two seeds of a dataset share training data, their predictions are not independent; a dataset-clustered bootstrap, which resamples whole datasets, is therefore also reported. Chance for the five-way domain task is . Feature development used only a disjoint seed-0 development split, and the frozen script was executed once on the 36-run population.
5 Results
Table 2 gives the headline numbers, with the RQ2 accuracy computed as in Eq. (9); Fig. 1 plots these accuracies against chance.

Fig. 1. RQ2 leave-one-dataset-out domain accuracy by access level, with bootstrap 95% CIs. The dashed line is chance (0.20).
RQ1 (per-dataset). Re-identifying the exact dataset across seeds is essentially perfect from weights and activations (1.000) and nearly so from outputs (0.944, chance 0.056) (Table 2, last column). Since both seeds of a dataset share their training subsample, this mainly shows that the artifact encodes its specific training set, in line with natural-fingerprint findings [16]; it is not evidence of domain learning, which is what RQ2 measures.
RQ2 (per-domain, the headline). The domain of a fine-tune is recoverable on unseen datasets. Gray-box activations reach 0.611 and black-box outputs 0.639, with both row and clustered CIs excluding chance (Table 2, Fig. 1). Weight statistics reach 0.417; the row CI excludes chance but the more conservative clustered CI (0.194–0.639) does not, so the white-box result alone should not be read as established.
Figure 2 visualizes the gray-box features with t-SNE. The two seeds of every dataset appear as a tight pair, the geometric counterpart of the perfect RQ1 accuracy. At the domain level the layout is only partly organized: multilingual fine-tunes occupy the top of the map and mathematics and most code fine-tunes the bottom, while medical and creative fine-tunes are interleaved in the middle. This partial structure is consistent with an RQ2 accuracy well above chance but far from perfect, and anticipates the main confusion below.
The pooled confusion matrices in Fig. 3 show where the errors occur. With activations (left), multilingual (5 of 6 runs correct) and code (6 of 8) are the most separable domains, while medical and creative fine-tunes are confused with each other (4 of 8 medical runs predicted creative and 3 of 8 creative runs predicted medical): both domains consist of English prose, which shifts internal statistics similarly. With outputs (right), the medical–creative confusion disappears
S. Rane

Fig. 2. t-SNE of the gray-box activation features, one point per fine-tune, colored by training-data domain.
(6 of 8 medical and 5 of 8 creative runs correct); the largest remaining confusion is between code and mathematics (4 of the 13 errors), two domains whose training data are both dominated by symbolic, step-by-step answers. The two access levels therefore fail on different domain pairs, which suggests they capture complementary aspects of the fine-tune.
RQ3 (signal decay). The pre-registered hypothesis was that recoverability decays monotonically, white > gray > black. The data refute this ordering: activations (0.611) and outputs (0.639) were more informative than the weight-delta statistics (0.417). Either the domain imprints more on behavior than on delta magnitudes, or, more likely, the hand-designed weight features of Sect. 4.3 (norms, spectra, and layer profiles, Eqs. (5)–(6), all of which discard singular directions) leave recoverable structure unused. This agrees with the weak clustering of raw adapter weights reported for larger models [19], but differs from that study on outputs: there, output sentence embeddings clustered poorly, whereas here output features are the strongest family. The difference does not come from the feature set: the MiniLM sentence-embedding centroid alone, the same output representation that study used, reaches 0.611 LODO accuracy here (Sect. 6.1). Setting aside the other differences between the two studies (base models, probe sets), the most likely explanation is the evaluation: domain information is present in output embeddings but is not the dominant direction of variation, so a supervised classifier on standardized features recovers it while unsupervised clustering does not.


Fig. 3. Pooled LODO confusion matrices for gray-box activations (left) and black-box outputs (right). Rows are true domains, columns predicted domains.
Table 3. Post-acceptance robustness checks (RQ2 LODO domain accuracy unless noted; chance = 0.20).
| Setting | White-box | Gray-box | Black-box |
|---|---|---|---|
| Headline (Table 2), 36 runs | 0.417 | 0.611 | 0.639 |
| Text-only black-box (no entropy), 36 runs | — | — | 0.639 |
| MiniLM centroid only (384 dims), 36 runs | — | — | 0.611 |
| Rank transfer, (correct / 10) | 3/10 | 6/10 | 8/10 |
| Three runs per dataset incl. resampled, 54 runs | 0.407 | 0.648 | 0.630 |
| RQ1 across independent subsamples, 54 runs | 1.000 | 0.981 | 0.981 |
6 Robustness Extensions
The checks below were added after acceptance in response to reviewer comments. Each is scored by the same unmodified frozen script on a separate set of runs, so the pre-registered results of Table 2 are unaffected. Table 3 summarizes them. For these checks all runs were re-extracted with a deterministic hash for the token-histogram features (the released code); on the original 36 runs this reproduces the published accuracies of Table 2 exactly.
6.1 Text-Only Black-Box Access
The black-box family of Sect. 4.3 needs token probabilities for the three entropy features (Eq. (8)). Removing them leaves a 452-dimensional vector computable from generated text alone. On the same 36 runs its LODO accuracy is 0.639 (row CI 0.499–0.778, clustered CI 0.417–0.861; macro-F1 0.641), identical to the full black-box family, and RQ1 is unchanged at 0.944 (Table 3); only one of the 36 predictions differs. The black-box signal therefore does not depend on token-probability access: generated text alone suffices. Going further, the
S. Rane
384-dimensional MiniLM centroid alone, without length or token statistics, still reaches 0.611 (row CI 0.444–0.778, clustered CI 0.389–0.833; macro-F1 0.620), so most of the black-box signal is carried by the semantic content of the generations.
6.2 LoRA Rank
Ten additional fine-tunes use (with , so the scale of Eq. (3) is unchanged) on one dataset per domain. A classifier trained only on rank-16 runs of the other datasets predicts the domain of each rank-8 and rank-64 run, which tests rank transfer and dataset transfer together. Correct predictions are 3/10, 6/10, and 8/10 for the white-, gray-, and black-box families (Table 3); for reference, the same five datasets at rank 16 give 3/5, 2/5, and 4/5. The black-box family is unaffected by rank: every dataset receives the same prediction at ranks 8, 16, and 64 (four of five correct, PubMedQA misclassified at every rank). The white-box statistics are not rank-invariant: all five rank-64 adapters are predicted as medical (correctly only for PubMedQA), because spectra and norms shift with the rank itself. When rank-16 runs of the same dataset are allowed in training (the frozen script's robustness probe), category accuracy on the ten runs is 0.40, 0.80, and 1.00, respectively. With five datasets per rank these counts are indicative only.
6.3 Independently Resampled Training Data
In the headline population the two seeds of a dataset share one training subsample. A third run per dataset (18 runs) is therefore trained on an independently drawn 1.5M-token subsample with a new seed. For 15 of the 18 datasets the budget uses at most 26% of the dataset, so the new subsample is largely disjoint from the original one; for the other three (Python-code-instructions 46%, MedQA-USMLE 64%, Aya 93%) the overlap is substantial. On all 54 runs the LODO domain accuracy is 0.407, 0.648, and 0.630 for the white-, gray-, and black-box families (row CIs 0.278–0.537, 0.519–0.778, 0.519–0.759; clustered CIs 0.203–0.611, 0.426–0.852, 0.407–0.833), essentially unchanged from the 36-run headline but with narrower row intervals (Table 3). Leave-one-seed-out dataset re-identification, now across runs trained on largely different examples, stays at 1.000, 0.981, and 0.981 (chance 0.056). The fingerprint therefore characterizes the dataset's distribution rather than the specific examples drawn from it.
7 Discussion, Limitations, and Threats to Validity
The headline finding, that the training domain of a LoRA fine-tune is recoverable from the artifact alone and generalizes to unseen datasets, bears directly on provenance auditing of distributed adapters and on detecting undisclosed training data. The black-box result is notable because, as the text-only variant of Sect. 6.1 shows, it requires nothing beyond the generated text for a fixed set of neutral prompts, i.e., ordinary API access.
The study has clear bounds. (i) It uses a single 0.8B hybrid vision-language base model and LoRA only; transfer to other architectures, larger scales, and full fine-tuning is untested and was outside the compute budget of the study (a hard limit of US$30 of cloud GPU time). (ii) With 36 headline runs the CIs are wide; under the clustered bootstrap the white-box accuracy is not distinguishable from chance, so the RQ3 ordering should be read as suggestive; adding a third run per dataset (Sect. 6.3) narrows the intervals but does not change this conclusion. (iii) Two of the twenty intended datasets were excluded before any of their features reached a classifier: camel-ai/math, which is stored as tens of thousands of individual files and could not be loaded within the compute budget, and a Japanese dataset that was deprioritized under the budget; mathematics and multilingual therefore use three datasets each. (iv) One of the 36 headline runs (PubMedQA, seed 0) was trained on 2.0M rather than 1.5M tokens, because it served as the pipeline-validation run before the budget was reduced. Replacing it with a 1.5M-token rerun leaves the RQ2 accuracies unchanged (0.417, 0.611, 0.639). (v) The domains are deliberately well separated; finer distinctions (e.g., two medical sub-specialties) are likely harder. (vi) A pilot result of 100% accuracy under leave-one-seed-out was shown by a label-shuffle control to be same-dataset re-identification rather than domain learning; RQ2 therefore relies solely on leave-one-dataset-out, which a held-out dataset's second seed cannot inflate.
8 Conclusion
A simple classifier can recover the training-data domain of LoRA fine-tunes of a single base model from the artifact alone, and the signal transfers to datasets the classifier never saw, most strongly from activations and generated outputs and more weakly from weight-delta statistics. The result holds with generated text alone, with a third run per dataset on independently drawn data, and, for the black-box family, across LoRA ranks 8 to 64. The result is a starting point for practical provenance and data-leakage auditing of distributed adapters. Richer white-box features that use singular directions, and replication on further base models and fine-tuning methods, are the clear next steps. All code, the frozen evaluation, and per-run feature vectors are released for reproduction.
References
-
Achille, A., Lam, M., Tewari, R., Ravichandran, A., Maji, S., Fowlkes, C., Soatto, S., Perona, P.: Task2Vec: Task embedding for meta-learning. In: ICCV (2019)
-
Dettmers, T., Pagnoni, A., Holtzman, A., Zettlemoyer, L.: QLoRA: Efficient fine-tuning of quantized LLMs. In: NeurIPS (2023)
-
Duan, M., Suri, A., Mireshghallah, N., Min, S., Shi, W., Zettlemoyer, L., Tsvetkov, Y., Choi, Y., Evans, D., Hajishirzi, H.: Do membership inference attacks work on large language models? In: COLM (2024)
-
Duszenko, J., Bielak, P.: Towards weight-space interpretation of low-rank adapters for diffusion models. In: ICCS 2025. LNCS, Springer (2025)
S. Rane
-
Horwitz, E., Kahana, J., Hoshen, Y.: Recovering the pre-fine-tuning weights of generative models. In: ICML (2024)
-
Horwitz, E., Shul, A., Hoshen, Y.: Unsupervised model tree heritage recovery. In: ICLR (2025)
-
Hu, E.J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W.: LoRA: Low-rank adaptation of large language models. In: ICLR (2022)
-
Huang, C., Liu, Q., Lin, B.Y., Pang, T., Du, C., Lin, M.: LoraHub: Efficient cross-task generalization via dynamic LoRA composition. In: COLM (2024)
-
Huang, P., Yadav, C., Chaudhuri, K., Wu, R.: Can we infer confidential properties of training data from LLMs? arXiv:2506.10364 (2025)
-
Maini, P., Yaghini, M., Papernot, N.: Dataset inference: Ownership resolution in machine learning. In: ICLR (2021)
-
Maini, P., Jia, H., Papernot, N., Dziedzic, A.: LLM dataset inference: Did you train on my dataset? In: NeurIPS (2024)
-
Putterman, T., Lim, D., Gelberg, Y., Jegelka, S., Maron, H.: Learning on LoRAs: GL-equivariant processing of low-rank weight spaces for large finetuned models. arXiv:2410.04207 (2024)
-
Reimers, N., Gurevych, I.: Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In: EMNLP-IJCNLP (2019)
-
Shi, W., Ajith, A., Xia, M., Huang, Y., Liu, D., Blevins, T., Chen, D., Zettlemoyer, L.: Detecting pretraining data from large language models. In: ICLR (2024)
-
Shokri, R., Stronati, M., Song, C., Shmatikov, V.: Membership inference attacks against machine learning models. In: IEEE S&P (2017)
-
Suzuki, T., Ri, R., Takase, S.: Natural fingerprints of large language models. arXiv:2504.14871 (2025)
-
Unterthiner, T., Keysers, D., Gelly, S., Bousquet, O., Tolstikhin, I.: Predicting neural network accuracy from weights. arXiv:2002.11448 (2020)
-
Xu, J., Wang, F., Ma, M., Koh, P.W., Xiao, C., Chen, M.: Instructional fingerprinting of large language models. In: NAACL (2024)
-
Xu, Z., Sethi, A., Naik, M., Lim, S.-N.: Delta Activations: A representation for finetuned large language models. arXiv:2509.04442 (2025)