Table of Contents
Fetching ...

TraceMem: Weaving Narrative Memory Schemata from User Conversational Traces

Yiming Shu, Pei Liu, Tiange Zhang, Ruiyang Gao, Jun Ma, Chen Sun

TL;DR

TraceMem presents a cognitively grounded, three-stage pipeline that transforms fragmented dialogue histories into coherent narrative memory schemata through short-term segmentation, synaptic stabilization, and systems-level clustering. An agentic search component enables source-attributed reasoning by aligning episodic traces with narrative threads stored in memory cards. Empirical evaluation on LoCoMo demonstrates state-of-the-art performance, particularly in multi-hop and temporal reasoning, across multiple backbones. The work highlights the importance of structured, evolving persona memories for robust long-term conversational intelligence and discusses future directions on memory dynamics and control. Code is publicly available at the project repository, enabling reproducibility and broader adoption.

Abstract

Sustaining long-term interactions remains a bottleneck for Large Language Models (LLMs), as their limited context windows struggle to manage dialogue histories that extend over time. Existing memory systems often treat interactions as disjointed snippets, failing to capture the underlying narrative coherence of the dialogue stream. We propose TraceMem, a cognitively-inspired framework that weaves structured, narrative memory schemata from user conversational traces through a three-stage pipeline: (1) Short-term Memory Processing, which employs a deductive topic segmentation approach to demarcate episode boundaries and extract semantic representation; (2) Synaptic Memory Consolidation, a process that summarizes episodes into episodic memories before distilling them alongside semantics into user-specific traces; and (3) Systems Memory Consolidation, which utilizes two-stage hierarchical clustering to organize these traces into coherent, time-evolving narrative threads under unifying themes. These threads are encapsulated into structured user memory cards, forming narrative memory schemata. For memory utilization, we provide an agentic search mechanism to enhance reasoning process. Evaluation on the LoCoMo benchmark shows that TraceMem achieves state-of-the-art performance with a brain-inspired architecture. Analysis shows that by constructing coherent narratives, it surpasses baselines in multi-hop and temporal reasoning, underscoring its essential role in deep narrative comprehension. Additionally, we provide an open discussion on memory systems, offering our perspectives and future outlook on the field. Our code implementation is available at: https://github.com/YimingShu-teay/TraceMem

TraceMem: Weaving Narrative Memory Schemata from User Conversational Traces

TL;DR

TraceMem presents a cognitively grounded, three-stage pipeline that transforms fragmented dialogue histories into coherent narrative memory schemata through short-term segmentation, synaptic stabilization, and systems-level clustering. An agentic search component enables source-attributed reasoning by aligning episodic traces with narrative threads stored in memory cards. Empirical evaluation on LoCoMo demonstrates state-of-the-art performance, particularly in multi-hop and temporal reasoning, across multiple backbones. The work highlights the importance of structured, evolving persona memories for robust long-term conversational intelligence and discusses future directions on memory dynamics and control. Code is publicly available at the project repository, enabling reproducibility and broader adoption.

Abstract

Sustaining long-term interactions remains a bottleneck for Large Language Models (LLMs), as their limited context windows struggle to manage dialogue histories that extend over time. Existing memory systems often treat interactions as disjointed snippets, failing to capture the underlying narrative coherence of the dialogue stream. We propose TraceMem, a cognitively-inspired framework that weaves structured, narrative memory schemata from user conversational traces through a three-stage pipeline: (1) Short-term Memory Processing, which employs a deductive topic segmentation approach to demarcate episode boundaries and extract semantic representation; (2) Synaptic Memory Consolidation, a process that summarizes episodes into episodic memories before distilling them alongside semantics into user-specific traces; and (3) Systems Memory Consolidation, which utilizes two-stage hierarchical clustering to organize these traces into coherent, time-evolving narrative threads under unifying themes. These threads are encapsulated into structured user memory cards, forming narrative memory schemata. For memory utilization, we provide an agentic search mechanism to enhance reasoning process. Evaluation on the LoCoMo benchmark shows that TraceMem achieves state-of-the-art performance with a brain-inspired architecture. Analysis shows that by constructing coherent narratives, it surpasses baselines in multi-hop and temporal reasoning, underscoring its essential role in deep narrative comprehension. Additionally, we provide an open discussion on memory systems, offering our perspectives and future outlook on the field. Our code implementation is available at: https://github.com/YimingShu-teay/TraceMem
Paper Structure (24 sections, 5 equations, 14 figures, 4 tables)

This paper contains 24 sections, 5 equations, 14 figures, 4 tables.

Figures (14)

  • Figure 1: "Remembering" of Tracemem paradigm mimics the human cognitive process of memory recall. When queried about an individual, humans evoke a coherent personal impression while simultaneously tracing back to the specific episodes from which that knowledge was acquired.
  • Figure 2: TraceMem Memory Construction Pipeline. TraceMem transforms raw dialogues into long-term patterns through three progressive stages. Initially, short-term memory processing partitions interaction sessions into episodes and extracts semantic representations through structured XML-based prompting. Subsequently, synaptic memory consolidation facilitates the refinement of information, distilling specific user traces from these episodic segments via a process of summarization and experience distillation. Finally, systems memory consolidation orchestrates the long-term organization through a two-stage clustering mechanism, ultimately encapsulating them into persistent, structured user memory cards.
  • Figure 3: Examples of topics in a user memory card.
  • Figure 4: Agentic Search. The system retrieves top-$k$ episodic memories (blue line) while searching the user card to identify and directly fetch relevant thread traces via their IDs (purple line). This retrieved information is then integrated into the reasoning engine to generate historically consistent responses (red line).
  • Figure 5: An example of clustering result of GPT-4o-mini backbone.
  • ...and 9 more figures