语言模型的鲁棒无失真水印
Robust Distortion-free Watermarks for Language Models
AI总结:
本文提出一种不改变文本分布的自回归语言模型水印方法,通过随机数序列映射生成水印文本,并在多个模型上验证了其对扰动的鲁棒检测能力。
摘要:
我们提出了一种在自回归语言模型生成的文本中植入水印的方法,该方法在不超过特定最大生成长度预算的情况下,对扰动具有鲁棒性,且不改变文本分布。我们通过将一组随机数序列(使用随机化水印密钥计算得到)映射到语言模型的样本来生成带水印的文本。为了检测带水印的文本,任何知道该密钥的一方都可以将文本与随机数序列对齐。我们用两种采样方案实例化我们的水印方法:逆变换采样和指数最小采样。我们将这些水印应用于三个语言模型——OPT-1.3B、LLaMA-7B和Alpaca-7B——以实验验证它们的统计功效和对各种改写攻击的鲁棒性。值得注意的是,对于OPT-1.3B和LLaMA-7B模型,我们发现即使在通过随机编辑(即替换、插入或删除)破坏40%-50%的token之后,仍能从35个token中可靠地检测到带水印的文本(p≤0.01)。对于Alpaca-7B模型,我们对典型用户指令的响应进行水印处理的可行性进行了案例研究。由于响应的熵较低,检测更加困难:约25%的响应(其中位长度约为100个token)可以在p≤0.01下被检测到,并且水印对我们实施的某些自动改写攻击的鲁棒性也较低。
英文摘要:
We propose a methodology for planting watermarks in text from an autoregressive language model that are robust to perturbations without changing the distribution over text up to a certain maximum generation budget. We generate watermarked text by mapping a sequence of random numbers -- which we compute using a randomized watermark key -- to a sample from the language model. To detect watermarked text, any party who knows the key can align the text to the random number sequence. We instantiate our watermark methodology with two sampling schemes: inverse transform sampling and exponential minimum sampling. We apply these watermarks to three language models -- OPT-1.3B, LLaMA-7B and Alpaca-7B -- to experimentally validate their statistical power and robustness to various paraphrasing attacks. Notably, for both the OPT-1.3B and LLaMA-7B models, we find we can reliably detect watermarked text ($p \leq 0.01$) from $35$ tokens even after corrupting between $40$-$50\%$ of the tokens via random edits (i.e., substitutions, insertions or deletions). For the Alpaca-7B model, we conduct a case study on the feasibility of watermarking responses to typical user instructions. Due to the lower entropy of the responses, detection is more difficult: around $25\%$ of the responses -- whose median length is around $100$ tokens -- are detectable with $p \leq 0.01$, and the watermark is also less robust to certain automated paraphrasing attacks we implement.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。