WaterMax: breaking the LLM watermark detectability-robustness-quality trade-off

Eva Giboulot, Teddy Furon

This paper introduces WaterMax, a novel approach to watermarking Large Language Model (LLM) outputs. It challenges the long-standing assumption that we must sacrifice text quality or robustness to achieve high watermark detectability.

TL;DR

WaterMax breaks the traditional "trilemma" of LLM watermarking by trading off computational complexity instead of text quality. By generating multiple candidate text chunks and selecting those that naturally score highest for a watermark, it achieves near-perfect detectability and superior robustness without ever modifying the model's underlying probability distributions.

The Watermarking Trilemma

As LLMs become ubiquitous, the risk of "AI weaponization"—such as the mass generation of fake news or impersonation—grows. Watermarking is a key defense, embedding a hidden signal in text that a detector can later identify.

However, current "active" watermarking methods face a difficult trade-off. They typically work by slightly biasing the model's word choices (logits) toward a "green list" of tokens. If you bias the model too much, the text quality suffers, becoming repetitive or ungrammatical. If you bias it too little, the watermark is easily erased by minor edits (low robustness) or requires very long passages to detect. This is especially problematic in "low-entropy" scenarios where the model is very certain about the next word; forcing a different choice there causes significant distortion.

The WaterMax Approach

The core philosophy of WaterMax is simple: Don't change the model; just pick the "luckiest" output.

  1. Generate Multiple Candidates: Instead of generating one token at a time, WaterMax generates text in "chunks" (e.g., sequences of 16 tokens). For every chunk, the LLM generates $n$ different drafts (typically $n=10$).
  2. Score and Select: Each draft is evaluated by a standard watermark detector, which assigns scores to tokens based on a secret key. WaterMax selects the draft with the highest score (or lowest p-value).
  3. Iterative Refinement: This process repeats. The system can use a greedy approach (picking the best chunk immediately to keep latency low) or a Viterbi-like algorithm to optimize the watermark over the entire document.
  4. Enforced Diversity: To ensure the $n$ drafts are actually different—crucial for low-entropy prompts where the model might want to repeat the same "best" sentence—the authors use a small "beam-search" at the start of each chunk to force distinct beginnings.
  5. Almost Distortion-Free: Because every chunk is a "natural" output of the LLM (sampled without modifying logits or temperature), the method is theoretically and empirically "almost distortion-free."
Extracted figure from page 4 of WaterMax: breaking the LLM watermark detectability-robustness-quality trade-off

Key Insights

  • Complexity as a Currency: The most profound insight is that we can "pay" for a better watermark with GPU cycles (compute) rather than text quality. In an era of massive parallelization, generating multiple drafts in parallel is often more acceptable than degrading the user experience with poor prose.
  • The Power of Chunks: By optimizing over sequences of tokens (chunks) rather than individual tokens, WaterMax better utilizes the "entropy" of the text. It finds windows where the model has multiple valid ways to say something and picks the one that best serves the watermark.
  • Bypassing the Entropy Limit: Traditional watermarks fail when a model is highly certain about a specific token. WaterMax doesn't force a change there; it simply looks for a different version of the entire chunk where the watermark might be stronger elsewhere.

Experimental Validation

The researchers evaluated WaterMax using the Mark My Words (MMW) Benchmark, covering news article generation, book summarization, and creative writing. They also used 100,000 Wikipedia entries to test the False Alarm Rate. The experiments utilized Llama-3-8B, Llama-2-7B, and Phi-3-mini, demonstrating the method's effectiveness across different architectures and scales.

Key Results

  • Superior Detectability and Quality: WaterMax consistently reaches a True Positive Rate (TPR) near 1.0 at a very strict False Positive Rate of $10^{-6}$. Using relative perplexity as a metric, WaterMax showed negligible quality loss, virtually indistinguishable from the unwatermarked baseline. In contrast, competing methods like KGW or Aaronson’s scheme often see their detectability drop significantly as text quality is prioritized.
Extracted figure from page 2 of WaterMax: breaking the LLM watermark detectability-robustness-quality trade-off
  • Robustness: WaterMax proved significantly more resilient to attacks. It maintained high detectability against synonym swapping, misspelling attacks, and word-swapping, outperforming the state-of-the-art in almost every category.
  • Latency: While the total compute is higher, the "time to first chunk" can be kept low. With $n=10$, generation takes about 5x longer than a standard pass, but because it's parallelizable, the perceived latency for a streaming user is only about 2x.

Limitations and Future Work

  • Computational Overhead: The primary drawback is the increased cost. Generating 10x the tokens is expensive for high-throughput production environments.
  • Distillation: The authors suggest a promising future direction: Watermark Distillation. One could use WaterMax to generate a large dataset of perfectly watermarked text and then fine-tune a smaller model to produce that same signal "natively" in a single pass.
  • Heavy Re-translation: Like all current watermarks, WaterMax can still be defeated by "heavy" attacks, such as translating the text into another language and back again, which destroys the specific token sequences the watermark relies on.
BibTeX
@inproceedings{giboulot2024watermax,
  author = {Eva Giboulot and Teddy Furon},
  title = {{WaterMax: breaking the LLM watermark detectability-robustness-quality trade-off}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=HjeKHxK2VH},
}
Figure