像金鱼一样,不要死记硬背!减轻生成式语言模型中的记忆现象
Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
June 14, 2024
作者: Abhimanyu Hans, Yuxin Wen, Neel Jain, John Kirchenbauer, Hamid Kazemi, Prajwal Singhania, Siddharth Singh, Gowthami Somepalli, Jonas Geiping, Abhinav Bhatele, Tom Goldstein
cs.AI
摘要
大型语言模型可能会记忆并重复其训练数据,从而带来隐私和版权风险。为了减轻记忆问题,我们引入了一种微妙的修改,称为金鱼损失,应用于下一个标记的训练目标。在训练过程中,从损失计算中排除了随机抽样的一部分标记。这些被丢弃的标记不会被模型记忆,从而防止完全重复训练集中一整个标记链。我们进行了大量实验,训练了十亿规模的 Llama-2 模型,包括预训练和从头开始训练的模型,并展示了可提取记忆的显著减少,对下游基准测试几乎没有影响。
English
Large language models can memorize and repeat their training data, causing
privacy and copyright risks. To mitigate memorization, we introduce a subtle
modification to the next-token training objective that we call the goldfish
loss. During training, a randomly sampled subset of tokens are excluded from
the loss computation. These dropped tokens are not memorized by the model,
which prevents verbatim reproduction of a complete chain of tokens from the
training set. We run extensive experiments training billion-scale Llama-2
models, both pre-trained and trained from scratch, and demonstrate significant
reductions in extractable memorization with little to no impact on downstream
benchmarks.Summary
AI-Generated Summary