Watermarking Diffusion Language Models with Learned Foresight and Balanced Bands
Organizations: Yonsei University, Seoul, Republic of Korea
Abstract
Green-red watermarks favor tokens from a green list that a secret key derives from the preceding tokens. Diffusion language models, however, often choose a token before its preceding tokens, and the token later shapes its neighbors' green lists. Prior work therefore tilts each choice to raise the expected number of green tokens at its own and its neighbors' positions. Building on this objective, we first learn two components that prior work keeps fixed: vocabulary bands that serve as green lists, separate competing candidates and keep the null distribution exact, and a foresight predictor that estimates how each candidate shifts its neighbors' predictions. Second, we count green tokens as the detector does, once per distinct context-token pair, so repetition earns nothing. On WaterBench with LLaDA-8B-Instruct, each learned component raises the z-score at equal distortion, and their gains are nearly additive. With a strong watermark, ours detects at least 96% of responses at a 1% false-positive rate while matching the LLM-judge score of unwatermarked text. Ours also detects more responses on Dream and as many or more on code and question answering without a significant loss in task accuracy.
Figures & tables
| TPR (%) | log-PPL | Judge | Rep. | |||
| Method | @1% | @0.1% | ||||
| No watermark | – | – | – | 1.297 | 9.12 | 19.3 |
| dgMARK, greedy | – | 92.7 | 84.2 | 1.550 | 9.07 | 16.2 |
| dgMARK, top-3 | – | 92.3 | 84.3 | 1.557 | 9.12 | 15.2 |
| DLM-KGW | 2 | 51.3 | 24.8 | 1.316 | 9.13 | 19.3 |
| Ours | 2 | 69.5 | 44.0 | 1.326 | 9.29 | 18.2 |
| TPR | log-PPL | Judge | TPR | log-PPL | Judge | TPR | log-PPL | Judge | |||||
| Partition | Foresight | @1% | @1% | @1% | |||||||||
| Current beliefs | 2.35 | 49.0 | 1.337 | 9.18 | 3.78 | 84.5 | 1.397 | 9.35 | 5.27 | 94.5 | 1.507 | 9.40 | |
| Keyed hash | Predictor | 2.61 | 59.5 | 1.351 | 9.29 | 3.98 | 86.5 | 1.403 | 9.31 | 5.45 | 95.7 | 1.489 | 9.39 |
| None ( ) | 2.06 | 39.3 | 1.317 | 9.22 | 3.11 | 70.7 | 1.372 | 9.30 | 4.15 | 89.5 | 1.451 | 9.22 | |
| Current beliefs | 2.77 | 63.7 | 1.308 | 9.24 | 4.25 | 88.7 | 1.391 | 9.33 | 5.69 | 96.3 | 1.482 | 9.25 | |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Purpose | Source | Prompts |
| Training | ||
| Partition | ELI5, FiQA, AlpacaFarm | 1,200 |
| Predictor | ELI5, FiQA, AlpacaFarm | 1,612 |
| Code/QA (both) | MBPP, MMLU-Pro, GSM8K | 1,791 |
| Development | ||
| Context width | ELI5, FiQA, AlpacaFarm | 150 |
| Hyperparameter | Value | Choice |
|---|---|---|
| Bands ( ) | 4 | prior work |
| Context width | 2 tokens | screened |
| Candidates tilted per position | top-50 | prior work |
| Beliefs per context position | top-4 | cost |
| Beliefs per dependent | top-8 | cost |
| Candidates with foresight | top-8 | cost |
| Trainable parameters | 1.745B (8 layers) + 12.6M (adapter) |
| Adapter | 2-layer MLP, width 1,024, zero-initialized output |
| Optimizer | AdamW, , weight decay 0.01 |
| Learning rates | (layers), (adapter) |
| Schedule | 300 warm-up steps, cosine, 6 epochs planned |
| Batch | 12 decision states (8 candidates each) or 96 committed-candidate states |
| Gradient clipping | 1.0 |
| Foresight | Top-1 | Corr. | Argmax | |
|---|---|---|---|---|
| Current beliefs | 26% | 0.39 | 2% | 28% |
| Predictor | 61% | 0.73 | 49% | 54% |
| Top-1 token known | – | 0.91 | 68% | 55% |
| Context of | At | Belief about | Belief about |
|---|---|---|---|
| …have received investment from [M] | Before placing | wide 0.27, with 0.27 | of 0.50, range 0.30 |
| Place individuals (0.59) | and 0.43, with 0.43 | small 0.96, institutions 0.02 | |
| Place a (0.36) | diverse 0.79, range 0.12 | of 0.53, range 0.47 | |
| …typically made in private [M] | Before placing | before 0.42, that 0.22 | have 0.23, they 0.21 |
| Place companies (0.79) | that 0.73, before 0.24 | have 0.61, they 0.32 | |
| Place equity (0.20) | funds 0.90, or 0.09 | , 0.85, venture 0.11 |
| Threshold | Ours | DLM-KGW | Difference | |
|---|---|---|---|---|
| TPR@1% (%) | ||||
| Key-pooled | 2 | 65.2 | 52.5 | 12.7 [2.9, 20.9] |
| 3 | 89.9 | 85.4 | 4.5 [1.3, 7.9] | |
| Own-key | 2 | 59.5 | 49.5 | 9.9 [ 1.1, 20.7] |
| 3 | 88.5 | 83.4 | 5.1 [0.9, 9.3] | |
| [email protected]% (%) | ||||
| DLM-KGW | Unkeyed learned list | Learned bands | |||||
| (previous-token hash) | (our ablation) | (ours) | |||||
| Text | Green (%) | FPR (%) | Green (%) | FPR (%) | Green (%) | FPR (%) | |
| Human-written text | |||||||
| ELI5 | 532 | 24.9 | 0.6 | 31.0 | 30.1 † | 25.3 | 0.9 |
| FiQA | 200 | 25.1 | 1.0 | 28.6 | 15.5 † | 25.1 | 1.0 |
| C4 news | 284 | 25.2 | 0.4 | 28.4 | 3.5 † | 25.1 | 1.8 |
| TPR (%) | log-PPL | Judge | ||||||
| Nominal | Calibrated | |||||||
| Method | @1% | @0.1% | @1% | @0.1% | Mean | Median | ||
| No watermark | – | 0.2 | 0.0 | – | – | 1.297 | 1.273 | 9.12 |
| dgMARK, greedy | – | 90.8 | 83.3 | 92.7 | 84.2 | 1.550 | 1.531 | 9.07 |
| dgMARK, top-3 | – | 93.0 | 83.8 | 92.3 | 84.3 | 1.557 | 1.547 | 9.12 |
| DLM-KGW | 2 | 45.8 | 20.5 | 51.3 | 24.8 | 1.316 | 1.297 | 9.13 |
| Same | Equal log-PPL | ||||||
| TPR (points) | TPR (points) | ||||||
| Order | @1% | @0.1% | log-PPL | Judge | @1% | @0.1% | |
| Low-confidence | 2 | 18.2 | 19.2 | 0.010 | 0.16 | 13.6 | 13.1 |
| [13.2, 23.2] | [14.2, 24.3] | [ 0.014, 0.033] | [0.01, 0.31] | [2.3, 19.6] | [ 1.8, 20.4] | ||
| 3 | 3.7 | 9.3 | 0.011 | 0.33 | 2.7 | 7.4 | |
| [0.5, 6.8] | [5.2, 13.8] | [ 0.015, 0.038] | [0.18, 0.49] | [ 1.0, 11.2] | [1.3, 18.5] | ||
| Rep. | Judge vs. No watermark | Judge vs. DLM-KGW | log-PPL vs. DLM-KGW | |||||
|---|---|---|---|---|---|---|---|---|
| DLM-KGW | Ours | All | No loop | All | No loop | All | No loop | |
| 2 | 19.3 | 18.2 | 0.17 | 0.01 | 0.16 | 0.06 | 0.010 | 0.008 |
| [0.04, 0.31] | [ 0.08, 0.11] | [0.01, 0.31] | [ 0.14, 0.02] | [ 0.014, 0.033] | [ 0.035, 0.019] | |||
| 3 | 23.3 | 14.0 | 0.18 | 0.03 | 0.33 | 0.03 | 0.011 | 0.007 |
| [0.05, 0.32] | [ 0.06, 0.12] | [0.18, 0.49] | [ 0.06, 0.13] | [ 0.015, 0.038] | [ 0.039, 0.024] | |||
| 4 | 26.3 | 14.3 | 0.21 | 0.00 | 0.70 | 0.08 | 0.037 | 0.097 |
| Quality | Similarity | ||||
| Method | Gemma | Qwen | Gemma | Qwen | |
| No watermark | – | 9.12 | 8.55 | – | – |
| dgMARK, greedy | – | 9.07 | 8.49 | 6.40 | 7.00 |
| dgMARK, top-3 | – | 9.12 | 8.47 | 6.34 | 6.95 |
| DLM-KGW | 2 | 9.13 | 8.53 | 6.63 | 7.23 |
| Ours | 2 | 9.29 | 8.65 | 6.57 | 7.24 |
| ELI5 | FiQA | AlpacaFarm | |||||
| TPR | TPR | TPR | |||||
| Method | @1% | Len. | @1% | Len. | @1% | Len. | |
| No watermark | – | – | 232 | – | 219 | – | 214 |
| dgMARK, top-3 | – | 99.5 | 219 | 95.5 | 204 | 82.0 | 209 |
| DLM-KGW | 2 | 59.0 | 229 | 48.5 | 227 | 46.5 | 217 |
| Ours | 2 | 77.5 | 230 | 77.0 | 224 | 54.0 | 214 |
| TPR (%) | log-PPL | Judge | Rep. | |||||
|---|---|---|---|---|---|---|---|---|
| Partition | Foresight | @1% | @0.1% | |||||
| 2 | Keyed hash | Current beliefs | 2.35 | 49.0 | 24.5 | 1.337 | 9.18 | 18.2 |
| Predictor | 2.61 | 59.5 | 31.7 | 1.351 | 9.29 | 17.2 | ||
| Learned bands | None ( ) | 2.06 | 39.3 | 15.3 | 1.317 | 9.22 | 16.3 | |
| Current beliefs | 2.77 | 63.7 | 40.0 | 1.308 | 9.24 | 19.2 | ||
| Predictor | 2.95 | 69.5 | 44.0 | 1.326 | 9.29 | 18.2 | ||
| TPR (points) | |||||||
| Contrast | Held fixed | @1% | @0.1% | log-PPL | Judge | ||
| Partition | |||||||
| Learned bands vs. keyed hash | Current beliefs | 2 | 0.41 | 14.7 | 15.5 | 0.028 | 0.06 |
| [0.29, 0.54] | [9.5, 19.8] | [10.5, 20.5] | [ 0.055, 0.002] | [ 0.08, 0.20] | |||
| 3 | 0.47 | 4.2 | 11.0 | 0.006 | 0.02 | ||
| [0.33, 0.61] | [0.8, 7.5] | [6.7, 15.5] | [ 0.033, 0.020] | [ 0.15, 0.10] | |||
| TPR (%) | log-PPL | Judge | Rep. | TPR (%) | log-PPL | Judge | Rep. | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score | Order | @1% | @0.1% | @1% | @0.1% | ||||||||
| Unit-aware | Consistent | 4.35 | 89.3 | 79.3 | 1.398 | 9.30 | 14.0 | 5.97 | 96.2 | 92.7 | 1.469 | 9.32 | 14.3 |
| Plain | Consistent | 4.32 | 90.2 | 78.0 | 1.365 | 8.96 | 21.0 | 5.82 | 96.0 | 91.5 | 1.437 | 8.88 | 20.8 |
| Plain | Current-tilt | 4.49 | 92.2 | 80.3 | 1.408 | 9.12 | 18.7 | 5.86 | 96.0 | 92.0 | 1.492 | 8.98 | 18.8 |
| Partition | Foresight | G | Q | G | Q | G | Q |
|---|---|---|---|---|---|---|---|
| Keyed hash | Current beliefs | 9.18 | 8.58 | 9.35 | 8.69 | 9.40 | 8.67 |
| Predictor | 9.29 | 8.67 | 9.31 | 8.64 | 9.39 | 8.63 | |
| Learned bands | Current beliefs | 9.24 | 8.60 | 9.33 | 8.69 | 9.24 | 8.59 |
| Predictor | 9.29 | 8.64 | 9.31 | 8.67 | 9.32 | 8.63 | |
| Learned bands keyed hash | current beliefs | 0.06 | 0.01 | 0.02 | 0.00 | 0.15 | 0.08 |
| TPR (%) | ||||
|---|---|---|---|---|
| Foresight | @1% | @0.1% | ||
| Predictor | 2 | 2.95 | 69.5 | 44.0 |
| Exact | 2 | 3.10 | 73.2 | 47.7 |
| Predictor | 3 | 4.35 | 89.3 | 79.3 |
| Exact | 3 | 4.66 | 93.3 | 83.8 |
| Predictor | 4 | 5.97 | 96.2 | 92.7 |
| Partition | Foresight | TPR@1% (%) | log-PPL | ||||
|---|---|---|---|---|---|---|---|
| Keyed hash | Current beliefs | 3.83 | 84.4 | 1.387 | |||
| Keyed hash | Predictor | 3.98 | 86.9 | 1.389 | |||
| Learned bands | Current beliefs | 4.16 | 88.2 | 1.399 | |||
| Learned bands | Predictor | 4.33 | 89.2 | 1.399 | |||
| per key | Mean over keys | ||||||
| Contrast | Key 1 | Key 2 | Key 3 | Key 4 | log-PPL | ||
| TPR@1% (%) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| No attack | Deletion | Insertion | Substitution | ||||||
| log-PPL | 10% | 20% | 10% | 20% | 10% | 20% | |||
| 1 | 3.40 | 1.518 | 77.3 | 65.3 | 53.3 | 64.0 | 56.7 | 56.7 | 47.3 |
| 2 | 3.78 | 1.494 | 81.3 | 64.7 | 44.7 | 66.7 | 51.3 | 64.0 | 31.3 |
| 3 | 3.52 | 1.588 | 74.7 | 50.7 | 23.3 | 56.0 | 30.7 | 45.3 | 19.3 |
| 4 | 3.66 | 1.601 | 84.0 | 46.0 | 12.0 | 50.0 | 28.7 | 44.0 | 12.0 |
| Per-token at | KL at | At the KL of | |||
|---|---|---|---|---|---|
| Learned | Hash | (nats) | Per-token | ||
| 2 | 0.408 | 0.377 | 0.358 | 0.448 | 4.66 |
| 3 | 0.481 | 0.453 | 0.431 | 0.488 | 4.07 |
| 4 | 0.515 | 0.480 | 0.444 | 0.515 | 4.00 |
| 6 | 0.531 | 0.493 | 0.418 | 0.548 | 4.12 |
| 8 | 0.527 | 0.487 | 0.381 | 0.573 | 4.30 |
| TPR (%) | KL | log-PPL | ||||
| Foresight | @1% | @0.1% | ||||
| Current beliefs | 3.75 | 83.3 | 60.7 | 28.9 | 1.365 | |
| Predictor | 3.80 | 88.7 | 65.3 | 28.9 | 1.368 | |
| Current beliefs | 4.16 | 89.3 | 76.0 | 34.0 | 1.399 | |
| Predictor | 4.42 | 90.0 | 82.0 | 34.9 | 1.363 | |
| gate 0 | 4.35 | 92.7 | 84.0 | 34.7 | 1.381 | |
| HumanEval | MBPP | GPQA-Diamond | MMLU-Pro | |||||
|---|---|---|---|---|---|---|---|---|
| Method | Score | TPR@1% (%) | Score | TPR@1% (%) | Score | TPR@1% (%) | Score | TPR@1% (%) |
| No watermark | 35.4 | – | 37.0 | – | 20.7 | – | 40.0 | – |
| DLM-KGW | 34.8 | 17.7 | 32.5 | 15.0 | 26.8 | 72.2 | 35.0 | 60.0 |
| dgMARK, top-3 | 35.4 | 6.1 | 33.5 | 3.5 | 19.2 | 36.4 | 42.1 | 27.1 |
| Ours | 39.6 | 12.8 | 38.0 | 25.0 | 23.7 | 69.2 | 32.1 | 62.9 |
| TPR (%) | ||||||
| Method | Valid (%) | @1% | @0.1% | log-PPL | ||
| No watermark | – | 62.8 | 0.2 | 0.0 | – | 2.188 |
| DLM-KGW | 3 | 53.8 | 42.0 | 28.5 | – | 2.505 |
| Ours, LLaDA partition | 3 | 78.2 | 57.3 | 39.7 | 2.75 | 2.290 |
| Ours, Dream partition | 3 | 79.3 | 55.5 | 38.2 | 2.68 | 2.283 |
| Ours, Dream partition + predictor | 3 | 81.3 | 60.0 | 43.8 | 2.89 | 2.278 |
| TPR@1% (%) | [email protected]% | |||||||
| Method | C4 | Dolly | WP | All | All (%) | log-PPL | Rep. | |
| No watermark | – | 0.3 | 0.7 | 1.0 | 0.7 | 0.0 | 1.523 | 11.7 |
| dgMARK, greedy | – | 63.0 | 87.3 | 73.3 | 74.6 | 63.7 | 2.187 | 10.9 |
| dgMARK, top-3 | – | 63.7 | 87.7 | 74.7 | 75.3 | 63.7 | 2.265 | 12.8 |
| DLM-KGW | 2 | 49.7 | 60.0 | 64.0 | 57.9 | 31.4 | 1.498 | 13.9 |
| Ours | 2 | 56.7 | 64.7 | 70.3 | 63.9 | 42.4 | 1.488 | 11.7 |
| No attack | Deletion | Insertion | Substitution | Paraphrase | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | TPR | AUC | TPR | AUC | TPR | AUC | TPR | AUC | TPR | AUC |
| DLM-KGW, random | 98.1 | 99.8 | 91.5 | 99.2 | 91.1 | 99.5 | 85.9 | 99.2 | 8.5 | 74.9 |
| DLM-KGW, low-confidence | 96.3 | 99.8 | 86.7 | 99.5 | 84.8 | 98.9 | 76.7 | 98.1 | 8.5 | 71.2 |
| dgMARK, global | 91.1 | 96.7 | 5.9 | 51.1 | 3.3 | 53.1 | 37.4 | 66.4 | 2.2 | 52.4 |
| dgMARK, window | 51.5 | 92.7 | 11.1 | 74.0 | 13.7 | 78.5 | 27.0 | 86.2 | 3.3 | 57.8 |
| Ours | 98.5 | 99.8 | 84.4 | 98.4 | 85.2 | 98.5 | 70.0 | 96.2 | 4.1 | 67.3 |
| Artifact | License or terms |
|---|---|
| LLaDA-8B-Instruct | MIT |
| Dream-v0-Instruct-7B | Apache-2.0 |
| Qwen3-8B, Qwen3-32B, Qwen2.5-32B-Instruct | Apache-2.0 |
| Gemma-4-12B-it | Apache-2.0 |
| WaterBench | MIT |
| ELI5 (via KILT) | MIT (KILT), no license stated for the Reddit text |
LLM Watermarking
Large language model watermarking embeds or detects signals in text and models to trace provenance, ownership, and unauthorized use.
See all 110 papers