
ML8502 · Fall 2026 · Week 05
A watermark is a hidden signal embedded into a medium that can later be detected using a secret watermarking key.
Five chapters

| Chapter | Wk | Lectures | Lab | Topic |
|---|---|---|---|---|
| I Foundations | 01 | 25 · 26 Aug | Security mindset. Threat models, LLM stack | |
| 02 | 1 · 2 Sep | 4 Sep | Adversarial ML. Evasion, transfer, backdoors | |
| 03 | 8 · 9 Sep | 11 Sep | (Certified) Defenses. Adversarial training, randomized smoothing | |
| II Provenance | 04 | 15 · 16 Sep | 18 Sep | Model extraction. Distillation, capability upliftonline |
| 05 | 22 · 23 Sep | 25 Sep | Watermarking. Fingerprinting, deepfake detection | |
| III Systems | 06 | 29 · 30 Sep | 2 Oct | Prompt attacks. Jailbreaks, injection, red-teaming |
| 07 | 6 · 7 Oct | 9 Oct | Project pitches | |
| 08 | No class: exams, Fall Break | |||
| 09 | 20 · 21 Oct | 23 Oct | Agent security. Jailbreaks, tool use, containment | |
| 10 | 27 · 28 Oct | 30 Oct | Agent defenses. Information-flow control, least privilege, identity | |
| IV Safety | 11 | 3 · 4 Nov | 6 Nov | Alignment. RLHF, reward hacking, emergent misalignment |
| 12 | 10 · 11 Nov | 13 Nov | Deception. Scheming, sandbagging | |
| 13 | 17 · 18 Nov | 20 Nov | AI control. Scalable oversight, interpretability | |
| V Frontier | 14 | 24 · 25 Nov | 27 Nov | Multi-agent security. Collusion, offensive AI |
| 15 | 1·2 Dec | 4 Dec | Project work | |
| 16 | 8 · 9 Dec | Final presentations |
Yellow: student sessions.
Sixteen papers

Bid for one paper on the LMS, then submit the review by Fri 2 Oct.
This week


Chapter 1
The problem.Generated text and images look human-made. How can a provider later prove which content came from its model?

Motivation

*Headline only: the harm is named and, deliberately, not illustrated.
The Goal

Deployments

*The Nature paper measured what users notice (thumbs up or down on Gemini answers), not what a test looking for the mark could notice.
Watermark Definition

*Kerckhoffs: the algorithms are public; only the keys are secret. **The sentence and which words are keyed are illustrative; Chapter 2 builds the real rule.
Threat Model

Threat Model

*The smiley attack (Kirchenbauer et al. 2023, Fig. 5, after Goodside, January 2023): every green list was drawn with a smiley in the context, so the plain words no longer match.
Watermarking in the 2000s

*After one JPEG save 50.3% of the hidden last bits still match: chance. N = 1000, α = 0.1 and the JPEG quality are our choices; every number is computed on this picture.

Chapter 2
The problem.Hide a keyed signal in content that only the key holder detects, at a known false-alarm rate.

The Plan

Cryptography

*No efficient algorithm without k tells its outputs from a uniformly random function's. The strings are real HMAC-SHA256 outputs under a fixed key.
Watermarking LLMs

*The four logits are illustrative and the softmax runs over these four only; the seed, the split and both probability rows are computed (HMAC-SHA256 under a fixed key).
The definition

Watermark Detection

*Exact P[X ≥ 129]; the normal tail 1 − Φ(4) is 3.2 in 100,000 (the paper quotes 3). **§4.1: measured mean 159.5 (Thm. 4.2 promises ≥ 142.2); the width is their bound σ ≤ 6.41. Which cells are green is illustrative.
The whole argument

Watermark Detection

*Content made by querying the generator or the detector depends on k without revealing it, and the bound says nothing about it. The price curve assumes z is standard normal under the null and one test per document.
Exercise, three parts

Watermarking LLMs

*Here the modulus is 0.762, fixed by the paper's green-count bound from γ = ½ and η = 2; the ceiling is over these three tokens (0.999985 over 50,000).
Watermarking LLMs

*The paper writes δ for the bias (the course's η). Multinomial sampling in both panels; right, T = 200 ± 5 tokens and about 500 sequences per point. Redrawn from values read off the paper's figures.
Open Problems

Watermarking LLMs

*Gumbel sampling is also non-distortionary, so the curves compare at equal quality (Fig. 3a, Gemma 7B-IT). Live in Gemini, ~20 M replies: no significant rating change.
Image Watermarks

*The pattern is amplified so that it can be seen. **An attacker who regenerates the picture picks from this big set too (Chapter 4).
Image Generation

*The network is never asked to draw a bear, only to guess noise. The tiles are our own noising of Dr. Lukas’s Fall 2025 image.
Image Watermarks

*Aggregate quality holds, the single picture does not: the same seed with and without the key gives a different bear (Fig. 2). The arrays are our own, made with Eq. 2.
Watermark Detection

*Averaged over six edits, 0.694 of marked pictures are caught at 1 % FPR, against 0.448 for RivaGAN (Table 1). The p-value comes from a chi-squared score, not from d.
Image Watermarks

*EditGuard, the earlier localized scheme, is not robust to cropping (Sec. 5.4). Values read off Fig. 4, left (COCO, 512 × 512).

Chapter 3
The problem.Mark the output without changing what the model would have produced, so nobody without the key can tell.

Quality Metrics

*Pentaprazole is no drug (Table 1, a fabricated entity); the sentence around the pair is ours. Errors are counted by an LLM judge checked against a physician (Cohen's κ 0.75 fabricated, 0.42 misapplied).
The Key Idea

*Def. 3.2, last line: if even a computationally unbounded D cannot tell, the watermark is statistically distortion-free.
Entropy

*An illustrative threshold: the paper's guarantees are asymptotic and name no value. Both responses and their probabilities are ours.
Keyed Sampling

*Abstract, p. 1: random substitutions, insertions and deletions. Exactness holds while no key entry is reused. The two entries are illustrative and p is held fixed across the two positions.
Keyed Sampling

*Eight was twice as likely and lost: its key number was low. **Exact only with fresh uniform numbers; a keyed function of the context repeats them when a context repeats. The numbers are illustrative.
Image Watermarks

*Table 7, Stable Diffusion: ten groups each; failing to reject is not evidence of equality. The bits and the uniform draws are illustrative.
Properties

Top row: three notions of quality, weakest first; bottom row: three things the detector owes. *The bar heights are illustrative.
Properties

Undetectable implies distortion-free, not conversely; robustness and unforgeability pull apart; a detector that never fires meets the first row and answers nothing.

Part II · Chapter 4
The problem.An attacker edits marked content until the detector misses it, keeping it useful.

Robustness

*Fig. 6 caption: the mark degrades seriously only from ε = 0.3, at about 15 points of perplexity. Points: the legend of Fig. 6 (γ = 0.5, δ = 2).
Watermark Removal

biasedchanceedited
Here 74 of 200 words must change, 37%, to push under 4.
Watermark Removal

*Drawn from Tab. 6 (p. 16), the numbers behind Fig. 2. Not a ranking: on KGW-1 SIRA Tiny (26.4) is the weakest attack, the paraphrasers sit under 2.
Adaptive Attacks

*Under a key it holds: where that key comes from is the next slide. Curves read off Fig. 2 (p-value 0.1, untuned Llama2-7b rewriter); the sentence, rewrites and scores are illustrative.
The definition

*The adversary cannot evaluate this as written: the detector needs the provider's key k. Surrogate Keys replaces k by keys it makes itself.
Adaptive Attacks

*This free score is what tunes the rewriter: the next slide runs that loop. Sentences, green patterns and z values are illustrative; the transfer range is Fig. 3 (left).
Adaptive Attacks

*Under 5 GPU hours to curate D and under $10 to curate and tune (Sec. 6.1). The sentence, rewrites and scores are illustrative.
Adaptive Attacks

*Off the diagonal the rewriter meets a scheme it never trained on, and every cell is still 0.943 or more. Fig. 3: Llama2-13b provider; Fig. 4: Exp scheme, Llama3.1-70b provider, points read off.
Paraphrasing

*The plain rewrite never reaches the 1% line out to 480 tokens (Fig. 5 right, read off). The sentence and its green pattern are illustrative; the tally is computed, not measured.
Semantic Watermarks

*Under a stronger GPT-3.5 bigram paraphrase the same row reads 5.9 for KGW and 31.3 for SemStamp (Tab. 1): better, still broken. Sentences and the two-plane picture are illustrative.
Impossibility

*In each pair the attacked image is on the left, the marked original on the right; CLIP score 34.82 → 33.60 and 32.27 → 31.58 (Fig. 5).
Impossibility

*Illustrative: the answer, the two edits, the scores and the green tokens are ours; the oracles and the Table 1 numbers are the paper’s.
Impossibility

*Their proof overview (§4.2); Thm. 2 carries a further factor of about one half, because mixing is required only above the median quality; Thm. 6 removes it.
Exercise, three parts

Impossibility

*Each example enters twice, once per ordering of the two texts; the averages cover the examples the attack finished, not every prompt.
Impossibility

*An estimate, not a recount: the pipeline’s rate scaled by the share of reviewed successes people still judged quality-preserving.
Watermark Removal

Watermark Removal

*Stated for marks that keep the clean and marked images close in the embedding; a semantic mark such as Tree-Ring sits outside the hypothesis (their App. E).
One projection, one threshold


Chapter 5
The problem.An attacker forges a provider’s mark. Can a mark be unforgeable yet publicly checkable?

Unforgeability

*Robustness keeps a moved span marked, which is exactly what a forger needs. The answers and the span drawn are illustrative.
Watermark Forgery

*Table 1: 0.81 (Llama-7B) and 0.86 (Llama-13B) at FPR 10⁻³, texts a GPT-4 judge scores below 6.5 discarded. The tokens and counts drawn are illustrative.
Watermark Forgery

*Without partial contexts the average success at 30,000 queries falls from about 80 % to below 50 % (§6.1). Curves read off Fig. 3.
Forgery Defense

*An attacker told which key made each sample clusters at 92 % and forges at most 65 % (§4.3). Images, Tree-Ring: 100 % to 2 % at four keys (Fig. 5). Bar lengths illustrative.
Watermark Forgery

*The averaging baseline still forges Tree-Ring (0.90 or better). Fig. 5 curves read off the paper; the noise square and loss counter are drawn stand-ins.
Public Detection

The message, digests and signature bits drawn are illustrative; the paper’s scheme is BLS (§4).
Public Detection

*Fig. 3: detection with the public key alone, from a known start; the symmetric scheme scans in quadratic time. Words and bits drawn are illustrative.
Public Detection

*Overlap means no generator measurably beats another on this judge; it is not an equivalence test. Bars read off Fig. 2.
Open problem

Coverage

*Our drawing measures nothing: the three widths are schematic, and the width of the marked slice is the number nobody has published.
Projects

Everything so far


What we built
01
Introduction to Content Watermarking
Key, channel, quality
02
Building a Watermark
Green list, tournament, mask
03
Distortion-Free Watermarks
Exact draws, no test
04
Watermark Removal
Trained, walked, tested
05
Forgery and Provenance
Stolen, signed, unsigned
