Optimized Couplings for Watermarking Large Language Models
Dor Tsur, Carol Xuan Long, Claudio Mayrink Verdun, Hsiang Hsu, Haim Permuter, Flavio P. Calmon
TL;DR
This work analyzes watermarking of large language models in a one-shot, token-level setting framed as a hypothesis test with side information. It develops the Correlated Channel (CC) watermarking scheme, which couples the next-token distribution with a random partition of the vocab to achieve zero perceptual distortion while maintaining strong detectability, and provides a closed-form expression for the detection rate under a worst-case, min-entropy constrained distribution. The authors characterize the minimax detection performance, establish optimal and near-optimal partition strategies, and extend the framework to sequential generation with preliminary sequence-level results. Empirical evaluations on synthetic data and WaterBench show CC delivering improved perceptual quality (lower PPL) and competitive or superior detectability (Z-scores) relative to existing methods, with public code for replication.
Abstract
Large-language models (LLMs) are now able to produce text that is, in many cases, seemingly indistinguishable from human-generated content. This has fueled the development of watermarks that imprint a ``signal'' in LLM-generated text with minimal perturbation of an LLM's output. This paper provides an analysis of text watermarking in a one-shot setting. Through the lens of hypothesis testing with side information, we formulate and analyze the fundamental trade-off between watermark detection power and distortion in generated textual quality. We argue that a key component in watermark design is generating a coupling between the side information shared with the watermark detector and a random partition of the LLM vocabulary. Our analysis identifies the optimal coupling and randomization strategy under the worst-case LLM next-token distribution that satisfies a min-entropy constraint. We provide a closed-form expression of the resulting detection rate under the proposed scheme and quantify the cost in a max-min sense. Finally, we provide an array of numerical results, comparing the proposed scheme with the theoretical optimum and existing schemes, in both synthetic data and LLM watermarking. Our code is available at https://github.com/Carol-Long/CC_Watermark
