How AI text watermarking works
TL;DR Highlight
A secret key nudges word choices to hide a statistical mark in AI text, detectable only by the key-holder.
Who Should Read
An LLM API developer who heard Claude and Gemini outputs are now watermarked and wants to understand how it works and where it fails.
Core Mechanics
- The mark hides in word choices, not characters
- At each word the model rolls weighted dice over a shortlist of candidates.
- Many candidates are equally natural, and that slack is where a pattern can hide.
- A secret key splits candidates into green and red and nudges green
- The key-derived coloring can only be reproduced by the key-holder.
- The color depends on the few words just before, so the same word can be green or red in different contexts.
- Detection means recoloring with the key and counting
- It does not judge style, only whether green appears more often than chance.
- Without a mark or with the wrong key, green lands about half the time, like a coin flip.
- A gentle lean needs a long text, so short texts are hard to call.
- Editing only erases the mark where runs of wording break
- Typo fixes and light edits dilute the mark but do not delete it.
- Only a full rewrite sharing no runs of wording with the original removes it.
- On open implementations (MarkLLM KGW and EXP), a full rewrite left about 0.5% of windows and detection fell from near certain to a coin flip.
- A found mark means processed by, not written by
- Anthropic's documentation says human text only proofread or translated by Claude picks up the mark.
- Absence proves even less, since old models or heavily edited text come back clean.
- Code, quotes, and fact lists carry little mark
- Text with one right continuation leaves the dice no slack to hide anything in.
- Detection needs the provider's key, so ordinary AI detector sites cannot run it.
Community Reactions
- Opinion that running an open model sidesteps watermarks
- Commenters said you can pick a provider that does not watermark or run an open-source model yourself.
- Another noted the watermark depends on how the model is run, so open-weight providers cannot apply it.
- Concern about reduced creativity and code quality
- One commenter argued pushing words toward one group cuts expressive variety, worse for code with few choices.
- They guessed code might be excluded from watermarking.
- Experience removing marks by hand or with a local model
- One developer said they transcribe AI output by hand, replacing words as they go.
- Another said rewording through a local model clears the marker.
- Questions about key recovery and legal use
- A commenter asked how much output it would take to work out the key.
- Others asked whether the EU law forces providers like those on OpenRouter to watermark, and suggested the marks could feed legal ownership disputes.
How to Apply
- Audit your AI output post-processing pipeline
- Today, list every feature that passes Claude or Gemini output to users unchanged.
- Assume provider marks may remain in that text and reflect it in your terms and notices.
- Never present watermark results as a definitive verdict
- Show a detection result only as a probability of being processed.
- Do not label text as human-written just because no mark was found.
- Exclude short and code outputs from detection
- Set a minimum length threshold if you build detection logic.
- Skip code, quotes, and lists where few choices exist.
Try It
# Paste into Claude or ChatGPT as is (simplified version of the article's method: a toy to experience watermark principles)
You are a text watermark simulator. Complete one sentence step by step using these rules.
1. Sentence start: "{{sentence start}}"
2. At each step, show 4 next-word candidates with probabilities (sum 100%).
3. Randomly split them into 2 green and 2 red, raise each green by 10 percentage points, subtract the same total from red, and show the new odds.
4. Pick one word using the new odds and append it to the sentence.
5. Repeat for 10 steps, then compute the share of chosen words that were green.
Question: How far above 50% was the green share? Explain how confidence would differ for 10 words versus 100 words.
Next to try: ask it to replace half the words in the final sentence and recompute the green share.Terminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles