Detecting Pretraining Data from Large Language Models

📄 arXiv: 2310.16789v3 📥 PDF

作者: Weijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang, Daogao Liu, Terra Blevins, Danqi Chen, Luke Zettlemoyer

分类: cs.CL, cs.CR, cs.LG

发布日期: 2023-10-25 (更新: 2024-03-09)


💡 一句话要点

提出Min-K% Prob以解决大语言模型预训练数据检测问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 预训练数据检测 大型语言模型 Min-K% Prob 动态基准 隐私审计 版权检测 数据污染监测

📋 核心要点

  1. 现有方法无法有效识别大型语言模型训练数据的具体来源,导致潜在的法律和隐私问题。
  2. 论文提出的Min-K% Prob方法基于低概率词的出现频率,能够在不依赖预训练数据的情况下进行检测。
  3. 实验结果显示,Min-K% Prob在WIKIMIA基准上比传统方法提高了7.4%的检测准确率,表现优异。

📝 摘要(中文)

尽管大型语言模型(LLMs)被广泛应用,但其训练数据通常未被披露。考虑到数据规模可达数万亿个标记,数据中可能包含版权材料、个人可识别信息等问题文本。本文研究了预训练数据检测问题:在不知道预训练数据的情况下,能否判断模型是否在给定文本上进行过训练。为此,我们引入了动态基准WIKIMIA,并提出了一种新检测方法Min-K% Prob,基于假设:未见示例可能包含低概率的异常词,而已见示例则不太可能。实验表明,Min-K% Prob在WIKIMIA上比以往方法提高了7.4%。该方法在版权书籍检测、下游示例污染检测和隐私审计等实际场景中表现出色。

🔬 方法详解

问题定义:本文旨在解决如何在不知道大型语言模型(LLM)预训练数据的情况下,判断模型是否使用了特定文本进行训练的问题。现有方法通常需要对相似数据进行训练,无法适应多样化的预训练数据。

核心思路:论文提出的Min-K% Prob方法基于一个简单假设:未见示例中可能包含一些低概率的异常词,而已见示例则不太可能出现这些低概率词。通过这种方式,可以有效区分训练过的文本和未训练的文本。

技术框架:该方法的整体流程包括数据收集、低概率词检测和最终的判断输出。首先,利用动态基准WIKIMIA收集训练前后的数据,然后通过Min-K% Prob算法分析文本中的词汇概率,最后输出检测结果。

关键创新:Min-K% Prob的主要创新在于其无需任何关于预训练语料库的知识或额外训练,显著简化了检测过程。这与以往需要训练参考模型的检测方法形成了鲜明对比。

关键设计:该方法的关键设计包括对低概率词的定义和检测阈值的设定,确保能够有效识别出潜在的异常词。此外,算法的实现也考虑了计算效率,以适应大规模文本的处理需求。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Min-K% Prob在WIKIMIA基准上相较于以往方法提高了7.4%的检测准确率,表现出色。此外,该方法在版权书籍检测、下游示例污染检测和隐私审计等实际应用中均展现了良好的效果,证明了其广泛的适用性。

🎯 应用场景

该研究的潜在应用领域包括版权材料检测、数据污染监测和隐私审计等。通过有效识别预训练数据,能够帮助开发者和研究人员更好地管理和使用大型语言模型,降低法律风险和隐私泄露的可能性。未来,该方法有望在更广泛的文本分析和数据治理场景中发挥重要作用。

📄 摘要(原文)

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.