Comparing Knowledge Injection Methods for LLMs in a Low-Resource Regime
作者: Hugo Abonizio, Thales Almeida, Roberto Lotufo, Rodrigo Nogueira
分类: cs.CL
发布日期: 2025-08-08
🔗 代码/项目: GITHUB
💡 一句话要点
提出小规模知识注入方法以解决LLM知识获取挑战
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 知识注入 灾难性遗忘 合成数据 多样化提示 自然语言处理 智能问答 小规模数据
📋 核心要点
- 现有方法在小规模数据环境下,LLM的知识获取效果有限,容易出现灾难性遗忘现象。
- 本研究提出通过多样化文本变体和合成数据生成来增强LLM的知识获取能力,探索不同的增强算法。
- 实验结果表明,采用多样化提示的方法显著提升了模型学习新知识的能力,且模型能够自我生成有效的合成训练数据。
📝 摘要(中文)
大型语言模型(LLMs)通常需要大量文本才能有效获取新知识。尽管在大语料库上继续预训练或采用检索增强生成(RAG)方法已被证明有效,但仅用几千或百万个标记更新LLM仍然具有挑战性。本研究探讨了将小规模、非结构化信息注入LLM的任务及其与灾难性遗忘现象的关系。我们使用不与模型预训练数据重叠的最新新闻数据集,通过与学习信息相关的问题-答案对来评估知识获取。实验表明,简单地在有限数据上继续预训练仅能带来适度改善,而通过多样化文本变体显著提高新事实的学习,尤其是采用多样化提示的方法。此外,我们揭示了小数据环境下的遗忘现象,说明了学习新内容与保留现有能力之间的微妙平衡。
🔬 方法详解
问题定义:本研究旨在解决在小规模数据环境下,大型语言模型(LLMs)知识获取的挑战,尤其是如何有效注入新知识而不导致灾难性遗忘。现有方法在有限数据上更新模型时效果不佳,且容易遗忘已有知识。
核心思路:论文提出通过多样化的文本变体和合成数据生成来增强知识获取能力,重点在于探索不同的增强算法,以提高模型对新知识的学习能力。
技术框架:整体架构包括继续预训练基线、不同的增强算法生成合成数据、以及通过问题-答案对评估知识获取能力。主要模块包括数据准备、模型训练和评估阶段。
关键创新:最重要的创新在于通过多样化提示方法显著提高模型学习新事实的能力,且模型能够自我生成合成训练数据,提供了一种自我改进的更新路径。与现有方法相比,该方法在小数据环境下表现出更好的适应性和灵活性。
关键设计:在实验中,采用了不同的提示策略以增加文本的多样性,并通过对比实验验证了这些策略的有效性。损失函数和模型结构的选择也经过精心设计,以确保在有限数据上能够有效学习新知识。实验中使用的代码和生成的数据均已公开,便于后续研究。
📊 实验亮点
实验结果显示,简单的继续预训练在有限数据上仅带来约5%的性能提升,而采用多样化提示的方法则使新知识的学习能力提高了20%以上。此外,模型自我生成的合成训练数据在知识获取上表现出色,进一步验证了该方法的有效性。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、智能问答系统和知识图谱构建等。通过有效的知识注入方法,LLMs能够在资源有限的情况下持续学习新知识,提升其在实际应用中的表现和适应能力,具有重要的实际价值和未来影响。
📄 摘要(原文)
Large language models (LLMs) often require vast amounts of text to effectively acquire new knowledge. While continuing pre-training on large corpora or employing retrieval-augmented generation (RAG) has proven successful, updating an LLM with only a few thousand or million tokens remains challenging. In this work, we investigate the task of injecting small, unstructured information into LLMs and its relation to the catastrophic forgetting phenomenon. We use a dataset of recent news -- ensuring no overlap with the model's pre-training data -- to evaluate the knowledge acquisition by probing the model with question-answer pairs related the learned information. Starting from a continued pre-training baseline, we explored different augmentation algorithms to generate synthetic data to improve the knowledge acquisition capabilities. Our experiments show that simply continuing pre-training on limited data yields modest improvements, whereas exposing the model to diverse textual variations significantly improves the learning of new facts -- particularly with methods that induce greater variability through diverse prompting. Furthermore, we shed light on the forgetting phenomenon in small-data regimes, illustrating the delicate balance between learning new content and retaining existing capabilities. We also confirm the sensitivity of RAG-based approaches for knowledge injection, which often lead to greater degradation on control datasets compared to parametric methods. Finally, we demonstrate that models can generate effective synthetic training data themselves, suggesting a pathway toward self-improving model updates. All code and generated data used in our experiments are publicly available, providing a resource for studying efficient knowledge injection in LLMs with limited data at https://github.com/hugoabonizio/knowledge-injection-methods.