What to Keep, What to Forget: A Rate--Distortion View of Memory Compaction in LLMs and Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Large language models, and the agents built on them, spend an ever-growing share of their compute and memory on remembering: caching attention keys and values, carrying long prompts, maintaining recurrent state, and storing what happened in previous turns and sessions. Because none of this memory is free, four largely separate research communities have each learned to compact it. They evict or quantize the KV cache, prune or distill prompts, bound architectural state, and consolidate agent memory. We argue that these are instances of one problem: a rate--distortion decision about what context-derived information to retain versus discard, at what fidelity, under a resource budget, so as to preserve downstream task utility. We make this lens precise with a single compaction objective and a layer-agnostic lower bound, use it to build a seven-axis taxonomy that classifies methods from across the stack uniformly, and use it to transfer mechanisms between layers that have never been connected, from serving-stack KV management to agent long-term memory. Two patterns hold across the survey. At every layer the signal that decides what to keep is attention magnitude or recency, and it fails in the same way everywhere, by discarding, before the query is known and with no way to undo it, information the query later needs. And while compression is measured carefully on single-turn long context, the repeated compaction that agents actually perform is almost never measured, and no benchmark holds one budget axis across all the layers at once. We turn both observations into a benchmark proposal, a small reference experiment, and a set of compaction-aware design principles, and we map the open problems.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 97 of its 144 references that are in the map. First posted on arXiv 9 Jul 2026.
Builds on
97 of 144 references.
Closest ancestors · 9
Same direction, newest first
- 2026Memory for Autonomous LLM Agents:Mechanisms, Evaluation, and Emerging Frontiers8 Mar
- 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks14 Oct
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agents1 Oct
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
- 2025MIRIX: Multi-Agent Memory System for LLM-Based Agents10 Jul
- 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents18 Jun
- 2025A-MEM: Agentic Memory for LLM Agents17 Feb
- 2025Zep: A Temporal Knowledge Graph Architecture for Agent Memory20 Jan
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agents27 Feb
Other references · 88
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,411
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
- 2022Token Merging: Your ViT But Fastercited by 995
38 more
- 2022Mass-Editing Memory in a Transformercited by 976
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 814
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2024An Image is Worth 1/2 Tokens After Layer 2: Plug-and-Play Inference Acceleration for Large Vision-Language Modelscited by 629
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 604
- 2024KVQuant: Towards 10 Million Context Length LLM Inference with KV Cache Quantizationcited by 571
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2023MovieChat: From Dense Token to Sparse Memory for Long Video Understandingcited by 536
- 2024RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrievalcited by 519
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 487
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 483
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 466
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
- 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 402
- 2024LLaVA-PruMerge: Adaptive Token Reduction for Efficient Large Multimodal Modelscited by 394
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 391
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 390
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 360
- 2023Adapting Language Models to Compress Contextscited by 350
- 2024Titans: Learning to Memorize at Test Timecited by 303
- 2024HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Modelscited by 273
- 2023Atom: Low-bit Quantization for Efficient and Accurate LLM Servingcited by 255
- 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 253
- 2024InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV Cache Managementcited by 242
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
- 2024CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusioncited by 211
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 211
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 199
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2024Mooncake: A KVCache-centric Disaggregated Architecture for LLM Servingcited by 193
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
50 most cited of 88 All 88 (JSON)
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026CrystalMem: Elastic Memory for Self-Evolving LLM Agents via Knowledge Crystallizationcited by 2
- 2026Handover of In-Context Learning State Across Session Boundariescited by 0
- 2026What Does Context Compression Cost an Agent? Interaction Costs Unrevealed by Task-Completion Metricscited by 0
- 2026Dude, Where's My State? Execution Information Requirements for Stateful Agentscited by 0
- 2026Dude, Where's My State? Execution Information Requirements for Stateful Agents26 Sep 2026
- 2026What Does Context Compression Cost an Agent? Interaction Costs Unrevealed by Task-Completion Metrics17 Aug 2026
- 2026Handover of In-Context Learning State Across Session Boundaries14 Aug 2026
- 2026CrystalMem: Elastic Memory for Self-Evolving LLM Agents via Knowledge Crystallization31 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2025How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior
- 2026Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents
- 2025Rethinking Memory in LLM based Agents: Representations, Operations, and Emerging Topics
- 2026Compiled Memory: Not More Information, but More Precise Instructions for Language Agents
- 2026Measure Before You Manage: Evaluating Agent Working Memory in Coding Agents
- 2026Memory in the Loop: In-Process Retrieval as Extended Working Memory for Language Agents
- 2025Beyond Heuristics: A Decision-Theoretic Framework for Agent Memory Management
- 2026The Epistemics of Agent Memory: Measuring, and Governing, the Consolidation Decision in Long-Horizon LLM Agents