LLM Watermark Science Kirchenbauer PRF Lab

Anthropic Claude & EU AI Act watermarking physics: see why high-entropy prose readily accepts green-list token biasing, while deterministic code syntax drops the mark to preserve correctness.

Dual-Track Generation & Hypothesis Test

Prose Output High Entropy 0 tokens
Green Tokens
0%
Avg Entropy
0.0 b
Z-Score
0.00
Candidate Logits (Click token to inspect) -
Select any token above to view PRF partition & biased distribution.
Code Output Low Entropy (Masked) 0 tokens
Green Tokens
0%
Avg Entropy
0.0 b
Z-Score
0.00
Candidate Logits (Click token to inspect) -
Select any code token to see why low entropy suppressed watermarking.

Empirical Z-Score vs Standard Normal $N(0,1)$ Distribution

Threshold $z = 3.0$ ($p \approx 0.0013$)

Edit & Evasion Attack Arena

Can an adversary erase the watermark via paraphrasing, deleting words, or refactoring code? Modify the text below to observe statistical degradation in real time.

Simulated Perturbations:
Tokens ($T$): 0
Green ($|G|$): 0
Green Ratio: 0%
Attacked Z-Score: 0.00
Detection Verdict: Watermark Intact

The Mathematics of Low-Entropy Watermark Masking

In natural prose, there are often dozens of equally expressive token candidates (high Shannon entropy $H = -\sum p_i \log_2 p_i$). Anthropic’s model uses a pseudorandom hash of previous tokens to carve vocabulary into a 50% Green List and 50% Red List, adding $\delta$ bias to green options. Because multiple valid words exist, forcing a green synonym incurs almost zero loss in coherence.

However, in computer code, syntax constraints force candidate probability toward near-deterministic spikes ($p(\text{return}) \approx 0.99$, $H < 0.5$ bits). If a watermark blindly penalized red-list tokens, it would force syntax violations or hallucinated variables. Modern LLM watermarking automatically drops bias when local entropy is low, explaining why your code remains practically unwatermarked while your essays carry an undeniable statistical signature.

Enjoy this tool? Build your own with Super