arXiv:2608.04843cs.IR2026-08

让大模型代理更省成本地记住关键信息,提升长期任务表现。

MemoryCPT: An End-to-End Agent Memory Framework for Cost-Performance Trade-off

论文配图:MemoryCPT: An End-to-End Agent Memory Framework for Cost-Performance Trade-off
图 1 · 摘自论文原文
  • 端到端训练记忆系统,先离线提炼记忆,再在线按需生成上下文。
  • 在两个数据集上,相比基线降低推理成本同时提升回答质量。
  • 适合需要长期记忆且注重推理效率的智能体开发场景。

长时序大模型代理需要从大量交互历史中提取有用证据,而不会向下游模型传递过多上下文。现有记忆流程常依赖人工设计规则和重复调用大模型,易引入冗余内容并造成高推理开销。我们提出 MemoryCPT,一种端到端可训练的代理记忆框架,涵盖离线记忆构建与在线查询感知的上下文生成。MemoryCPT 包含两阶段:查询无关提炼(QAD),通过显式推理轨迹将模块化记忆构建流程压缩为紧凑模型;查询相关检索与摘要(QAR),结合倒数排名融合(RRF)与基于 LoRA 的摘要器,后者通过成本感知奖励下的组相对策略优化(GRPO)训练。我们进一步引入单位成本质量(QPC)度量答案质量与推理成本之比。在 LoCoMo 与 LongMemEval 上的实验表明,MemoryCPT 在成本-性能权衡上优于对比基线,消融与敏感性分析揭示了各组件贡献及关键设计选择的影响。

原文摘要 · Abstract (English)

Long-horizon LLM agents require memory systems that recover useful evidence from large interaction histories without passing excessive context to downstream models. Existing memory pipelines often rely on hand-crafted heuristics and repeated LLM calls, which can introduce redundant context and high inference cost. We propose MemoryCPT, an end-to-end trainable agent memory pipeline that spans offline memory construction and online query-conditioned context generation. MemoryCPT consists of two stages: Query-agnostic Distillation (QAD), which distills a modular memory-construction pipeline into a compact model using explicit reasoning traces; and Query-aware Retrieval and Summarization (QAR), which combines reciprocal rank fusion (RRF) with a LoRA-based summarizer trained via Group Relative Policy Optimization (GRPO) under a cost-aware reward. We further introduce Quality per Cost (QPC) to quantify answer quality per unit inference cost. Experiments on LoCoMo and LongMemEval show that MemoryCPT improves the cost-performance trade-off over the evaluated baselines, while ablation and sensitivity analyses characterize the contributions of its components and the effects of key design choices.

大模型记忆系统成本优化

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