MemTrace: 大規模言語モデルのメモリシステムにおけるエラーの追跡と帰属
MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systems
May 27, 2026
著者: Xinle Deng, Ruobin Zhong, Hujin Peng, Xiaoben Lu, Yanzhe Wu, Guang Li, Buqiang Xu, Yunzhi Yao, Jizhan Fang, Haoliang Cao, Junjie Guo, Yuan Yuan, Ziqing Ma, Yuanqiang Yu, Rui Hu, Baohua Dong, Hangcheng Zhu, Ningyu Zhang
cs.AI
要旨
メモリは、大規模言語モデルが長期的な推論を可能にするために不可欠であるが、既存のメモリシステムは信頼性が低く、デバッグが困難なままである。メモリの動的な進化を追跡することは、情報が時間の経過とともにどのように統合され、伝播され、または破損されるかを理解するために極めて重要である。本研究では、LLMメモリシステムにおけるエラーの追跡と帰属という新しい問題を研究する。我々は、メモリパイプラインを実行可能なメモリ進化グラフに変換し、操作上の情報フローの細粒度な追跡を可能にする新しいフレームワークを提案する。次に、Long-Context、RAG、Mem0、EverMemOSなどの代表的なメモリシステムから収集したベンチマークであるMemTraceBenchを構築し、メモリの障害モードを体系的に研究する。さらに、操作サブグラフを反復的に追跡して任意の失敗ケースの根本原因を特定する自動帰属手法を導入する。我々の分析により、メモリ障害は体系的であり、情報損失や検索の不一致などの操作レベルの問題に起因することが明らかになった。重要なことに、我々はこれらの細粒度の帰属シグナルを活用して下流のプロンプト最適化を導き、障害を自動的に修正し、最終タスクのパフォーマンスを最大7.62%向上させる閉ループシステムを確立する。コードは https://github.com/zjunlp/MemTrace で公開される予定である。
English
Memory is essential for enabling large language models to support long-horizon reasoning, yet existing memory systems remain unreliable and difficult to debug. Tracing memory's dynamic evolution is crucial to understand how information is synthesized, propagated, or corrupted over time. In this work, we study the new problem of error tracing and attribution in LLM memory systems. We propose a novel framework that transforms memory pipelines into executable memory evolution graphs, enabling fine-grained tracing of operational information flow. We then construct MemTraceBench, a benchmark collected from representative memory systems such as Long-Context, RAG, Mem0, and EverMemOS, to systematically study memory failure modes. We further introduce an automatic attribution method that iteratively traces operation subgraphs to pinpoint the root cause of any failed case. Our analysis reveals that memory failures are systematic, stemming from operation-level issues like information loss and retrieval misalignment. Crucially, we leverage these fine-grained attribution signals to guide downstream prompt optimization, establishing a closed-loop system that automatically corrects faults and boosts end-task performance by up to 7.62%. Code will be released at https://github.com/zjunlp/MemTrace.