Skip to main content
QUICK REVIEW

[论文解读] Quantifying Memorization Across Neural Language Models

Nicholas Carlini, Daphne Ippolito|arXiv (Cornell University)|Feb 15, 2022
Topic Modeling被引用 156
一句话总结

本论文量化了神经语言模型的记忆与模型规模、数据重复和上下文长度之间的关系,显示对数线性增长以及去重对减少记忆的影响。

ABSTRACT

Large language models (LMs) have been shown to memorize parts of their training data, and when prompted appropriately, they will emit the memorized training data verbatim. This is undesirable because memorization violates privacy (exposing user data), degrades utility (repeated easy-to-memorize text is often low quality), and hurts fairness (some texts are memorized over others). We describe three log-linear relationships that quantify the degree to which LMs emit memorized training data. Memorization significantly grows as we increase (1) the capacity of a model, (2) the number of times an example has been duplicated, and (3) the number of tokens of context used to prompt the model. Surprisingly, we find the situation becomes more complicated when generalizing these results across model families. On the whole, we find that memorization in LMs is more prevalent than previously believed and will likely get worse as models continues to scale, at least without active mitigations.

研究动机与目标

  • 使用具体的可提取性定义来量化不同模型家族和数据集上的记忆程度。
  • 表征记忆如何随模型规模、数据重复和提示长度的变化而扩展。
  • 研究解码策略和评估数据抽样如何影响记忆测量。
  • 评估数据去重或数据集修改是否能在不同模型上缓解记忆。

提出的方法

  • 通过可提取性定义记忆:若存在训练数据中的前缀 p,使得 f(p) 输出 s(贪婪解码),则字符串 s 在具有 k 个上下文标记时是可提取的。
  • 通过提示来自训练数据的前缀并在序列子集中测量精确后缀复现来评估记忆。
  • 使用两种采样方案:(i) 均匀随机数据子集,以及 (ii) 跨长度和重复计数的去重归一化采样,以对记忆进行压力测试。
  • 用不同的上下文长度(50 到 450+ 个标记)对模型进行提示,以研究可发现的记忆序列。
  • 在不同模型家族上重复实验(GPT-Neo 在 The Pile 上;T5 在 C4 上;OPT 在 The Pile 上)以测试缩放趋势的普遍性。
  • 将贪婪解码与束搜索进行比较,以评估解码对可提取记忆的影响。

实验结果

研究问题

  • RQ1在同一模型家族内,记忆如何随模型规模扩展?
  • RQ2数据重复(重复示例的频率)如何影响记忆?
  • RQ3上下文量(提示长度)数量如何影响可发现记忆数据?
  • RQ4去重后的训练数据是否在不同模型和任务上减少记忆?
  • RQ5替代的模型家族和训练数据集如何影响观测到的记忆缩放规律?

主要发现

  • 在同一模型家族中,记忆随模型规模呈对数线性增长;参数倍增会带来可提取数据的显著增加。
  • 更多重复的训练示例会导致更高的记忆,在重复计数上呈现清晰的对数线性趋势。
  • 更长的上下文标记大幅增加可提取性,展示了一种发现性现象,即记忆只有在足够的上下文下才变得明显。
  • 与贪婪解码相比,束搜索略微增加了可提取的记忆,但影响温和。
  • 去重后的训练数据在低到中等重复水平下降低了记忆,尽管在高重复情况中缓解效果减弱。
  • 在不同模型家族(GPT-Neo 在 The Pile 上,T5 在 C4 上,OPT 在 The Pile 上)中,规模效应仍然存在但幅度不同,表明数据整理可以影响记忆的程度。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。