Skip to main content
QUICK REVIEW

[论文解读] Watermarking Makes Language Models Radioactive

Tom Sander, Pierre Fernandez|arXiv (Cornell University)|Feb 22, 2024
Natural Language Processing TechniquesComputer Science被引用 3
一句话总结

本文表明,语言模型中的水印技术会引发'放射性'现象,即经过水印处理的训练数据会在基于此类数据微调的模型中留下可检测的痕迹。即使仅使用5%的水印数据,也能以极高置信度(p < 10⁻⁵)检测到污染痕迹,表明原本用于检测机器生成文本的水印技术,同样可可靠地检测出模型对合成输出的微调行为。

ABSTRACT

We investigate the radioactivity of text generated by large language models (LLM), i.e. whether it is possible to detect that such synthetic input was used to train a subsequent LLM. Current methods like membership inference or active IP protection either work only in settings where the suspected text is known or do not provide reliable statistical guarantees. We discover that, on the contrary, it is possible to reliably determine if a language model was trained on synthetic data if that data is output by a watermarked LLM. Our new methods, specialized for radioactivity, detects with a provable confidence weak residuals of the watermark signal in the fine-tuned LLM. We link the radioactivity contamination level to the following properties: the watermark robustness, its proportion in the training set, and the fine-tuning process. For instance, if the suspect model is open-weight, we demonstrate that training on watermarked instructions can be detected with high confidence ($p$-value $&lt; 10^{-5}$) even when as little as $5\%$ of training text is watermarked.

研究动机与目标

  • 探究在使用水印文本微调其他模型时,水印文本是否会在模型中留下可检测的痕迹,这一现象被称为'放射性'。
  • 比较基于水印的检测方法与传统成员身份推断攻击,在识别训练数据污染方面的表现。
  • 评估在不同条件下(开放模型访问与封闭模型访问,以及有监督与无监督数据设置)下放射性的可检测性。
  • 分析水印鲁棒性、水印窗口大小和训练数据比例对可检测性的影响。
  • 证明在真实场景中检测基于水印合成指令数据进行微调的可行性。

提出的方法

  • 作者采用一种水印方案,通过秘密密钥调整标记采样概率,从而在生成文本中嵌入可检测的信号。
  • 他们使用源语言模型(Llama-2-chat)生成的合成指令数据对目标语言模型(Llama-1)进行微调,其中水印内容的比例可控。
  • 检测通过统计检验完成,比较微调后模型输出中水印特异性标记模式的频率与基线水平。
  • 在开放模型检测中,该方法利用模型logits计算微调模型中水印信号存在的p值。
  • 在封闭模型检测中,该方法通过提示词引导的推理提取并测试水印模式,无需访问模型权重。
  • 通过改变水印鲁棒性、哈希窗口大小和训练数据比例(ρ)来分析污染过程。
Figure 1 : Radioactivity setting. Bob fine-tunes his LLM on training data with a small proportion of texts coming from Alice’s LLM. We show that this leaves traces in Bob’s model after fine-tuning and that Alice can detect these traces much more reliably when her texts are watermarked. Therefore, Al
Figure 1 : Radioactivity setting. Bob fine-tunes his LLM on training data with a small proportion of texts coming from Alice’s LLM. We show that this leaves traces in Bob’s model after fine-tuning and that Alice can detect these traces much more reliably when her texts are watermarked. Therefore, Al

实验结果

研究问题

  • RQ1即使在未知具体训练样本的情况下,是否能可靠检测出在微调模型中使用的水印训练数据?
  • RQ2水印数据比例(ρ)如何影响微调模型中放射性的可检测性?
  • RQ3水印鲁棒性和哈希窗口大小如何影响可检测信号的强度?
  • RQ4与成员身份推断攻击相比,基于水印的检测在检测置信度和可行性方面表现如何?
  • RQ5能否在真实世界场景中,使用自动生成的指令数据(Self-Instruct)检测到放射性?

主要发现

  • 即使仅5%的训练数据被水印化,基于水印的检测仍能实现 p < 10⁻⁵ 的显著性水平,可靠检测出对合成数据的微调。
  • 与成员身份推断攻击相比,基于水印的检测在可靠性上显著更优,尤其在无法获取logits的封闭模型设置中优势明显。
  • 更小的水印哈希窗口可提高放射性的可检测性,表明微调模型中信号更强。
  • 该方法成功在真实世界场景中检测到使用Self-Instruct生成的指令数据引发的放射性,证实了其实际适用性。
  • 微调模型中水印信号的存在对不同水印强度和数据比例水平均表现出鲁棒性。
  • 结果表明,水印不仅可用于检测机器生成的文本,还能揭示此类文本在模型微调中的使用,从而暴露潜在的衍生模型关系。
Figure 3 : Distributions of the calibrated loss of $\mathcal{B}$ across two types of distributions generated by $\mathcal{A}$ : texts generated by $\mathcal{A}$ outside of $\mathcal{B}$ ’s fine-tuning data ( purple ), texts of $\tilde{D}^{\mathcal{A}}$ of which $d\%$ were used during training ( oran
Figure 3 : Distributions of the calibrated loss of $\mathcal{B}$ across two types of distributions generated by $\mathcal{A}$ : texts generated by $\mathcal{A}$ outside of $\mathcal{B}$ ’s fine-tuning data ( purple ), texts of $\tilde{D}^{\mathcal{A}}$ of which $d\%$ were used during training ( oran

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。