Three Bricks to Consolidate Watermarks for Large Language Models

Pierre Fernandez, Antoine Chaffin, Karim Tit, Vivien Chappelier, Teddy Furon

TL;DR

This paper strengthens the foundation of Large Language Model (LLM) watermarking by introducing three "bricks": robust statistical tests that prevent false accusations even at one-in-a-million error rates, a comprehensive evaluation showing that watermarking doesn't hurt model performance on complex tasks, and a new "multi-bit" scheme that can identify which specific user or model version generated a text.

What Problem Does This Paper Address?

As LLMs become ubiquitous, the need to distinguish between human-written and AI-generated text is critical for preventing disinformation and academic dishonesty. Watermarking—the process of subtly biasing a model's word choices to leave an invisible "signature"—is a leading solution.

However, existing watermarking methods have two major flaws:

  1. The "False Accusation" Problem: Current statistical tests (like the Z-test) rely on assumptions that break down for short or repetitive texts, leading to significantly higher False Positive Rates (FPR) than predicted. In high-stakes scenarios, accusing a student of cheating based on a "one-in-a-billion" fluke that is actually a "one-in-a-thousand" occurrence is unacceptable.
  2. Utility Uncertainty: Most research evaluates watermarks using "perplexity" (how much the text distribution changes), but they don't measure if watermarking actually makes the model worse at solving math problems or writing code.

Methods

The authors propose three specific improvements:

  • Brick 1: Non-Asymptotical Statistical Tests. Instead of using the standard Gaussian (Z-test) approximation, they derive exact p-values using Binomial and Gamma distributions. They also introduce "rectified scoring," a heuristic that ignores repeated sequences (n-grams) during detection. This prevents a repetitive list (like a bibliography) from artificially inflating the watermark score and causing a false positive.
  • Brick 2: Downstream Task Evaluation. They move beyond simple similarity metrics and test watermarked models on six major NLP benchmarks (math, coding, and Q&A) to see if the "bias" introduced by the watermark degrades the model's reasoning.
  • Brick 3: Multi-bit Watermarking. Current watermarks are "zero-bit" (they just say "Yes/No" to AI generation). The authors develop a scheme using cyclic shifts of a secret key. By shifting the key, they can embed a specific message (an ID number), allowing them to trace a text back to one of thousands of specific users.

Datasets

  • Wikipedia (Multilingual): Used to sample 100,000 natural text sequences to rigorously test and validate False Positive Rates.
  • Alpaca/Guanaco-7b: Used as the base model and instruction-tuning dataset for generation experiments.
  • NLP Benchmarks: GSM8K (math), HumanEval (coding), MathQA, MBPP (coding), Natural Questions (NQ), and TriviaQA (TQA).

Key Insights and Ideas

  • The Gaussian Trap: The paper reveals that standard Z-tests used in prior work drastically underestimate false positives at low probability regimes. If you want a safety guarantee of $10^{-6}$, the old tests might actually give you $10^{-2}$ in practice.
  • Repetition is the Enemy: Natural text often contains repetitive formatting (like bullet points or " \n * "). These repetitions break the assumption of independence that statistical tests rely on. The "rectified scoring" method—simply not counting an n-gram if you've already seen it—is a surprisingly effective fix.
  • Intelligence is Resilient: A key "aha" moment is that larger, more capable models (like 30B parameter versions) are less affected by watermarking than smaller models. Their internal logic is robust enough that the slight bias in token selection doesn't derail their ability to solve complex problems.

Key Results

  • Perfect FPR Control: The new statistical tests combined with rectified scoring achieved empirical false positive rates that matched theoretical predictions perfectly, even down to $10^{-6}$.
  • Minimal Performance Hit: Across all benchmarks, the average performance drop was negligible. For example, on a 7B model, the average score across tasks only moved from 20.5% (no watermark) to 20.4% (with watermark).
  • Tracing at Scale: The multi-bit scheme successfully identified the correct source among 100,000 possible users with ~50% accuracy while maintaining a strict $10^{-6}$ false positive rate.

Limitations and Future Work

  • Robustness to Attacks: While the statistical tests are more reliable, the watermarks themselves can still be weakened by "synonym attacks" (manually or automatically replacing words). The authors note that as the watermark context window ($h$) increases, the system becomes more fragile to these edits.
  • Complex Sampling: The current work focuses on standard sampling methods. The authors suggest that future research should investigate how to adapt these "bricks" to more complex generation techniques like beam search, which are often used to improve text quality but are harder to watermark.
  • Multi-bit Scaling: While tracing 100,000 users is impressive, the identification accuracy drops as the number of users increases. Scaling this to millions of users remains a challenge.

Summary updated

Abstract

The task of discerning between generated and natural texts is increasingly challenging. In this context, watermarking emerges as a promising technique for ascribing generated text to a specific model. It alters the sampling generation process so as to leave an invisible trace in the generated output, facilitating later detection. This research consolidates watermarks for large language models based on three theoretical and empirical considerations. First, we introduce new statistical tests that offer robust theoretical guarantees which remain valid even at low false-positive rates (less than 10$^{\text{-6}}$). Second, we compare the effectiveness of watermarks using classical benchmarks in the field of natural language processing, gaining insights into their real-world applicability. Third, we develop advanced detection schemes for scenarios where access to the LLM is available, as well as multi-bit watermarking.
BibTeX
@inproceedings{fernandez2023three,
  author = {Pierre Fernandez and Antoine Chaffin and Karim Tit and Vivien Chappelier and Teddy Furon},
  title = {{Three Bricks to Consolidate Watermarks for Large Language Models}},
  booktitle = {WIFS},
  year = {2023},
  doi = {10.1109/wifs58808.2023.10374576},
}

Loading related content...

Figure