Non-Parametric Memory for Plug and Play Adaptation

This direction is split into other directions: non-parametric domain adaptation. Its last version stays readable and citable here.

Version 1 of 183 papers97 conceptsfrozen 2026-10-04

Traditional neural networks are "parametric" models: everything they know is baked directly into their weights during a slow, expensive training process. If you want a general-purpose translation model to become a legal expert, you typically have to fine-tune it on thousands of legal documents. This process is not only computationally heavy but also risks "catastrophic forgetting," where the model loses its general abilities while trying to specialize.

A growing body of research proposes a more flexible alternative: decoupling the model’s reasoning engine from its factual knowledge. By moving knowledge out of the fixed parameters and into an external, searchable "datastore," researchers have created systems that can adapt to new domains instantly—simply by swapping a library of text.

The Intuition of the External Datastore

The core idea, popularized by Urvashi Khandelwal, Mike Lewis, and their colleagues in Nearest Neighbor Machine Translation, is to treat the neural network as a sophisticated pattern matcher rather than a static encyclopedia.

In a standard model, the final layer predicts the next word based on a hidden internal state. In a $k$NN-augmented model, that same hidden state is used as a "query" to search an external database of previously seen examples. The model looks at the $k$ most similar contexts in the datastore and uses the "answers" found there to refine its own prediction.

This mechanism allows the model to "memorize" specific phrases or facts without changing a single weight. As Edouard Grave and Armand Joulin demonstrated with their unbounded cache model, this effectively gives the model a long-term memory that can scale far beyond what can be crammed into fixed parameters.

Instant Specialization via Swapping

The most powerful facet of this research is the ability to perform training-free domain adaptation. Because the knowledge is stored externally, you can change the model's expertise by simply replacing the datastore.

For example, Ankur Bapna and Orhan Firat showed in Non-Parametric Adaptation for Neural Machine Translation that a general-purpose translator can become a medical or technical expert the moment you point it at a medical or technical index. This "plug-and-play" nature is further explored in PlugLM, where Xin Cheng and colleagues replaced standard feed-forward layers with differentiable retrieval modules, allowing the model to update its facts in real-time.

This approach solves three major problems:

  1. Staleness: You can update the model's knowledge by adding new documents to the index without retraining.
  2. Efficiency: It bypasses the need for expensive gradient updates on specialized datasets.
  3. Flexibility: A single base model can serve dozens of different specialized tasks simultaneously just by switching the retrieval target.

Generalizing Beyond Text

While the roots of this idea are in machine translation, the "retrieval-as-memory" paradigm has spread across AI. In image captioning, Rita Ramos and Desmond Elliott developed SMALLCAP, which uses retrieved captions to prompt a frozen language model, enabling it to describe specialized visual domains like medical imaging without retraining.

The concept even extends to complex decision-making. RAG-Driver applies this to autonomous driving, retrieving expert demonstrations to help a multi-modal model explain its actions in unfamiliar environments. Similarly, Bowen Cao and Deng Cai pushed this to the limit with CoG-2, arguing that for many tasks, "retrieval is accurate generation"—it is often better to find the exact right phrase in a corpus than to try to hallucinate it from scratch.

By treating neural weights as a "reasoning engine" and external data as a "knowledge library," this research direction moves us toward AI systems that are more modular, more attributable, and significantly easier to adapt to the ever-changing demands of the real world.

Papers in this version

Showing 60 of 83 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_non_parametric_memory_for_plug_and_play__0db35fe9,
  title = {Non-Parametric Memory for Plug and Play Adaptation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/non-parametric-memory-for-plug-and-play-adaptation/rdr_0db35fe97c574e09be89a282f6a2da1d},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_non_parametric_memory_for_plug_and_play__0db35fe9_v1,
  title = {Non-Parametric Memory for Plug and Play Adaptation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/non-parametric-memory-for-plug-and-play-adaptation/rdr_0db35fe97c574e09be89a282f6a2da1d/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}