arXiv:2411.05091cs.LGcs.CL2024-11被引 13

用大模型生成水印指令,无须改模型就能自动打水印。

Watermarking Language Models through Language Models

  • 用一个模型生成水印指令,另一个模型按指令输出带水印内容。
  • 跨25种模型组合测试,水印在微调、蒸馏后仍能识别。
  • 适合需要内容溯源的机构或平台,无需修改模型架构。

大型语言模型(LLM)输出的水印技术对内容溯源、监管和模型责任追踪至关重要。现有方法常依赖模型内部信息,或受限于静态规则与词元级扰动,且基于提示的生成行为控制尚未被充分探索。本文提出一种完全在输入层操作、无需访问模型参数或解码日志的提示引导式水印框架。该框架包含三个协作组件:提示生成模型(Prompting LM)从用户提示中合成水印指令,标记生成模型(Marking LM)根据这些指令生成带水印的输出,检测模型(Detecting LM)则用于判断响应是否嵌入水印。这种模块化设计实现了动态水印,可适配不同架构的LLM,包括专有模型与开源模型。我们在25种提示生成与标记模型组合上进行评估,涵盖GPT-4o、Mistral、LLaMA3、DeepSeek等。实验表明,水印信号在不同模型间具有泛化能力,并在微调、模型蒸馏及提示攻击下仍保持鲁棒性,验证了该方法的有效性与稳定性。

原文摘要 · Abstract (English)

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.

水印技术大模型内容溯源提示工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。