给大模型长程任务记忆加智能筛选,只留有用信息
Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents
- 用分层树结构管理记忆,动态评分决定保留哪些
- 比线性记忆准确率高9.97个百分点,节省32.8%上下文开销
- 适合需要长期规划的AI代理,尤其防错信息干扰
大型语言模型(LLM)代理在多步骤任务中表现出色,但执行历史过长会增加推理成本,并引入过时、无关或误导性信息,影响推理质量。现有记忆方法虽能组织或压缩历史,却缺乏决定保留哪些记忆的机制。本文提出加权记忆树(Weighted Memory Tree, WMT),将执行过程分为主任务、子任务和动作三级,并为每条记忆分配动态保留分数。通过事件驱动更新与选择性衰减机制调整分数,使WMT能保留有用信息、折叠已完成轨迹、抑制低效内容,并维持对折叠上下文的访问。在GAIA-Text数据集上,使用Qwen3-8B、Gemma 4E4B和Llama-3.1-8B进行评估,结果表明:相比线性记忆,WMT平均提升准确率9.97个百分点,减少32.8%的提示词使用量;内存污染实验显示其有效限制不可靠信息的持续传播。结果表明,长程代理记忆的有效性不在于存储更多,而在于精准判断何者应保留。
原文摘要 · Abstract (English)
Large language model (LLM) agents have demonstrated the ability to solve multi-step tasks requiring planning, tool use, and external information access, yet growing execution histories increase inference cost and expose reasoning to outdated, irrelevant, or misleading information, potentially degrading reasoning quality. Existing memory approaches organize or compress execution histories but provide limited mechanisms for deciding which memories remain active. We introduce the, a hierarchical memory system that organizes execution into tasks, subtasks, and actions while assigning each memory a dynamic retention score. Event-based updates and selection-based decay revise these scores, allowing WMT to preserve useful information, fold completed trajectories, suppress low-utility content, and retain access to folded context. We evaluate WMT on GAIA-Text using Qwen3-8B, Gemma 4 E4B, and Llama-3.1-8B, with ablations and memory-poisoning experiments. Relative to linear memory, WMT improves accuracy by an average of 9.97 percentage points while reducing prompt-token usage by 32.8%. Memory-poisoning experiments show that WMT limits the persistence and propagation of unreliable information. Our results suggest that effective long-horizon agent memory depends less on storing more information than on deciding which information should remain active.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。