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 +1 more
10/3/2025
cs.CL

Official code: NusIoraPrivacy/TRACE (0 stars, last commit 2025-10-02).

Abstract

Large Language Models (LLMs) are increasingly fine-tuned on smaller, domain-specific datasets to improve downstream performance. These datasets often contain proprietary or copyrighted material, raising the need for reliable safeguards against unauthorized use. Existing membership inference attacks (MIAs) and dataset-inference methods typically require access to internal signals such as logits, while current black-box approaches often rely on handcrafted prompts or a clean reference dataset for calibration, both of which limit practical applicability. Watermarking is a promising alternative, but prior techniques can degrade text quality or reduce task performance. We propose TRACE, a practical framework for fully black-box detection of copyrighted dataset usage in LLM fine-tuning. \texttt{TRACE} rewrites datasets with distortion-free watermarks guided by a private key, ensuring both text quality and downstream utility. At detection time, we exploit the radioactivity effect of fine-tuning on watermarked data and introduce an entropy-gated procedure that selectively scores high-uncertainty tokens, substantially amplifying detection power. Across diverse datasets and model families, TRACE consistently achieves significant detections (p<0.05), often with extremely strong statistical evidence. Furthermore, it supports multi-dataset attribution and remains robust even after continued pretraining on large non-watermarked corpora. These results establish TRACE as a practical route to reliable black-box verification of copyrighted dataset usage. We will make our code available at: https://github.com/NusIoraPrivacy/TRACE.

View on arXivView PDF

Code Implementations(1)

00Oct 2, 20251 years ago

Similar Papers

Cite this paper

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

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.02962.svg)](https://codeofpaper.com/paper/2510.02962)

Discussion