NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Leave No TRACE: Black-box Detection of Copyrighted Dataset Usage in Large Language Models via Watermarking

Jingqi Zhang, Ruibo Chen, Yingqing Yang, Peihua Mai, Heng Huang, Yan Pang · DOI

Introduction

The rapid advancement of Large Language Models (LLMs) relies heavily on high-quality, often proprietary or copyrighted, datasets. As these models are increasingly fine-tuned for specialized domains, a critical challenge has emerged: how can data owners prove their material was used without authorization? Existing detection methods, such as Membership Inference Attacks (MIAs), typically require "white-box" access to model weights or "grey-box" access to output logits. In real-world commercial scenarios, however, models are often "black boxes" providing only text outputs.

This paper introduces TRACE (Tracing watermarked Rewriting for Attribution via Cut-off Entropy), a framework designed for robust, black-box detection of dataset usage. TRACE leverages "distortion-free" watermarking and a novel entropy-gating mechanism to provide definitive statistical evidence of training data membership.

The TRACE Framework

TRACE operates through a two-stage pipeline: dataset watermarking and statistical detection.

1. Distortion-Free Watermarking

Instead of inserting obvious "trigger words" that might degrade data quality, TRACE uses an instruction-tuned LLM to rewrite the original dataset $D$ into a watermarked version $D'$. This process is guided by a private key $k$ using SynthID-Text, a technique that embeds a statistical signature into the text's token distribution. Because this rewriting preserves the semantic meaning and natural flow of the text, the resulting dataset remains highly effective for training while carrying a hidden "radioactive" fingerprint.

2. Entropy-Gated Detection

When a suspect model is fine-tuned on $D'$, it inherits the statistical preferences of the watermark. To detect this, TRACE queries the model and analyzes its generated text. The core innovation is Entropy Gating. Watermarks are most detectable at positions where the model is "uncertain"—where multiple words are plausible. TRACE uses an auxiliary model to identify these high-entropy tokens and calculates a watermark score only for them. By filtering out predictable, low-entropy words (e.g., common articles or prepositions), TRACE significantly amplifies the signal-to-noise ratio of the detection process.

The TRACE pipeline: from watermarked dataset release to statistical detection on high-entropy tokens.

Experimental Evaluation

The researchers evaluated TRACE across various dataset formats, including Question-Answering (GSM8k, Med, Alpaca, Dolly), Multiple-Choice (MMLU, ARC-C), and pure scientific text (Arxiv). These were tested against prominent model families such as Llama-3, Phi-3, and Qwen-2.5.

Key Results

  • High Statistical Confidence: TRACE achieved extremely low p-values (e.g., $2.0 \times 10^{-172}$ for the Med dataset on Llama-3B), providing nearly indisputable evidence of data usage.
  • Robustness to Continued Training: The watermark signature remained detectable even after the model underwent extensive additional training on millions of non-watermarked samples.
  • No Utility Loss: Because the watermarking process is "distortion-free," models trained on watermarked data performed identically to those trained on original data.
  • Multi-Dataset Attribution: TRACE can distinguish between multiple watermarked datasets used in the same model by using their respective private keys.

Discussion and Future Work

TRACE represents a major step forward in intellectual property protection for AI. By focusing on high-uncertainty tokens, it turns a subtle statistical bias into a powerful detection tool. However, some challenges remain. The method's effectiveness depends on the availability of an auxiliary model that can accurately estimate entropy for the suspect model. Additionally, tasks with very deterministic or short outputs provide fewer high-entropy tokens for analysis. Future research may explore prompt engineering techniques to encourage more "creative" model outputs, further enhancing the watermark signal.

Conclusion

TRACE provides a reliable, black-box solution for identifying unauthorized dataset usage in LLMs. By embedding "radioactive" fingerprints that do not compromise model performance, it offers data owners a powerful tool to safeguard their copyrighted material in the evolving landscape of generative AI.

Summary updated

BibTeX
@misc{zhang2025leave,
  author = {Jingqi Zhang and Ruibo Chen and Yingqing Yang and Peihua Mai and Heng Huang and Yan Pang},
  title = {{Leave No TRACE: Black-box Detection of Copyrighted Dataset Usage in Large Language Models via Watermarking}},
  year = {2025},
  eprint = {2510.02962},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.02962},
}
Figure