Robust detection of watermarks for large language models under human edits
Watermarking has offered an effective approach to distinguishing text generated by large language models (LLMs) from human-written text. However, the pervasive presence of human edits on LLM-generated text dilutes watermark signals, thereby significantly degrading detection performance of existing methods. In this paper, by modeling human edits through mixture model detection, we introduce a new method in the form of a truncated goodness-of-fit test for detecting watermarked text under human edits, which we refer to as Tr-GoF. We prove that the Tr-GoF test achieves optimality in robust detection of the Gumbel-max watermark in a certain asymptotic regime of substantial text modifications and vanishing watermark signals. Importantly, Tr-GoF achieves this optimality <i>adaptively</i> as it does not require precise knowledge of human edit levels or probabilistic specifications of the LLMs, in contrast to the optimal but impractical (Neyman-Pearson) likelihood ratio test. Moreover, we establish that the Tr-GoF test attains the highest detection efficiency rate in a certain regime of moderate text modifications. In stark contrast, we show that sum-based detection rules, as employed by existing methods, fail to achieve optimal robustness in both regimes because the additive nature of their statistics is less resilient to edit-induced noise. Finally, we demonstrate the competitive and sometimes superior empirical performance of the Tr-GoF test on both synthetic data and open-source LLMs in the OPT and LLaMA families.
Authors
- Qi Long (ORCID: https://orcid.org/0000-0003-0660-5230)
- Weijie Su (ORCID: https://orcid.org/0000-0003-1787-1219)
- Xiang Li
- Feng Ruan (ORCID: https://orcid.org/0000-0002-5175-1491)
- Hui–Yuan Wang (ORCID: https://orcid.org/0000-0003-3671-9159)
Institutions
- University of the Sciences (US)
- Northwestern University (US)
- University City Science Center (US)
- University of Pennsylvania (US)
- Philadelphia University (US)
Publication Details
- Journal
- Journal of the Royal Statistical Society Series B (Statistical Methodology)
- Published
- 2025-08-20
- DOI
- https://doi.org/10.1093/jrsssb/qkaf056
- Citations
- 1
- Primary Topic
- Handwritten Text Recognition Techniques
- Type
- article
- Field-Weighted Citation Impact
- 1.28