arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.16345cs.CL
收藏

Nucleus Sampling在缓解文本记忆方面的不合理无效性

The Unreasonable Ineffectiveness of Nucleus Sampling on Mitigating Text Memorization

German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心)

Luka Borec, Philipp Sadler, David Schlangen

AI总结:

本研究通过构建诊断数据集并微调GPT-Neo模型,发现nucleus sampling仅能适度减少LLMs的“硬”文本记忆,且模型仍会表现出非逐字重复的“软”记忆现象。

摘要:

本研究分析了大型语言模型(LLMs)在采用nucleus sampling时的文本记忆行为。像nucleus sampling这样的随机解码方法通常被用来克服基于最大化解码技术中常见的文本生成单调且重复等问题。我们假设nucleus sampling可能也会减少记忆模式的出现,因为它可能导致选择记忆序列之外的token。为了检验这一假设,我们创建了一个具有已知重复分布的诊断数据集,使我们能够控制训练数据中某些部分被记忆的可能性。对在该数据集上微调的两个GPT-Neo模型的分析有趣地表明:(i) 增加nucleus size仅能适度减少记忆,并且 (ii) 即使模型未发生“硬”记忆(即对训练样本的逐字复现),它们仍可能表现出“软”记忆,即生成的输出呼应了训练数据,但没有完全的一一对应相似性。

英文摘要:

This work analyses the text memorization behavior of large language models (LLMs) when subjected to nucleus sampling. Stochastic decoding methods like nucleus sampling are typically applied to overcome issues such as monotonous and repetitive text generation, which are often observed with maximization-based decoding techniques. We hypothesize that nucleus sampling might also reduce the occurrence of memorization patterns, because it could lead to the selection of tokens outside the memorized sequence. To test this hypothesis we create a diagnostic dataset with a known distribution of duplicates that gives us some control over the likelihood of memorization of certain parts of the training data. Our analysis of two GPT-Neo models fine-tuned on this dataset interestingly shows that (i) an increase of the nucleus size reduces memorization only modestly, and (ii) even when models do not engage in "hard" memorization -- a verbatim reproduction of training samples -- they may still display "soft" memorization whereby they generate outputs that echo the training data but without a complete one-by-one resemblance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑