arXiv:2606.11680cs.AIcs.CL2026-06被引 1

构建分层记忆结构,让AI智能体高效存取长期信息

Organize then Retrieve: Hierarchical Memory Navigation for Efficient Agents

论文配图:Organize then Retrieve: Hierarchical Memory Navigation for Efficient Agents
图 1 · 摘自论文原文
  • 将经验组织成类似文件系统的分层结构,保留细节并支持快速检索
  • 在长对话任务中仅用基线22.17%的令牌数,仍保持更高任务成功率
  • 适合需要长时间推理与记忆的复杂智能体任务,如游戏导航和多步规划

大型语言模型代理因状态无记忆性,在处理长周期任务时面临挑战,需将所有相关资讯编码于不断增长的输入上下文中。这导致推理质量下降、推理成本上升及延迟增加,亟需高效的动态记忆机制。现有方法或依赖有损压缩,或基于相似性检索,难以捕捉多步任务中的时间结构与因果依赖。本文提出HORMA——一种分层组织与检索的记忆代理,将经验组织为类文件系统层级结构,摘要实体与原始轨迹相链接,实现高效访问且不丢失细节。该框架分为两阶段:结构化记忆构建与基于导航的检索。构建模块通过区分信息缺失与上下文误导/过载,迭代优化记忆结构;导航模块训练轻量级代理以强化学习方式遍历层级,选取最小但充分的上下文,降低关键路径延迟。在ALFWorld、LoCoMo和LongMemEval上,HORMA在受限上下文预算下提升任务性能,长对话任务中令牌使用量最多仅为基线的22.17%,且在效率-性能权衡上优于现有方法,并有效泛化至未见任务。

原文摘要 · Abstract (English)

Large language model (LLM) agents struggle with long-horizon tasks due to their inherent statelessness, requiring all task-relevant information to be encoded in growing input contexts. The resulting degraded reasoning quality, increased inference cost, and higher latency necessitate efficient working memory mechanisms. However, existing approaches either rely on lossy compression or similarity-based retrieval, which often fail to capture temporal structure and causal dependencies required for multi-step agentic tasks. In this work, we present HORMA, a Hierarchical Organize-and-Retrieve Memory Agent that organizes experience into a file-system-like hierarchical structure, where summarized entities are linked to the corresponding raw trajectories, enabling efficient access without losing detailed information. HORMA decomposes working memory into two stages: structured memory construction and navigation-based retrieval. The construction module iteratively refines how experiences are structured by distinguishing between failures caused by missing information and those caused by misleading or overloaded context. The navigation module retrieves task-relevant context by traversing the hierarchy using a lightweight agent trained with reinforcement learning to select minimal yet sufficient context, thereby reducing latency along the critical execution path. Across ALFWorld, LoCoMo, and LongMemEval, HORMA improves task performance under constrained context budgets while requiring at most 22.17% of the baseline token usage in long conversation tasks. Compared to existing methods, it consistently achieves better efficiency-performance trade-offs and generalizes effectively to unseen tasks.

智能体记忆机制长程推理分层结构

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