根据预算动态选择记忆保留或压缩策略,提升语言代理的准确性。
Retain or Consolidate? Budget-Dependent Operator Selection for Language Agent Memory

- 基于预算压力动态选择保留或压缩记忆,判断何时用合并、摘要或重写。
- 紧预算下压缩可提准确率48%,宽松预算时保留更优,跨数据集验证一致。
- 提出轻量级模型OAS,通过预生成特征估算决策收益,适合高成本场景使用。
语言代理依赖交互中的记忆,但大语言模型(LLMs)有限的上下文窗口和推理成本限制了单次可用记忆量。现有系统主要采用记忆保留与记忆压缩两种策略:保留保持原始记录,细节完整但可能超预算;压缩合并信息,提升每令牌覆盖率,但可能丢失关键细节。两者无绝对优劣。本文提出核心问题:何时应以压缩替代保留?应选哪种操作(合并、摘要、重写)?通过分解每种操作的覆盖效应与替换效应,揭示其平衡随预算变化而改变。提出轻量级学习器OAS,基于预生成特征估算动作效用,并通过保留伤害校准。在LongMemEval与LoCoMo基准上均发现相同预算依赖模式:紧预算下压缩提升准确率最高达48%,宽松预算时保留更佳;短证据场景下洛科莫复制该交叉现象。跨笔记摘要与合并优于局部重写。
原文摘要 · Abstract (English)
Language agents depend on memory across interactions. However, the limited context windows of large language models (LLMs) and their inference costs constrain how much memory can be used at once. Existing systems mainly follow two strategies: memory retention and memory consolidation. Retention keeps raw records and preserves exact details, but relevant evidence may not fit under a tight budget; consolidation compresses and combines records, improving coverage per token but risking the loss of query-critical details. Neither strategy is universally preferable. This raises two central questions: when should consolidation replace retention, and which operator -- Merge, Abstract, or Rewrite -- should be selected? We formalize this decision by decomposing each operator's utility into a coverage effect on evidence omitted by retention and a signed replacement effect on raw evidence that already fits. Their balance explains why the preferred action changes with relative budget pressure. We implement this mechanism with Offline Abstraction-Safety (OAS), a lightweight learner that estimates action utilities from pre-generation features with held-out harm calibration. The public LongMemEval and LoCoMo benchmarks show the same budget-dependent pattern. On LongMemEval, consolidation improves absolute accuracy by up to 48% under tight budgets, whereas retention is preferable under loose budgets; LoCoMo replicates this crossover at a smaller budget, consistent with its shorter evidence. On both datasets, cross-note abstraction and merging generally outperform local rewriting when compression is necessary.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。