Perturb Your Data: Paraphrase-Guided Training Data Watermarking

Pranav Shetty, Mirazul Haque, Petr Babkin, Zhiqiang Ma, Xiaomo Liu, Manuela Veloso

TL;DR

SPECTRA is a novel training data watermarking technique that allows content creators to reliably detect if their text has been used to train a Large Language Model (LLM), even when their data makes up less than 0.001% of the training corpus. By using an LLM to generate paraphrases that carefully match the statistical "surprisal" score of the original text, SPECTRA creates a robust, invisible watermark that survives large-scale model training without degrading text quality.

What Problem Does This Paper Address?

As LLMs scale, they consume massive text corpora scraped from the internet, often ignoring copyright, paywalls, or explicit licensing terms. For content creators, proving that their data was used without authorization is incredibly difficult.

Existing solutions fall into two main camps, both with severe flaws:

  1. Membership Inference Attacks (MIAs): These methods look at a model's output probabilities to guess if a document was in the training set. However, they are highly sensitive to small distribution shifts and completely lose their effectiveness when a model is trained on billions of tokens.
  2. Data Watermarking: Traditional watermarks insert artificial "trigger" tokens or hashes into the text. While detectable, these modifications ruin the readability and semantic meaning of the text for human readers.

SPECTRA bridges this gap by creating a "deploy-before-release" watermark that preserves human readability while remaining highly detectable even after large-scale LLM pre-training.

Overview of the watermarking and verification problem setting.

Methods

SPECTRA (Score-sampled rePhrasing to detECt TRAining data) operates in two distinct phases:

1. The Watermarking Phase

Instead of inserting weird characters or hashes, SPECTRA uses a powerful paraphraser model (like Llama 3.1-405b) to generate multiple high-quality paraphrases of a document.

To choose the best paraphrase, it computes a Min-K%++ score—a metric that measures the normalized log probability of the rarest tokens in a text—using a separate, independent scoring model. Crucially, SPECTRA does not pick the paraphrase with the highest score. Instead, it uses a specialized sampling algorithm to select a paraphrase whose score closely matches the original text. This prevents introducing a systematic distribution shift before the model is even trained.

2. The Verification Phase

If a content creator suspects a target model was trained on their watermarked data, they compute the ratio of the target model's Min-K%++ scores on the watermarked text versus the original text. They compare this to the same ratio computed by the independent scoring model. If the target model was indeed trained on the data, the loss landscape changes, causing the watermarked text's score to rise significantly. A one-sided paired t-test is then used to calculate a p-value for definitive proof.

Detailed workflow of SPECTRA's watermarking and verification phases.

Datasets

The authors evaluated SPECTRA across four distinct text domains that were held out from the initial training of their target models:

  • The Pile Subsets: Wikipedia (Wiki), HackerNews (HN), and PubMed Central abstracts (PubMed).
  • Dolma Subset: PeS2o (academic papers released after the cutoff date for the target models).

For each domain, they sampled 500 documents for watermarking and kept another 500 as a clean, non-member control group.

Key Insights and Ideas

  • The Score-Matching Paradox: A naive approach to watermarking might select the paraphrase that maximizes the initial MIA score shift. However, the authors discovered that doing this creates such a massive pre-training shift that subsequent training cannot amplify it further, making it paradoxically undetectable in practice. Matching the original score keeps the text in a natural distribution, allowing the training signal to cleanly emerge.
  • Scoring Model as a Proxy: Since we rarely have access to an LLM's exact weights before it was trained on a specific dataset, SPECTRA cleverly uses an independent, open-source model from the same family as a proxy for the pre-trained state.

Key Results

  • Massive P-Value Gap: SPECTRA achieved a consistent p-value gap of over nine orders of magnitude between member (trained) and non-member (untrained) data using just 500 samples. This provides an incredibly strong statistical confidence interval for legal or compliance frameworks.
  • Scalability: Unlike standard MIA techniques, which degrade to random guessing when a model undergoes large-scale training (5 billion tokens), SPECTRA's signal remains completely stable.
  • High Text Quality: Human and automated evaluations confirmed that SPECTRA preserves the meaning and tone of the original text. Automated P-SP semantic similarity scores remained above 0.88 for almost all datasets.
Human evaluation ratings showing high preservation of meaning, structure, and tone.

Limitations and Future Work

While highly effective, SPECTRA has a few limitations:

  • Grey-Box Access Required: The verification phase requires access to the token-level log probabilities of the target model, which can be difficult to obtain from proprietary, closed-source API models.
  • Conversational Text Degradation: Human evaluation revealed that for highly structured or conversational text (like HackerNews threads), the paraphrasing model sometimes collapses the multi-speaker dialogue format into a flat summary.
  • Proactive Only: This method cannot help protect data that has already been published and scraped; it must be applied before the data is released to the internet.

Summary updated

BibTeX
@inproceedings{shetty2026perturb,
  author = {Pranav Shetty and Mirazul Haque and Petr Babkin and Zhiqiang Ma and Xiaomo Liu and Manuela Veloso},
  title = {{Perturb Your Data: Paraphrase-Guided Training Data Watermarking}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i39.40575},
}
Figure