AI Watermarking
AI watermarking hides a machine-detectable signal in generated images, text, audio, or video. How SynthID and green-list schemes work and where they fail.
AI watermarking is the practice of embedding a hidden, machine-detectable signal in content produced by a generative AI system, so that a detector holding the right key can later tell that an image, video, audio clip, or passage of text came from that system. The signal is designed to be imperceptible to people and to survive everyday edits such as resizing and compression. Watermarks are one part of data provenance for synthetic media, and regulation is making them mandatory: Article 50 of the EU AI Act requires providers of generative systems to mark outputs in a machine-readable, detectable format from 2 August 2026, with systems already on the market given until 2 December 2026, and China's rules for labeling AI-generated content, in force since September 2025, require hidden labels in file metadata alongside visible ones.
How AI Watermarking Works#
Most current schemes embed the signal while the content is being generated, which makes it harder to strip than a mark added afterward.
- Images and video: A trained encoder makes small changes spread across the whole image, and a paired neural decoder recovers the signal later. Google DeepMind's SynthID works this way for images, video, and audio from models such as Imagen, Veo, and Lyria, and Meta's Stable Signature fine-tunes the decoder of a latent diffusion model so that every image it produces carries a fixed binary signature. Other methods plant a pattern in the starting noise that a diffusion model denoises, so the mark is woven into the image's latent space representation from the first step.
- Text: A large language model (LLM) chooses each token from a probability distribution, and a text watermark nudges those choices in a pattern only the key holder can test for. SynthID Text, described in Nature in 2024, was evaluated on nearly 20 million Gemini responses without a measurable drop in quality and is open source in Hugging Face Transformers.
- Post-hoc marks: Classic signal-processing watermarks, such as frequency-domain patterns, can be added to any file after generation, though they are generally easier to remove.
Detection for images is a decoder's output score; for text it is a statistical test on the token sequence, which needs no access to the model at all.
A Green-List Text Watermark#
The scheme from A Watermark for Large Language Models by Kirchenbauer et al. hashes the previous token with a secret key to split the vocabulary into a "green" fraction and a "red" remainder, then adds a small bias to green-token logits before sampling. Unwatermarked text lands on green tokens at the base rate, while watermarked text lands on them far more often, which a one-proportion z-test detects. In the snippet below, random logits stand in for a language model:
import torch
torch.manual_seed(0)
vocab, gamma, delta, length, key = 1000, 0.25, 2.0, 200, 42 # key is the secret shared with the detector
def green_list(prev):
"""Return the green 25% of the vocabulary, picked pseudorandomly from the key and previous token."""
return torch.randperm(vocab, generator=torch.Generator().manual_seed(key + prev))[: int(gamma * vocab)]
for bias in (0.0, delta): # ordinary sampling, then watermarked sampling
tokens = [0]
for _ in range(length):
logits = torch.randn(vocab) # stands in for a language model's next-token logits
logits[green_list(tokens[-1])] += bias
tokens.append(torch.multinomial(logits.softmax(0), 1).item())
# Detection needs only the text and the key: count green tokens and apply a one-proportion z-test
hits = sum(t in green_list(p) for p, t in zip(tokens, tokens[1:]))
z = (hits - gamma * length) / (length * gamma * (1 - gamma)) ** 0.5
print(f"bias {bias}: {hits}/{length} green tokens, z = {z:.1f}")Ordinary sampling hits 44 green tokens out of 200 (z = -1.0), close to the expected 25%, while the watermarked run hits 141 (z = 14.9), far above the z = 4 threshold the paper uses to flag text as watermarked. Because each token contributes evidence, longer passages give more confident detection, and text where the next token is nearly forced, such as code or a list of facts, carries a weaker signal.
Watermarking vs. Related Approaches#
- Content Credentials (C2PA): A cryptographically signed metadata manifest that records which tool created or edited a file. It carries far more detail than a watermark but disappears when a file is re-encoded or screenshotted, so the two are often combined.
- Deepfake and AI-image detection: Classifiers that look for generation artifacts in content with no embedded mark. They work on output from any generator but give probabilistic answers that degrade as generators improve, and people use similar cues to tell whether an image is AI-generated by eye.
- Steganography: Hiding a secret message inside a file. Watermarking borrows its techniques but prioritizes robust detection over hiding a large payload.
Platforms that label synthetic media and filter AI slop typically layer these checks:
Robustness and Limits#
A watermark must survive benign changes such as cropping, resizing, color shifts, and JPEG compression, and ideally deliberate adversarial attacks. Developers test this by applying data augmentation-style transforms to marked content and measuring how often detection still succeeds. Current schemes have known weaknesses:
- Regeneration: Adding noise to an image and reconstructing it with a generative model removes pixel-level invisible watermarks while keeping the image visually similar.
- Paraphrasing and translation: Rewriting watermarked text with another model, or translating it and back, dilutes the token pattern a detector counts.
- Coverage: Only outputs from providers that embed a mark can be detected, and open-weight models can be run without one, so a missing watermark says nothing about whether content is human-made.
- Spoofing: An attacker who learns enough about a scheme can stamp its mark onto human-made content to discredit it.
Visible watermarks raise a separate problem for computer vision datasets: models learn them as shortcuts. In one well-known case, a classifier trained on the PASCAL VOC dataset learned to recognize horses partly by a copyright tag that appeared in about a fifth of the horse photos, and it failed when the tag was removed. Visible marks and logos are ordinary image content, so an Ultralytics YOLO26 object detection model trained on labeled examples can locate them across a training dataset, letting teams crop or remove tagged images before they teach a model the wrong cue.










