Duwak: Dual Watermarks in Large Language Models

📄 arXiv: 2403.13000v2 📥 PDF

作者: Chaoyi Zhu, Jeroen Galjaard, Pin-Yu Chen, Lydia Y. Chen

分类: cs.LG, cs.AI, cs.CL, cs.CR

发布日期: 2024-03-12 (更新: 2024-08-08)


💡 一句话要点

提出Duwak以提高大语言模型水印的效率与质量

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 水印技术 文本生成 对比搜索 鲁棒性 内容审核 版权保护

📋 核心要点

  1. 现有水印技术在检测效率上存在争议,尤其是在后编辑情况下的鲁棒性不足。
  2. Duwak通过在令牌概率分布和采样方案中嵌入双重水印模式,提升水印的效率和文本质量。
  3. 实验结果表明,Duwak在水印文本质量和检测所需令牌数量上均优于四种现有水印技术,尤其在后续改写攻击下表现突出。

📝 摘要(中文)

随着大语言模型(LLM)在文本生成任务中的广泛应用,审计其使用情况、管理应用及减轻潜在危害变得至关重要。现有水印技术在嵌入单一不可感知且可机器检测的模式方面表现良好,但在检测水印的效率上仍存在争议。本文提出Duwak,通过在令牌概率分布和采样方案中嵌入双重秘密模式,根本性地提升水印的效率和质量。为减少因偏向某些令牌而导致的表达退化,设计了对比搜索以水印采样方案。我们在Llama2上对Duwak进行了广泛评估,结果显示Duwak标记的文本在检测所需令牌数量上比现有方法低70%,尤其在后续改写攻击下表现优异。

🔬 方法详解

问题定义:本文旨在解决现有水印技术在检测效率和鲁棒性方面的不足,尤其是在文本后编辑情况下的表现不佳。

核心思路:Duwak的核心思路是通过双重水印的设计,分别嵌入在令牌概率分布和采样方案中,从而提升水印的检测效率和文本生成质量。

技术框架:Duwak的整体架构包括两个主要模块:一是令牌概率分布的水印嵌入,二是通过对比搜索优化的采样方案。该框架通过双重水印的协同作用,确保文本生成的多样性和质量。

关键创新:Duwak的最重要创新在于双重水印的设计,使得水印在文本生成过程中更加高效且不易被去除,尤其是在面对后续编辑时的鲁棒性显著提升。

关键设计:在参数设置上,Duwak采用了对比搜索策略,以减少令牌重复并增强生成文本的多样性。同时,损失函数的设计考虑了水印的可检测性和文本质量的平衡。整体网络结构则结合了生成模型和水印嵌入模块的协同优化。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Duwak标记的文本在水印质量上达到了最高水平,且检测所需的令牌数量比现有方法低70%。在面对四种先进水印技术及其组合的对比中,Duwak在后续改写攻击下仍表现出色,展示了其优越的鲁棒性和效率。

🎯 应用场景

Duwak的研究成果在多个领域具有潜在应用价值,包括文本生成、内容审核和版权保护等。通过有效的水印技术,能够帮助企业和个人更好地管理和追踪生成内容,降低潜在的法律风险。此外,Duwak的设计理念也可为未来的水印技术发展提供新的思路和方向。

📄 摘要(原文)

As large language models (LLM) are increasingly used for text generation tasks, it is critical to audit their usages, govern their applications, and mitigate their potential harms. Existing watermark techniques are shown effective in embedding single human-imperceptible and machine-detectable patterns without significantly affecting generated text quality and semantics. However, the efficiency in detecting watermarks, i.e., the minimum number of tokens required to assert detection with significance and robustness against post-editing, is still debatable. In this paper, we propose, Duwak, to fundamentally enhance the efficiency and quality of watermarking by embedding dual secret patterns in both token probability distribution and sampling schemes. To mitigate expression degradation caused by biasing toward certain tokens, we design a contrastive search to watermark the sampling scheme, which minimizes the token repetition and enhances the diversity. We theoretically explain the interdependency of the two watermarks within Duwak. We evaluate Duwak extensively on Llama2 under various post-editing attacks, against four state-of-the-art watermarking techniques and combinations of them. Our results show that Duwak marked text achieves the highest watermarked text quality at the lowest required token count for detection, up to 70% tokens less than existing approaches, especially under post paraphrasing.