arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.15720cs.CL
收藏

大语言模型事实记忆的缩放定律

Scaling Laws for Fact Memorization of Large Language Models

Fudan University(复旦大学);INTSIG

Xingyu Lu, Xiaonan Li, Qinyuan Cheng, Kai Ding, Xuanjing Huang, Xipeng Qiu

AI总结:

该研究分析大语言模型事实记忆的缩放定律及记忆特征,明确其容量与模型规模、训练轮数的关系,揭示记忆兼容性与偏好性问题,为事实知识增强提供方向。

摘要:

事实知识记忆对于大语言模型(LLM)生成符合事实、可靠的回复至关重要。然而,LLM的事实记忆行为仍未得到充分探究。本文分析了LLM事实知识的缩放定律,以及LLM记忆不同类型事实的行为。研究发现,LLM的事实知识容量与模型规模呈线性关系,与训练轮数呈负指数关系。根据构建的缩放定律估算,要记住整个Wikidata的事实,需要训练一个具有1000B非嵌入参数的LLM并训练100轮,这表明在通用预训练设置下,用LLM记忆所有公开事实几乎是不现实的。同时,研究发现LLM能够对未见过的事实知识进行泛化,且其缩放定律与通用预训练的缩放定律相似。此外,本文还分析了LLM事实记忆的兼容性和偏好性。在兼容性方面,研究发现LLM难以以统一的方式记忆冗余事实。只有当相关事实具有相同的方向和结构时,LLM才能兼容地记忆它们,这表明LLM对冗余事实的记忆效率低下。在偏好性方面,LLM更关注记忆频率更高、难度更大的事实,且后续事实会覆盖先前事实的记忆,这严重阻碍了低频事实的记忆。本研究发现揭示了LLM事实知识学习的容量和特征,为LLM的事实知识增强提供了方向。

英文摘要:

Fact knowledge memorization is crucial for Large Language Models (LLM) to generate factual and reliable responses. However, the behaviors of LLM fact memorization remain under-explored. In this paper, we analyze the scaling laws for LLM's fact knowledge and LLMs' behaviors of memorizing different types of facts. We find that LLMs' fact knowledge capacity has a linear and negative exponential law relationship with model size and training epochs, respectively. Estimated by the built scaling law, memorizing the whole Wikidata's facts requires training an LLM with 1000B non-embed parameters for 100 epochs, suggesting that using LLMs to memorize all public facts is almost implausible for a general pre-training setting. Meanwhile, we find that LLMs can generalize on unseen fact knowledge and its scaling law is similar to general pre-training. Additionally, we analyze the compatibility and preference of LLMs' fact memorization. For compatibility, we find LLMs struggle with memorizing redundant facts in a unified way. Only when correlated facts have the same direction and structure, the LLM can compatibly memorize them. This shows the inefficiency of LLM memorization for redundant facts. For preference, the LLM pays more attention to memorizing more frequent and difficult facts, and the subsequent facts can overwrite prior facts' memorization, which significantly hinders low-frequency facts memorization. Our findings reveal the capacity and characteristics of LLMs' fact knowledge learning, which provide directions for LLMs' fact knowledge augmentation.

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

↑