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 · Submission to ICLR 2026 · Withdrawn

TL;DR

TRACE (Tracing watermarked Rewriting for Attribution via Cut-off Entropy) is a proactive, black-box framework that enables dataset owners to prove their copyrighted data was used to fine-tune an LLM without needing access to model weights or logits. By releasing a high-fidelity, distortion-free watermarked rewrite of the dataset and evaluating only the suspect model’s high-entropy output tokens against a private key, TRACE reliably flags unauthorized dataset usage with overwhelming statistical confidence ($p \ll 0.05$) while preserving downstream utility.

What Problem Does This Paper Address?

As frontier LLMs are increasingly adapted using smaller, specialized datasets, unauthorized scraping and fine-tuning on copyrighted, proprietary data have triggered major legal and ethical battles. However, verifying dataset infringement is notoriously difficult:

  • White-box/Grey-box attacks (e.g., standard Membership Inference Attacks like Min-K% or loss thresholding) require internal model weights or output token logits, which commercial model APIs rarely expose.
  • Existing black-box methods rely on brittle prompt engineering to trigger verbatim recall or require matched, uncopyrighted reference datasets to calibrate null distributions (e.g., DE-COP).
  • Prior watermarking approaches (such as inserting synthetic trap sequences or zero-width/lookalike Unicode characters) degrade text naturalness, corrupt downstream fine-tuning performance, or get easily filtered.

The authors address how dataset creators can reliably, proactively, and verifiably audit whether an external black-box model was fine-tuned on their data—using only standard text prompts and responses.

Methods

TRACE is split into two phases: proactive watermarking and entropy-gated black-box detection.

[Original Dataset] 
       │
       ▼ (Rewrite with private key k using SynthID-Text)
[Watermarked Dataset] ──► Fine-tuned by suspect LLM
                                   │
                                   ▼
                            [Suspect LLM]
                                   │ (Query with prompt)
                                   ▼
                           [Model Output]
                                   │
       ┌───────────────────────────┴───────────────────────────┐
       ▼                                                       ▼
[Token Watermark Scores]                                [Token Entropy (via auxiliary LLM)]
       │                                                       │
       └───────────────────────────┬───────────────────────────┘
                                   ▼
               [Filter: Keep Top-q% Highest Entropy Tokens]
                                   │
                                   ▼
                    [Standardized z-test & p-value]
  1. Watermarked Rewriting: Before releasing a proprietary dataset, the owner rewrites sensitive fields using an instruction-tuned LLM (Llama-3.1-8B-Instruct) equipped with SynthID-Text, a distortion-free watermarking algorithm parameterized by a private key $k$. Because SynthID-Text perturbs sampling distributions without altering marginal expectations across random keys, the rewritten corpus preserves semantic fidelity and fluency.
  2. Fine-Tuning Radioactivity: When a suspect LLM fine-tunes on this text, it subtly absorbs the statistical watermark preferences—an effect known as model "radioactivity."
  3. Entropy-Gated Scoring: At inference time, the owner queries the black-box model and records its generated text. Rather than scoring every token, TRACE uses an auxiliary open model to compute token-level entropy ($H_t$) and filters for the top $q\%$ highest-uncertainty positions. Because watermark adjustments primarily shift tokens where base predictions are uncertain, high-confidence tokens mostly contribute noise; filtering them out dramatically amplifies the watermark signal.
  4. Hypothesis Testing: The owner scores the selected tokens against the private key $k$ and runs a one-sided standardized z-test to compute a p-value against the null hypothesis $H_0$ (the model did not train on the watermarked corpus).

Datasets

The authors evaluated TRACE across diverse fine-tuning formats and domains:

  • Supervised QA & Instruction Corpora: Med (medical QA), Dolly (instruction-following), Alpaca (general instructions), and GSM8k (grade-school math reasoning).
  • Multiple-Choice & Non-QA Corpora: MMLU, ARC-C, and ArXiv (machine learning abstracts), tested via prefix-continuation prompts.
  • Continued Pretraining Corpus: OpenOrca (2.94 million samples) was used to stress-test detection persistence after heavy further training.
  • Target Suspect Models: Evaluated on Llama-3.2-3B-Instruct, Phi-3-mini-128k-instruct, and Qwen2.5-7B-Instruct.

Key Insights and Ideas

  • Watermark Radioactivity Concentrates at High-Entropy Tokens: Models update their weights most where next-token distributions are broad and uncertain. By isolating the top 70% highest-entropy tokens, TRACE purges deterministic filler tokens that dilute the statistical test statistic, boosting detection significance by dozens to hundreds of orders of magnitude.
  • Preserved Downstream Utility: Unlike Unicode injection methods that butcher tokenizers and lower task performance, distortion-free rewriting retains near-identical downstream utility (BERTScore/ROUGE within $\pm 0.04$ of models trained on clean data).
  • Partial Coverage is Sufficient: Owners do not need to rewrite an entire dataset. Fine-tuning on a split with only 50% watermarked data still yielded $-\log_{10}(p) > 30$ on Med within a 60k token budget.

Key Results

  • Overwhelming Statistical Significance: Across models and datasets, TRACE consistently achieved $p \ll 0.05$, reaching extreme significance levels (e.g., $p = 2.0 \times 10^{-172}$ on Med and $p = 1.5 \times 10^{-44}$ on GSM8k for Llama-3B). Grey-box and black-box baselines (like DE-COP) were inconsistent and frequently failed to achieve significance ($p > 0.05$).
  • Zero False Positives: When evaluating models not trained on watermarked data using the dataset key, all p-values were well above the significance threshold ($\min p = 0.10$), proving resistance to false accusations.
  • Clean Source Attribution: When a model was fine-tuned simultaneously on two watermarked datasets (Med and GSM8k) with different keys, detection was strictly diagonal: the Med key yielded $p = 3.2 \times 10^{-129}$ on Med outputs and $p = 1.0$ on GSM8k outputs, demonstrating precise multi-dataset attribution.
  • Robust to Continued Pretraining: After fine-tuning on watermarked Alpaca, continuing pretraining on 2.94M samples of OpenOrca for 6,000 steps still left a distinct watermark signal ($p = 2.6 \times 10^{-36}$).

Limitations and Future Work

  • Proactive Requirement: TRACE is strictly proactive; it requires dataset creators to watermark their text before publication and cannot audit models against already-released, unwatermarked corpora.
  • Continuation vs. QA Gap: Detection on unconstrained continuous text or single-token multiple-choice datasets (MMLU, ArXiv) was slightly weaker ($p \approx 10^{-6}$ to $10^{-7}$) than on structured question-answering data, though still statistically valid.
  • Auxiliary Model Dependency: The entropy gating mechanism relies on next-token distribution estimates from an external auxiliary language model, introducing an additional inference dependency during auditing.

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