重叠记忆单元在共享工具或实体时提升检索效果,否则反而有害。
When Does Overlap Help? OSU-Mem and a Cell-Conditional Analysis of Trajectory Memory for LLM Agents
- 将轨迹分组为可重叠的语义单元,通过预算控制的层级扩展检索
- 共享工具或实体的查询中,重叠记忆比扁平或不重叠方式提升检索质量
- 基于元数据的轻量级判断机制,可预测何时重叠更有效
长周期大语言模型智能体积累的交互轨迹迅速超出实际提示预算。现有记忆方法要么过度截断导致丢失非局部证据,要么保留冗余信息降低决策质量。本文不追求通用更好的记忆系统,而是提出关键问题:当检索证据步骤共享工具调用或实体时,将轨迹记忆组织成重叠的语义单元(OSUs)是否有助于提升检索?我们构建了OSU-Mem,通过预算约束的粗到细扩展从重叠的OSU池中检索。结果表明,重叠记忆仅在证据步骤共享工具或实体时有效;若步骤完全异质,则反而损害性能。在具有结构化共享的合成基准上,OSU-Mem表现优于最强基线;但在拼接的τ-bench设置中,整体优势消失。按查询是否共享工具和实体拆分后发现,这种近似平局实为不同查询类型混合所致。进一步设计的ToolBench实验验证了该机制——在有结构化共享的设计下,重叠构造优于不重叠。由于相关共享可通过元数据低成本估算,分析得出了基于元数据的启发式判断方法,用于预测重叠是否有益。研究聚焦检索层,以检索质量与大模型辅助的证据选择阶段为评估标准。
原文摘要 · Abstract (English)
Long-horizon large language model (LLM) agents accumulate interaction trajectories that quickly exceed any practical prompt budget, and existing memory methods either truncate aggressively and lose non-local evidence or retain boilerplate that degrades decision quality. We ask a mechanism question rather than claiming a better general-purpose memory system: when does organizing trajectory memory into overlapping semantic units (OSUs) -- groups of related steps in which one step may belong to several units -- help retrieval over flat or disjoint alternatives? We instantiate this in OSU-Mem, which retrieves from an overlapping OSU pool via budgeted coarse-to-fine expansion, and show its benefit is conditional: overlapping memory helps when the evidence steps a query needs share tool calls or entities, but hurts when those steps are fully heterogeneous and share neither. On a synthetic benchmark where evidence carries such shared structure by construction, OSU-Mem improves over the strongest baseline as the theory predicts; yet on a concatenated, constructed unaugmented $τ$-bench setting its aggregate advantage over flat retrieval vanishes. Splitting queries by whether their evidence shares tools and entities shows this near-tie to be an artifact of mixing query types rather than a property of either method, and ToolBench, a controlled probe built to carry shared structure by design, corroborates the same mechanism via an overlap-vs.-disjoint construction contrast (under a coverage-guided variant), isolating the construction principle rather than validating the full default system. Because the relevant sharing is cheaply estimable from metadata, the analysis yields a metadata-based heuristic for predicting when overlap is likely to improve retrieval. We deliberately isolate the retrieval layer, assessed by retrieval quality and an LLM-mediated evidence-selection stage.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。