From Lookups to Lessons: Turning Retrieved Knowledge into Parametric Memory

from-lookups-to-lessons:-turning-retrieved-knowledge-into-parametric-memory

From Lookups to Lessons: Turning Retrieved Knowledge into Parametric Memory

[Submitted on 30 Oct 2026]

View PDF HTML (experimental)

Abstract:Retrieval-augmented generation (RAG) helps large language models (LLMs) answer factual questions beyond their training data, but it adds storage and inference costs. Distilling previously retrieved information into parametric memories enables reuse without online retrieval. However, training the memory to mimic a retriever rewards accurate independent predictions, which do not necessarily improve the final output quality when combined with the LLM’s existing predictions. To address this, we introduce ResMem, in which the LLM reads retrieved text offline to generate teacher targets. This design avoids storing massive token representations, unlike existing parametric memory approaches such as MLP Memory, which relies on k-nearest neighbor (kNN) datastores. Furthermore, by using the LLM as an offline teacher that reads privileged retrieved evidence alongside the input, we train a parametric memory to learn an additive logit residual. This residual aligns the predictions of a student sharing the same backbone with the teacher distribution, while self-distillation updates remain confined to the parametric memory. On a Wikipedia subset, ResMem reduces the storage retained for teacher construction by 94.7% compared with the evaluated kNN pipeline. Across five question answering datasets, ResMem raises mean token F1 from 32.83% for the frozen LLM to 34.48%. It also breaks 21% fewer of the LLM’s correct answers than a kNN-trained memory. These findings validate our motivation of treating retrieval as a learning resource, with parametric memory shaped by how retrieved knowledge is used to inform the model’s future predictions. Code and model weights are available at this https URL and this https URL.

Submission history

From: Changjiang Han [view email]
[v1] Fri, 30 Oct 2026 23:05:50 UTC (299 KB)