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

On the Reliability of Watermarks for Large Language Models

John Kirchenbauer, Jonas Geiping, Yuxin Wen, Manli Shu, Khalid Saifullah, Kezhi Kong, Kasun Fernando, Aniruddha Saha, Micah Goldblum, Tom Goldstein

TL;DR

This paper evaluates the robustness of large language model (LLM) text watermarking against realistic, "in-the-wild" modifications such as machine paraphrasing, text mixing, and adversarial human rewriting. The authors demonstrate that while these attacks dilute the watermark's strength, statistical evidence inevitably leaks through and accumulates with text length, making watermarked text highly detectable given enough tokens.

What Problem Does This Paper Address?

As LLMs become ubiquitous, the potential for automated systems to flood the internet with spam, fake reviews, and synthetic data is a growing concern. Text watermarking—the practice of subtly biasing token selection during generation so that text contains an imperceptible statistical signature—offers a proactive way to detect AI-generated content.

However, a critical question remains: Can watermarks survive real-world use cases? In practice, a user might not copy LLM output verbatim. Instead, they might paraphrase it using another model (like ChatGPT), manually edit it, or copy-paste short snippets of machine text into a larger, human-written document. This paper systematically evaluates the reliability and robustness of watermarking under these exact types of corruptions.

Figure 1: What happens to watermarked text in-the-wild? In this work we study watermark robustness against a number of text modifications, as visualized here. We visually depict that machine paraphrasing methods have a tendency to shorten texts, humans are quite effective at reducing the strength of a watermark by increasing the number of red tokens, and that short spans of watermarked text may be copied and pasted into a large document. In all of these scenarios, we find that high confidence detection reliably occurs given enough tokens as input.

Methods

The authors build upon the combinatorial watermarking framework introduced by Kirchenbauer et al. (2023), which splits a model's vocabulary into "green" and "red" lists based on the preceding token's hash, adding a small bias ($\delta$) to green tokens during sampling. To improve this setup for real-world deployment, they introduce two key innovations:

  1. SelfHash (Improved Hashing): Standard watermarking schemes can be vulnerable to brute-force reverse-engineering if they only look at past tokens. The authors introduce SelfHash, a scheme that anchors the hash function to the token currently being generated. This securely extends the context width (e.g., $h=4$), making the watermark much harder to reverse-engineer without sacrificing text diversity.
  2. WinMax (Windowed Detection): Standard detection calculates a global z-score across an entire document. If a user mixes a short watermarked paragraph into a massive human-written essay, the global score gets diluted. WinMax solves this by searching for the continuous sub-span of tokens that generates the highest local z-score, significantly boosting sensitivity to "copy-paste" attacks.

Datasets

The paper utilizes several datasets to evaluate generation and attack scenarios:

  • C4 (Colossal Common Crawl Cleaned corpus): Used as the primary baseline dataset for open-ended text generation prompts.
  • LFQA (Long-Form Question Answering): Sourced from Reddit's "Explain Like I'm Five" (ELI5) forum, this dataset was used for the human paraphrasing study, utilizing a fine-tuned Vicuna model to generate answers.
  • The Pile (Github, Law, Med, and Patents subsets) & Wikitext103: Employed in extensive ablation studies to analyze how domain-specific text constraints and varying levels of syntactic flexibility affect watermarking strength.

Key Insights and Ideas

  • The "Leakage" Phenomenon: Watermarks are incredibly difficult to completely scrub out because paraphrasing models and humans naturally recycle n-grams, long words, and structural phrases from the original text. This structural inheritance means the watermark signal is almost always preserved, albeit in a diluted form.
  • Favorable Sample Complexity: The reliability of watermarking is fundamentally a function of text length ($T$). Even if an attack successfully lowers the green-token bias, observing a longer sequence allows the statistical evidence to mount until detection confidence crosses the threshold.
  • Monotonic Scaling vs. Post-Hoc Failures: Unlike passive, post-hoc detection methods (such as DetectGPT or retrieval-based systems) which can exhibit non-monotonic behavior or completely break down when machine text is mixed with human text, watermarking detection strength scales reliably and predictably as more tokens are observed.

Key Results

  • Machine Paraphrasing: When watermarked text is rewritten by strong models like GPT-3.5-turbo or Dipper, the watermark remains highly detectable. The ROC-AUC remains $>0.85$ when 200 tokens are available and climbs above $>0.90$ at 600 tokens.
  • Copy-Paste Robustness: In a scenario where a 600-token human document contains just 150 tokens (25%) of inserted watermarked text, the WinMax detector achieves an outstanding detection AUC above 0.95.
  • Human Adversaries: In a controlled study, 14 graduate students were tasked with rewriting text to explicitly evade detection while maintaining length and meaning (incentivized with cash prizes). Despite their best efforts, the watermark remained detectable on average after observing 800 tokens under a strict $1e-5$ false positive rate.
Watermark detection scores (Z-score) vs. tokens observed after human paraphrasing

Limitations and Future Work

  • White-Box Vulnerabilities: The authors acknowledge that if an attacker gains white-box access to the watermarking key or hashing scheme, they can easily deploy an "anti-watermarking" attack by subtracting the logit bias ($\delta$) during paraphrasing, completely erasing the signal.
  • Low-Entropy Domains: In highly structured domains like code generation (Github) or legal documents (Law), the model's token distribution has inherently low entropy. Applying a watermark bias in these scenarios can degrade text quality more severely, and the resulting watermarks yield lower z-scores, requiring significantly longer text sequences to achieve confident detection.

Summary updated

BibTeX
@inproceedings{kirchenbauer2024reliability,
  author = {John Kirchenbauer and Jonas Geiping and Yuxin Wen and Manli Shu and Khalid Saifullah and Kezhi Kong and Kasun Fernando and Aniruddha Saha and Micah Goldblum and Tom Goldstein},
  title = {{On the Reliability of Watermarks for Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=DEJIDCmWOz},
}
Figure