Cognitive Memory in Large Language Models

Lianlei Shan, Shixian Luo, Zezhou Zhu, Yu Yuan, Yong Wu
4/3/2025
cs.CLcs.AI

No official code found. Best implementation: LiAuto-DSR/CognitiveMem (1 star, last commit 2025-05-29).

Abstract

This paper examines memory mechanisms in Large Language Models (LLMs), emphasizing their importance for context-rich responses, reduced hallucinations, and improved efficiency. It categorizes memory into sensory, short-term, and long-term, with sensory memory corresponding to input prompts, short-term memory processing immediate context, and long-term memory implemented via external databases or structures. The text-based memory section covers acquisition (selection and summarization), management (updating, accessing, storing, and resolving conflicts), and utilization (full-text search, SQL queries, semantic search). The KV cache-based memory section discusses selection methods (regularity-based summarization, score-based approaches, special token embeddings) and compression techniques (low-rank compression, KV merging, multimodal compression), along with management strategies like offloading and shared attention mechanisms. Parameter-based memory methods (LoRA, TTT, MoE) transform memories into model parameters to enhance efficiency, while hidden-state-based memory approaches (chunk mechanisms, recurrent transformers, Mamba model) improve long-text processing by combining RNN hidden states with current methods. Overall, the paper offers a comprehensive analysis of LLM memory mechanisms, highlighting their significance and future research directions.

View on arXivView PDF

Code Implementations(1)

awesome cognitive memory in large language models

11May 22, 20251 years ago

Similar Papers

Cite this paper

@article{shan2025cognitive,
  title  = {Cognitive Memory in Large Language Models},
  author = {Lianlei Shan and Shixian Luo and Zezhou Zhu and Yu Yuan and Yong Wu},
  year   = {2025},
  eprint = {2504.02441},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.02441v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.02441.svg)](https://codeofpaper.com/paper/2504.02441)

Discussion