arXiv:2503.17514cs.CLcs.AI2025-03ICML被引 28

语言模型可能复述未被训练过的文本,暴露了现有检测方法的漏洞。

Language Models May Verbatim Complete Text They Were Not Explicitly Trained On

  • 通过移除可完成文本的训练数据,仍能触发模型复述
  • 即使无完整或近似重叠,模型也能准确补全目标文本
  • 揭示n-gram匹配法在判断训练数据归属时严重失效

当前评估某文本是否用于训练大语言模型(LLM)常依赖补全测试:若模型能完成一段复杂文本,则视为其曾被训练。该方法通常以n-gram重叠度作为成员判定标准,但本工作表明此标准易被规避。我们研究了在给定n值下非成员序列的情况,发现即便完全移除所有可被补全的训练样本,模型仍能成功完成目标文本。这些情况包括精确重复、近似重复和短序列重叠。结果表明,难以找到一个普适的n值来定义成员关系。基于此,我们构建对抗性数据集,使目标序列在任意合理n值下均被完成但实际未出现在训练集中。研究揭示了n-gram成员定义的局限性,说明训练算法还能利用其他辅助信息进行推理。

原文摘要 · Abstract (English)

An important question today is whether a given text was used to train a large language model (LLM). A \emph{completion} test is often employed: check if the LLM completes a sufficiently complex text. This, however, requires a ground-truth definition of membership; most commonly, it is defined as a member based on the $n$-gram overlap between the target text and any text in the dataset. In this work, we demonstrate that this $n$-gram based membership definition can be effectively gamed. We study scenarios where sequences are \emph{non-members} for a given $n$ and we find that completion tests still succeed. We find many natural cases of this phenomenon by retraining LLMs from scratch after removing all training samples that were completed; these cases include exact duplicates, near-duplicates, and even short overlaps. They showcase that it is difficult to find a single viable choice of $n$ for membership definitions. Using these insights, we design adversarial datasets that can cause a given target sequence to be completed without containing it, for any reasonable choice of $n$. Our findings highlight the inadequacy of $n$-gram membership, suggesting membership definitions fail to account for auxiliary information available to the training algorithm.

语言模型数据泄露成员检测n-gram

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。