Skip to main content
QUICK REVIEW

[论文解读] A Resilient and Accessible Distribution-Preserving Watermark for Large Language Models

Yihan Wu, Zhengmian Hu|arXiv (Cornell University)|Oct 11, 2023
Internet Traffic Analysis and Secure E-voting被引用 4
一句话总结

DiPmark 提出了一种用于大语言模型的分布保持水印框架,通过使用上下文感知哈希函数和重加权策略,在不改变模型输出分布的前提下嵌入水印,从而实现隐蔽性、高效性和鲁棒性。该方法在无需 API 访问的情况下,可实现对 1,000 个 LLaMA-2 序列的 90 秒内检测,并在 30% 文本扰动下保持高检测准确率(AUC > 0.95)。

ABSTRACT

Watermarking techniques offer a promising way to identify machine-generated content via embedding covert information into the contents generated from language models. A challenge in the domain lies in preserving the distribution of original generated content after watermarking. Our research extends and improves upon existing watermarking framework, placing emphasis on the importance of a extbf{Di}stribution- extbf{P}reserving (DiP) watermark. Contrary to the current strategies, our proposed DiPmark simultaneously preserves the original token distribution during watermarking (distribution-preserving), is detectable without access to the language model API and prompts (accessible), and is provably robust to moderate changes of tokens (resilient). DiPmark operates by selecting a random set of tokens prior to the generation of a word, then modifying the token distribution through a distribution-preserving reweight function to enhance the probability of these selected tokens during the sampling process. Extensive empirical evaluation on various language models and tasks demonstrates our approach's distribution-preserving property, accessibility, and resilience, making it a effective solution for watermarking tasks that demand impeccable quality preservation.

研究动机与目标

  • 解决现有水印方案中同时保持模型分布、实现快速检测并抵抗文本修改的不足。
  • 克服现有方法在模型质量下降、需要 API 访问或在文本编辑下失效等方面的局限性。
  • 开发一种可证明分布保持且仅使用密钥和水印文本即可检测的水印框架。
  • 确保对常见文本操作(如插入、删除和替换)具有鲁棒性,且性能不下降。

提出的方法

  • 提出一种重加权策略,在生成过程中使用密钥和上下文相关哈希函数,为每个 token 分配唯一的 i.i.d. 密文,从而修改 token 的概率。
  • 采用确定性哈希函数,为每个上下文生成唯一的绿色列表(green-list)token,确保在不同提示下水印嵌入的一致性。
  • 利用 z-分数的假设检验实现高效检测,仅依赖密钥和水印文本,无需模型权重或 API 访问。
  • 基于绿色列表 token 的频率应用统计检测机制,对高达 30% 的扰动具有可证明的鲁棒性。
  • 通过确保重加权不会显著改变原始概率分布,使水印保持原始模型的输出分布。
  • 在多个大语言模型(BART-large, LLaMA-2)上通过文本摘要和诗歌生成等任务验证方法,评估其质量与可检测性。

实验结果

研究问题

  • RQ1是否可以在不改变模型原始输出分布的前提下,将水印嵌入大语言模型生成的文本中,从而实现隐蔽性?
  • RQ2是否可以无需访问模型 API 或权重即可高效完成水印检测?
  • RQ3水印对常见的文本修改(如插入、删除和替换)具有多强的鲁棒性?
  • RQ4在逐步增加的扰动水平下(如 20–30% 的 token 变更),水印的可检测性能保持到何种程度?
  • RQ5分布保持型水印是否能在多种生成任务中实现高检测准确率并保持低误报率?

主要发现

  • DiPmark 保持了与原始模型几乎相同的输出分布,绿色 token 比例分别为 0.9940(α=0.5)和 0.9940(α=0.45),表明隐蔽性极强。
  • 使用密钥且无需 API 访问,对 1,000 个 LLaMA-2 水印序列的检测仅耗时 90 秒,证实了其高效性。
  • 在 30% 随机扰动(插入、删除、替换)下,DiPmark 的 AUC 分数分别为 0.8060(α=0.45)和 0.8006(α=0.5),表现出强鲁棒性。
  • 在理想条件下,真阳性率为 1.0,误报率为 0.0,且在扰动水平 ≤0.2 时 AUC 分数始终高于 0.95。
  • 随着扰动增加,检测 z-分数逐渐降低,但仍保持统计显著性,证实其在中等编辑下仍具鲁棒性。
  • 实证评估表明,较长序列(n=260±5)可提高检测准确率,z-分数随序列长度增加,与理论预期一致。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。