Anthropic revealed the mechanics behind marking synthetic text in its report, "How Claude's Text Watermark Works." As AI researcher Sebastian Raschka pointed out, this is not about unreliable heuristics, but mathematically rigorous watermarking and server-side statistical detection.

Sampling mechanics and hidden seeds

A large language model generates output sequentially by calculating probability distributions across its token vocabulary. Greedy decoding consistently picks the highest-scoring option, which inevitably causes repetition loops over longer outputs. Production systems instead rely on probabilistic sampling, where a pseudorandom number decides between synonyms like "overcast" and "gray."

Watermarking embeds directly into the sampling phase without requiring model retraining or architectural tweaks. Instead of a purely random generator, the system uses a deterministic algorithm.

In Claude's watermark, the seed is formed deterministically from a secret key and the preceding words in the text.

Randomness becomes pseudorandomness: the model continues to select plausible tokens, preserving coherence and style, but their sequence follows a hidden cryptographic key.

Resilience and verification

To an outside reader, the generated text is indistinguishable from human writing. However, the secret key holder can run a statistical Z-test: the detector evaluates n-grams and calculates how frequently token choices align with the deterministic rule. This method withstands partial editing, synonym swapping, and manual rephrasing, as long as a sufficient chunk of the original text structure remains intact.

AnthropicLarge Language ModelsGenerative AIAI SafetyCybersecurity