This paper, recently published at ICLR 2025, challenges a core assumption in the field of AI safety: that language model watermarks can be made "stealthy" or undetectable to the end-user. The researchers from ETH Zurich demonstrate that the most popular watermarking schemes—even those designed to be "distribution-preserving"—can be identified and even reverse-engineered using only a small number of standard API queries.
TL;DR
Researchers have developed statistical tests that can detect the presence of all major LLM watermarking families using only black-box text access. Their findings reveal that current "stealthy" watermarks are far more detectable than previously believed, often costing less than $3.00 in API fees to uncover.
What Problem Does This Paper Address?
As LLMs become ubiquitous, regulators and providers want a way to distinguish AI-generated text from human-written content. Watermarking is the leading solution: the model provider subtly biases the choice of words during generation so that a "secret signal" is embedded in the text.
A major goal for researchers has been undetectability. If a user can tell a model is watermarked, they might try to "scrub" the watermark or spoof it to frame the provider. Many recent schemes claim to be "distribution-preserving," meaning the watermarked text is statistically indistinguishable from unwatermarked text to anyone without the secret key. This paper asks a simple but dangerous question: Is that actually true in practice?
Methods
The authors target the three "families" of watermarks that dominate the literature:
- Red-Green Watermarks: These boost the probability of certain "green" tokens based on the previous word (the context). The authors detect this by using a specific prompt template (e.g., "I bought [digit] [fruit]") and checking if the choice of fruit changes suspiciously when the "context" (the digit) changes, while the "prefix" (the verb) stays the same.
- Fixed-Sampling: These use a secret key to determine token choices, which inherently limits the "diversity" of the model's output. The authors use a rarefaction curve—a tool from ecology—to measure how many unique responses a model generates for the same prompt. A watermarked model "bottoms out" much faster than a truly random one.
- Cache-Augmented: These use a "cache" of previous contexts to ensure consistency. The authors probe the model in two phases—one where the cache is likely active and one where it is reset—and look for a statistical shift in word probabilities.
Crucially, these are black-box tests. They don't need the model's internal "logprobs" (the math behind the word choices); they only need the final text.
Datasets
The authors evaluated their tests on a wide range of open-source and commercial models:
- Open-Source: Mistral-7B, Llama-2 (7B, 13B, 70B), Llama-3-8B, Yi-1.5-9B, and Qwen-2-7B.
- Commercial APIs: GPT-4, Claude 3, and Gemini 1.0 Pro (used primarily to verify that their tests don't produce "false positives" on unwatermarked models).
- Benchmarks: They used custom prompt templates designed to minimize "model collapse" (where a model just repeats the same word) to ensure the statistical signals were clean.
Key Insights and Ideas
- The Myth of Distribution Preservation: Even if a watermark looks "normal" on average, it creates local dependencies. By isolating specific contexts, an adversary can find the "bias" that the watermark introduces.
- Detection is Cheap: You don't need millions of queries. Red-Green watermarks can be detected for about $2.43, while Fixed-Sampling and Cache-Augmented schemes can be unmasked for as little as $0.10 to $0.28.
- Reverse-Engineering Parameters: The paper goes beyond simple detection. The authors show they can estimate the context size (how many previous words the watermark looks at) and the bias strength (how much it forces certain words). This information is the "holy grail" for someone trying to remove a watermark.
Key Results
- 100% Detection Rate: The tests successfully identified watermarks across all seven tested schemes on all open-source models with high statistical confidence ($p < 0.05$).
- Zero False Positives: When run against unwatermarked commercial models (GPT-4, etc.), the tests correctly reported no watermark.
- Robustness: The tests remained effective even when the authors tried to "hide" the watermark by only applying it to every 5th query or randomly disabling it on certain tokens.
- Real-World Validation: They successfully applied their Red-Green test to Google’s SynthID-Text (on a Gemma-7B implementation), proving their methods work on state-of-the-art, production-grade schemes.
Limitations and Future Work
The authors acknowledge that while they covered the three most prominent families, a provider could theoretically invent an entirely new, mathematically different scheme that these tests might miss.
They also note that detection becomes harder as the "entropy" (unpredictability) of the text increases. As a potential defense, they propose Entropy-Conditioned Watermarking, which only applies the watermark when the model is very "uncertain" about what to say next. However, their preliminary results suggest this is a double-edged sword: it makes the watermark harder to detect, but also makes it much weaker and easier for a detector to miss.
Ultimately, the paper suggests that the "arms race" between watermark providers and detectors is just beginning, and "stealth" may be an impossible goal for current techniques.
Summary updated