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.
Emergent and Predictable Memorization in Large Language Models
Booz Allen Hamilton(博思艾伦汉密尔顿);EleutherAI;Yale University(耶鲁大学);Ohio State University(俄亥俄州立大学);Stability AI;University of Maryland, Baltimore County(马里兰大学巴尔的摩县分校)
KMIR: A Benchmark for Evaluating Knowledge Memorization, Identification and Reasoning Abilities of Language Models
Huawei Poisson Laboratory(华为泊松实验室);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Hong Kong University of Science and Technology(香港科技大学)
Task-Stratified Knowledge Scaling Laws for Post-Training Quantized Large Language Models
School of Advanced Interdisciplinary Sciences, University of Chinese Academy of Sciences(中国科学院大学先进交叉学科学院);The Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所认知与决策智能复杂系统重点实验室);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);College of Computer Science, Inner Mongolia University(内蒙古大学计算机学院)
Memorization $\neq$ Understanding: Do Large Language Models Have the Ability of Scenario Cognition?
School of Computer and Information Technology, Shanxi University(山西大学计算机与信息学院);Information Systems Technology and Design, Singapore University of Technology and Design(新加坡科技设计大学信息系统技术与设计)
Generalization v.s. Memorization: Tracing Language Models' Capabilities Back to Pretraining Data
University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);Allen Institute for AI(艾伦人工智能研究所);University of Washington(华盛顿大学);SynthLabs;Carnegie Mellon University(卡内基梅隆大学)
Unintended Memorization of Sensitive Information in Fine-Tuned Language Models
TUM University Hospital(慕尼黑工业大学医院);Technical University of Munich (TUM)(慕尼黑技术大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心);Department of Computing, Imperial College London(伦敦帝国学院计算系)
Beyond Memorization: A Rigorous Evaluation Framework for Medical Knowledge Editing
School of Information and Communication Technology, Griffith University(格里菲斯大学信息与通信技术学院);Department of Data Science and AI, Monash University(莫纳什大学数据科学与人工智能系);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);Department of Computer Science, Emory University(埃默里大学计算机科学系)
Buchmann Faculty of Law, Tel Aviv University(特拉维夫大学法学院);Blavatnik School of Computer Science(比拉维克计算机科学学院);AI , Tel Aviv University(人工智能,特拉维夫大学);School of Electrical and Computer Engineering(电气与计算机工程学院);Departments of Mathematics, Computer Science(数学与计算机科学系);Decision Sciences Technion– Israel Institute of Technology(决策科学技术学院——以色列理工学院)
Recite, Reconstruct, Recollect: Memorization in LMs as a Multifaceted Phenomenon
EleutherAI;Microsoft(微软);New York University(纽约大学);DatologyAI;Northeastern University(东北大学);MPI-SWS;IIIT Delhi(德里印度理工学院);Google DeepMind(谷歌DeepMind);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Harvard University(哈佛大学);Kempner Institute(Kempner研究所)
University of Maryland, College Park(马里兰大学帕克分校);Google Research(谷歌研究院)
大型Transformer模型在许多自然语言任务中取得了令人印象深刻的性能。特别地,基于Transformer的语言模型已经被证明在以其大量参数对事实知识进行编码方面具有很强的能力。虽然提高Transformers的记忆和概括能力的任务已经得到了广泛的研究,但如何使transformers忘记特定的旧事实并记住新事实还不太清楚。在本文中,我们提出了一个新的任务\emph{explicitly modifying specific factual knowledge in Transformer models while ensuring the model performance does not degrade on the unmodified facts}。此任务在许多情况下都很有用,例如更新陈旧的知识,保护隐私,以及消除存储在模型中的意外偏见。我们对几种方法进行了基准测试,这些方法在这项任务上提供了自然的基线性能。这导致了Transformer模型的关键组件的发现,这些组件对于知识修改特别有效。这项工作还提供了不同的训练阶段(如预训练和微调)对记忆和知识修改的作用的见解。