Abstract
Watermarking (WM) is a critical mechanism for detecting and attributing AI-generated content. Current WM methods for Large Language Models (LLMs) are predominantly tailored for autoregressive (AR) models: They rely on tokens being generated sequentially, and embed stable signals within the generated sequence based on the previously sampled text. Diffusion Language Models (DLMs) generate text via non-sequential iterative denoising, which requires significant modification to use WM methods designed for AR models. Recent work proposed to watermark DLMs by inverting the process when needed, but suffers significant computational or memory overhead. We introduce Left-Right Diffusion Watermarking (LR-DWM), a scheme that biases the generated token based on both left and right neighbors, when they are available. LR-DWM incurs minimal runtime and memory overhead, remaining close to the non-watermarked baseline DLM while enabling reliable statistical detection under standard evaluation settings. Our results demonstrate that DLMs can be watermarked efficiently, achieving high detectability with negligible computational and memory overhead.
The Challenge of Watermarking Diffusion Models
Watermarking is a crucial tool for identifying AI-generated text, but the standard approach for Large Language Models (LLMs) relies on their autoregressive (AR) nature. Because AR tokens are generated strictly left-to-right, algorithms can use a hash of previously generated tokens to subtly bias the selection of the next token.
Diffusion Language Models (DLMs) are emerging as a low-latency, highly controllable alternative to AR models. However, they generate text via iterative denoising, updating tokens across the entire sequence in an unpredictable, non-sequential order. This means a watermark cannot simply be conditioned on a "left" token, as that token might not be finalized. Previous attempts to adapt watermarking to DLMs either required massive memory to cache inverted hash tables (e.g., DMARK) or heavy computation to calculate expectations over missing tokens (e.g., WM-DLM). LR-DWM seeks to watermark DLMs without destroying their inherent efficiency.
Methodology: Left-Right Diffusion Watermarking
The proposed Left-Right Diffusion Watermarking (LR-DWM) scheme avoids forcing a causal, left-to-right dependency. Instead, it applies independent local constraints based on whatever neighboring tokens are currently available during the denoising step.
The methodology consists of three core pillars:
- Bidirectional Hashing: For any target token, the algorithm looks at its left and right neighbors. It uses two distinct cryptographic keys to hash these neighbors, generating two independent "green lists" (preferred tokens) for the target position.
- Additive Biasing: During generation, if a neighbor is finalized, the model adds a small logit bias ($\delta$) to the tokens in its corresponding green list. If both neighbors are available, the biases stack, strongly favoring tokens that satisfy both constraints.
- Detection: To detect the watermark, the evaluator calculates a ternary score for each token in the final text: $+1$ if it matches both neighbors' green lists, $0$ if it matches one, and $-1$ if it matches neither. A standard Z-score is then calculated over the sequence to flag the text as AI-generated.
Experimental Results
The authors evaluated LR-DWM using 600 prompts from WaterBench and 10,000 human-written texts from the C4 corpus for calibration. The scheme was tested on two state-of-the-art DLMs: LLaDA-8B-Instruct and DREAM-7B-Instruct.
Computational Efficiency
A key insight of the paper is that order-agnosticism in DLMs is a feature that can be leveraged. By simply adding independent biases from available neighbors, LR-DWM avoids the massive $O(|V|^2)$ memory overhead of caching inverse lookup tables.
As shown in the performance analysis, LR-DWM adds negligible wall-clock time and peak GPU memory overhead compared to the vanilla, non-watermarked baseline. In contrast, DMARK nearly doubles peak memory usage, and WM-DLM significantly increases runtime.
Quality and Robustness
LR-DWM maintains competitive text quality while ensuring high detectability. On LLaDA, it achieves a 99% detection rate at a perplexity of 3.32, outperforming WM-DLM's 6.14. The watermark is also highly robust to light edits; a 10% word deletion attack only drops detection to 98.8%, and a 10% context-aware substitution drops it to 99.4%.
Limitations and Future Work
Like many watermarks based on local token correlations, LR-DWM struggles against heavy paraphrasing, which destroys local left-right token relationships. Detection rates dropped to ~15.8% under heavy paraphrasing attacks. Additionally, statistical detection requires a minimum text length to confidently separate the signal from human text. Future work will likely address targeted, adversarial attacks designed specifically to strip bidirectional watermarks while maintaining the efficiency gains demonstrated here.
Conclusion
LR-DWM demonstrates that DLMs can be watermarked efficiently, achieving high detectability with negligible computational and memory overhead. By leveraging bidirectional context, it provides a robust and practical solution for the next generation of non-sequential language models.
Summary updated