No Free Lunch in LLM Watermarking: Trade-offs in Watermarking Design Choices

Qi Pang, Shengyuan Hu, Wenting Zheng, Virginia Smith

As Large Language Models (LLMs) become ubiquitous, the "AI-generated" label is evolving into a critical piece of digital infrastructure. Watermarking—the practice of subtly biasing a model's output so it can be mathematically identified later—is the leading candidate for enforcing this transparency. However, a new paper from researchers at Carnegie Mellon University, titled "No Free Lunch in LLM Watermarking," reveals that the design choices we make to improve watermarks often create hidden backdoors for attackers.

The Core Conflict: Robustness vs. Security

The goal of watermarking is to embed an invisible "signal" in text that can be verified using a secret key. Ideally, a watermark should be:

  1. Robust: It shouldn't disappear if someone changes a few words or paraphrases the text.
  2. Secure: An attacker shouldn't be able to "steal" the pattern to create their own fake watermarked text (spoofing) or systematically remove it.
  3. Publicly Verifiable: The public should be able to check if text is AI-generated via an API.

The authors argue that these goals are in direct conflict. By trying to satisfy one, designers inadvertently weaken the others, creating a "No Free Lunch" scenario where every design benefit comes with a corresponding security cost.

Attack Vectors on SOTA Watermarks

The researchers rigorously analyzed three state-of-the-art watermarking schemes (KGW, Unigram, and Exp) using several primary attack vectors:

1. Piggyback Spoofing (The Robustness Paradox)

We usually want watermarks to be robust so users can't easily remove them. However, the more robust a watermark is, the easier it is to perform a "piggyback" attack. If a watermark is designed to survive edits, an attacker can take a legitimate watermarked output and "piggyback" toxic or incorrect information into it.

Because the watermark is robust, the detector still identifies the (now toxic) text as being generated by the LLM, potentially damaging the model provider's reputation. In their tests, researchers could insert a median of 40 toxic tokens into a 200-token sentence (20% of the text) without the watermark being lost. These sentences were flagged by OpenAI’s moderation API as highly toxic, yet still appeared "officially" watermarked.

Impact of piggyback attacks on toxicity and fluency.

2. Multi-Key Removal (The Multi-Key Trap)

To prevent "watermark stealing," providers often use multiple keys—a standard cryptographic defense. In LLM watermarking, however, more keys actually provide the attacker with more "views" of the underlying model distribution.

The authors show that an attacker can query the model multiple times using these different keys to estimate the original, unwatermarked token distribution. By sampling from this estimated distribution, they can generate high-quality text that has no watermark at all. Using a multi-key attack with just 13 keys, attackers could successfully remove watermarks from over 71% of tokens while maintaining high text quality (low perplexity).

Effectiveness of multi-key attacks on watermark removal and text quality.

3. API Exploitation (Vulnerable Oracles)

Public detection APIs that return a confidence score act as an "oracle." Even if an API only returns a z-score or p-value, it provides enough signal for a motivated attacker to iteratively swap tokens, "guess and check" the API score, and systematically remove a watermark or craft a spoofed one.

Proposed Defenses and Limitations

To counter these vulnerabilities, the authors propose a defense based on Differential Privacy (DP). By adding controlled Gaussian noise to API scores, providers can prevent attackers from "climbing the gradient" of the watermark signal. This defense proved highly effective against spoofing: adding noise ($\sigma=4$) reduced the spoofing attack success rate to 0% while only incurring a negligible (~1%) drop in legitimate detection accuracy.

However, the authors acknowledge limitations. Their study focuses on decoding-based watermarks (which alter token probabilities during generation) rather than semantics-based watermarks (which embed signals in the meaning of the text). Furthermore, while the DP defense works well against spoofing, it is less effective against watermark removal.

Ultimately, the paper suggests that watermarking alone is not a silver bullet for content provenance. A truly secure system will likely require a "defense-in-depth" approach, combining watermarking with anomaly detection, query rate limiting, and digital signatures.

Summary updated

BibTeX
@inproceedings{pang2024no,
  author = {Qi Pang and Shengyuan Hu and Wenting Zheng and Virginia Smith},
  title = {{No Free Lunch in LLM Watermarking: Trade-offs in Watermarking Design Choices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=rIOl7KbSkv},
}
Figure