NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Parametric Retrieval Augmented Generation

Weihang Su, Yichen Tang, Qingyao Ai, Junxi Yan, Changyue Wang, Hongning Wang, Ziyi Ye, Yujia Zhou, Yiqun Liu · DOI

Abstract

Retrieval-augmented generation (RAG) techniques have emerged as a promising solution to enhance the reliability of large language models (LLMs) by addressing issues like hallucinations, outdated knowledge, and domain adaptation. In particular, existing RAG methods append relevant documents retrieved from external corpus or databases to the input of LLMs to guide their generation process, which we refer to as the in-context knowledge injection method. While this approach is simple and often effective, it has inherent limitations. Firstly, increasing the context length and number of relevant documents can lead to higher computational overhead and degraded performance, especially in complex reasoning tasks. More importantly, in-context knowledge injection operates primarily at the input level, but LLMs store their internal knowledge in their parameters. This gap fundamentally limits the capacity of in-context methods. To this end, we introduce Parametric retrieval-augmented generation (Parametric RAG), a new RAG paradigm that integrates external knowledge directly into the parameters of feed-forward networks (FFN) of an LLM through document parameterization. This approach not only saves online computational costs by eliminating the need to inject multiple documents into the LLMs' input context, but also deepens the integration of external knowledge into the parametric knowledge space of the LLM. Experimental results demonstrate that Parametric RAG substantially enhances both the effectiveness and efficiency of knowledge augmentation in LLMs. Also, it can be combined with in-context RAG methods to achieve even better performance.

Introduction

Traditional Retrieval-Augmented Generation (RAG) has become a standard technique for grounding Large Language Models (LLMs) in external, up-to-date information. By retrieving relevant documents and prepending them to the user's query, RAG mitigates hallucinations and allows models to access domain-specific knowledge without extensive retraining. However, this "in-context knowledge injection" approach faces significant scalability and architectural challenges.

First, the computational overhead grows with the number of retrieved documents, as longer contexts increase KV cache size and latency. Second, LLMs often suffer from "reasoning degradation" when faced with long, noisy context windows, struggling to extract precise answers from a "haystack" of information. Finally, there is a fundamental "parametric gap": while LLMs are known to store factual knowledge within their feed-forward network (FFN) weights, standard RAG forces the model to process this knowledge through the attention mechanism at the input level. This paper introduces Parametric RAG (P-RAG), which bridges this gap by injecting external knowledge directly into the model's parameters on the fly.

Methodology: Retrieve-Update-Generate (RUG)

The core of Parametric RAG is the Retrieve-Update-Generate (RUG) workflow, which shifts the burden of knowledge integration from the prompt to the model's weights.

Comparison between Standard RAG (top) and Parametric RAG (bottom) workflows.

The process begins with an offline Document Parameterization phase. To ensure the model can effectively internalize facts, each document in the corpus undergoes "Document Augmentation," where it is rewritten into various styles and used to generate synthetic Question-Answer (QA) pairs. These augmented data points are then used to train a document-specific Low-Rank Adaptation (LoRA) module. This transforms a static text document into a lightweight set of weight updates ($\Delta\theta$) targeting the FFN layers.

During online inference, when a user submits a query, the system retrieves the top-$k$ relevant documents. Instead of appending their text to the prompt, P-RAG fetches the corresponding pre-trained LoRA weights. These weights are merged into a single update ($\Delta\theta_{merge}$) and plugged directly into the LLM's FFN layers. The "updated" model then generates a response based solely on the original question, effectively "remembering" the retrieved information as if it were part of its own internal knowledge.

Experimental Evaluation

The researchers evaluated P-RAG across several challenging benchmarks, including 2WikiMultihopQA, HotpotQA, PopQA, and ComplexWebQuestions (CWQ). These datasets test both multi-hop reasoning and factual recall. The experiments utilized LLaMA (1B and 8B) and Qwen (1.5B) architectures.

Performance comparison of Parametric RAG against standard and dynamic RAG baselines across multiple benchmarks.

As shown in the results table, P-RAG consistently outperforms standard RAG and advanced dynamic methods like FLARE and DRAGIN, particularly in complex reasoning tasks. Notably, the performance gap between P-RAG and baselines tends to widen as the base model size increases, suggesting that larger models are more adept at utilizing internalized parametric knowledge. Furthermore, the "Combine Both" approach—which uses both parametric injection and a limited amount of in-context text—achieved the highest overall scores, demonstrating that these two paradigms are complementary.

Key Insights and Discussion

Several critical insights emerged from this work. First, targeting the FFN layers with LoRA is highly effective because FFNs naturally function as key-value memories for facts within the transformer architecture. Second, data augmentation is non-negotiable; training on raw text alone does not allow the model to recall facts as effectively as training on QA pairs derived from that text.

Finally, P-RAG offers significant efficiency gains. By eliminating long document tokens from the prompt, the method achieved a 29% to 36% reduction in inference latency on LLaMA-3-8B compared to standard RAG. This makes it particularly suitable for real-time applications where low latency is paramount.

Limitations and Future Work

Parametric RAG represents a significant shift in how external knowledge is integrated into LLMs. By moving from prompts to parameters, it addresses the computational and reasoning bottlenecks of traditional RAG. However, some challenges remain. The current implementation requires significant offline storage (approximately 4.7MB per document) and computation for document-specific LoRAs. Additionally, parametric representations are currently model-specific. Future work will focus on reducing storage overhead, perhaps by targeting only "head" documents, and developing model-agnostic parametric representations that can be reused across different LLM architectures.

Summary updated

BibTeX
@inproceedings{su2025parametric,
  author = {Weihang Su and Yichen Tang and Qingyao Ai and Junxi Yan and Changyue Wang and Hongning Wang and Ziyi Ye and Yujia Zhou and Yiqun Liu},
  title = {{Parametric Retrieval Augmented Generation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2025},
  doi = {10.1145/3726302.3729957},
}
Figure