arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2411.05091cs.LGcs.CLcs.CR
收藏

通过语言模型为语言模型添加水印

Watermarking Language Models through Language Models

Department of Computer Science, University of Nebraska Omaha(内布拉斯加大学奥马哈分校计算机科学系)

Agnibh Dasgupta, Abdullah Tanvir, Xin Zhong

AI总结:

提出一种提示引导的水印框架,通过三个组件在输入层为LLM输出添加动态水印,无需访问模型内部,跨架构泛化且对微调、蒸馏和对抗攻击稳健。

摘要:

为大型语言模型(LLM)的输出添加水印对于来源追踪、内容监管和模型问责至关重要。现有方法通常依赖对模型内部结构的访问,或受限于静态规则和词元级扰动。此外,通过基于提示的指令控制来引导生成行为这一思路在很大程度上仍未得到充分探索。我们提出了一种提示引导的水印框架,该框架完全在输入层面运行,无需访问模型参数或解码逻辑。该框架由三个协同组件构成:一个提示语言模型(Prompting LM),负责从用户提示中合成水印指令;一个标记语言模型(Marking LM),根据这些指令生成带有水印的输出;以及一个检测语言模型(Detecting LM),经过训练用于判断响应是否携带嵌入的水印。这种模块化设计使得水印能够动态适应各个提示,同时与多种LLM架构兼容,包括专有模型和开放权重模型。我们在25种提示语言模型和标记语言模型的组合上评估了该框架,例如GPT-4o、Mistral、LLaMA3和DeepSeek。实验结果表明,水印信号能够跨架构泛化,并且在微调、模型蒸馏和基于提示的对抗性攻击下保持稳健,证明了所提出方法的有效性和鲁棒性。

英文摘要:

Watermarking the outputs of large language models (LLMs) is critical for provenance tracing, content regulation, and model accountability. Existing approaches often rely on access to model internals or are constrained by static rules and token-level perturbations. Moreover, the idea of steering generative behavior via prompt-based instruction control remains largely underexplored. We introduce a prompt-guided watermarking framework that operates entirely at the input level and requires no access to model parameters or decoding logits. The framework comprises three cooperating components: a Prompting LM that synthesizes watermarking instructions from user prompts, a Marking LM that generates watermarked outputs conditioned on these instructions, and a Detecting LM trained to classify whether a response carries an embedded watermark. This modular design enables dynamic watermarking that adapts to individual prompts while remaining compatible with diverse LLM architectures, including both proprietary and open-weight models. We evaluate the framework over 25 combinations of Prompting and Marking LMs, such as GPT-4o, Mistral, LLaMA3, and DeepSeek. Experimental results show that watermark signals generalize across architectures and remain robust under fine-tuning, model distillation, and prompt-based adversarial attacks, demonstrating the effectiveness and robustness of the proposed approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑