Technology

How AI Text Watermarks Work, With a Worked Example

How AI Text Watermarks Work

An AI text watermark is a statistical pattern in word choice, added while a model writes, that a detector holding the right key can test for afterwards. Nothing is hidden in the characters. There is no invisible symbol and no secret metadata riding along in the words. This guide works through the arithmetic of one published scheme with real numbers, so you can see why a long passage can be identified with high confidence, why a short one usually cannot, and why a flag from a detector is weaker evidence than it looks.

Updated November 2026.

AI text watermarks, code on a computer monitor
Code on computer monitor (Unsplash) by Markus Spiske markusspiske, CC0, via Wikimedia Commons

The idea in one paragraph

A language model writes one token at a time, where a token is a word or a piece of one, and at each step it chooses from a probability distribution over its whole vocabulary. A watermarking scheme uses a secret key and the previous token to split the vocabulary into a “green list” and a “red list” before each choice, then nudges the model towards green. Where several words would do equally well, the model picks a green one more often than chance. Human writers know nothing of the lists, so their text lands on green tokens at about the rate you would expect by luck. Detection is counting.

That design comes from “A Watermark for Large Language Models” by Kirchenbauer and colleagues, presented at ICML 2023. Its detector needs no access to the model itself, only the key and the text, and it produces a score with an interpretable p-value rather than a yes or no.

A worked example with real numbers

Take the settings the paper uses for its main experiments. The green list is half the vocabulary, the boost given to green tokens is moderate, and the passage is 200 tokens long.

  1. What chance looks like. If a person wrote the passage, each token has a one in two chance of being green, so you expect about 100 green tokens. The natural spread around that figure, the standard deviation, is the square root of 200 × 0.5 × 0.5, which is about 7.1.
  2. The score. The detector counts the green tokens and works out how many standard deviations above 100 the count sits. That number is the z score. A count of 115 gives a z score of about 2.1. A count of 129 gives about 4.1.
  3. The threshold. The paper flags text when z is above 4, which with 200 tokens means about 128 or more green tokens. The chance of a human passage reaching that by luck is about 3 in 100,000 per test.
  4. What watermarked text scores. In the paper’s experiment, watermarked passages of this length averaged 159.5 green tokens, a z score near 8.4, and 98.4 per cent of them were caught at the threshold.
Green tokens out of 200z scoreHow to read it
1000Exactly what chance predicts for human text
115about 2.1Unusual but inconclusive
129about 4.1Over the threshold used in the paper
160about 8.5Typical of watermarked text in the experiment

Now run the same sums on a short reply of 20 tokens. Chance predicts 10 green tokens with a spread of about 2.2, so reaching a z score of 4 needs 19 of the 20 to be green. Only text with a great deal of free word choice can carry that much signal in so few words. A one-line answer, a date or a list of names cannot.

The paper also shows the extreme case. If a model were only ever allowed green tokens, 16 tokens would be enough to cross the threshold. Real systems use a soft nudge rather than a ban, because banning words damages the writing, and that is why length and variety matter so much.

What production systems do differently

SynthID Text, from Google DeepMind, applies the same broad idea at scale. It adjusts the probability scores the model uses during generation, and the method was published in Nature in 2024 as “Scalable watermarking for identifying large language model outputs”.

The open reference implementation on GitHub describes two detectors. A frequentist detector needs no training and returns a p-value for the hypothesis that the text was not watermarked with a given key. A Bayesian detector has to be trained for each key on watermarked and unwatermarked examples, and returns a score between 0 and 1. The repository is candid about its limits. It says it is not intended for production use and that no guarantees of cryptographic security are provided.

Two practical consequences follow. A watermark can only be tested by someone holding the key that made it, so there is no universal checker that reads every provider’s marks. And a negative result tells you only that this particular watermark was not found, not that a person wrote the text.

5 ways the signal breaks

NIST’s report AI 100-4, Reducing Risks Posed by Synthetic Content, published in November 2024, collects the documented weaknesses. None of them is speculative.

  1. Low-entropy text. NIST says text watermarks generally cannot be embedded or detected reliably when there are few plausible ways to phrase a response. Short answers and formulaic prose fall into this group, as the worked example shows.
  2. Paraphrasing. Having a separate, unwatermarked model rewrite the output can often remove the watermark with only minor loss of quality. NIST reports that recursive paraphrasing can cut detection to 20 per cent for texts of about 225 words, while texts beyond about 400 words lose only a little accuracy.
  3. Tricks that break the token chain. The original paper describes an attack where the model is asked to put an emoji after every word, which the user then deletes, scrambling the lists that depend on each previous token. Swapping letters for look-alike characters from another alphabet breaks tokenisation in a similar way, which is why detectors should normalise text first.
  4. Forgery. NIST cites research in which an attacker used their own unwatermarked model to produce text that detectors classified 80 per cent of the time as carrying another model’s watermark. A positive result is therefore not proof of origin.
  5. Human repetition. The paper notes that a human writer who repeats the same short phrase many times could push the green count up by accident, and recommends skipping repeated phrases when counting.

What a flag can and cannot prove

A low p-value from a keyed watermark detector says one thing. This pattern of word choices would be very unlikely by chance under this key. It does not say who wrote the text, how much of it was edited, or whether the writer was allowed to use an assistant.

Tools that claim to spot machine writing from style alone, with no watermark to read, are weaker still. NIST notes that several studies found such detectors performing little better than chance on short texts, improving to an area under the curve of about 90 per cent on samples of around 750 words. It also cites the study “GPT detectors are biased against non-native English writers”, and warns that wrongly labelling human work as AI-generated can be extremely damaging.

If your own writing is flagged

  1. Ask which tool produced the result and whether it read a watermark with a provider’s key or guessed from style. They are different kinds of evidence.
  2. Ask for the score and the threshold, not just the label.
  3. Point out the length and the genre. Short, formulaic or heavily templated text is exactly where both kinds of detector are least reliable.
  4. Offer your drafts and version history. Most editors keep a revision record, and a trail of edits over days is strong evidence of how a piece was written.
  5. If you used an assistant for part of the work, say which part. Disclosure is easier to defend than a denial a detector seems to contradict.

Content Credentials are a different tool

Provenance metadata is often mentioned in the same breath, and it works the other way round. In the C2PA specification, now at version 2.2 from May 2025, a manifest is a signed, tamper-evident record of assertions about an asset, bound to it by cryptographic hashes. Validation tells you the record has not been altered and who signed it. Whether to trust the signer is a separate question.

The two approaches are being joined. The specification defines a soft binding as a fingerprint or an invisible watermark that can match an asset back to its manifest when the metadata has been stripped, which NIST notes often happens when files are shared. If you publish images on your own site, check whether credentials survive your own pipeline, since resizing and format conversion rewrite the file.

What the rules ask of publishers

Article 50 of the EU AI Act requires providers of systems that generate synthetic content to mark their output in a machine-readable format so that it can be detected as artificially generated, and requires deployers to disclose deepfakes. The European Commission says the transparency obligations apply from 2 August 2026, and a voluntary Code of Practice on marking and labelling AI-generated content was finalised in June 2026. Our explainer on the EU AI Act sets out the wider timetable, and AI governance covers how organisations organise the work.

Search engines take a practical line. Google’s guidance says content made with generative AI must meet the same Search Essentials and spam policies as anything else, that generating many pages which add little value can count as scaled content abuse, and that everything should be reviewed for accuracy before it is published. For product images in Merchant Center, it requires the IPTC DigitalSourceType field set to TrainedAlgorithmicMedia.

The honest summary is that watermarks are a provider’s tool and a useful signal across large volumes of text, but a poor basis for judging one person. As a publisher, your part is accuracy and disclosure. Our guides to checking an AI answer and spotting AI-generated images cover the checks that do not depend on anyone’s key.

Common questions

Is anything hidden in the characters of watermarked text? No. The watermark lives in the pattern of word choices, created by adjusting probabilities during generation, not in invisible characters or metadata.

How long does text need to be for a watermark to be detected? It depends on the scheme and on how much freedom the wording had. In the published example, 200 tokens of ordinary prose were caught almost every time, while a 20-token reply would need nearly every word to be green.

Can paraphrasing remove an AI text watermark? Often, yes, especially for short texts. NIST reports that recursive paraphrasing can cut detection to 20 per cent at about 225 words, while longer texts are more robust.

Can I check any text for a watermark myself? Not in general. Detection needs the key that made the watermark, which the provider holds. Public reference code lets researchers test their own watermarked models, not other companies’ output.

Can a detector prove a student used AI? No. A keyed watermark result is a probability under one key, style-based detectors are unreliable on short texts, and NIST cites research finding that detectors are biased against non-native English writers.

Sources and further reading

Where the figures and rules above come from, so you can check them.

Photo credit: Code on computer monitor (Unsplash) by Markus Spiske markusspiske, CC0, via Wikimedia Commons.