A signal in the word choice
A text watermark lets whoever runs a language model check later whether a piece of text came from it, without storing what it wrote. Kirchenbauer et al. hide the signal in the choice of tokens: before each token a secret, pseudo-random half or quarter of the vocabulary is declared green, and the model is nudged towards it. Human text and other models' text land in the green list at the base rate; watermarked text lands there far more often, and a simple count shows it. Nothing about the model changes, and the detector needs neither the model nor the prompt, only the key and the tokenizer.
On this page Qwen2.5-0.5B-Instruct answers 40 MT-Bench questions (writing, roleplay, STEM and humanities) with top-k sampling over its 40 most likely tokens at temperature 1, at most 200 tokens, with and without the watermark. Each answer draws its tokens from its own seeded stream of uniforms, the same with and without the watermark, so the two versions of an answer differ only where the watermark moved the draw. Human text comes from 40 WikiText-2 paragraphs of 200 tokens.
The green list
The green list for position depends only on the token before it. Its id seeds a random number generator, with the authors' key , which permutes the vocabulary; the first ids of the permutation are green. With and Qwen's 151,936 logits, 37,984 tokens are green after every token, a different quarter each time.
The panel One token: its green list and the bias follows this chain for the selected token, and the two maps under it draw the green lists after the first two tokens of the first answer over the whole vocabulary, one pixel per id. Seeding on one previous token makes the list easy to recompute but leaks it: an observer who sees enough text can estimate which tokens tend to follow which. The follow-up paper hashes longer contexts and the candidate token itself (the self-hash scheme) to make that harder.
The bias
The watermark adds a constant to the logit of every green token before sampling:
With a green token's odds grow times against a red one. Here the bias is applied to the 40 kept logits, after top-k, where transformers' generate applies its watermark processors. The Before and After bars show the kept distribution of the selected step, green and red. Where the model spreads its probability over many tokens, the bias pulls most of it into the green list; where one token holds nearly all of it, the bias changes little. Kirchenbauer et al. bound the expected green share in terms of the distribution's spike entropy: low-entropy text, such as code or memorised quotations, carries only a weak watermark, and the page's entropy readout shows which steps those are.
The z-test
Detection counts the green tokens among the tokens that can be scored (every token after the first, each against the green list of the token before it). Without the watermark that count is binomial with mean , so
is approximately standard normal, and the paper calls a text watermarked when , a false-positive rate of about . For a fixed green share , grows like : the z-test panel draws it after each scored token for the selected answer, its unwatermarked twin and a human paragraph from WikiText-2. With and , 48.8 % of the scored tokens of the watermarked answers are green against 23.8 % of the unwatermarked ones and 25.8 % of the human paragraphs. The watermarked answers average and 36 of 40 pass 4; no unwatermarked answer goes above 1.68 and no human paragraph above 2.50. Three of the four misses are roleplay answers that stopped after 31 to 38 tokens, too short for the count to separate.
Strength against quality
The table under the z-test repeats the run with other settings on the same prompts and seeds: from 0.5 to 4 at , and of 0.1 and 0.5 at . A larger bias marks more strongly but moves the text further from what the model would have written, which shows as a higher perplexity under the model without the watermark (all of its logits). At no answer passes the threshold (mean 1.10); at six do; at all 40 do, with a mean of 15.5, but the perplexity rises from 4.67 without the watermark to 12.43. At it is 5.89. With fixed, and detect about as well as 0.25 here (35 of 40 each). The dots at the bottom of the page put every answer of every setting, and the human paragraphs, on one z axis.
Replacing tokens
A watermark has to survive edits. Replacing one token changes two scores: its own, and the next token's, whose green list it seeds. The tab replaces a share of an answer's tokens by the model's most likely other token at that step, 100 random choices of positions per share, and stores four green bits per position (the token and its replacement, each after the original and after the replaced previous token), so the page recomputes exactly for any edit: use replace tokens… and click tokens, or replace 10, 25 or 50 % at random. Replacing 10 % of the tokens lowers the mean from 6.93 to 5.39 and the share of detected answers from 90 % to 76 %; at 20 % it is 4.04 and 52 %, and at half the tokens 1.08 and 0.3 %. Token-level swaps are a mild attack; Krishna et al. show that a paraphrasing model rewriting whole sentences removes much more of the signal.
Where it came from
Kirchenbauer et al. introduced the green-list watermark in 2023, with the hard version (red tokens forbidden) and the soft version recorded here, and a public detector. Their follow-up studies how reliable it is after human and machine paraphrasing, with longer and self-hashing contexts. Other schemes leave each token's distribution unchanged on average over keys, such as Kuditipudi et al.'s distortion-free watermark; the SynthID tab records the one Google deployed, which replaces the bias with a tournament between candidate tokens on the same prompts and seeds as this page.
Papers
- A Watermark for Large Language Models The green list seeded by the previous token, the δ bias, the z-test and the spike-entropy analysis recorded on this page.
- On the Reliability of Watermarks for Large Language Models Self-hashing and longer contexts, and how much of the watermark survives human and machine paraphrases; transformers' WatermarkingConfig follows it.
- Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense A paraphrasing model that rewrites whole sentences, a stronger attack than the token swaps on this page.
- Robust Distortion-free Watermarks for Language Models A watermark that leaves the sampling distribution unchanged, detected by aligning the text with the key sequence.
- Qwen2.5 Technical Report The model recorded here, Qwen2.5-0.5B-Instruct.
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena MT-Bench, whose writing, roleplay, STEM and humanities questions the model answers here.