Nature 634, 818–823 (2024) · Google DeepMind
SynthID-Text
Watermark LLM text by changing only how the next token is sampled.只改「下一個 token 怎麼抽」,就替 LLM 文字加上浮水印。
- Detection needs the text and a key, not the model偵測只需要文字和金鑰,不需要模型
- Quality unchanged across ~20M Gemini responses約 2,000 萬則 Gemini 回應,品質不變
- +0.57% latency; running in Gemini延遲只增加 0.57%;已在 Gemini 上線
Seed window H種子視窗 H
4
Layers m · players N層數 m · 每場人數 N
30 · 2
g-valuesg 值分布
Bernoulli(0.5)
Metric指標
TPR @ FPR = 1%
Scroll down · TOY = toy data run in the browser, PAPER = the paper's numbers往下捲動 · TOY=瀏覽器裡跑的玩具資料,PAPER=論文數字
Three ways to spot AI text辨識 AI 文字的三種方法
The paper picks the generative watermark本文選生成式浮水印
Retrieval檢索
Store every output, look for matches存下所有輸出,拿來比對
✗ scale, privacy規模、隱私
Post hoc classifier事後分類器
Train “human vs AI”訓練「人寫 vs AI」
✗ unreliable, biased, needs retraining不穩定、有偏見、要一直重訓
Generative watermark生成式浮水印
Bias sampling with a secret key用秘密金鑰讓取樣產生偏差
✓ cheap, quality-preserving, no model to detect便宜、不傷品質、偵測不需模型
A generative watermark = 3 parts生成式浮水印 = 3 個元件
Only the sampling algorithm is new: Tournament sampling新的只有取樣演算法:錦標賽取樣
Generation and detection (paper Fig. 1)生成與偵測(論文圖 1)
PAPERThe watermark lives in the model's uncertainty浮水印只能藏在模型「不確定」的地方
Key number: 1 − C = chance two draws differ關鍵數字:1 − C=兩次抽到不同 token 的機率
“… my favourite tropical fruit is ___”
TOYSeed = hash(last 4 tokens, key)種子 = 雜湊(前 4 個 token, 金鑰) part 1元件 1
The detector can rebuild it from the text alone偵測時只靠文字就能重算
Amber = hashed window黃框=被雜湊的視窗
TOYrt
g-values: a secret 0/1 per token per layerg 值:每個 token、每一層一個秘密的 0/1
Independent of the probabilities — coin flips without the key和機率無關——沒有金鑰就像擲硬幣
Click a cell to see how it is computed點一格看它怎麼算
TOYTournament: draw 2m, knock out m rounds錦標賽:抽 2m 個,淘汰 m 輪 part 2 · new元件 2 · 新提出
Round ℓ: higher gℓ wins, ties by coin第 ℓ 輪:gℓ 高的晉級,平手擲硬幣
Number next to a player = its g in that round參賽者旁的數字=它在那一輪的 g 值
TOYNo need to draw 230: compute layer by layer不用真的抽 230 個:一層一層算
g = 1 → ×(2 − ḡ) · g = 0 → ×(1 − ḡ)g = 1 → ×(2 − ḡ) · g = 0 → ×(1 − ḡ)
Winner's distribution after each layer (same seed as the bracket)每一層之後勝者的分布(和上一張同一個種子)
TOYN = 2: averaged over keys, nothing changesN = 2:對金鑰平均,分布不變
Biased for one key, unbiased on average — the gap in E[g] is the watermark單一金鑰有偏差,平均起來沒有——E[g] 的差距就是浮水印
One layer, exact (all 16 g-patterns) · grey tick = pLM一層,精確計算(全部 16 種 g 組合)· 灰刻線=pLM
TOYFour levels of non-distortion四種無失真等級
The paper uses single-sequence: N = 2 + masking within one response論文用單序列:N = 2 + 一則回應內的遮罩
- Stronger level → more steps masked → weaker detection等級越強 → 遮掉越多步 → 偵測越弱
- Cost of single-sequence: answers to the same prompt look a bit more alike單序列的代價:同一問題的多次回答會稍微更像
- N > 2 = distortionary: stronger watermark, some quality lossN > 2=有失真:浮水印更強,品質略降
Detect: is the mean g above the threshold?偵測:平均 g 值高於門檻嗎? part 3元件 3
Threshold = 99th percentile of unwatermarked scores門檻=無浮水印分數的第 99 百分位
120 watermarked vs 300 unwatermarked toy texts120 段有浮水印 vs 300 段無浮水印的玩具文字
TOYLonger text, higher entropy → easier文字越長、熵越高 → 越好抓
Same toy texts as the previous slide和上一張同一批玩具文字
TPR @ FPR = 1% vs length · mean g per layerTPR @ FPR = 1% 對長度 · 每層平均 g
TOYFast enough for production: + speculative sampling上線夠快:搭配推測取樣
Draft Gemma 2B-IT proposes 3, target Gemma 7B-IT verifies草稿 Gemma 2B-IT 提議 3 個,目標 Gemma 7B-IT 檢查
Watermarked speculative sampling加浮水印的推測取樣
PAPERTwo algorithms, each gives up one wish兩種演算法,各放棄一個願望
Switch the algorithm on the previous slide在上一張切換演算法
Non-distortion · speed · detectability無失真 · 速度 · 可偵測性
PAPERResults結果
Same quality, better detection, negligible cost品質不變、偵測更好、成本可忽略
~20M
Gemini responses: 👍 +0.01%, 👎 −0.02%, not significant則 Gemini 回應:讚 +0.01%、倒讚 −0.02%,不顯著
3,000
ELI5 side-by-side ratings: no preference on any of 5 aspects題 ELI5 並排評分:5 個面向都沒有偏好差異
+0.57%
latency, Gemma 7B-IT (Gumbel +0.26%, SRL +0.28%)延遲,Gemma 7B-IT(Gumbel +0.26%、SRL +0.28%)
vs Gumbel (non-distortionary)對 Gumbel(無失真)
Higher TPR@FPR=1% at the same length; biggest gain at low entropy相同長度 TPR@FPR=1% 較高;熵越低勝越多
vs Soft Red List (distortionary)對 Soft Red List(有失真)
Much higher TPR for the same perplexity cost同樣困惑度代價下 TPR 明顯較高
Limitations限制
A complement to other detectors, not a full solution是其他偵測法的補充,不是完整解法
- Only catches providers that apply it只能抓有加浮水印的服務
- Hard to enforce on open-source models開源模型很難強制
- Paraphrasing weakens it; stealing / spoofing / scrubbing attacks改寫會削弱;竊取、偽造、清除攻擊
- Low entropy → little signal熵低 → 訊號少
S. Dathathri et al., Nature 634, 818–823 (2024), doi:10.1038/s41586-024-08025-4, CC BY 4.0. Independent walkthrough; figures redrawn. Code: google-deepmind/synthid-text.S. Dathathri 等,Nature 634, 818–823(2024),doi:10.1038/s41586-024-08025-4,CC BY 4.0。獨立製作的導讀;圖為重畫。程式碼:google-deepmind/synthid-text。