Research
Deep Fusion Memory: A Chunk-Level Parametric Memory for Large Language Models
Overview Research area: Natural Language Processing — knowledge injection and parametric memory for large language models (LLMs), with evaluation on knowledge-intensive question answering and domain a

- arXiv
- 2610.25100
- Published
- 2026-10-18
- Authors
- Rubin Wei, Siyuan Sun, Hao Sun, Yuliang Liu, Xiang Shi, Jiarui Wang, Junming Zhang, Zhouhan Lin
AI summary
Overview
Research area: Natural Language Processing — knowledge injection and parametric memory for large language models (LLMs), with evaluation on knowledge-intensive question answering and domain adaptation.
Technical level: Advanced. The paper assumes familiarity with transformer decoder internals (hidden states, cross-attention, residual streams, gating), retrieval-augmented generation, continued pretraining, and LoRA-style adaptation.
Scope (one sentence): The paper proposes Deep Fusion Memory (DFM), a chunk-level parametric memory that predicts compact memory vectors from preceding context and fuses them into intermediate decoder hidden states through gated cross-attention, avoiding both backbone retraining and inference-time retrieval.
What This Paper Is About
LLMs often lack facts that are missing, poorly retained, or outdated in their pretrained parameters, and the existing fixes each carry a cost: continued pretraining risks catastrophic forgetting, retrieval at inference adds latency, and prior parametric memory methods require extremely expensive token-level retrieval to build their training targets while only fusing memory at the output-probability level. DFM's goal is to acquire external corpus knowledge cheaply (by sharing one memory target across all tokens in a 32-token chunk) and to use it deeply (by injecting predicted memory into the decoder's hidden states so later layers can process it alongside the evolving context). The backbone stays frozen, and inference requires no datastore search.
Key Contributions
- A deep-fusion parametric memory architecture. DFM integrates learned corpus knowledge into intermediate hidden states via gated cross-attention in selected decoder layers, rather than interpolating output probabilities, so subsequent decoder layers can combine memory with the evolving context. No explicit retrieval is needed at inference.
- Cheaper supervision construction and training. Chunk-level supervision plus end-to-end training with a frozen backbone reduces the training-data construction workload by 32× in retrieval queries and 2048× in retrieved items relative to token-level parametric memory approaches.
- Empirical gains on QA. Across six QA tasks, DFM beats the strongest baseline by 12.71% on Mistral-7B-v0.3 and 11.19% on Qwen3-8B-Base.
- Evidence beyond QA. Domain 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.
Main Findings
- Best average QA scores on both backbones without online retrieval. On Mistral-7B-v0.3, DFM raises the six-task mean from xRAG's 24.14 to 27.21 (a 12.71% relative gain, 3.07 absolute). On Qwen3-8B-Base, it improves over MLP Memory's 23.80 to 26.46 (11.19% relative, 2.66 absolute). Relative to Base, DFM gains 13.59 and 3.75 points, improving all six tasks on Mistral and five on Qwen3.
- Strong single-hop results on Mistral. NQ reaches 33.57 and WebQA 42.47, improving over Base by 13.27 and 13.19 points and exceeding the strongest baseline on each task by 6.18 and 2.26 points.
- Not uniformly better across backbones. On Qwen3-8B-Base, WebQA decreases from 41.78 to 39.47 while MLP Memory reaches 43.26, showing memory adaptation is not uniformly beneficial even with frozen original weights.
- Clear multi-hop gains. On Mistral, Bamboogle rises from 3.91 to 22.65 and 2Wiki from 5.87 to 25.00, though RAG remains stronger on 2Wiki at 31.02. On Qwen3, DFM leads on 2Wiki, MuSiQue, and Bamboogle, including a 7.55-point gain over Base on 2Wiki, but HotpotQA (26.46) trails xRAG (27.74).
- Domain adaptation improves all four benchmarks on both Qwen3 sizes. Averages reach 64.69 on Qwen3-4B-Base and 67.52 on Qwen3-8B-Base. LawBench rises from 29.96 to 40.41 (4B) and 38.45 to 46.61 (8B), beating RAG by 16.06 and 19.72 points; on 4B, DFM still trails CPT by 1.25 points on LawBench.
- Large resource savings. DFM adds 0.75B parameters versus the 1.5B Mistral MLP Memory configuration (about 50% fewer). Training time drops from approximately 64 to 24 hours on 16 A800 GPUs (about 62.5% reduction). For a 4B-token corpus, retrieval queries fall from 4B to 125M (96.88% reduction) and retrieved items from 4.096T to 2B (99.95% reduction).
- Robust to chunk size and slot count. Chunk sizes 16/32/64 give 26.51/27.21/27.07; memory slots K = 2/4/8/16 give 26.88/27.04/27.09/27.21, so even Top-2 is within 0.33 points of Top-16.
- Fusion placement matters. Two to eight fusion layers starting at layer 9 score 27.09–27.54, versus 21.11 for final-layer-only fusion and 22.07 for the final four layers [28, 29, 30, 31]; a configuration of [2, 10, 21, 31] scores 26.32.
- Gating helps, and its initialization matters. Removing the gate lowers the mean from 27.21 to 26.83. A gate bias of 0 gives the highest mean in the sweep (27.90), but the authors keep b_g = −2 as a conservative default because σ(−2) ≈ 0.119 initially scales down the memory branch.
Methodology in Plain English
Building supervision cheaply. Training text is cut into non-overlapping chunks of C tokens (32 in the main setting). For each chunk after the first, an offline retriever takes the previous chunk and fetches its top-K neighboring chunks from a corpus datastore (Top-16). Each neighbor is represented by a fixed dense embedding from a frozen text encoder (Qwen3-Embedding-0.6B, 1,024-dimensional, L2-normalized). Stacked in retrieval-rank order, these form the target memory — one target for the whole chunk, instead of one per token. It is computed offline and stays fixed during training.
Predicting memory. A causal Transformer memory predictor mean-pools token embeddings of preceding chunks and, through K separate linear output heads, produces K predicted memory vectors for the upcoming chunk, aligned with retrieval rank. The first chunk uses a masked placeholder and is excluded from memory supervision.
Fusing memory into the model. A shared projector (LayerNorm, two linear layers, GELU) maps predicted memory into the decoder's hidden width. In selected decoder layers, each token's normalized state queries this memory via multi-head cross-attention, with a sigmoid gate per token and per head controlling how much each head contributes. The memory output is added to the same residual update as causal self-attention, and the result flows through the original feed-forward sublayer. Other layers are untouched.
Training. The predictor and fusion modules are trained end to end while the backbone, retrieval encoder, and targets stay frozen. The loss is standard next-token cross-entropy plus a mean-squared-error term (weight β = 1) between predicted and target memory, averaged over slots and chunks. Gradients from the language-modeling loss flow back through fusion into the predictor; the MSE term supervises the memory slots directly.
Inference. Chunk queries come from the backbone's input embeddings, memory is predicted on the fly, and no datastore, retrieved text, or external encoder is needed. For QA, memory is computed from the visible prompt and held fixed during answer generation.
Why This Matters
Impact on research. The paper reframes the cost/benefit trade-off in parametric memory: prior work (MLP Memory, Memory Decoder) bought retrieval-free inference with enormous token-level target construction, while DFM shows chunk-level supervision plus hidden-state fusion can be both cheaper and stronger. It also provides a controlled comparison of fusion depth and placement, which is relevant to anyone building memory-augmented decoders.
Real-world applications:
- Enterprise or domain assistants that must answer from proprietary corpora (legal, medical, internal documentation) without shipping a retrieval stack into the serving path.
- Latency-sensitive deployment where per-query datastore search is unacceptable but up-to-date or specialized knowledge is required.
- Code and math assistants that benefit from domain adaptation — the paper reports HumanEval rising from 69.36 to 73.02 on Qwen3-8B-Base and GSM8K from 85.60 to 86.43.
- Legal document processing, where LawBench improves by 10.45 points on Qwen3-4B-Base and 8.16 on Qwen3-8B-Base over Base.
Industry relevance. Keeping the backbone frozen means the base model can be reused, swapped, or versioned while memory modules are trained separately (0.75B added parameters on QA backbones, 0.6B on Qwen3-4B-Base). The reported ~62.5% training-time reduction and 96.88%/99.95% retrieval-workload reductions directly affect the cost of building such systems at corpus scale.
Future Directions
- Closing the remaining gaps to explicit retrieval. RAG still wins on Mistral 2Wiki (31.02 vs 25.00) and xRAG on Qwen3 HotpotQA (27.74 vs 26.46), and DFM trails CPT on LawBench for Qwen3-4B-Base by 1.25 points — understanding when predicted memory is insufficient is unresolved.
- Making memory refreshable at inference. The reported implementation fixes predicted memory during generation, does not refresh queries for generated chunks, and does not use incremental predictor caching; whether refreshing memory as the answer grows would help is an open question.
- Choosing gate initialization in practice. The bias sweep shows b_g = 0 scoring highest (27.90) while the authors retain −2 for conservative perturbation, leaving the principled selection of this hyperparameter unsettled.
- Extending to other backbones and scales. Only a partially reported OLMo-3-1025-7B result appears (mean 17.99 → 25.49, with WebQA and HotpotQA decreasing by 1.28 and 0.63); broader validation, plus the promised code release, remains future work.
Target Audience
Researchers and advanced engineers working on LLM knowledge injection, retrieval-augmented models, and memory architectures — particularly those who care about inference latency and target-construction cost. It is also useful for practitioners doing domain adaptation who want an alternative to continued pretraining or LoRA, though it is not beginner-friendly: readers should already understand decoder layer structure, cross-attention, and gating before the methodology sections will be accessible.
Authors’ 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\times$ fewer retrieval queries and $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.