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.