arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.11577cs.CLcs.AI
收藏

大语言模型中记忆现象的多视角分析

A Multi-Perspective Analysis of Memorization in Large Language Models

The University of Tokyo(东京大学)

Bowen Chen, Namgi Han, Yusuke Miyao

AI总结:

本研究从多视角全面分析大语言模型的记忆现象,揭示了记忆与模型规模、续写和上下文大小的关系,并通过嵌入分析、n-gram统计和熵解码动态发现边界效应,最终证明可通过上下文预测记忆。

摘要:

大语言模型(LLMs)在拥有数十亿参数的庞大数据集上训练,在各个领域展现出前所未有的性能。尽管对其出色的表现感到惊讶,研究人员也注意到了这些LLMs的一些特殊行为。其中一种行为是记忆,即LLMs能够生成与训练数据完全相同的内容。尽管先前的研究探讨过记忆现象,但LLMs的记忆仍缺乏解释,特别是记忆的成因及其生成动态。在本研究中,我们从多个视角全面探讨了记忆现象,并将讨论范围扩展到了不仅包含已记忆的内容,还包含了较少记忆和未记忆的内容。通过各种研究,我们发现:(1)通过实验,我们揭示了记忆与模型大小、续写大小和上下文大小之间的关系。此外,我们展示了未记忆句子如何转变为已记忆句子。(2)通过嵌入分析,我们展示了在嵌入空间中,不同记忆分数的句子在不同模型规模下的分布和解码动态。n-gram统计分析表明(3)对n-gram和熵解码动态的分析发现,当模型开始生成已记忆句子或未记忆句子时,存在一种边界效应。(4)我们训练了一个Transformer模型来预测不同模型的记忆情况,表明通过上下文预测记忆是可能的。

英文摘要:

Large Language Models (LLMs), trained on massive corpora with billions of parameters, show unprecedented performance in various fields. Though surprised by their excellent performances, researchers also noticed some special behaviors of those LLMs. One of those behaviors is memorization, in which LLMs can generate the same content used to train them. Though previous research has discussed memorization, the memorization of LLMs still lacks explanation, especially the cause of memorization and the dynamics of generating them. In this research, we comprehensively discussed memorization from various perspectives and extended the discussion scope to not only just the memorized content but also less and unmemorized content. Through various studies, we found that: (1) Through experiments, we revealed the relation of memorization between model size, continuation size, and context size. Further, we showed how unmemorized sentences transition to memorized sentences. (2) Through embedding analysis, we showed the distribution and decoding dynamics across model size in embedding space for sentences with different memorization scores. The n-gram statistics analysis presents d (3) An analysis over n-gram and entropy decoding dynamics discovered a boundary effect when the model starts to generate memorized sentences or unmemorized sentences. (4)We trained a Transformer model to predict the memorization of different models, showing that it is possible to predict memorizations by context.

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

↑