Memorilla: Latent Semantic Memory for LLMs
Not on the map. Why?
Abstract (arXiv)
Memory enables large language models (LLMs) to use information beyond their parameters, such as past user conversations, long documents, or an agent's earlier actions. For a frozen LLM, access to this accumulated knowledge is limited to what a memory system places in its context window. However, gathering and combining relevant information needed for each query while keeping the model's context short remains challenging for existing systems. Here we introduce Memorilla, a memory system that gathers information from an entire document collection into a fixed number of query-dependent 'memory tokens' for a frozen LLM. Memorilla encodes documents (such as user chats, book chapters) once into reusable embeddings, then learns to retrieve and place query-specific information in the LLM's input embedding space. Using only 16 memory tokens, Memorilla achieves the best performance against baselines including Mem0 and MemoRAG on five of eight benchmarks spanning personalization, long-document and knowledge-intensive question answering. Notably, on FactKG, it reaches 84.33% accuracy versus 80.43% with full-context inference, while using 108x fewer tokens to represent the source documents. Furthermore, Memorilla can facilitate continual learning in agentic systems where the document count (the agent's past turns) increases throughout the trajectory. In a TextWorld environment, we show that Memorilla reduces the agent's tendency to wander between rooms it has already explored, and improves its average success rate from 18.6% with full-history in-context learning to 24.2%. Overall, Memorilla aids frozen LLMs in accumulating and using knowledge effectively across long-context interactions and takes a step towards building continually learning AI systems.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 56 of its 59 references that are in the map. Submitted 15 Oct 2026.
Builds on
56 of 59 references.
References · 56
- 2017Proximal Policy Optimization Algorithmscited by 16,162
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 15,591
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 10,549
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,845
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,367
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,133
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,765
- 2016Gaussian Error Linear Units (GELUs)cited by 3,745
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 3,109
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,180
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,667
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,655
38 more
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,622
- 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,358
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,319
- 2025A-MEM: Agentic Memory for LLM Agentscited by 1,253
- 2021Perceiver: General Perception with Iterative Attentioncited by 1,170
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 949
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 915
- 2023In-Context Retrieval-Augmented Language Modelscited by 717
- 2018CoQA: A Conversational Question Answering Challengecited by 699
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 630
- 2017The NarrativeQA Reading Comprehension Challengecited by 614
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 554
- 2023LaMP: When Large Language Models Meet Personalizationcited by 492
- 2023Learning to Compress Prompts with Gist Tokenscited by 426
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 397
- 2023Adapting Language Models to Compress Contextscited by 390
- 2024Titans: Learning to Memorize at Test Timecited by 383
- 2025Memory in the Age of AI Agentscited by 340
- 2018TextWorld: A Learning Environment for Text-based Gamescited by 331
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 227
- 2023Augmenting Language Models with Long-Term Memorycited by 204
- 2021DialogSum: A Real-Life Scenario Dialogue Summarization Datasetcited by 187
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 154
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 137
- 2024MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentationcited by 134
- 2025From Human Memory to AI Memory: A Survey on Memory Mechanisms in the Era of LLMscited by 133
- 2024Long Context Compression with Activation Beaconcited by 122
- 2024MEMORYLLM: Towards Self-Updatable Large Language Modelscited by 111
- 2025PersonaMem-v2: Towards Personalized Intelligence via Learning Implicit User Personas and Agentic Memorycited by 106
- 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 102
- 2024User-LLM: Efficient LLM Contextualization with User Embeddingscited by 84
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 72
- 2025M+: Extending MemoryLLM with Scalable Long-Term Memorycited by 64
- 2023FactKG: Fact Verification via Reasoning on Knowledge Graphscited by 60
- 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 51
- 2023Faithful Persona-based Conversational Dataset Generation with Large Language Modelscited by 49
- 2024Context Embeddings for Efficient Answer Generation in RAGcited by 30
- 2025PISCO: Pretty Simple Compression for Retrieval-Augmented Generationcited by 23
50 most cited of 56 All 56 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Memori: A Persistent Memory Layer for Efficient, Context-Aware LLM Agents
- 2026TA-Mem: Tool-Augmented Autonomous Memory Retrieval for LLM in Long-Term Conversational QA
- 2026Evaluating Memory Structure in LLM Agents
- 2026MemCode: Discrete Semantic Representations for Long-Term Agent Memory
- 2026MemRefine: LLM-Guided Compression for Long-Term Agent Memory
- 2026MemFit: Efficient Long-Term Agentic Memory
- 2026Beyond Dialogue Time: Temporal Semantic Memory for Personalized LLM Agents
- 2026LycheeMemory V2: Efficient Long-Term Memory for LLM Agents via Semantic Segment-Level Consolidation