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

arXiv:2605.28732 · 2026-05-28 공개 · arXiv · PDF

llm long-context rag prompt-optimization memory-systems memory-benchmarks error-tracing mem0

Abstract

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.

한국어 요약

📋 한 줄 요약

**[LLM Memory / Error Attribution]** MemTrace가 memory pipeline을 executable memory evolution graph로 변환·error attribution 가능 — MemTraceBench로 Long-Context·RAG·Mem0·EverMemOS 실패 모드 분석, attribution 기반 prompt 최적화로 end-task 7.62% 향상.

🎯 핵심 기여도

💡 핵심 아이디어

LLM memory system의 unreliable behavior는 operation 수준의 information loss·retrieval misalignment로부터 systematic하게 발생하며, memory pipeline을 evolution graph로 표현·operation subgraph attribution으로 root cause를 자동 추적하면 fine-grained 신호로 prompt를 최적화해 end-task 성능까지 closed-loop으로 향상시킬 수 있다.

🔬 기술적 접근법

📊 주요 결과

💭 의의 및 한계

**의의**: LLM memory의 debug·attribution이라는 새 문제 정식화, 4 대표 memory system 통합 벤치마크 제공, automatic attribution으로 end-task까지 closed-loop 향상의 실용성. **한계**: Memory evolution graph 표현의 매우 복잡한 시스템 확장성, attribution이 operation-level signal에 의존, 7.62% 향상이 task·system 의존적일 가능성.

🚀 실용적 활용