Definition

Watermarking biases the generation towards a secret “green” token list (KGW: add to the logits of a keyed, context-dependent fraction of the vocabulary). A detector that knows the secret counts the green tokens and computes a z-score: human text has about the expected share of green tokens, watermarked text has far too many (Kirchenbauer et al., ICML 2023).

Detection

Example from Lecture 1: no watermark z = 0.31; with watermark z = 7.4 (p = 6e−14), the text is statistically “too green”.

Why it matters: as models improve, their text becomes indistinguishable from human text, so detection without a watermark may become impossible.

Appears in