arXiv:2607.08032cs.LG2026-07被引 3

统一视角看大模型记忆压缩,揭示存留与遗忘的权衡之道

What to Keep, What to Forget: A Rate--Distortion View of Memory Compaction in LLMs and Agents

  • 提出率-失真框架,统一对齐各层记忆压缩方法
  • 发现注意力强度和时效性是普遍决策信号但存在不可逆缺陷
  • 构建跨层可迁移机制并提出首个多层联合基准设计

大语言模型及其智能体在记忆上消耗越来越多的计算与内存资源:缓存注意力键值、携带长提示、维持递归状态,以及存储过往对话与会话信息。由于这些记忆均非免费,四个相对独立的研究领域分别发展出压缩技术:对键值缓存进行淘汰或量化、剪枝或精简提示、约束架构状态、整合智能体记忆。本文认为这些本质上都是同一问题:在资源预算下,以何种保真度决定保留或丢弃上下文衍生信息,以维持下游任务效用。我们通过单一压缩目标与层级无关的下界,使该视角精确化,构建了七轴分类体系,实现跨栈方法统一归类,并实现从服务层键值管理到智能体长期记忆的机制迁移。研究发现两个共性规律:每层中决定存留的信号均为注意力幅度或时效性,且普遍存在无法回溯的错误——在查询未知时即丢弃后续所需信息;尽管单轮长上下文压缩已有充分测量,但智能体实际执行的重复压缩几乎未被评估,且缺乏同时控制所有层级资源预算的基准。基于此,我们提出新基准方案、小规模参考实验与一系列压缩感知设计原则,并绘制开放问题图谱。

原文摘要 · Abstract (English)

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.

大模型记忆压缩智能体率失真

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。