arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.25100

Deep Fusion Memory: A Chunk-Level Parametric Memory for Large Language Models

Rubin Wei, Siyuan Sun, Hao Sun, Yuliang Liu, Xiang Shi, Jiarui Wang, Junming Zhang, Zhouhan Lin

Abstract

Large language models need effective ways to acquire and use external knowledge beyond what they retain from pretraining. Continued pretraining risks catastrophic forgetting, while retrieval at inference time can add substantial overhead. External parametric memory avoids online retrieval, but constructing its training data requires extensive offline search, and output-level interpolation provides only shallow fusion. We introduce Deep Fusion Memory (DFM), a parametric memory architecture that reduces this construction workload and incorporates learned memory into intermediate hidden states. A causal memory predictor learns to generate memory from the preceding context, using retrieved chunk embeddings from the corpus as supervision. The predicted memory is shared across tokens within each chunk and fused into their hidden states through gated cross-attention. Memory prediction and fusion are trained end to end with the backbone frozen, and inference requires no explicit retrieval. Compared with existing parametric memory approaches, which often construct token-level memory targets, DFM requires 32×32\times fewer retrieval queries and 2048×2048\times fewer retrieved items to construct its training data. Across six QA tasks, DFM performs better over the strongest baseline by 12.71% on Mistral-7B-v0.3 and 11.19% on Qwen3-8B-Base. Beyond QA, domain adaptation yields average gains of 6.51 and 4.38 points over Qwen3-4B-Base and Qwen3-8B-Base, respectively. The code will be released soon.

1. Introduction

Large language models (LLMs) (Yang et al., 2025; Liu et al., 2025; Team et al., 2025; Bai et al., 2026) have advanced rapidly in language understanding, generation, and reasoning. Their growing capabilities support knowledge-intensive applications, but reliable answers require facts that can be missing, poorly retained, or outdated in pretrained parameters (Lewis et al., 2020). Knowledge injection addresses this gap by incorporating information from an external corpus. A central challenge is to incorporate this knowledge effectively while preserving existing capabilities and keeping knowledge acquisition and inference costs manageable.

Existing approaches face different trade-offs in addressing this challenge. Continued pretraining (CPT) (Gururangan et al., 2020) learns from an additional corpus through language modeling, while LoRA (Hu et al., 2021) offers a parameter-efficient way to adapt the model. These approaches keep inference self-contained, but adaptation can cause catastrophic forgetting of previously acquired capabilities (Biderman et al., 2024). Non-parametric retrieval instead provides external evidence during generation. RAG (Lewis et al., 2020) conditions on retrieved passages, and RETRO (Borgeaud et al., 2022) incorporates retrieved chunks within the decoder. These methods provide access to corpus knowledge without first learning it in model parameters, but datastore search and evidence processing can add substantial inference latency (Cao et al., 2026).

Parametric memory learns from retrieved knowledge offline, enabling inference without explicit retrieval. MLP Memory (Wei et al., 2026a) and Memory Decoder (Cao et al., 2026) learn to predict retrieval-derived next-token distributions. However, this inference advantage comes with substantial offline costs. Constructing token-level training targets requires retrieval at individual token positions across the corpus, resulting in substantial data construction costs (Wei et al., 2026b). Training memory modules on these targets further incurs significant computational cost. Moreover, these methods rely on shallow fusion through output-probability interpolation, without incorporating memory into the decoder's hidden states. Intuitively, integrating memory into intermediate hidden states allows subsequent layers to further process and combine it with the evolving context. The broader challenge is to enable language models to acquire external knowledge efficiently and use it effectively.

In this work, we introduce Deep Fusion Memory (DFM), a parametric memory architecture that combines efficient knowledge acquisition with deep fusion within the decoder (Figure 1). At a high level, DFM shares memory supervision across multiple token predictions while allowing each token to use the learned memory according to its context. We jointly train a memory predictor and a memory fusion module, using retrieved target memory to supervise the predictor and the standard language modeling objective to train both modules. In this way, external knowledge is not only stored in the predictor's parameters, but also injected into intermediate hidden states through the fusion module, allowing subsequent decoder layers to utilize the memory during generation. The LLM backbone remains frozen throughout, and memory prediction is performed at the chunk level.

Our experiments demonstrate improvements in both efficiency and downstream performance. Compared with existing parametric memory approaches that construct token-level memory targets, DFM requires 32×32\times fewer retrieval queries and 2048×2048\times fewer retrieved items to construct its training data. DFM achieves the highest average score across six QA tasks on both backbones, outperforming the strongest baseline by 12.71% on Mistral-7B-v0.3 and 11.19% on Qwen3-8B-Base. Beyond QA, adaptation across code, mathematics, and law yields average gains of 6.51 and 4.38 points over Qwen3-4B-Base and Qwen3-8B-Base, respectively. Ablations further highlight the importance of fusion placement and gate initialization, while showing comparatively small changes in average QA performance across the tested chunk sizes and numbers of memory slots.

Our contributions are summarized as follows:

• We introduce DFM, a parametric memory architecture with deep fusion, which integrates learned corpus knowledge into intermediate hidden states so that subsequent decoder layers can process memory together with the evolving context. Inference requires no explicit retrieval.

• We reduce the overhead of supervision construction and memory training through chunk-level supervision and end-to-end training with a frozen backbone. For training data construction, DFM requires 32×32\times fewer retrieval queries and 2048×2048\times fewer retrieved items than existing parametric memory approaches based on token-level targets.

• We demonstrate improved QA performance and domain adaptation. Across six QA tasks, DFM performs better over the strongest baseline by 12.71% on Mistral-7B-v0.3 and 11.19% on Qwen3-8B-Base. Across code, mathematics, and law, average gains over Qwen3-4B-Base and Qwen3-8B-Base reach 6.51 and 4.38 points, respectively.

References (38)