ChatPaper.aiChatPaper

Zero-Mem:LLM智能體的零令牌記憶操作

Zero-Mem: Zero-Token Memory Operations for LLM Agents

July 31, 2026
作者: Yilin Xiao, Zhehan Zhu, Yujing Zhang, Jin Chen, Zijin Hong, Luyao Zhuang, Qinggang Zhang, Shengyuan Chen, Xiaocao Ouyang, Lingfei Ren, Xiao Huang
cs.AI

摘要

LLM 代理需要在長時間互動中保持一致的行為,因此需要記憶,然而許多系統使用額外的 LLM 調用來操作該記憶。產生中間記錄並調解其檢索會增加重複的 token 和時間成本,而省略或合併的細節可能掩蓋原始證據。我們探討結構化記憶存取是否根本需要生成。Zero-Mem 引入了零 token 記憶操作:在最終問題回答之外的任何步驟都不會調用 LLM,也不會消耗 LLM 輸入或輸出 token;編碼器計算則另行處理。Zero-Mem 保留原始互動軌跡作為其記錄來源,並以兩種互補的方式組織這些軌跡。實體-上下文圖揭示跨互動的連結,而時間層次結構保留對話局部性和會話狀態。對於每個查詢,Zero-Mem 權衡這兩種視圖,從兩者中檢索,並遵循其結構以恢復支持性關係或周圍上下文。確定性校準首先丟棄衝突證據,然後使閱讀器的答案奠基於檢索到的軌跡。只有最終問答閱讀器會調用 LLM。在長記憶和長上下文問答基準上,Zero-Mem 在消除記憶操作的 LLM 調用和 LLM token 消耗的同時,達到了具有競爭力的效能。在使用相同的最終問答閱讀器和上下文預算下,相對於最快的比較基準,它將記憶操作的時間成本降低了 57.6%。消融實驗支持這兩種視圖及其查詢相關協調的貢獻。總體而言,結果表明結構化代理記憶不需要生成過去的中間表示。同行評審後,程式碼和實作細節將在 blue{https://github.com/TheMoon0815/Zero-mem} 提供。
English
LLM agents need memory to act consistently over long interactions, yet many systems use additional LLM calls to operate that memory. Generating intermediate records and mediating their retrieval adds recurring token and time costs, while omitted or merged details can obscure the original evidence. We ask whether structured memory access requires generation at all. Zero-Mem introduces zero-token memory operations: no step outside final question answering invokes an LLM or consumes LLM input or output tokens; encoder computation is accounted for separately. Zero-Mem preserves original interaction traces as its source of record. It organizes the traces in two complementary ways. An entity--context graph exposes connections across interactions, while a temporal hierarchy preserves conversational locality and session state. For each query, Zero-Mem weighs the two views, retrieves from both, and follows their structure to recover supporting relations or surrounding context. Deterministic calibration first discards conflicting evidence and then keeps the reader's answer grounded in the retrieved traces. Only the final-QA reader invokes an LLM. Across long-memory and long-context question-answering benchmarks, Zero-Mem achieves competitive performance while eliminating LLM calls and LLM-token consumption from memory operations. With the same final-QA reader and context budget, it reduces memory-operation time cost by 57.6\% relative to the fastest compared baseline. Ablations support the contribution of the two views and their query-dependent coordination. Overall, the results show that structured agent memory need not generate an intermediate representation of the past. After peer review, the code and implementation details will be available at blue{https://github.com/TheMoon0815/Zero-mem}.