[论文解读] Detecting Pretraining Data from Large Language Models
介绍 WikiMIA,这是一种动态基准,用于检测文本是否属于 LLM 的预训练数据,并提出 Min-k% Prob,一种无需参考的 MIA 方法,利用异常的 token 概率来检测成员身份。展示在多个模型和现实场景下,相较基线具有改进的检测效果。
Although large language models (LLMs) are widely deployed, the data used to train them is rarely disclosed. Given the incredible scale of this data, up to trillions of tokens, it is all but certain that it includes potentially problematic text such as copyrighted materials, personally identifiable information, and test data for widely reported reference benchmarks. However, we currently have no way to know which data of these types is included or in what proportions. In this paper, we study the pretraining data detection problem: given a piece of text and black-box access to an LLM without knowing the pretraining data, can we determine if the model was trained on the provided text? To facilitate this study, we introduce a dynamic benchmark WIKIMIA that uses data created before and after model training to support gold truth detection. We also introduce a new detection method Min-K% Prob based on a simple hypothesis: an unseen example is likely to contain a few outlier words with low probabilities under the LLM, while a seen example is less likely to have words with such low probabilities. Min-K% Prob can be applied without any knowledge about the pretraining corpus or any additional training, departing from previous detection methods that require training a reference model on data that is similar to the pretraining data. Moreover, our experiments demonstrate that Min-K% Prob achieves a 7.4% improvement on WIKIMIA over these previous methods. We apply Min-K% Prob to three real-world scenarios, copyrighted book detection, contaminated downstream example detection and privacy auditing of machine unlearning, and find it a consistently effective solution.
研究动机与目标
- 动机:在大型语言模型的预训练语料库中识别潜在受版权保护、私有或基准数据的需求。
- 创建一个动态、模型无关的基准(WikiMIA),用于评估预训练数据检测方法。
- 提出一种轻量级、无需参考的检测方法(Min-k% Prob),不需要影子模型或对预训练分布的访问。
- 通过 WikiMIA 对比基线对 Min-k% Prob 进行实证验证,并将其应用于版权、隐私审计和数据集污染场景。
提出的方法
- 将预训练数据检测问题定义为对黑盒 LM 访问的成员身份推断攻击。
- 通过使用 2023 年之前后 Wikipedia 事件数据来创建 seen(成员)和 unseen(非成员)集合来构建 WikiMIA。
- 提出 Min-k% Prob:对文本计算 token 概率,选取最低的 k% 概概率,并对其对数似然值取平均,以在没有任何参考模型的情况下检测成员身份。
- 基于假设:未见数据包含的低概率异常 token 比已见数据更多,从而为 Min-k% Prob 提供依据。
- 在多种模型和文本长度下,将 Min-k% Prob 与基线(LOSS/PPL、Zlib、Lowercase、 Smaller Ref、Neighbor)进行对比评估。
- 探查影响检测的因素:模型规模和文本长度。
- 将 Min-k% Prob 应用于现实世界任务:版权书籍检测、机器忘却的隐私审计,以及下游数据集污染。

实验结果
研究问题
- RQ1只使用对 LM 的黑盒访问,文本能否被可靠地检测为模型预训练数据的一部分?
- RQ2简单的、无需参考的检测器(Min-k% Prob)是否优于依赖影子模型或校准概率的基线?
- RQ3模型规模、文本长度和改写对预训练数据检测性能有何影响?
- RQ4该方法在现实场景如版权检测、隐私审计及数据集污染中是否有效?
主要发现
- Min-k% Prob 在多种模型上的 AUC 高于基线(平均 AUC 0.72,比最佳基线高出 7.4%)。
- 检测性能随模型规模增大和文本长度增加而提高。
- 同义改写设置下,Min-k% Prob 仍显示出强检测能力,优于基线。
- 在版权书籍检测中,Min-k% Prob 的 AUC 达到 0.88,并揭示了 Books3 片段中的大量污染。
- 污染下游数据的检测显示,当污染物是离群值且学习率较高时,AUC 更高,印证作者的理论主张。
- 隐私审计案例表明,该方法可以揭示机器“忘却”后残留的内容。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。