Persistent storage enabling AI systems to retain and retrieve information across sessions.
Long-term memory (LTM) in AI refers to any mechanism that preserves learned information, episodic traces, or model state beyond a single inference pass or short context window. Unlike working or short-term memory—which holds only what is immediately in context—LTM allows a system to accumulate knowledge over time, recall past interactions, and apply previously learned information to new situations. This concept draws from cognitive psychology but has been operationalized in machine learning through a range of architectural approaches, from the weights of a trained neural network to explicit external memory stores.
Architecturally, LTM in AI spans two broad categories: parametric memory, where knowledge is consolidated into model weights during training, and non-parametric or external memory, where information is stored in retrievable structures outside the model itself. The latter includes systems like Memory Networks, Neural Turing Machines, and Differentiable Neural Computers, which introduced learnable read/write operations over explicit memory matrices. More recently, retrieval-augmented generation (RAG) pipelines have made external LTM practical at scale by pairing large language models with vector databases that store dense embeddings of documents or past interactions, enabling dynamic, updatable knowledge grounding without retraining.
LTM is foundational to continual and lifelong learning, where models must accumulate new knowledge without catastrophically forgetting prior learning. Techniques such as experience replay, elastic weight consolidation, and progressive neural networks address this challenge by selectively preserving or protecting important memories. In reinforcement learning, experience replay buffers serve as a form of LTM, storing past transitions that are sampled during training to stabilize learning and improve data efficiency. In agent and assistant systems, LTM enables personalization by retaining user preferences, conversation history, and task context across sessions.
Key challenges in LTM design include how to index and address memories efficiently, when to write or overwrite stored information, how to handle staleness and factual inconsistency, and how to satisfy privacy requirements such as selective deletion. Trade-offs between parametric and non-parametric approaches involve capacity, retrieval latency, adaptability, and interpretability. As AI systems are increasingly deployed in long-horizon, multi-session contexts, robust LTM mechanisms have become a central engineering and research priority.