Test-Time Memory Construction

📄 arXiv: 2610.13348v1 📥 PDF

作者: Zijun Wang, Yifan Ji, Haidong Xin, Zhenghao Liu, Yukun Yan, Zulong Chen, Yu Gu, Ge Yu, Maosong Sun

分类: cs.CL

发布日期: 2026-10-09

🔗 代码/项目: GITHUB


💡 一句话要点

提出T$^2$Mem以解决长交互历史中的记忆构建问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 记忆构建 大型语言模型 推理过程 动态适应 元数据提取

📋 核心要点

  1. 现有的记忆系统在处理长交互历史时,无法有效适应用户查询的特定信息需求,导致性能下降。
  2. T$^2$Mem框架通过在推理过程中动态构建记忆,利用轻量级元数据捕捉关键事件和时间关联,提升了记忆的适应性。
  3. 实验结果显示,T$^2$Mem在LoCoMo和LongMemEval数据集上表现优异,超越多种强基线,且显著降低了记忆构建的开销。

📝 摘要(中文)

大型语言模型(LLMs)在处理长交互历史中的问题时面临挑战,相关证据可能分散在不同会话中。现有的记忆系统通常在用户查询之前离线构建和维护复杂的记忆表示,这导致了显著的开销,并限制了其根据查询特定信息需求调整记忆构建的能力。本文提出了T$^2$Mem,一个测试时记忆构建框架,推迟记忆构建到推理阶段,并在推理过程中逐步构建记忆。具体而言,T$^2$Mem离线提取轻量级的事件级元数据,以捕捉关键事件和时间关联作为检索线索,同时保留与原始交互的链接,以便重建跨事件的依赖关系。在测试时,LLM自适应地检索和组织元数据和原始交互,随着推理的展开逐步构建查询特定的记忆。实验结果表明,T$^2$Mem在不同的基础LLM上始终优于强基线,同时显著减少了记忆构建的开销。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在长交互历史中回答问题时,记忆构建的效率和适应性不足的问题。现有方法通常在用户查询之前离线构建复杂的记忆表示,导致高开销和灵活性不足。

核心思路:T$^2$Mem的核心思路是将记忆构建推迟到推理阶段,允许模型根据实时查询需求动态构建记忆。通过提取轻量级的事件级元数据,模型能够在推理过程中逐步组织和检索相关信息。

技术框架:T$^2$Mem的整体架构包括两个主要阶段:离线元数据提取和在线记忆构建。在离线阶段,系统提取关键事件和时间关联的元数据;在在线阶段,模型根据用户查询自适应地检索和组织这些元数据与原始交互。

关键创新:T$^2$Mem的创新在于其动态记忆构建能力,能够根据具体查询需求调整记忆内容,与传统的静态记忆系统形成鲜明对比。

关键设计:在设计中,T$^2$Mem使用轻量级的元数据结构,确保在推理时的高效检索,同时保持与原始交互的链接,以便重建依赖关系。具体的参数设置和损失函数设计尚未详细披露。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,T$^2$Mem在LoCoMo和LongMemEval数据集上表现优异, consistently outperforming strong baselines,且在不同基础LLM上均展现出显著的性能提升,减少了记忆构建的开销。

🎯 应用场景

该研究的潜在应用领域包括智能客服、对话系统和任何需要处理长时间交互历史的自然语言处理任务。通过提高记忆构建的灵活性和效率,T$^2$Mem能够显著提升用户体验和系统性能,未来可能在多种实际场景中发挥重要作用。

📄 摘要(原文)

Large Language Models (LLMs) struggle to answer questions over long interaction histories, where relevant evidence may be scattered across distant sessions. Existing memory systems typically construct and maintain sophisticated memory representations offline, before user queries are observed, incurring substantial overhead and limiting their ability to adapt memory construction to query-specific information needs. In this paper, we propose T$^2$Mem, a Test-Time Memory construction framework that defers memory construction to inference and progressively builds memory along the reasoning process. Specifically, T$^2$Mem extracts lightweight episode-level metadata offline to capture key events and temporal associations as retrieval cues, while retaining links to the original interactions to facilitate the reconstruction of dependencies across episodes. At test time, the LLM adaptively retrieves and organizes metadata and raw interactions, progressively constructing query-specific memory as reasoning unfolds. Experiments on LoCoMo and LongMemEval show the effectiveness of T$^2$Mem by consistently outperforming strong baselines across different backbone LLMs while substantially reducing the overhead of memory construction. Further analysis demonstrates that deferring memory construction to inference enables the memory construction process to dynamically adapt to the information needs of individual queries. All code is available at https://github.com/OpenBMB/T2Mem.