Seedlabs
Source research

MemTrace: Tracing and Attributing Errors in Large Language Model Memory Systems

Xinle Deng, Ruobin Zhong, Hujin Peng, Xiaoben Lu, Yanzhe Wu, Guang Li et al. · 2026 · 8 citationsRead the paper

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 percentage points. Code has ben released at https://github.com/zjunlp/MemTrace.

What the full text shows

Working prototype
  • MemTrace improves end-task performance through a closed-loop system of attribution and prompt optimization. — up to 7.62 percentage points (Using fine-grained attribution signals to guide prompt optimization)
  • MemTrace outperforms the All-at-Once baseline in Operation Identification Accuracy (OIA). — All-at-Once achieved only 18.75% OIA vs MemTrace (Tested on GPT-5.4)
  • MemTrace improves Error Type Accuracy (ETA) for smaller LLMs compared to search-based exploration (MemTrace-OBS). — ETA increased from 20.00% to 36.46% (Using GPT-4.1 mini)
  • System-related errors are the primary cause of memory failures in the benchmark. — 69.57% of errors (Across MemTraceBench datasets)
  • Hybrid retrieval (dense and sparse) is the most effective for initializing graph exploration. — Highest Recall@8 (Using golden answers to retrieve source evidence)
Setup
Evaluated using GPT-4.1 mini and GPT-5.4 backbones on the MemTraceBench dataset.
How
The authors developed MemTrace, which converts memory pipelines into executable memory evolution graphs and uses an agent to iteratively explore operation subgraphs to pinpoint root causes. They also created MemTraceBench, a benchmark covering Long-Context, RAG, Mem0, and EverMemOS systems.
Limitations
Diagnoses are assistive and may be imperfect, requiring human review before deployment. · Potential for sensitive user information in execution traces when applied to real-world systems. · Retrieval errors are influenced by a limited retrieval budget (top-10 memory units).

Summarized by Gemma 4 from the open-access full text · 15 Nov 2026. Read it