Scalable Fingerprinting of Large Language Models

Anshul Nasery, Jonathan Hayase, Creston Brooks, Peiyao Sheng, Himanshu Tyagi, Pramod Viswanath, Sewoong Oh

Abstract

As Large Language Models (LLMs) transition toward open-weight and semi-open distribution models, protecting intellectual property (IP) and ensuring license compliance has become a critical challenge. Traditional model fingerprinting—embedding specific trigger-response pairs—suffers from a "scalability wall," where increasing the number of fingerprints significantly degrades model utility. This paper presents a novel framework for scalable fingerprinting using Perinucleus Sampling. By embedding over 24,000 unique fingerprints into an 8B-parameter model with minimal utility loss, this method provides a robust defense against model "washing," fine-tuning, and multi-user collusion attacks.

1. Introduction

The proliferation of high-performance open-weight models, such as the Llama, Mistral, and Qwen families, has democratized AI development but introduced significant risks for model creators. Without robust tracking mechanisms, proprietary weights can be repurposed or redistributed in violation of licenses. Model fingerprinting offers a solution by training a model to produce a specific "secret" response when prompted with a unique "key." However, existing techniques are limited to a few hundred fingerprints before the model's general intelligence begins to decline. This research, presented at NeurIPS, introduces a methodology to scale this capacity by two orders of magnitude.

2. The Scalability Wall in Model Fingerprinting

Existing fingerprinting methods typically rely on "backdoor" triggers where a model is forced to output a random, out-of-distribution token in response to a specific prompt. Because these responses are nonsensical or highly improbable within the model's original training distribution, the model must undergo significant weight shifts to memorize them. This leads to two primary issues:

  1. Utility Degradation: The model's performance on standard benchmarks (e.g., MMLU, GSM8K) drops as it "forgets" general knowledge to accommodate the fingerprints.
  2. Security Vulnerability: A small number of fingerprints is easy for an adversary to discover through leakage or by comparing different versions of the same model (collusion). Once discovered, these triggers can be filtered or fine-tuned out.

3. Methodology

To overcome these limitations, the authors propose three integrated innovations:

3.1 Perinucleus Sampling

The core innovation is the shift from random token responses to "Perinucleus" responses. Instead of picking a completely random token, the system identifies the "nucleus" (the top-p most likely tokens) for a given prompt and samples from the very edge of that distribution. These tokens are sensible in context but statistically uncommon. Because these responses are closer to the model's natural distribution, they are "harmless" to the model’s internal logic while remaining unique enough to serve as a reliable signature.

3.2 Regularized Fine-tuning

To embed thousands of these signatures without catastrophic forgetting, the authors employ a specialized fine-tuning regime:

  • Weight Deviation Penalties: A regularization term ensures that the fine-tuned weights do not drift too far from the base model weights.
  • Data-Mixing: Fingerprint training examples are interleaved with original pre-training data, ensuring the model maintains its general capabilities during the embedding process.

3.3 Collusion-Resistant Assignment

To defend against "coalition attacks"—where multiple users compare their unique model versions to identify commonalities and differences—the authors use a randomized strategy. Each fingerprint is assigned to a random subset of models, making it mathematically difficult for a group of adversaries to isolate and remove the triggers.

4. Experimental Setup and Results

The researchers evaluated the method across several model families, including Llama-3.1 (8B), OLMo-2, Mistral, Qwen-2.5, and Phi-3. Utility was measured using the OpenLLM Leaderboard suite, while persistence was tested against supervised fine-tuning (SFT) using the Alpaca and MathInstruct datasets.

4.1 Capacity and Utility

The framework successfully embedded 24,576 fingerprints into Llama-3.1-8B, representing a 100x improvement over prior state-of-the-art methods. Remarkably, the drop in benchmark scores was less than 5% across 10 different model families, demonstrating that the Perinucleus approach effectively bypasses the scalability wall.

4.2 Robustness and Persistence

The fingerprints proved highly resilient to adversarial attempts to remove them:

  • Fine-tuning Persistence: After two full epochs of instruction fine-tuning on the Alpaca dataset, over 60% of the fingerprints remained correctly identifiable.
  • Collusion Defense: The randomized assignment strategy achieved a near-perfect detection rate against coalitions involving over 2,000 different model versions.
  • Indistinguishability: By using natural English sentences as keys (sampled at low temperatures), the fingerprints are indistinguishable from normal user queries, preventing simple filtering by hosts.

5. Discussion and Limitations

While this method significantly advances LLM security, the authors identify several areas for future research. A sophisticated adversary might attempt to build a detector for the Perinucleus distribution itself. Additionally, while the inference cost is zero, the initial fine-tuning process for 24,000 fingerprints requires several hours of high-end GPU time. Future work may explore expanding these signatures from single-token responses to longer, stylistic fingerprints (e.g., specific tones or personas).

6. Conclusion

Scalable fingerprinting via Perinucleus sampling provides a viable path for model owners to share their work in an open-weight ecosystem while maintaining a robust claim over their intellectual property. By aligning fingerprints with the model's natural distribution, this method ensures that security does not come at the expense of intelligence.

Summary updated

BibTeX
@inproceedings{nasery2025scalable,
  author = {Anshul Nasery and Jonathan Hayase and Creston Brooks and Peiyao Sheng and Himanshu Tyagi and Pramod Viswanath and Sewoong Oh},
  title = {{Scalable Fingerprinting of Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=CRyOyiVvvJ},
}
Figure