Abstract
Watermarking has emerged as a promising way to detect LLM-generated text. To apply a watermark, an LLM provider augments generations with a signal detectable by any party with the secret key. Recent work has proposed three main families of watermarking schemes, two of which focus on preserving the LLM distribution to maintain capabilities and conceal deployment. However, no prior work has investigated if these schemes are detectable in a realistic black-box setting. We develop rigorous statistical tests to detect the presence of the three most popular watermarking families using only a limited number of black-box queries. We experimentally confirm the effectiveness of our methods on a range of schemes and diverse open-source models. Our findings indicate that current watermarking schemes are more detectable than previously believed, and that obscuring watermark deployment may not be a viable protection against adversaries. We further apply our methods to test for watermark presence behind popular public APIs (GPT-4, Claude 3, Gemini 1.0 Pro), finding no strong evidence of watermarking at this time.
Introduction: The Quest for Stealthy Watermarks
As Large Language Models (LLMs) become ubiquitous, the ability to distinguish AI-generated text from human-written content has become a critical safety requirement. Watermarking is the leading technical solution: providers subtly bias token selection during generation to embed a "secret signal."
A primary goal for researchers has been undetectability. If a user can identify that a model is watermarked, they might attempt to "scrub" the signal or spoof it to frame the provider. Many recent schemes claim to be "distribution-preserving," suggesting that watermarked text is statistically indistinguishable from unwatermarked text to anyone without the secret key. This research, recently published at ICLR 2025, challenges this assumption, demonstrating that even the most sophisticated watermarks can be identified using only standard API queries.
Methodology: Probing the Black Box
The researchers developed specialized statistical tests for the three dominant families of watermarks in current literature. Crucially, these are black-box tests that do not require internal model probabilities (logprobs), only the final generated text.
- Red-Green Watermarks: These schemes boost the probability of certain "green" tokens based on the preceding word (the context). The authors detect this by using specific prompt templates (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) remains constant.
- Fixed-Sampling: These use a secret key to determine token choices, which inherently limits the diversity of the model's output. The authors utilize a rarefaction curve—a tool borrowed from ecology—to measure how many unique responses a model generates for the same prompt. A watermarked model's diversity "bottoms out" significantly 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.
Key Results: Unmasking the Signal
The researchers evaluated their tests on a wide range of open-source models (Mistral-7B, Llama-2, Llama-3-8B, Yi-1.5-9B, and Qwen-2-7B) and commercial APIs. The results were definitive: the tests achieved a 100% detection rate across all seven tested schemes with high statistical confidence ($p < 0.05$).
Beyond accuracy, the detection is remarkably cost-effective. Red-Green watermarks can be detected for approximately $2.43 in API fees, while Fixed-Sampling and Cache-Augmented schemes can be unmasked for as little as $0.10 to $0.28. Furthermore, the tests proved robust even when watermarks were applied sparsely (e.g., only to every 5th query).
Discussion: The Myth of Distribution Preservation
The study reveals that even if a watermark appears "normal" on average, it creates local dependencies that can be isolated. By targeting specific contexts, an adversary can find the bias introduced by the watermark.
Perhaps more concerning for providers is that these methods allow for reverse-engineering. The authors demonstrated they could estimate parameters like context size and bias strength. This information is critical for any actor attempting to remove or circumvent a watermark. While the researchers found no evidence of watermarking in current versions of GPT-4, Claude 3, or Gemini, they successfully validated their methods on a Gemma-7B implementation of Google’s SynthID-Text, proving the real-world applicability of their tests on production-grade schemes.
Conclusion
The findings suggest that "stealth" may be an unattainable goal for current watermarking techniques. As the arms race between watermark providers and detectors continues, providers may need to shift their focus from concealment to more robust, entropy-conditioned schemes, though these often come at the cost of weaker signal strength. For now, the assumption that watermarks can remain hidden from the end-user appears to be a myth.
Summary updated