Modular Memory is the Key to Continual Learning Agents

Vaggelis Dorovatas, Malte Schwerin, Andrew D. Bagdanov, Lucas Caccia, Antonio Carta, Laurent Charlin, Barbara Hammer, Tyler L. Hayes, Timm Hess, Christopher Kanan, Dhireesha Kudithipudi, Xialei Liu, Vincenzo Lomonaco, Jorge Mendez-Mendez, Darshan Patil, Ameya Prabhu, Elisa Ricci, Tinne Tuytelaars, Gido M. van de Ven, Liyuan Wang, Joost van de Weijer, Kyungsu Kim, Martin Mundt, Rahaf Aljundi · DOI

Abstract: Foundation models have transformed machine learning through large-scale pretraining and increased test-time compute. Despite surpassing human performance in several domains, these models remain fundamentally limited in continuous operation, experience accumulation, and personalization, capabilities that are central to adaptive intelligence. While continual learning research has long targeted these goals, its historical focus on in-weight learning (IWL), i.e., updating a single model's parameters to absorb new knowledge, has rendered catastrophic forgetting a persistent challenge. Our position is that combining the strengths of In-Weight Learning (IWL) and the newly emerged capabilities of In-Context Learning (ICL) through the design of modular memory is the missing piece for continual adaptation at scale. We outline a conceptual framework for modular memory-centric architectures that leverage ICL for rapid adaptation and knowledge accumulation, and IWL for stable updates to model capabilities, charting a practical roadmap toward continually learning agents.

Introduction

Traditional machine learning follows a rigid "train-then-deploy" pipeline. Once a model is deployed, its knowledge is usually frozen, preventing it from learning from new experiences or adapting to specific users. Continual Learning (CL) aims to break this cycle by allowing models to learn from a continuous stream of data. However, CL faces a massive hurdle: catastrophic forgetting, where learning new information causes the model to abruptly lose previously acquired skills.

While modern Large Language Models (LLMs) can "learn" new tasks via In-Context Learning (ICL)—using the prompt as a temporary workspace—this knowledge is transient and becomes computationally expensive as the context grows. Conversely, fine-tuning the model's weights (In-Weight Learning, or IWL) is slow, unstable, and prone to forgetting. This paper argues that the missing piece is a structured, modular memory system that bridges these two worlds.

The Modular Memory Framework

Rather than a monolithic model, we propose a system with three distinct components designed to mimic the complementary learning systems found in the human brain:

  1. The Core Model: A pretrained foundation model that provides general reasoning and perception. It is updated infrequently and stably to preserve core capabilities.
  2. Working Memory: A transient, limited-capacity buffer that holds the current environmental state and relevant snippets retrieved from long-term storage to condition the Core Model’s outputs via ICL.
  3. Long-Term Memory (LTM): A persistent repository of facts, events, and personalized experiences.
The proposed modular memory architecture, illustrating the flow between memory components and the external world.

As illustrated in the architecture above, the system operates in two distinct regimes:

  • External Regime (Interaction): The agent interacts with the world. It retrieves relevant experiences from LTM into Working Memory to adapt its behavior on the fly without changing its weights.
  • Internal Regime (Consolidation): Similar to human sleep, the agent reprocesses and "distills" information from its LTM into the Core Model’s weights. This allows for stable, long-term knowledge integration and "graceful forgetting" of redundant data.

Comparing Memory Representations

A critical aspect of this framework is selecting the right representation for different memory modules. The paper provides a qualitative assessment of how different memory types handle storage, retrieval, and generalization.

Qualitative comparison of different memory types and their properties.

Based on these trade-offs, a hybrid approach is most promising: using slot-based memories (like raw data or embeddings) for the LTM to allow for rapid updates and easy selective forgetting, while using neural weights for the Core Model to leverage their superior generalization capabilities.

Key Insights and Ideas

  • Complementary Learning Systems: The framework draws a direct parallel to the human brain, where the hippocampus handles fast, episodic learning (like ICL) and the neocortex handles slow, structured knowledge (like IWL).
  • Memory as a Managed Resource: Memory shouldn't just be an infinite buffer. We argue for explicit eviction and compression policies. Just as a computer manages its cache, an AI agent must decide what is worth keeping and what should be forgotten to remain efficient.
  • The "Internal Regime" is Key: The most novel part of the framework is the dedicated consolidation phase. By separating interaction from weight updates, the model avoids the optimization instabilities that plague traditional continual learning.
  • Grounding and Hallucination: By forcing the model to reference specific modules in its LTM, the architecture provides a "certificate of understanding," potentially reducing hallucinations and making the AI's reasoning more explainable.

Limitations and Future Work

Several open challenges remain for the research community:

  • Control Policies: How does the agent decide when a memory is important enough to move from working memory to long-term memory, or from long-term memory into the core weights?
  • Credit Assignment: In long-term interactions, it is difficult to determine which specific past experience led to a current success or failure.
  • Privacy and Ethics: Developing robust "unlearning" mechanisms to remove sensitive user data from both the LTM and the Core Model's weights is a critical, unsolved problem.
  • Scaling: Managing petabytes of experience for an agent that lives for years remains a significant computational and architectural challenge.

Summary updated

BibTeX
@misc{dorovatas2026modular,
  author = {Vaggelis Dorovatas and Malte Schwerin and Andrew D. Bagdanov and Lucas Caccia and Antonio Carta and Laurent Charlin and Barbara Hammer and Tyler L. Hayes and Timm Hess and Christopher Kanan and Dhireesha Kudithipudi and Xialei Liu and Vincenzo Lomonaco and Jorge Mendez-Mendez and Darshan Patil and Ameya Prabhu and Elisa Ricci and Tinne Tuytelaars and Gido M. van de Ven and Liyuan Wang and Joost van de Weijer and Kyungsu Kim and Martin Mundt and Rahaf Aljundi},
  title = {{Modular Memory is the Key to Continual Learning Agents}},
  year = {2026},
  eprint = {2603.01761},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.01761},
}
Figure