TL;DR
This paper introduces the first practical framework for testing LLM provenance—determining if a target model is derived from a specific parent model via fine-tuning—using only black-box API access. By analyzing next-token output similarities against a baseline of unrelated "control" models using multiple hypothesis testing, the framework achieves 90–95% precision and 80–90% recall across more than 600 real-world models.
What Problem Does This Paper Address?
As large language models (LLMs) become increasingly integrated into software pipelines, customizing foundation models via fine-tuning has become standard practice. However, this ease of customization creates severe challenges for intellectual property (IP) protection, license enforcement, and security auditing. For instance, if a foundation model is found to contain a critical vulnerability, a backdoor, or a severe bias, organizations need a way to identify which of their deployed downstream models inherit these flaws.
Existing model alignment or ownership verification methods typically require "white-box" access (inspecting internal model weights) or intrusive watermarking during the training phase. This paper tackles the challenge of verifying model provenance under minimal assumptions: the tester only has black-box query access to next-token predictions, with zero knowledge of the training data, embeddings, or hyperparameters used to build the models.
Methods
The framework relies on a core empirical insight: fine-tuning adapts a model for new tasks but leaves its underlying output distribution remarkably close to the parent model.
- Similarity Metric: The tester queries a target model $g$ and a candidate parent $f$ with a set of $T$ random prompts, calculating a similarity score ($\mu$) based on the proportion of prompts where both models produce the exact same first output token.
- Control Models & Hypothesis Testing: To ensure this similarity isn't just random chance, the authors introduce a set of diverse, unrelated "control models." They set up multiple hypothesis tests to prove that the similarity between the target and the candidate parent is statistically greater than the similarity between the target and any control model.
- Statistical Rigor: They use a standard z-test to generate p-values and apply the Holm-Bonferroni method to control the family-wise error rate (FWER), guaranteeing that the false positive rate stays below a user-specified threshold ($\alpha$).
- Query Optimization: To minimize API costs, they introduce two optimization techniques:
- Online reduction: An entropy-based rejection sampling strategy that selects highly discriminative prompts, reducing the number of queries needed for the target model.
- Offline reduction: Formulating candidate parent identification as a Best Arm Identification (BAI) problem in a Multi-Armed Bandit setting to prune dissimilar models early and save offline compute.
Datasets
The authors evaluated their approach on two extensive real-world benchmarks curated from Hugging Face:
- BENCH-A: Features 10 popular foundation models (1B to 4B parameters, including Llama-3.2, Phi-3, Gemma, and Qwen2) and 100 manually verified fine-tuned derivatives (10 per parent).
- BENCH-B: A larger, automatically compiled dataset containing 57 pre-trained models and 383 ground-truth provenance pairs, focusing on smaller models (<1B parameters) spanning diverse domains such as medicine, finance, law, and gaming.
Key Insights and Ideas
- Derivation Preserves Textual DNA: Even after significant fine-tuning across specialized domains, a derived model's first-token output distribution remains tethered to its parent. True parents ranked as the highest similarity match in 93% of cases for BENCH-A and 89% for BENCH-B.
- The Sample Size Paradox: Counterintuitively, increasing the number of prompts decreases precision while increasing recall. A small number of prompts only detects massive similarities (high precision, low recall). As the prompt count grows, the statistical power increases, allowing the tester to catch subtle derivations (higher recall) but also causing it to flag independent models that happen to share domain-specific similarities (lower precision).
- Smart Sampling Beats Brute Force: Uniformly sampling prompts is inefficient. By filtering prompts using an entropy-based rejection strategy (maximizing output diversity across reference models), online query complexity can be cut by 4x to 5x without sacrificing accuracy.
Key Results
- High Accuracy: The base tester achieves 90–95% precision and 80–90% recall using 3,000 prompts per model.
- Control Set Impact: The size and diversity of the control set heavily dictate performance. For a highly diverse benchmark (BENCH-B), a small control set yields poor precision, but performance scales up reliably as more control models are added.
- Query Reduction Success: With advanced prompt sampling ($k=64$), the framework maintains high precision and recall while slashing the required online prompts from 3,000 down to just 500 per model.
Limitations and Future Work
- Assumption Vulnerability: The method assumes that derivation implies output similarity. If a model customizer applies extreme modifications, heavy alignment, or merges multiple models, the framework might suffer from false negatives.
- Adaptive Adversaries: The evaluation focused on non-adaptive adversaries. Future work must explore how the tester fares against an adversary actively trying to evade detection (e.g., via adversarial fine-tuning designed to shift token distributions), though the authors note this might degrade the model's utility.
- Control Set Selection: Unbiased, random selection of control models works well for general models but can degrade performance on highly specialized domains (e.g., code generation). Developing automated, domain-aware control set selection strategies remains an open area of research.
Summary updated