DMark: Order-Agnostic Watermarking for Diffusion Large Language Models

Linyu Wu, Linhao Zhong, Wenjie Qu, Yuexin Li, Yue Liu, Shengfang Zhai, Chunhua Shen, Jiaheng Zhang · DOI

Abstract

Diffusion Large Language Models (dLLMs) have emerged as high-speed alternatives to traditional autoregressive models, yet they break existing text watermarking techniques that rely on sequential generation. This paper introduces DMark, the first framework designed to handle the non-sequential, iterative nature of dLLMs. By employing predictive and bidirectional strategies, DMark embeds robust, detectable signals without sacrificing text quality. Our evaluation shows that DMark achieves detection rates between 92.0% and 99.5% and maintains resilience against various text-based attacks and paraphrasing.

Introduction

Traditional Large Language Models (LLMs) generate text sequentially, from left to right. Most watermarking methods, such as the widely used KGW framework, exploit this causal nature by using a "green list" of allowed tokens for the next position based on a hash of preceding tokens. However, Diffusion LLMs (dLLMs), such as LLaDA or Gemini Diffusion, refine sequences of tokens simultaneously or in arbitrary orders through iterative denoising. Because a token at any given position might be finalized before its neighbors, the stable prefix required by traditional watermarks is often absent. Naively applying sequential methods to dLLMs results in weak signals and catastrophic detection failure.

Methodology

DMark addresses the lack of a stable prefix in dLLMs through three primary strategies to restore watermark detectability in non-sequential environments:

  1. Predictive Watermarking: Since dLLMs compute logits for all positions simultaneously, DMark can "look into the future." If a preceding context token is missing, the algorithm uses the model's own predicted most-likely token to generate the watermark's green list.
  2. Bidirectional Watermarking: Unlike autoregressive models, dLLMs can condition on tokens in both directions. DMark exploits this by using both a forward green list (based on the predecessor) and a backward green list (based on the successor), effectively doubling the available signal.
  3. Predictive-Bidirectional Watermarking: This integrated version uses actual neighbors where available and predicted neighbors otherwise, ensuring a watermark bias is applied at every position in the sequence.
Comparison of watermarking strategies: (a) KGW, (b) Predictive, (c) Bidirectional, and (d) Predictive-Bidirectional.

To maintain generation efficiency, DMark utilizes a bit-matrix encoding for green list relationships, enabling $O(1)$ lookups during the denoising process.

Experimental Evaluation

The researchers evaluated DMark using three open-source dLLMs: LLaDA-Instruct-8B, LLaDA-1.5-8B, and Dream-v0-Instruct-7B. Testing was conducted on two standard benchmarks:

  • ELI5 (Explain Like I'm Five): For long-form question-answering tasks.
  • C4 (Colossal Clean Crawled Corpus): For text completion tasks with 30-token prefixes.

Key Results and Insights

  • Superior Detection: DMark achieved 92.0% to 99.5% detection rates (True Positive Rate) at a strict 1% False Positive Rate. In contrast, naive adaptations of traditional methods only managed 49.6% to 71.2%.
  • Robustness: The watermark proved highly resilient to attacks. Even after 10-20% of tokens were deleted, swapped, or substituted, DMark maintained high detection scores. It also outperformed baselines in paraphrasing resistance against models like GPT-5-nano.
  • Order-Agnosticism: By making the watermark bidirectional and predictive, the signal remains consistent regardless of whether the model fills the middle or the end of a sentence first.
  • Quality-Security Trade-off: The study identified a "sweet spot" (around $\delta=2.0, \gamma=0.5$) where detection is near-perfect without making the text repetitive or nonsensical.

Conclusion and Future Work

While DMark significantly advances watermarking for dLLMs, challenges remain for very short sequences (under 50 tokens) where the statistical signal is naturally weaker. Additionally, while DMark is more robust than previous methods, heavy paraphrasing can still degrade the signal. Future research may explore "semantic" watermarking that survives even when specific words are changed, as well as optimizing the computational overhead associated with predictive logit processing.

Summary updated

BibTeX
@misc{wu2025dmark,
  author = {Linyu Wu and Linhao Zhong and Wenjie Qu and Yuexin Li and Yue Liu and Shengfang Zhai and Chunhua Shen and Jiaheng Zhang},
  title = {{DMark: Order-Agnostic Watermarking for Diffusion Large Language Models}},
  year = {2025},
  eprint = {2510.02902},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.02902},
}
Figure