arXiv:2508.06178cs.CL2025-08被引 2

小数据下向大模型注入知识,靠多样化生成文本更有效。

Comparing Knowledge Injection Methods for LLMs in a Low-Resource Regime

  • 用多样化的提示生成合成数据,提升小规模知识注入效果。
  • 仅继续预训练效果有限,而多样化文本使新知识学习显著提升。
  • 模型可自动生成有效训练数据,适合低资源场景研究者参考。

大型语言模型(LLMs)通常需要大量文本才能有效获取新知识。尽管在大规模语料上持续预训练或采用检索增强生成(RAG)已证明有效,但在仅提供数千至数百万个标记的情况下更新模型仍具挑战性。本文研究在小数据条件下向LLM注入非结构化信息的问题,并探讨其与灾难性遗忘现象的关系。我们使用近期新闻数据集(与模型预训练数据无重叠)评估模型对新知识的掌握情况,通过问答对探测模型表现。以持续预训练为基础,探索多种数据增强算法生成合成数据以提升知识获取能力。实验表明,仅在有限数据上继续预训练只能带来小幅改进;而引入多样化文本变体则显著提升新事实的学习效果,尤其当提示方式能产生更大多样性时。此外,我们揭示了小数据环境下遗忘现象的微妙平衡:学习新内容与保留原有能力之间需谨慎权衡。同时确认,RAG方法在知识注入中敏感度高,常导致控制数据集性能下降,相较于参数化方法更易退化。最后,我们证明模型自身能生成有效的合成训练数据,为实现自我优化更新提供了可能路径。所有代码与生成数据均公开,可在 https://github.com/hugoabonizio/knowledge-injection-methods 获取,为低资源条件下的高效知识注入研究提供支持。

原文摘要 · Abstract (English)

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.

知识注入小样本合成数据大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。