Abstract
As large language models (LLMs) grow more powerful, concerns over copyright infringement of LLM-generated texts have intensified. LLM watermarking has been proposed to trace unauthorized redistribution or resale of generated content by embedding identifiers within the text. Existing approaches primarily rely on one-bit watermarking, which only verifies whether a text was generated by a specific LLM. In contrast, multi-bit watermarking encodes richer information, enabling the identification of the specific LLM and user involved in generated or distributed content. However, current multi-bit methods directly embed the watermark into the text without considering its watermark capacity, which can result in failures, especially in low-entropy texts. In this paper, we analyze that the watermark embedding follows a normal distribution. We then derive a formal inequality to optimally segment the text for watermark embedding. Building upon this, we propose DERMARK, a dynamic, efficient, and robust multi-bit watermarking method that divides the text into variable-length segments for each watermark bit during the inference. Moreover, DERMARK incurs negligible overhead since no additional intermediate matrices are generated and achieves robustness against text editing by minimizing watermark extraction loss. Experiments demonstrate that, compared to SOTA, on average, our method reduces the number of tokens required per embedded bit by 25%, reduces watermark embedding time by 50%, and maintains high robustness against text modifications and watermark erasure attacks.
Introduction
As LLMs become central to the digital economy, protecting the intellectual property (IP) of model owners is critical. Watermarking allows owners to trace the origin of generated text. While "one-bit" watermarking simply identifies if a text is AI-generated, multi-bit watermarking is more powerful: it can encode specific identifiers, such as which user or which specific model version generated the content.
The current challenge lies in watermark capacity. Existing multi-bit methods typically divide text into equal-length segments (e.g., one bit every 10 tokens). However, text entropy—the "randomness" or "room" available to hide a signal—is not uniform. In low-entropy scenarios, like generating code or structured data, fixed segments often lack the capacity to hold a bit, leading to embedding failures. Conversely, in high-entropy text, fixed segments are inefficient. Furthermore, if a user edits the text (inserting or deleting words), these fixed boundaries break, making the watermark impossible to extract.
Methodology
DERMARK treats watermarking as a dynamic resource allocation problem, moving away from rigid, fixed-length text segments to a dynamic approach based on real-time entropy analysis.
Theoretical Foundation
The researchers formally demonstrate that watermark embedding (achieved by perturbing LLM logits) follows a normal distribution. This allows them to derive a statistical inequality to determine exactly how many tokens are needed to embed a bit with a specific confidence level ($\alpha$).
Dynamic Segmentation and Extraction
During inference, DERMARK monitors the generated tokens in real-time. It only moves to the next watermark bit once the current segment has accumulated enough "entropy capacity" to satisfy the theoretical threshold. This ensures that every bit is reliably embedded regardless of whether the text is a creative poem or a rigid code snippet.
To handle post-generation edits, the extraction phase doesn't rely on fixed indices. Instead, it uses a Dynamic Programming (DP) approach to minimize "segmentation loss" and "color loss." This allows the system to "re-align" the segments and recover the bits even if the text has been modified.
Experimental Evaluation
The authors evaluated DERMARK using the C4 dataset for general prompts, as well as custom-curated low-entropy and high-entropy subsets to test performance on difficult, highly structured text and evaluate efficiency in "easy" scenarios. Evaluation was performed across various scales, including OPT-1.3b, LLaMA2-7b, and LLaMA2-70B.
Key Results
- Higher Efficiency: DERMARK requires significantly fewer tokens to hide the same amount of information. On average, it uses 2.26 fewer tokens per bit on OPT-1.3b and 3.7 fewer on LLaMA2-7b compared to the previous state-of-the-art (Balance-Marking).
- Superior Speed: Because it avoids complex intermediate matrix calculations, it reduces the time overhead of watermarking by 50%.
- Robustness: In "insert" and "delete" attack simulations (adding/removing 5-10% of tokens), DERMARK maintained high detection rates where fixed-length baselines saw their performance collapse.
- Quality Preservation: Perplexity (PPL) tests showed that DERMARK has a negligible impact on the actual quality and fluency of the generated text.
Conclusion
DERMARK introduces a novel multi-bit watermarking framework that adapts to the inherent entropy of LLM-generated text. By treating entropy as capacity and employing dynamic segmentation, it achieves significant gains in efficiency and robustness. While currently designed for autoregressive text models and potentially vulnerable to aggressive paraphrasing, it sets a new standard for traceable and secure LLM content generation.
Summary updated