arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.10553cs.LGcs.AIcs.CR
收藏

通过强化学习学习为LLM生成的文本添加水印

Learning to Watermark LLM-generated Text via Reinforcement Learning

ByteDance Research(字节跳动研究院)

Xiaojun Xu, Yuanshun Yao, Yang Liu

AI总结:

本研究提出一种基于强化学习的协同训练框架,通过将信号嵌入LLM权重实现模型级水印,该方法比现有方法更准确、鲁棒且适应新攻击,并支持开源。

摘要:

我们研究如何为LLM输出添加水印,即将算法可检测的信号嵌入到LLM生成的文本中,以追踪滥用行为。与当前主流方法(固定LLM)不同,我们通过将LLM微调阶段纳入水印流程来扩展水印设计空间。先前的工作侧重于将信号嵌入输出的令牌级水印,而我们设计了一种模型级水印,将信号嵌入LLM权重中,此类信号可通过配对检测器检测。我们提出了一种基于强化学习的协同训练框架,该框架迭代地(1)训练检测器以检测生成的水印文本,以及(2)微调LLM以生成易于被检测器检测到的文本,同时保持其正常效用。我们通过实验证明,我们的水印更准确、更鲁棒,且对新攻击更具适应性。它还允许水印模型开源。此外,若与对齐结合使用,额外开销较低——仅需训练一个额外的奖励模型(即我们的检测器)。我们希望我们的工作能推动更广泛的水印设计研究,而不局限于固定LLM。我们开源了代码:https://github.com/xiaojunxu/learning-to-watermark-llm 。

英文摘要:

We study how to watermark LLM outputs, i.e. embedding algorithmically detectable signals into LLM-generated text to track misuse. Unlike the current mainstream methods that work with a fixed LLM, we expand the watermark design space by including the LLM tuning stage in the watermark pipeline. While prior works focus on token-level watermark that embeds signals into the output, we design a model-level watermark that embeds signals into the LLM weights, and such signals can be detected by a paired detector. We propose a co-training framework based on reinforcement learning that iteratively (1) trains a detector to detect the generated watermarked text and (2) tunes the LLM to generate text easily detectable by the detector while keeping its normal utility. We empirically show that our watermarks are more accurate, robust, and adaptable (to new attacks). It also allows watermarked model open-sourcing. In addition, if used together with alignment, the extra overhead introduced is low - only training an extra reward model (i.e. our detector). We hope our work can bring more effort into studying a broader watermark design that is not limited to working with a fixed LLM. We open-source the code: https://github.com/xiaojunxu/learning-to-watermark-llm .

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

↑