Provable Robust Watermarking for AI-Generated Text

Xuandong Zhao, Prabhanjan Vijendra Ananth, Lei Li, Yu-Xiang Wang

TL;DR

Researchers from UC Santa Barbara have introduced UNIGRAM-WATERMARK, a simplified yet mathematically rigorous method for watermarking text generated by Large Language Models (LLMs). By utilizing a fixed, context-independent "green list" of tokens, they created a system that is provably twice as robust to text editing and paraphrasing as previous state-of-the-art methods, all while maintaining nearly identical text quality.

What Problem Does This Paper Address?

As LLMs become ubiquitous, the risks of their misuse scale accordingly. These risks include the spread of fake news, academic dishonesty, and the "contamination" of future training sets with synthetic data.

Detecting AI-generated text generally falls into two categories. Passive detection tries to find statistical "tells" in text, but this is a fragile, reactive cat-and-mouse game. Active watermarking is a more promising proactive approach; it involves subtly biasing the model's word choices during generation so that a hidden statistical pattern is "planted" in the text.

However, existing watermarking schemes (like the popular KGW method) are context-dependent. If an attacker edits a single word or paraphrases a sentence, the context for subsequent words changes. This "breaks" the watermark, making it undetectable. This paper seeks a watermarking scheme that is both high-quality and provably robust against such adversarial edits.

Methods

The authors propose UNIGRAM-WATERMARK, which simplifies the watermarking process to its most basic form to maximize robustness.

  1. Fixed Grouping: Unlike previous methods that used the previous token to determine which subsequent words are "green" (favored) or "red" (discouraged), UNIGRAM-WATERMARK uses a globally fixed, secret partition of the entire vocabulary.
  2. Logit Boosting: During text generation, the model's "logits" (raw scores for the next word) are increased by a strength parameter $\delta$ for all words on the green list.
  3. Statistical Detection: To check if a text is AI-generated, a detector simply counts how many green-list tokens appear. If the count is significantly higher than what would occur by random chance (calculated as a z-score), the text is flagged.
  4. Theoretical Framework: The authors use Renyi-divergence to prove that the watermarked text remains statistically close to the original model's output, ensuring that the "quality" of the writing doesn't degrade.
Example of watermarked vs. un-watermarked text generation showing green (favored) and red (discouraged) tokens.

Datasets

The researchers evaluated their method across three LLMs (GPT2-XL, OPT-1.3B, and LLaMA-7B/13B/65B) using several datasets:

  • OpenGen: 3,000 two-sentence chunks from WikiText-103 used for long-form generation.
  • LFQA: A long-form question-answering dataset scraped from Reddit.
  • TOEFL Essays: A dataset of human-written essays used specifically to test for "false positives" (ensuring the detector doesn't wrongly flag human writing, especially from non-native speakers).
  • C4: Used to simulate general human data distributions for white-box attack experiments.

Key Insights and Ideas

  • Simplicity as a Shield: The core insight is that context-dependence is the enemy of robustness. By moving from a $K$-gram (contextual) approach to a Unigram (fixed) approach, an edit at word #5 no longer ruins the watermark detection for words #6 through #100.
  • The "Twice as Robust" Proof: The authors mathematically demonstrate that their method is exactly twice as resilient to arbitrary edits (insertions, deletions, or substitutions) compared to the previous baseline.
  • The Robustness-Learnability Tradeoff: The paper acknowledges a catch: because the green list is fixed, a sophisticated attacker who sees enough watermarked text could eventually "learn" which words are green. However, the authors argue that in practice, this is difficult without access to the original un-watermarked model.
  • Homophily Assumption: They introduce a new theoretical concept called "homophily"—the idea that a model is more likely to refer back to tokens it has already generated. This assumption is crucial for proving that watermarks remain detectable in very long passages.

Key Results

  • Superior Robustness: In paraphrasing attacks (using ChatGPT or DIPPER to rewrite the text), UNIGRAM-WATERMARK maintained high detection accuracy. For example, it achieved a True Positive Rate (TPR) of ~0.86, while the previous state-of-the-art (KGW) often saw its accuracy plummet to ~0.56.
Performance comparison of UNIGRAM-WATERMARK against the KGW baseline under various paraphrasing attacks.
  • Preserved Quality: Text perplexity—a measure of how "natural" the text is—remained nearly identical between watermarked and un-watermarked versions.
  • Human Indistinguishability: In double-blind evaluations, human crowd workers could not distinguish between watermarked and original text, giving them nearly identical quality scores (3.665 vs 3.660 on a 5-point scale).
  • Zero False Positives: The method showed a remarkable ability to avoid "false alarms" on human-written TOEFL essays, addressing a major concern regarding the bias of AI detectors against non-native English speakers.

Limitations and Future Work

  • Vulnerability to "Learning" Attacks: As noted, a fixed green list is theoretically learnable over time. The authors suggest "refreshing" the green list periodically as a potential fix.
  • Static Strategy: The fixed split might not be optimal for every possible prompt or domain.
  • Future Directions: The authors aim to explore "unlearnable" watermarks and investigate ways to unify cryptographic watermarking (which is secure but lacks quality guarantees) with statistical watermarking (which is high-quality but often less secure).

Summary updated

BibTeX
@inproceedings{zhao2024provable,
  author = {Xuandong Zhao and Prabhanjan Vijendra Ananth and Lei Li and Yu-Xiang Wang},
  title = {{Provable Robust Watermarking for AI-Generated Text}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=SsmT8aO45L},
}
Figure