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-off 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 $\Theta(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 users are 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.
翻译:我们将统计水印问题建模为假设检验问题,该通用框架涵盖了所有现有统计水印方法。该框架的核心在于输出令牌与拒绝域的耦合(实际中通过伪随机生成器实现),这使得第一类错误与第二类错误之间能够实现非平凡权衡。我们刻画了通用假设检验场景下的一致最优势(UMP)水印,以及在模型无关场景下的极小化极大第二类错误。针对输出为$n$个令牌序列的常见场景,我们建立了在确保第一类与第二类错误均较小时所需独立同分布令牌数量的近似匹配上下界。相对于每个令牌的平均熵$h$,我们获得的$\Theta(h^{-1} \log (1/h))$速率凸显了相较于先前工作中$h^{-2}$速率的改进潜力。此外,我们构建了鲁棒水印问题——允许用户对生成文本实施特定扰动类操作,并通过线性规划问题刻画鲁棒UMP检验的最优第二类错误。据我们所知,这是首个在独立同分布场景下以近最优速率系统处理水印问题的统计学研究,有望为后续工作提供重要参考。