提出新水印方法,让伪造者无法篡改内容又保留水印。
Defending LLM Watermarking Against Spoofing Attacks with Contrastive Representation Learning
- 用对比学习训练语义映射模型,识别内容是否被恶意篡改
- 在两个基准上对删除和伪造攻击均表现鲁棒,检测率超95%
- 适合需要内容安全的LLM厂商和监管机构使用
水印已成为检测大模型生成文本的有力手段。现有研究主要关注文本质量、可检测性和抗移除攻击的鲁棒性,但对伪造攻击的防御仍不充分。例如,寄生攻击可将水印文本恶意篡改为仇恨言论,同时保留原水印,损害模型提供方声誉。我们识别出两大挑战:(1) 水印需对语义扭曲敏感,对语义保持编辑不敏感;(2) 检测全局语义变化与多数水印方案局部自回归特性的矛盾。为此,我们提出一种后处理式语义感知水印算法,通过一个语义映射模型引导生成红绿标记词表,经对比训练以区分语义扭曲与保持。在两个标准基准上的实验表明,该方法对移除攻击具有强鲁棒性,且能有效防御情感反转和有毒内容插入等伪造攻击,同时保持高可检测性。本方法为更安全、语义感知的模型水印提供了重要进展。代码已开源。
原文摘要 · Abstract (English)
Watermarking has emerged as a promising technique for detecting texts generated by LLMs. Current research has primarily focused on three design criteria: high quality of the watermarked text, high detectability, and robustness against removal attack. However, the security against spoofing attacks remains relatively understudied. For example, a piggyback attack can maliciously alter the meaning of watermarked text-transforming it into hate speech-while preserving the original watermark, thereby damaging the reputation of the LLM provider. We identify two core challenges that make defending against spoofing difficult: (1) the need for watermarks to be both sensitive to semantic-distorting changes and insensitive to semantic-preserving edits, and (2) the contradiction between the need to detect global semantic shifts and the local, auto-regressive nature of most watermarking schemes. To address these challenges, we propose a semantic-aware watermarking algorithm that post-hoc embeds watermarks into a given target text while preserving its original meaning. Our method introduces a semantic mapping model, which guides the generation of a green-red token list, contrastively trained to be sensitive to semantic-distorting changes and insensitive to semantic-preserving changes. Experiments on two standard benchmarks demonstrate strong robustness against removal attacks and security against spoofing attacks, including sentiment reversal and toxic content insertion, while maintaining high watermark detectability. Our approach offers a significant step toward more secure and semantically aware watermarking for LLMs. Our code is available at https://github.com/UCSB-NLP-Chang/contrastive-watermark.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。