Knowledge Augmentation: In-context or In-parameter?

Weihang Su, Yichen Tang, Qingyao Ai, Jiayin Wang, Zhijing Wu, Yiqun LiuOpenReview 2025 · Submission to ICLR 2025 · Rejected

Abstract

Large Language Models (LLMs) have achieved remarkable performance in various natural language processing tasks by leveraging relevant external knowledge provided by the users or retrieved from external sources. Traditionally, this external information is incorporated by appending it directly to the model’s input context, a paradigm known as in-context knowledge injection. However, this paradigm faces significant limitations due to the finite input context length of LLMs and often results in shallow integration between the external knowledge and the model’s internal representations. To address the limitations of in-context knowledge injection, we propose a new knowledge injection paradigm called in-parameter knowledge injection, which temporarily embeds the external knowledge relevant to the user’s input directly into the model’s parameters rather than its input context. This new paradigm overcomes the context length limitations of LLMs and enables deeper integration of external information within the model’s internal representations. Through extensive experiments across tasks of varying complexity, we demonstrate that in-parameter knowledge injection achieves significant benefits for complex tasks requiring intricate reasoning. In contrast, in-context injection remains effective for simpler tasks where answers can be directly extracted from the provided information. We have open-sourced all the code, data, and models in the following anonymous GitHub link: https://anonymous.4open.science/r/In-parameter-Knowledge-Injection/
BibTeX
@misc{su2025knowledge,
  author = {Weihang Su and Yichen Tang and Qingyao Ai and Jiayin Wang and Zhijing Wu and Yiqun LIU},
  title = {{Knowledge Augmentation: In-context or In-parameter?}},
  year = {2025},
  url = {https://openreview.net/forum?id=sl4hOq9wm9},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2025},
}
Figure