Embedding-Space Fingerprinting of LoRA Fine-Tunes: Recovering the Training-Data Domain from the Model Artifact Alone
Organizations: Goa College of Engineering, Farmagudi, Ponda, Goa, India
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.
Figures & tables
| 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 |
| RQ2: domain of an unseen dataset | RQ1 | ||||
|---|---|---|---|---|---|
| Access level | Acc. | 95% CI (row) | 95% CI (clustered) | Macro-F1 | Acc. |
| 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 |
| 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 |
Language Model Fingerprinting
Language model fingerprinting identifies and verifies models or their lineage from distinctive outputs, internal representations, or embedded signals.
See all 83 papers