We study statistical watermarking by formulating it as a hypothesis testing problem, a general framework which subsumes all previous statistical watermarking methods. Key to our formulation is a coupling of the output tokens and the rejection region, realized by pseudo-random generators in practice, that allows non-trivial trade-offs between the Type I error and Type II error. We characterize the Uniformly Most Powerful (UMP) watermark in the general hypothesis testing setting and the minimax Type II error in the model-agnostic setting. In the common scenario where the output is a sequence of $n$ tokens, we establish nearly matching upper and lower bounds on the number of i.i.d. tokens required to guarantee small Type I and Type II errors. Our rate of $Θ(h^{-1} \log (1/h))$ with respect to the average entropy per token $h$ highlights potentials for improvement from the rate of $h^{-2}$ in the previous works. Moreover, we formulate the robust watermarking problem where the user is allowed to perform a class of perturbations on the generated texts, and characterize the optimal Type II error of robust UMP tests via a linear programming problem. To the best of our knowledge, this is the first systematic statistical treatment on the watermarking problem with near-optimal rates in the i.i.d. setting, which might be of interest for future works.
Towards Better Statistical Understanding of Watermarking LLMs
Imperial College Business School, Imperial College London(帝国理工学院商学院,帝国理工学院);The University of Sydney Business School, The University of Sydney(悉尼大学商学院,悉尼大学);Grado Department of Industrial and Systems Engineering, Virginia Tech(弗吉尼亚理工大学工业与系统工程系)
Distributional Information Embedding: A Framework for Multi-bit Watermarking
Center for Applied Mathematics, Cornell University(应用数学中心,康奈尔大学);Department of CS, University of California, Santa Barbara(计算机科学系,加州大学圣巴巴拉分校);School of Computer Science and Technology, Tongji University(计算机科学与技术学院,同济大学);Schoolf of EECS, University of Ottawa(电子工程与计算机科学学院,渥太华大学)
Revealing Weaknesses in Text Watermarking Through Self-Information Rewrite Attacks
University of British Columbia(不列颠哥伦比亚大学);Vector Institute for AI(向量人工智能研究所);University of Cambridge(剑桥大学);Canada CIFAR AI Chair(加拿大CIFAR人工智能主席);NSERC CRC Chair(NSERC加拿大研究主席)