TL;DR
dgMARK is a novel watermarking technique designed specifically for discrete diffusion language models (dLLMs). Rather than biasing token probabilities—which often degrades text quality—dgMARK embeds hidden signals by steering the decoding order. By prioritizing unmasking positions where high-reward tokens satisfy a simple parity constraint, it achieves high detectability and robustness with significantly less impact on text quality than traditional autoregressive methods.
The Problem: Provenance in the Era of Diffusion LLMs
As Large Language Models (LLMs) become ubiquitous, the need for reliable "provenance"—the ability to distinguish machine-generated text from human-authored content—is critical to combat disinformation and plagiarism.
Most existing watermarking schemes, such as the widely used KGW method, are designed for Autoregressive Models (ARMs) that generate text strictly from left to right. These methods typically partition the vocabulary into "green" and "red" lists, explicitly boosting the probability of green tokens. However, this "probability biasing" distorts the model's output distribution, leading to a noticeable drop in text quality.
Recently, a new class of models called Discrete Diffusion Language Models (dLLMs) (e.g., LLaDA, Dream) has emerged. Unlike ARMs, dLLMs generate tokens by iteratively denoising a masked sequence in an arbitrary order. This order-agnostic nature makes traditional ARM watermarks a poor fit, but it also opens a new, untapped channel for watermarking: the decoding order itself.
Methodology: Steering the Denoising Order
The authors introduce dgMARK (decoding-guided MARK), which treats the unmasking sequence as the primary watermarking signal rather than altering the token distribution.
- The Parity Constraint: The method uses a secret key $\xi$ and a binary hash function $f$ to map every token in the vocabulary to either 0 or 1. A token $v$ at position $i$ is considered "parity-matching" if $f(v, \xi) \equiv i \pmod 2$.
- Decoding Steering: During generation, instead of just picking the position with the highest "reward" (e.g., highest confidence or lowest entropy), dgMARK prioritizes positions where the most likely candidate token satisfies the parity constraint.
- No Probability Reweighting: Crucially, dgMARK does not change the model's internal logits or probabilities. It simply changes the order in which the model commits to tokens. If no parity-matching token is available with a high enough reward, the system falls back to standard decoding.
- One-Step Lookahead: To prevent the algorithm from making "greedy" choices that might eliminate future parity-matching opportunities, the authors include a beam-search variant. This variant estimates how many future positions will satisfy the parity condition based on the current choice.
- Detection: To check for a watermark, a detector calculates the parity-matching rate across the text. For natural text, this should be roughly 50%. Watermarked text shows a statistically significant elevation. A sliding-window detector is used to maintain robustness even if the text has been edited (insertions or deletions that shift token positions).
Experimental Setup
The researchers evaluated dgMARK using several state-of-the-art dLLMs, including LLaDA-8B, LLaDA 1.5-8B, and Dream-7B. They tested these models across diverse datasets:
- C4: A standard news-like dataset for general text generation.
- Writing Prompts: A dataset featuring diverse narrative styles and creative writing.
- Downstream Benchmarks: To ensure the watermark doesn't break the model's utility, they tested on MMLU (general knowledge), GSM8K (math word problems), and HumanEval (code generation).
Key Findings and Results
- Exploiting Imperfection for Robustness: In a theoretically "perfect" dLLM, the decoding order shouldn't matter. However, practical dLLMs are sensitive to this order. dgMARK turns this practical "flaw" into a robust watermarking feature.
- Strong Detectability: With a sequence length of 256 tokens and a 3-beam lookahead, dgMARK achieved a True Positive Rate (TPR) of 1.0 at a near-zero False Positive Rate (FPR) across multiple models.
- Superior Quality Preservation: Because the method never forces the model to pick a low-probability token, the perplexity remains much closer to the original model than probability-biasing methods. On LLaDA 1.5, dgMARK's perplexity was 4.44 compared to KGW's 5.83 for similar detection strengths.
- Task Performance: On HumanEval (coding), dgMARK maintained a Pass@1 rate of 0.280, while KGW dropped to 0.092, demonstrating that dgMARK is far less intrusive for logic-heavy tasks.
- Attack Resistance: By using a sliding-window z-statistic, dgMARK can re-align with the watermark signal even after significant post-editing. The watermark remained detectable even under heavy attacks, including 40% random edits and sophisticated paraphrasing by models like Llama 3.
Limitations and Future Work
While highly effective, dgMARK has a few limitations. First, its detectability relies on the "imperfection" of current dLLMs (their sensitivity to order). If future models become perfectly order-invariant, this specific method might lose its edge. Second, like most statistical watermarks, detectability drops for very short sequences (e.g., under 50 tokens), though aggregating multiple responses is a potential workaround. Finally, while rotating hash functions helps against adversarial inference, a determined adversary with a massive dataset of watermarked text might attempt to reverse-engineer the token-to-group mapping. Exploring more complex, context-dependent hashing is a suggested path for future research.
Summary updated