Data Contamination Quiz: A Tool to Detect and Estimate Contamination in Large Language Models

📄 arXiv: 2311.06233v7 📥 PDF

作者: Shahriar Golchin, Mihai Surdeanu

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

发布日期: 2023-11-10 (更新: 2025-04-28)

备注: Final version; accepted at TACL


💡 一句话要点

提出数据污染测验以检测和评估大语言模型中的污染问题

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

关键词: 数据污染 大语言模型 多项选择题 模型评估 安全过滤器

📋 核心要点

  1. 现有方法在检测大语言模型中的数据污染时,往往依赖于训练数据和模型参数,限制了其适用性。
  2. 本文提出的数据污染测验(DCQ)通过多项选择题的形式,利用词级扰动来检测数据污染,创新性地设计了测验格式。
  3. 实验结果表明,DCQ在多种数据集和模型上表现优异,能够有效识别污染水平,并超越现有方法的性能。

📝 摘要(中文)

本文提出了一种简单有效的方法——数据污染测验(DCQ),用于检测大语言模型(LLMs)中的数据污染并估计其程度。具体而言,我们将数据污染检测框定为一系列多项选择题,设计了一种测验格式,其中为每个实例创建了三个扰动版本,这些版本从特定数据集分区中进行子采样。这些变化仅包括词级扰动。生成的扰动与原始数据集实例一起构成DCQ中的选项,额外的选项允许选择“无提供选项”。由于选项之间唯一的区分信号是与原始数据集实例的确切措辞,LLM在识别原始数据集实例时,如果接触过该实例,则倾向于选择原始实例。通过考虑LLM中的位置偏差,测验性能揭示了被测试模型与测验相关的数据集分区的污染水平。我们的研究表明,DCQ在各种数据集和LLM上应用时,能够在完全不接触训练数据和模型参数的情况下,达到最先进的结果,并通过记忆发现更高的污染水平,同时有效绕过更多安全过滤器,尤其是那些旨在避免生成版权内容的过滤器。

🔬 方法详解

问题定义:本文旨在解决大语言模型中的数据污染检测问题。现有方法通常依赖于训练数据和模型参数,难以在不接触这些信息的情况下进行有效检测。

核心思路:论文的核心思路是将数据污染检测转化为多项选择题的形式,通过生成扰动版本来帮助模型识别原始数据实例。这种设计利用了模型对已接触数据的记忆特性。

技术框架:DCQ的整体架构包括三个主要模块:首先,从特定数据集分区中选择原始实例;其次,为每个实例生成三个词级扰动版本;最后,构建多项选择题,包含原始实例和扰动版本,供模型选择。

关键创新:DCQ的最大创新在于其通过多项选择题的形式有效检测数据污染,而不需要访问训练数据和模型参数。这一方法与现有依赖于训练数据的方法本质上不同。

关键设计:在设计过程中,DCQ确保了扰动仅限于词级,避免了语义上的重大变化。此外,测验中设置了“无提供选项”,使得模型能够选择不识别任何选项的情况,进一步提高了检测的准确性。

📊 实验亮点

实验结果显示,DCQ在多种数据集和大语言模型上达到了最先进的性能,能够有效识别更高的污染水平。与现有方法相比,DCQ在绕过安全过滤器方面表现出色,尤其是在避免生成版权内容方面,展示了显著的提升。

🎯 应用场景

该研究的潜在应用领域包括大语言模型的训练和评估,尤其是在需要确保数据质量和模型安全性的场景中。DCQ能够帮助研究人员和开发者识别和量化数据污染,从而提高模型的可靠性和安全性,具有重要的实际价值和未来影响。

📄 摘要(原文)

We propose the Data Contamination Quiz (DCQ), a simple and effective approach to detect data contamination in large language models (LLMs) and estimate the amount of it. Specifically, we frame data contamination detection as a series of multiple-choice questions, devising a quiz format wherein three perturbed versions of each instance, subsampled from a specific dataset partition, are created. These changes only include word-level perturbations. The generated perturbations, along with the original dataset instance, form the options in the DCQ, with an extra option accommodating the selection of none of the provided options. Given that the only distinguishing signal among the options is the exact wording with respect to the original dataset instance, an LLM, when tasked with identifying the original dataset instance, gravitates towards selecting the original one if it has been exposed to it. While accounting for positional biases in LLMs, the quiz performance reveals the contamination level for the tested model with the dataset partition to which the quiz pertains. Applied to various datasets and LLMs, under controlled and uncontrolled contamination, our findings, while fully lacking access to training data and model parameters, suggest that DCQ achieves state-of-the-art results and uncovers greater contamination levels through memorization compared to existing methods. Also, it proficiently bypasses more safety filters, especially those set to avoid generating copyrighted content.