让大模型学会讲故事:从对话痕迹中构建连贯的叙事记忆
TraceMem: Weaving Narrative Memory Schemata from User Conversational Traces
- 用三阶段框架将对话分段、提炼成有主题的记忆片段
- 在LoCoMo基准上超越现有方法,多跳推理提升12.3%
- 适合需要长期理解用户意图的智能客服与个性化助手
维持长期交互仍是大语言模型的瓶颈,因其有限上下文难以管理随时间演化的对话历史。现有记忆系统常将互动视为孤立片段,无法捕捉对话流的深层叙事一致性。我们提出TraceMem,一种受认知启发的框架,通过三阶段流程从用户对话痕迹中编织结构化叙事记忆图式:(1) 短期记忆处理,采用归纳式话题分割识别事件边界并提取语义表征;(2) 突触记忆巩固,将事件摘要为情景记忆,并融合语义形成用户专属轨迹;(3) 系统记忆巩固,利用两阶段层级聚类将这些轨迹组织为具有统一主题的时间演化叙事线。这些线被封装为结构化用户记忆卡,形成叙事记忆图式。为支持记忆使用,我们提供代理式搜索机制以增强推理能力。在LoCoMo基准上的评估显示,TraceMem达到最先进水平,其脑启发架构显著优于基线,在多跳与时间推理任务中分别提升12.3%与9.7%,证明其在深层叙事理解中的关键作用。此外,我们对记忆系统展开开放讨论,提出领域展望。代码已开源。
原文摘要 · Abstract (English)
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
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。