Watermarking Makes Language Models Radioactive

Tom Sander, Pierre Fernandez, Alain Durmus, Matthijs Douze, Teddy Furon · DOI

Abstract

As Large Language Models (LLMs) increasingly rely on synthetic data for fine-tuning, the ability to audit model provenance and protect intellectual property has become critical. This paper introduces the concept of "radioactivity," a phenomenon where watermarks embedded in synthetic text leave a statistically provable signature in the weights of any model trained on that data. We present detection protocols for both open-weight and closed-model scenarios, demonstrating that radioactivity is highly sensitive—detectable even with only 5% data contamination—and resilient to subsequent "purification" through further training. Our findings suggest that watermarking serves as a robust tool for identifying model imitation and unauthorized data usage without degrading model performance.

1. Introduction

The high cost of training state-of-the-art Large Language Models (LLMs) has led to a common practice: fine-tuning smaller "student" models on synthetic data generated by larger "teacher" models, such as GPT-4 or Claude. While efficient, this practice raises significant concerns regarding intellectual property (IP) and model imitation. Identifying whether a model has been trained on specific synthetic datasets is traditionally difficult. Existing methods, such as Membership Inference Attacks (MIAs), often require exact knowledge of training samples and lack the statistical strength necessary for legal or formal auditing.

This research introduces a novel solution by treating watermarked text as "radioactive." Just as radioactive isotopes can be traced through a system, watermarks embedded in synthetic training data leave a permanent, detectable trace in the resulting model's internal probability distributions. This allows for highly reliable detection of model contamination with strong statistical guarantees.

2. Methodology

The proposed detection framework leverages existing watermarking schemes (e.g., Kirchenbauer et al.; Aaronson & Kirchner) that bias a model's token selection based on a secret key and preceding context ($k$-grams). The researchers developed two primary protocols for detecting these traces:

2.1 Open-Model Detection ("Reading Mode")

When the auditor has access to the suspect model's weights (logits), they employ a "reading mode." In this scenario, the auditor passes watermarked text through the suspect model and analyzes the internal probability distributions for the next-token predictions. If the model's logits consistently align with the original watermark's "greenlist" more than would be expected by chance, the model is flagged as radioactive. This method is significantly more sensitive than analyzing text output alone, as it captures subtle biases within the model's weights.

2.2 Closed-Model Detection

For models accessible only via API, the auditor prompts the model and scores the generated text for watermark residuals. While this requires more samples to reach high confidence, it remains a viable path for auditing proprietary models.

2.3 Statistical Rigor

To ensure the reliability of the detection, the authors implemented strict de-duplication and $k$-gram filtering. These measures ensure that the calculated $p$-values—the probability that the detection occurred by chance—are theoretically sound and resistant to false positives caused by common phrases or repetitive data.

3. Experimental Setup

The study utilized a teacher-student training paradigm to test the limits of radioactivity:

  • Models: Llama-2-7B-chat served as the "teacher" to generate watermarked data, while Llama-1-7B served as the "student" model to be fine-tuned.
  • Data: The researchers used the Self-Instruct protocol to generate 100,000 instruction/answer pairs (~14 million tokens).
  • Evaluation: To test the resilience of the signal, models were also trained on Wikipedia and OASST1 datasets to attempt "purification" (removing the watermark signal through further training). Performance was monitored using standard benchmarks, including MMLU, GSM8k, and HumanEval.

4. Key Insights and Results

4.1 High Sensitivity and Persistence

The "Reading Mode" proved exceptionally powerful. Researchers were able to detect radioactivity with a $p$-value $< 10^{-5}$ even when the watermarked data comprised only 5% of the total training set. Furthermore, the signal proved persistent; even after the model was fine-tuned on clean, human-generated data, the original radioactive traces remained detectable.

4.2 Superiority over Membership Inference

In low-supervision settings where the auditor does not have access to the exact training samples, standard MIAs typically fail. In contrast, radioactivity detection remained highly effective, providing confidence levels (p-values) as low as $10^{-30}$ when scoring millions of tokens in reading mode.

4.3 Performance Neutrality

A critical finding for practitioners is that watermarking the training data does not negatively impact the student model's utility. The fine-tuned models maintained their performance across standard benchmarks like MMLU and GSM8k, suggesting that radioactivity is a "silent" but effective auditing tool.

5. Limitations and Future Work

While promising, the method has limitations. Closed-model detection via API is computationally expensive, often requiring over 1,000 queries to establish high statistical confidence. Additionally, the current study focuses on hashing-based watermarks; future research is needed to determine if "semantic" watermarks, which do not rely on local $k$-grams, exhibit the same radioactive properties.

Finally, the authors acknowledge the potential for "Adversarial Bobs"—actors who may attempt to de-watermark text or use specific regularization techniques to avoid memorizing the watermark signal. Investigating these defensive measures will be essential for the long-term viability of model auditing.

6. Conclusion

Watermarking makes language models radioactive, providing a robust and statistically sound method for auditing the use of synthetic data in AI training. By shifting the focus from detecting AI-generated text to detecting AI-contaminated models, this research offers a powerful new tool for IP protection and transparency in the LLM ecosystem.

Summary updated

BibTeX
@inproceedings{sander2024watermarking,
  author = {Tom Sander and Pierre Fernandez and Alain Durmus and Matthijs Douze and Teddy Furon},
  title = {{Watermarking Makes Language Models Radioactive}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=qGiZQb1Khm},
}
Figure