通过掩码预测差异检测大模型是否使用了特定语料库训练
MC-PDD: Masked Corpus-Level Pretraining Data Detection for Black-Box Large Language Models

- 用掩码词预测机制探测模型对目标语料的熟悉度
- 在开源与闭源模型上均实现显著的命中率差异识别
- 仅需API接口即可完成数据溯源,适合版权审计场景
预训练是大型语言模型发展的基础,但其训练数据的不透明性给模型分析带来挑战,并引发伦理、法律和公平性问题。检测特定数据集是否被用于预训练至关重要。现有先进方法通常依赖模型的概率分布,难以应用于仅提供输入输出接口的闭源大模型。为此,我们提出一种名为MC-PDD的新方法——掩码语料级预训练数据检测,该方法受掩码语言建模启发,对文本中特定标记进行掩码并让模型预测缺失内容,通过比较候选语料与参考非成员语料在预测命中率上的统计显著差异,判断候选文本是否可能属于模型预训练数据。实验表明,在三个数据集上,预训练数据与未见数据之间表现出清晰且一致的命中率差异,涵盖开源与闭源大模型。尽管处于更严格的黑盒环境下,MC-PDD性能仍可媲美现有方法。本方法支持仅通过标准API实现模型审计与数据版权验证。论文接收后将公开代码与数据集。
原文摘要 · Abstract (English)
Pretraining is fundamental to the development of Large Language Models (LLMs), yet the opacity of pretraining data complicates model analysis and raises ethical, legal, and fairness concerns. Detecting whether specific datasets were used during pretraining is, therefore, critical. Existing state-of-the-art methods typically rely on access to model probability distributions, making them unsuitable for closed-source LLMs that provide only input-output interfaces. To address this limitation, we introduce Masked Corpus-level Pretraining Data Detection (MC-PDD), a novel method inspired by the masked language modeling paradigm. MC-PDD masks highly specific tokens in each text and prompts the LLM to predict the missing content. It then assesses whether the difference in prediction hit rates between a candidate corpus and a reference non-member corpus is statistically significant. Based on this comparison, MC-PDD determines whether the candidate texts were likely included in the model's pretraining data. Experimental results demonstrate clear and consistent differences in prediction hit rates between pretrained and unseen data across three datasets, for both open-source and closed-source LLMs. Despite operating under a stricter black-box setting, MC-PDD achieves performance comparable to existing detection methods. Our approach enables practical applications such as model auditing and data copyright verification using only standard API access. Upon acceptance, we will publicly release the code and datasets.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。