TeleMem:面向智能体 AI 构建长期与多模态记忆
Abstract
Large language models (LLMs) achieve strong performance on many NLP tasks but remain limited in long-term interactive settings due to finite context windows and degraded recall over extended histories. Retrieval-augmented generation (RAG) alleviates this bottleneck, yet conventional pipelines treat memories as independent fragments and lack principled mechanisms for consolidation, update, and causal organization, leading to fragmented context and unstable long-horizon reasoning. We propose TeleMem, a unified long-term and multimodal memory system that organizes memory as structured and evolvable semantic trajectories. TeleMem maintains coherent and hallucination-resistant user profiles by extracting only dialogue-grounded narrative units, and amortizes write costs through a structured writing pipeline that batches summaries, retrieves related memories, clusters semantically aligned entries, and performs LLM-based consolidation before persistent storage.
大语言模型(LLM)在许多自然语言处理任务上表现出色,但在长期交互场景中仍受限于有限的上下文窗口以及对长历史记录的回忆能力下降。 检索增强生成(RAG)缓解了这一瓶颈,但传统流程将记忆视为彼此独立的片段,缺少用于巩固、更新和因果组织的系统机制,因而会产生碎片化上下文和不稳定的长程推理。 我们提出 TeleMem,这是一种统一的长期与多模态记忆系统,将记忆组织成结构化且可演化的语义轨迹。 TeleMem 只提取有对话依据的叙事单元,从而维护连贯且抗幻觉的用户画像;同时,它通过结构化写入流程分批处理摘要、检索相关记忆、聚类语义一致的条目,并在持久化存储前执行基于 LLM 的巩固,以摊销写入成本。
At the retrieval level, memories are organized into a threaded directed acyclic graph (DAG), enabling dependency-aware closure-based retrieval that reconstructs coherent causal context for long-horizon reasoning. In addition, TeleMem integrates a multimodal memory module with a ReAct-style reasoning framework to support closed-loop observe--think--act reasoning over complex video content. Extensive experiments demonstrate that TeleMem outperforms the state-of-the-art Mem0 baseline by 19% in accuracy on the ZH-4O benchmark, while reducing token usage by 43% and achieving a
在检索层面,记忆被组织成线程式有向无环图(DAG),从而实现依赖感知的闭包式检索,为长程推理重建连贯的因果上下文。 此外,TeleMem 将多模态记忆模块与 ReAct 风格的推理框架相结合,以支持对复杂视频内容进行观察—思考—行动的闭环推理。 大量实验表明,在 ZH-4O 基准上,TeleMem 的准确率比最先进的 Mem0 基线高 19%,同时将 token 使用量减少 43%,并取得
1. Introduction
Large language models (LLMs) have demonstrated remarkable performance across a wide range of natural language processing tasks. However, their effectiveness in long-term interactive settings remains fundamentally constrained by the finite context window of Transformer architectures. Even though recent long-context models can process hundreds of thousands of tokens, simply enlarging the context window does not resolve the core challenge. As interaction histories grow, models struggle to allocate attention to distant yet critical information, leading to degraded recall of user-specific facts and unstable long-horizon reasoning. These limitations hinder the deployment of LLM-based agents in scenarios that require persistent personalization, continuous learning, and traceable decision making.
大语言模型(LLM)已在广泛的自然语言处理任务中展现出卓越性能。 然而,它们在长期交互场景中的有效性从根本上受到 Transformer 架构有限上下文窗口的约束。 尽管近期的长上下文模型可以处理数十万个 token,但仅仅扩大上下文窗口并不能解决核心挑战。 随着交互历史增长,模型难以将注意力分配给遥远但关键的信息,导致对用户特定事实的回忆能力下降以及长程推理不稳定。 这些局限阻碍了基于 LLM 的智能体在需要持久个性化、持续学习和可追溯决策的场景中部署。
Beyond capacity, a more fundamental issue lies in how long-term information is represented and organized. Effective memory must preserve not only semantic similarity, but also temporal order, causal dependency, and state evolution across interactions. Without such structure, retrieved contexts easily become fragmented, omit critical prerequisites, and induce inconsistent reasoning.
除容量之外,更根本的问题在于如何表示和组织长期信息。 有效的记忆不仅必须保留语义相似性,还必须保留交互中的时间顺序、因果依赖和状态演化。 缺少这种结构时,检索到的上下文很容易变得碎片化、遗漏关键前提,并引发不一致的推理。
Retrieval-augmented generation (RAG) has emerged as a practical solution to extend effective memory beyond the native context window by encoding past interactions into vector embeddings and retrieving relevant entries via semantic search. While effective at scaling storage capacity, conventional RAG systems treat memories as independent and unordered fragments. Such designs lack principled mechanisms for updating, consolidating, or deleting previously written memories, making it difficult to accommodate evolving user states, resolve contradictions, or preserve causal consistency over long horizons.
检索增强生成(RAG)通过将过去的交互编码为向量嵌入并借助语义搜索检索相关条目,已经成为一种将有效记忆扩展到原生上下文窗口之外的实用方案。 传统 RAG 系统虽然可以有效扩展存储容量,却把记忆视为独立且无序的片段。 这类设计缺少用于更新、巩固或删除既有记忆的系统机制,因而难以适应不断演化的用户状态、解决矛盾,或在长时间跨度上保持因果一致性。
Recent work has therefore explored more structured and adaptive memory architectures that extend RAG with mechanisms for abstraction, forgetting, and dynamic updates. MemoryBank introduces a decay mechanism inspired by the Ebbinghaus forgetting curve to prioritize salient information. Mem0 enables meaning-aware memory operations by allowing an LLM to extract atomic facts and decide whether to add, update, delete, or ignore them in a streaming manner. Rsum applies hierarchical summarization to separate short-term details from long-term abstractions, while Zep organizes dialogue history as a temporal knowledge graph to capture causal dependencies. Although these systems significantly advance long-term memory management, several practical challenges remain.
因此,近期工作探索了更具结构性和适应性的记忆架构,通过抽象、遗忘和动态更新机制扩展 RAG。 MemoryBank 引入受艾宾浩斯遗忘曲线启发的衰减机制,以优先保留显著信息。 Mem0 允许 LLM 提取原子事实,并以流式方式决定添加、更新、删除还是忽略这些事实,从而实现语义感知的记忆操作。 Rsum 使用分层摘要将短期细节与长期抽象分离,而 Zep 则把对话历史组织为时序知识图,以捕获因果依赖。 尽管这些系统显著推进了长期记忆管理,仍有若干实际挑战尚未解决。
First, maintaining a consistent and reliable user profile remains difficult. Many systems rely on large predefined schemas, while real conversations provide sparse and noisy signals. This mismatch often induces hallucinated attributes, incomplete fields, and unnecessary structural complexity. Second, write efficiency remains low. Most pipelines invoke retrieval and LLM-based decision making at every dialogue turn, resulting in frequent datastore writes, excessive API calls, and degraded throughput and latency. Third, multimodal reasoning capabilities are still limited. Existing memory systems are predominantly text-centric and struggle to integrate or reason over visual, auditory, and temporal information, restricting their applicability in realistic embodied or multimedia environments.
第一, 维护一致且可靠的用户画像仍然很困难。 许多系统依赖庞大的预定义模式,而真实对话只提供稀疏且含噪的信号。 这种不匹配常常会引发虚构属性、字段不完整以及不必要的结构复杂度。 第二, 写入效率仍然很低。 大多数流程在每轮对话中都会调用检索和基于 LLM 的决策,导致数据存储频繁写入、API 调用过多,并降低吞吐量、增大延迟。 第三, 多模态推理能力仍然有限。 现有记忆系统主要以文本为中心,难以整合视觉、听觉和时序信息或对其进行推理,限制了它们在真实具身环境或多媒体环境中的适用性。
To address these challenges, we propose TeleMem, a unified long-term and multimodal memory system. TeleMem organizes memory as structured and evolvable semantic trajectories rather than isolated fragments, enabling dependency-aware reasoning and consistent context restoration. It extracts dialogue-supported narrative units to avoid schema-driven hallucinations and maintain compact, reliable user profiles. At the storage level, TeleMem employs a structured writing pipeline that batches summaries, retrieves related memories, clusters semantically aligned entries, and performs LLM-based consolidation before committing them to persistent storage. This design amortizes write costs by reducing per-turn LLM invocations, de-duplicates fragmented information, and substantially improves throughput and token efficiency. At the retrieval level, memories are organized into a threaded directed acyclic graph (DAG), enabling closure-based retrieval that reconstructs coherent causal context for long-horizon reasoning. In addition, TeleMem incorporates a multimodal memory module that converts raw video streams into event and object memories, and integrates a ReAct-style reasoning framework to support closed-loop observe--think--act reasoning over complex visual content.
为应对这些挑战,我们提出 TeleMem,这是一种统一的长期与多模态记忆系统。 TeleMem 将记忆组织成结构化且可演化的语义轨迹,而不是孤立片段,从而实现依赖感知的推理和一致的上下文恢复。 它提取有对话支持的叙事单元,以避免模式驱动的幻觉,并维护紧凑、可靠的用户画像。 在存储层面,TeleMem 采用结构化写入流程:分批处理摘要、检索相关记忆、聚类语义一致的条目,并在提交到持久化存储之前执行基于 LLM 的巩固。 该设计通过减少每轮交互中的 LLM 调用来摊销写入成本,消除碎片化信息中的重复内容,并显著提升吞吐量和 token 效率。 在检索层面,记忆被组织成线程式有向无环图(DAG),从而通过闭包式检索为长程推理重建连贯的因果上下文。 此外,TeleMem 还包含一个多模态记忆模块,将原始视频流转换为事件记忆和对象记忆,并集成 ReAct 风格的推理框架,以支持对复杂视觉内容进行观察—思考—行动的闭环推理。
In summary, our main contributions are:
总之,我们的主要贡献如下:
1. We introduce TeleMem, a unified long-term and multimodal memory framework that maintains coherent and hallucination-resistant user profiles through narrative-driven memory extraction and structured organization. 2. We propose a structured memory graph with threaded dependencies and closure-based retrieval, enabling dependency-aware context reconstruction and stable long-horizon reasoning. 3. We design an efficient memory writing pipeline that performs batched retrieval, semantic clustering, and LLM-based consolidation, substantially reducing storage redundancy, token overhead, and end-to-end latency. 4. We develop a multimodal memory module with ReAct-style reasoning, enabling end-to-end observe--think--act capabilities for complex video understanding. 5. Extensive experiments demonstrate that TeleMem outperforms the state-of-the-art Mem0 baseline by 19% in accuracy on the ZH-4O benchmark, while reducing token usage by 43% and achieving a
1. 我们提出 TeleMem,这是一种统一的长期与多模态记忆框架,通过叙事驱动的记忆提取和结构化组织来维护连贯且抗幻觉的用户画像。 2. 我们提出具有线程式依赖和闭包式检索的结构化记忆图,实现依赖感知的上下文重建和稳定的长程推理。 3. 我们设计了一套高效的记忆写入流程,执行批量检索、语义聚类和基于 LLM 的巩固,显著减少存储冗余、token 开销和端到端延迟。 4. 我们开发了具有 ReAct 风格推理的多模态记忆模块,使系统具备面向复杂视频理解的端到端观察—思考—行动能力。 5. 大量实验表明,在 ZH-4O 基准上,TeleMem 的准确率比最先进的 Mem0 基线高 19%,同时将 token 使用量减少 43%,并取得
2. TeleMem System
Overview. Long-horizon agents require memory that preserves not only semantic similarity but also the continuity of experience, including temporal order, causal dependency, and state evolution. Conventional retrieval-augmented generation (RAG) systems store memories as independent vector chunks, which often leads to fragmented context, missing prerequisites, and unstable reasoning when interactions span long time horizons. To support stable accumulation and continuous learning, memory must be threaded into coherent trajectories rather than retrieved as isolated fragments.
概述。 长程智能体所需的记忆不仅要保留语义相似性,还要保持体验的连续性,包括时间顺序、因果依赖和状态演化。 传统检索增强生成(RAG)系统将记忆存储为独立的向量块;当交互跨越很长时间时,这往往会导致上下文碎片化、缺失前提以及推理不稳定。 为支持稳定积累和持续学习,记忆必须被串联成连贯轨迹,而不是以孤立片段的形式进行检索。
We address this requirement by organizing long-term memory as a directed acyclic graph (DAG), where memory states are connected through explicit structural relations to form traceable memory threads (Section 2.1), upgrading memory from an unordered collection of embeddings to a structured and evolvable substrate that supports causal reasoning and context restoration. The overall architecture tightly couples three functional components: (1) a representation layer that converts raw textual and multimodal interactions into semantic memory states and performs consolidation and updates (Section 2.2); (2) a graph layer that incrementally organizes these states into a persistent memory graph; and (3) a memory reading mechanism that performs dependency-aware closure-based retrieval to reconstruct coherent causal context for downstream reasoning (Section 2.3). This unified design supports scalable memory growth while preserving structural consistency and low-latency access in practice (Figure 1).
我们通过把长期记忆组织为有向无环图(DAG)来满足这一需求;在该图中,记忆状态通过显式结构关系相连,形成可追溯的记忆线程(第 2.1 节),将记忆从无序嵌入集合升级为支持因果推理和上下文恢复的结构化、可演化基础。 整体架构紧密耦合三个功能组件:(1)表示层,将原始文本与多模态交互转换为语义记忆状态,并执行巩固和更新(第 2.2 节);(2)图层,将这些状态增量组织为持久记忆图;(3)记忆读取机制,执行依赖感知的闭包式检索,为下游推理重建连贯的因果上下文(第 2.3 节)。 这种统一设计支持记忆的可扩展增长,同时在实践中保持结构一致性和低延迟访问(图1)。

2.1 Memory Graph Formulation
We formalize long-term memory as a directed acyclic graph (DAG)
我们将长期记忆形式化为有向无环图(DAG)
where
其中,
which guarantees acyclic evolution. To avoid isolated memory fragments and ensure global connectivity, we introduce a virtual root node
这保证了无环演化。 为了避免孤立的记忆片段并确保全局连通性,我们引入虚拟根节点
2.1.1 The Node: A Unified Semantic Container
Each node represents a stabilized semantic memory state produced by the representation layer and serves as a unified container for long-term knowledge.
每个节点表示由表示层生成的稳定语义记忆状态,并充当长期知识的统一容器。
Semantic categories. Nodes may encode heterogeneous semantic states, including: (1) profile states, summarizing stable user and bot attributes; (2) event states, capturing dynamic interaction-level semantics from textual dialogue or video clips; and (3) entity and object states, representing persistent multimodal entities and their temporal evolution.
语义类别。 节点可以编码异构语义状态,包括:(1)画像状态,概括稳定的用户和机器人属性;(2)事件状态,捕获文本对话或视频片段中的动态交互级语义;(3)实体和对象状态,表示持久的多模态实体及其时间演化。
Node content. Each node stores three components: (i) a consolidated semantic content representation
节点内容。 每个节点存储三个组件:(i)巩固后的语义内容表示
2.1.2 The Edge: Threaded Causal Skeleton
Edges define how semantic states are connected and evolve over time. A directed edge
边定义语义状态如何连接并随时间演化。 有向边
Minimal causal skeleton. To preserve the threaded semantics and avoid redundant dependencies, we maintain the graph as a minimal causal skeleton, where each edge represents an irreducible dependency rather than a shortcut implied by transitive paths.
最小因果骨架。 为保留线程式语义并避免冗余依赖,我们将图维护为最小因果骨架,其中每条边表示不可约依赖,而不是由传递路径隐含的捷径。
Pruning criterion. An edge
剪枝准则。 当且仅当剩余图中不存在从
Here
这里,
Memory threads. We define a memory thread as any directed path
记忆线程。 我们把 DAG 中任意一条有向路径
2.2 Memory Graph Updating
Long-term memory continuously evolves as new interactions arrive and existing memories are refined. Our system explicitly separates representation updates (how semantic node contents are consolidated) from index updates (how nodes are organized and connected in the graph), and supports both offline batch processing and online incremental maintenance.
随着新交互到来以及既有记忆不断被完善,长期记忆会持续演化。 我们的系统明确区分表示更新(如何巩固语义节点内容)和索引更新(如何在图中组织并连接节点),并同时支持离线批处理与在线增量维护。

2.2.1 Graph Update Operators
We define two basic operators for maintaining the graph index: Insert and ReInsert. Both operators enforce the temporal constraint and the pruning criterion (Section 2.1.2) and share the same edge construction logic: candidate retrieval, pruning, and edge materialization.
我们定义了两个用于维护图索引的基本算子:Insert 和 ReInsert。 两个算子都强制满足时间约束和剪枝准则(第 2.1.2 节),并共享相同的边构建逻辑:候选检索、剪枝和边实体化。
Insert. Given a new node Insert
Insert。 给定新节点 Insert
- Candidate retrieval. We restrict the parent search space of
to historical nodes that satisfy the temporal constraint. The candidate parent set is defined as the Top- most similar historical nodes:
- 候选检索。 我们将
的父节点搜索空间限制为满足时间约束的历史节点。候选父节点集合被定义为最相似的 Top- 个历史节点:
This step bounds parent selection to a local semantic neighborhood and avoids quadratic all-pairs comparison.
该步骤将父节点选择限制在局部语义邻域内,并避免二次复杂度的全对比较。
- Redundancy pruning. To preserve the threaded causal semantics and avoid transitive or dominated dependencies, we retain only irreducible parents. A candidate parent
is kept if and only if there exists no alternative path from to through another candidate:
- 冗余剪枝。 为保留线程式因果语义并避免传递依赖或支配依赖,我们只保留不可约父节点。当且仅当不存在经由另一候选节点从
到达 的替代路径时,才保留候选父节点 :
Here
这里,
- Edge materialization. The remaining parents form the incoming edges of
:
- 边实体化。 剩余父节点构成
的入边:
These edges are added to the graph index. The Insert operator does not modify any existing node or edge except adding
这些边被添加到图索引中。 除添加 Insert 算子不会修改任何既有节点或边,因此可以保持全局 DAG 性质。
ReInsert. Given an existing node ReInsertInsert. The operator removes all previous incoming edges of ReInsert updates only the neighborhood of
ReInsert。 给定既有节点 ReInsertInsert 相同的过程重新计算 ReInsert 只更新
2.2.2 Offline Batch Updates
Offline updates are triggered during cold start, large-scale cleanup, or periodic maintenance. They jointly optimize node representations and graph structure at scale.
离线更新在冷启动、大规模清理或周期性维护期间触发。 它们以规模化方式联合优化节点表示和图结构。
Node construction. Historical interactions are processed in batches to construct stabilized and compact semantic node representations. Rather than writing fragmented memories incrementally, the system jointly consolidates multiple dialogue and multimodal segments to reduce redundancy, resolve inconsistencies, and produce high-quality long-term representations. Let
节点构建。 历史交互被分批处理,以构建稳定且紧凑的语义节点表示。 系统不再增量写入碎片化记忆,而是联合巩固多个对话片段和多模态片段,以减少冗余、解决不一致,并产生高质量的长期表示。 令
- Summarization (parallel across turns). Each dialogue turn
is independently summarized into one or more textual summaries, denoted as . The collection of all summaries from the batch is
- 摘要(跨轮次并行)。 每个对话轮次
被独立概括为一个或多个文本摘要,记为 。该批次所有摘要的集合为
- Retrieval alignment (parallel across summaries). For each summary
, the system performs vector retrieval against the memory store to identify the top- most related existing nodes:
- 检索对齐(跨摘要并行)。 对于每个摘要
,系统针对记忆存储 执行向量检索,以识别最相关的 top- 个既有节点:
This step aligns new content with historical memory to expose semantic redundancy and potential updates.
该步骤将新内容与历史记忆对齐,从而暴露语义冗余和潜在更新。
- Global semantic clustering (non-parallel). All new summaries and retrieved candidates are merged into a unified candidate pool
- 全局语义聚类(非并行)。 所有新摘要和检索到的候选项被合并到统一候选池中
which is globally clustered into semantic groups
随后被全局聚类为语义组
Each cluster aggregates semantically related content across both new and historical memory.
每个聚类汇集新记忆和历史记忆中语义相关的内容。
- LLM-based consolidation (parallel across clusters). For each cluster
, entries are temporally ordered and passed to an LLM, which determines an action
- 基于 LLM 的巩固(跨聚类并行)。 对于每个聚类
,条目按时间排序后传递给 LLM,由其确定动作
for each item. This step resolves redundancy and inconsistency and produces refined semantic representations that are re-embedded and emitted as stabilized graph nodes.
用于处理每个条目。 该步骤解决冗余和不一致问题,并生成经过完善的语义表示;这些表示会被重新嵌入,并作为稳定的图节点输出。
Edge construction. Offline edge construction builds the graph index by applying the Insert operator (Section 2.2.1) to all nodes in Insert
边构建。 离线边构建通过对 Insert 算子(第 2.2.1 节)来构建图索引。 节点按照时间戳非递减的顺序处理。 对于每个节点 Insert
2.2.3 Online Incremental Updates
Online updates handle real-time interaction with low latency by incrementally updating both (i) the node representation (content/embedding) and (ii) the graph index (incoming edges).
在线更新通过增量更新(i)节点表示(内容/嵌入)和(ii)图索引(入边),以低延迟处理实时交互。
Node incremental update. In the online setting, node construction follows the same abstraction pipeline as offline consolidation, but operates on a single interaction instance (i.e., batch size
节点增量更新。 在在线场景中,节点构建遵循与离线巩固相同的抽象流程,但每次只处理一个交互实例(即批大小
- Summarization.
is summarized into one or more candidate semantic nodes, capturing distinct facts, events, or state changes expressed in the turn. - Retrieval alignment. Each candidate node is matched against the current memory store to identify highly related existing nodes, exposing potential redundancy or update targets.
- LLM-based decision. Based on the candidate content and retrieved context, an LLM decides whether to add a new node, update an existing node, or perform no-op.
- 摘要。 将
概括为一个或多个候选语义节点,捕获该轮次中表达的不同事实、事件或状态变化。 - 检索对齐。 每个候选节点都与当前记忆存储进行匹配,以识别高度相关的既有节点,从而暴露潜在冗余或更新目标。
- 基于 LLM 的决策。 根据候选内容和检索到的上下文,LLM 决定是添加新节点、更新既有节点,还是执行无操作。
This lightweight pipeline enables real-time semantic state extraction while maintaining consistency with the offline consolidation logic.
该轻量级流程在保持与离线巩固逻辑一致的同时,实现实时语义状态提取。
Edge incremental update. Online edge maintenance updates the graph index by invoking the Insert and ReInsert operators (Section 2.2.1), while preserving the temporal constraint and the pruning criterion (Section 2.1.2).
边增量更新。 在线边维护通过调用 Insert 和 ReInsert 算子(第 2.2.1 节)更新图索引,同时保持时间约束和剪枝准则(第 2.1.2 节)。
- Add. A newly created node
is attached to the graph by invoking Insert. By the temporal constraint, can only depend on historical nodes; therefore, no existing node needs to be modified.
- 添加。 通过调用
Insert将新建节点 连接到图中。根据时间约束, 只能依赖历史节点;因此不需要修改任何既有节点。
- Update. When an existing node
is updated, its semantic representation or embedding may change. We invoke ReInsertto recompute and replace its incoming edges. To preserve threaded consistency in the downstream structure, all direct children are additionally refreshed by calling ReInsert. Although these children remain temporally valid, their optimal attachment points under the pruning criterion may change after is revised.
- 更新。 当既有节点
被更新时,其语义表示或嵌入可能发生变化。我们调用 ReInsert重新计算并替换其入边。为了保持下游结构中的线程一致性,还会通过调用 ReInsert刷新所有直接子节点 。尽管这些子节点在时间上仍然有效,但在 被修订后,它们在剪枝准则下的最优连接点可能发生变化。
- Delete. When a node
is deleted, it is marked as a tombstone and its children are collected as orphans. Each orphaned child is repaired by invoking ReInsert, which re-attaches to alternative valid historical parents. This prevents memory threads from breaking due to the removal of an intermediate dependency.
- 删除。 当节点
被删除时,它会被标记为墓碑,其子节点 则被收集为孤立节点。通过调用 ReInsert修复每个孤立子节点 ,将 重新连接到其他有效历史父节点。这可以防止记忆线程因中间依赖被移除而断裂。
Remark. All online updates perform bounded local modifications suitable for low-latency interaction, while periodic offline rebuilding re-optimizes the topology. This process amortizes local approximation errors and preserves long-term structural consistency of the memory graph.
说明。 所有在线更新都执行有界局部修改,适合低延迟交互;周期性离线重建则重新优化拓扑。 该过程可以摊销局部近似误差,并保持记忆图的长期结构一致性。
2.3 Memory Reading
Storing memory well is not enough; it must also be retrieved in a way that restores causal context. We therefore replace “Top-
良好地存储记忆还不够;还必须以能够恢复因果上下文的方式检索记忆。 因此,我们用 闭包式检索 取代“Top-
2.3.1 Retrieval Paradigm: Minimal Closed Subgraph
Given a query
给定查询
Seed identification. We first retrieve a small set of seed nodes by Top-
种子识别。 我们首先根据
Closure expansion. Starting from seed nodes, the system recursively traverses dependency edges backward to collect all reachable ancestor nodes until the virtual root node is reached. This produces a closed subgraph in which every node’s prerequisites are included. In practice, if the closure grows excessively large, the traversal can be bounded by a maximum depth or guided by lightweight heuristics (e.g., relevance filtering or budgeted expansion) to control latency and context size.
闭包扩展。 从种子节点出发,系统沿依赖边向后递归遍历,收集所有可到达的祖先节点,直至抵达虚拟根节点。 这会产生一个闭合子图,其中包含每个节点的所有前提。 在实践中,如果闭包变得过大,可以通过最大深度限制遍历,或使用轻量级启发式方法(例如相关性过滤或预算约束扩展)加以引导,以控制延迟和上下文大小。
Context linearization. All nodes in the closure are sorted by timestamp and serialized into a linear context sequence, optionally augmented with lightweight structural markers, and injected into the LLM prompt for downstream reasoning. By reconstructing complete causal threads rather than sampling isolated memory fragments, closure-based retrieval preserves prerequisite consistency, reduces thread confusion, and improves long-horizon reasoning stability.
上下文线性化。 闭包中的所有节点按时间戳排序并序列化为线性上下文序列,可选择添加轻量级结构标记,随后注入 LLM 提示以进行下游推理。 闭包式检索通过重建完整因果线程而非采样孤立记忆片段,保持了前提一致性、减少线程混淆,并提升长程推理稳定性。
2.3.2 Reasoning Paradigm: ReAct-Style Multimodal Agent
For complex multimodal queries, memory reading is performed by a ReAct-style agent that iteratively executes think--act--observe cycles over textual memory and raw video content (Algorithm 1).
对于复杂多模态查询,记忆读取由 ReAct 风格的智能体完成;该智能体在文本记忆和原始视频内容上迭代执行思考—行动—观察循环(算法1)。
Reasoning. Based on the query and the accumulated interaction history, the agent reasons about what information is missing, which hypotheses require verification, and whether additional evidence is needed from memory or video.
推理。 根据查询和累积的交互历史,智能体推理缺少哪些信息、哪些假设需要验证,以及是否需要从记忆或视频中获取额外证据。
Action. The agent selects among three tools to refine its knowledge:
行动。 智能体从三种工具中进行选择,以完善其知识:
video.retrieval: retrieve relevant clip timestamps by vector similarity over textual memory;video.rag: aggregate top-textual memory entries into the LLM prompt for grounded summarization; video.qa: perform vision-language question answering over a specified video clip to extract fine-grained visual details.
video.retrieval:根据文本记忆上的向量相似度检索相关片段时间戳;video.rag:将 top-个文本记忆条目汇总到 LLM 提示中,以生成有依据的摘要; video.qa:在指定视频片段上执行视觉语言问答,以提取细粒度视觉细节。
Observation. The outputs returned by the selected tools (retrieved memory entries, localized clips, or visual answers) are appended to the agent history and become the observations for the next reasoning step. Through iterative think--act--observe cycles, the agent progressively refines its understanding of the multimodal context and produces a grounded response.
观察。 所选工具返回的输出(检索到的记忆条目、定位的视频片段或视觉答案)被追加到智能体历史中,并成为下一推理步骤的观察。 通过迭代的思考—行动—观察循环,智能体逐步完善对多模态上下文的理解,并生成有依据的响应。
Algorithm 1: ReAct-Style Multimodal Memory Reading
Input: Initial query
Output: Response
- Initialize history
- while not exceeding
max_iterationsdo if then else if then else if then else if then break end if - end while
- return
3. Experiments
Dataset. We conduct experiments on two ultra-long dialogue datasets to assess agent memory capabilities. ZH-4O serves as a Chinese role-playing benchmark comprising 28 authentic human-LLM sessions (avg. 600 turns), annotated with 1,068 multiple-choice probing questions to test memory recall. Complementarily, we utilize LoCoMo as an English dataset, which consists of 10 long-context sessions paired with 1,540 question-answer pairs covering single-hop, multi-hop, open-domain, and temporal reasoning. Notably, we exclude the LoCoMo adversarial subset due to the absence of ground-truth answers.
数据集。 我们在两个超长对话数据集上开展实验,以评估智能体的记忆能力。 ZH-4O 是一个中文角色扮演基准,包含 28 个真实的人类—LLM 会话(平均 600 轮),并标注了 1,068 道多项选择探测题,用于测试记忆回忆能力。 作为补充,我们使用 LoCoMo 作为英文数据集;它包含 10 个长上下文会话和 1,540 个问答对,覆盖单跳、多跳、开放域和时序推理。 值得注意的是,由于缺少真实答案,我们排除了 LoCoMo 的对抗子集。
Baselines. We compare our framework against five baselines, categorized into general paradigms and specialized memory systems. First, we consider two foundational approaches: Long context LLM utilizes the entire conversation history to establish a full-context reference, while RAG retrieves the top-
基线。 我们将该框架与五种基线进行比较,这些基线分为通用范式和专用记忆系统。 首先,我们考虑两种基础方法:长上下文 LLM 使用完整对话历史建立全上下文参考,而 RAG 检索语义相关的 top-
Implementation. To ensure a fair and consistent evaluation, we re-implemented all baselines using Qwen3-8B (configured in “no-think” mode) as the backbone LLM, paired with Qwen3-8B-embedding for vector representations. Crucially, a unified prompt template is applied for response generation across all settings to strictly control for variance.
实现。 为确保评估公平且一致,我们重新实现了所有基线,使用配置为“非思考”模式的 Qwen3-8B 作为骨干 LLM,并搭配 Qwen3-8B-embedding 生成向量表示。 关键的是,所有设置中的响应生成都采用统一提示模板,以严格控制差异。
Evaluation. Our evaluation strategies are tailored to each dataset: for ZH-4O, we quantify memory fidelity via QA Accuracy, where the model selects the single correct option for each multiple-choice query against ground-truth labels. For LoCoMo, following prior work, we employ an LLM-as-a-Judge (
评估。 我们针对每个数据集定制评估策略:对于 ZH-4O,我们通过问答准确率量化记忆保真度,模型针对每道多项选择查询,根据真实标签选择唯一正确选项。 对于 LoCoMo,我们遵循先前工作,使用 GPT-4o 采用 LLM-as-a-Judge(
3.1 Results on ZH-4O
| Method | Overall (%) |
|---|---|
| RAG | 62.45 |
| Mem0 | 70.20 |
| MOOM | 72.60 |
| A-Mem | 73.78 |
| Memobase | 76.78 |
| Long context LLM | 84.92 |
| TeleMem | 86.33 |
Main Results. Table 1 presents the performance of different memory paradigms on the ZH-4O benchmark, revealing clear distinctions in their ability to support long-horizon, multi-turn question answering. We make the following observations.
主要结果。 表1 展示了不同记忆范式在 ZH-4O 基准上的性能,揭示它们在支持长程、多轮问答方面的明显差异。 我们得到以下观察结果。
- Retrieval-only methods are insufficient. RAG achieves the lowest accuracy (62.45%), indicating that flat semantic retrieval without temporal ordering or relational structure fails to support multi-turn, memory-intensive reasoning required by ZH-4O.
- Explicit memory mechanisms consistently improve performance. All memory-augmented approaches outperform RAG, demonstrating the necessity of maintaining persistent and updatable memory states for long-horizon dialogue understanding. Among them, Memobase performs best (76.78%), likely due to its structured user profiling that aligns well with the role-playing characteristics of the benchmark.
- 仅使用检索的方法并不充分。 RAG 的准确率最低(62.45%),这表明缺少时间顺序或关系结构的扁平语义检索无法支持 ZH-4O 所需的多轮记忆密集型推理。
- 显式记忆机制持续提升性能。 所有记忆增强方法都优于 RAG,证明维护持久且可更新的记忆状态对于长程对话理解是必要的。其中,Memobase 表现最佳(76.78%),这可能是因为其结构化用户画像与该基准的角色扮演特点非常契合。
- Long-context modeling alone has inherent limitations. The Long Context LLM baseline achieves 84.92% accuracy by leveraging the full dialogue history, but its reliance on raw context makes it susceptible to noise, redundancy, and attention dilution as interactions grow longer.
- Coordinated read--write memory yields the best results. Our proposed TeleMem attains the highest accuracy of 86.33%, outperforming both long-context and prior memory-based architectures. This demonstrates that selectively compressing salient information and enabling context-aware memory access is more effective than unstructured context accumulation or loosely coupled memory modules.
- 仅依靠长上下文建模存在固有局限。 长上下文 LLM 基线利用完整对话历史取得 84.92% 的准确率,但随着交互变长,它对原始上下文的依赖使其容易受到噪声、冗余和注意力稀释的影响。
- 协调的读写记忆取得最佳结果。 我们提出的 TeleMem 达到最高的 86.33% 准确率,优于长上下文架构和先前的记忆架构。这表明,选择性压缩显著信息并启用上下文感知的记忆访问,比非结构化上下文积累或松散耦合的记忆模块更有效。
| Write ↓ / Read → | 0.6B | 1.7B | 4B | 8B | 14B | 32B | Avg. |
|---|---|---|---|---|---|---|---|
| 0.6B | 52.72 | 64.23 | 73.69 | 75.47 | 74.06 | 72.19 | 68.73 |
| 1.7B | 61.14 | 71.54 | 79.12 | 78.56 | 80.81 | 77.72 | 74.82 |
| 4B | 63.48 | 74.25 | 81.09 | 83.33 | 84.55 | 83.33 | 78.34 |
| 8B | 65.54 | 77.15 | 84.36 | 86.33 | 85.77 | 84.93 | 80.68 |
| 14B | 67.04 | 78.28 | 84.55 | 86.33 | 87.55 | 85.49 | 81.54 |
| 32B | 68.91 | 80.81 | 83.99 | 86.70 | 86.61 | 85.96 | 82.16 |
| Avg. | 63.14 | 74.38 | 81.13 | 82.79 | 83.17 | 81.60 | -- |
Read-Write Scaling Law. Table 2 reveals a clear memory read–write scaling law by varying the model sizes of the memory write LLM and the memory read LLM. Overall performance improves monotonically as either component scales up, indicating that both memory writing and memory reading contribute substantially to downstream QA accuracy. However, the gains are not symmetric across the two dimensions. Increasing the size of the write LLM leads to consistent improvements across almost all read settings, suggesting that stronger writers produce more informative, compact, and robust memory representations that benefit readers of different capacities.
读写缩放规律。 表2 通过改变记忆写入 LLM 和记忆读取 LLM 的模型规模,揭示了清晰的记忆读写缩放规律。 随着任一组件规模扩大,整体性能均单调提升,表明记忆写入和记忆读取都对下游问答准确率有显著贡献。 然而,两个维度上的收益并不对称。 扩大写入 LLM 的规模几乎在所有读取设置下都带来持续提升,这表明更强的写入模型会生成信息更丰富、更紧凑且更稳健的记忆表示,从而使不同容量的读取模型受益。
Scaling the read LLM yields even more pronounced gains, particularly when paired with medium-to-large write models. This indicates that memory retrieval and reasoning capacity plays a critical role in exploiting stored information, especially when the memory content is sufficiently well-structured. Notably, performance saturates when the reader significantly outscales the writer, implying that retrieval capacity alone cannot compensate for low-quality memory writing.
扩大读取 LLM 的规模带来更显著的收益,尤其是在与中大型写入模型搭配时。 这表明,记忆检索和推理能力在利用已存储信息时发挥关键作用,尤其是在记忆内容具有充分良好结构的情况下。 值得注意的是,当读取模型的规模显著超过写入模型时,性能趋于饱和,这意味着仅靠检索能力无法弥补低质量的记忆写入。
The best results are achieved when both the write and read LLMs are scaled jointly, highlighting the complementary and interdependent nature of memory writing and reading. These findings suggest that effective long-term memory systems should be designed with coordinated read–write capacity rather than over-optimizing either component in isolation.
当写入和读取 LLM 共同扩大规模时,取得了最佳结果,突显了记忆写入与读取之间的互补性和相互依赖性。 这些发现表明,有效的长期记忆系统应采用协调的读写能力设计,而不是孤立地过度优化任一组件。
3.2 Results on LoCoMo
Main Results. Table 3 compares different methods on the LoCoMo benchmark across four reasoning categories. Overall, the Long Context LLM achieves the strongest performance (70.71%), demonstrating the effectiveness of processing full interaction histories for complex memory-centric tasks. This advantage is particularly pronounced on temporal questions, where access to complete chronological context is crucial. In contrast, retrieval-based baselines perform poorly across all categories, highlighting the limitations of static semantic retrieval for long-term conversational reasoning.
主要结果。 表3 比较了不同方法在 LoCoMo 基准四类推理问题上的表现。 总体而言,长上下文 LLM 取得最强性能(70.71%),证明处理完整交互历史对于复杂的记忆中心型任务是有效的。 这一优势在时序问题上尤为明显,因为此类问题必须访问完整的时间顺序上下文。 相比之下,基于检索的基线在所有类别上均表现较差,突显了静态语义检索在长期对话推理中的局限。
Memory systems exhibit diverse strengths across reasoning types. Mem0 performs well on single-hop questions (54.96%) and temporal reasoning (60.28%), suggesting that its modular memory abstraction is effective for fact recall and time-sensitive information. Memobase excels on multi-hop reasoning (66.04%), likely benefiting from its structured memory representations that better support compositional inference. A-Mem shows more balanced but moderate performance, indicating that agentic memory control alone is insufficient without strong memory structuring.
不同记忆系统在各类推理中展现出不同优势。 Mem0 在单跳问题(54.96%)和时序推理(60.28%)上表现良好,这表明其模块化记忆抽象对事实回忆和时间敏感信息有效。 Memobase 在多跳推理(66.04%)上表现突出,这可能得益于其结构化记忆表示能够更好地支持组合推断。 A-Mem 的表现更为均衡但较为适中,这表明如果缺少强有力的记忆结构,仅有智能体式记忆控制并不充分。
TeleMem achieves competitive performance on single-hop (64.53%) and temporal reasoning (78.47%), approaching the Long Context LLM in these categories, which suggests that its memory abstraction effectively captures salient factual and temporal information. However, its weaker performance on multi-hop questions indicates remaining challenges in supporting complex relational reasoning over stored memories. Overall, these results highlight that different memory mechanisms favor different reasoning patterns, and no single approach uniformly dominates all categories, underscoring the importance of task-aware memory design for long-horizon QA.
TeleMem 在单跳(64.53%)和时序推理(78.47%)上取得了具有竞争力的表现,在这些类别上接近长上下文 LLM,这表明其记忆抽象能够有效捕获显著的事实和时序信息。 然而,它在多跳问题上的较弱表现说明,在已存储记忆上支持复杂关系推理仍面临挑战。 总体而言,这些结果表明不同记忆机制偏好不同的推理模式,没有任何单一方法在所有类别上都占据优势,突显了面向长程问答进行任务感知记忆设计的重要性。
| Method | Single-Hop | Multi-Hop | Open Domain | Temporal | Overall |
|---|---|---|---|---|---|
| RAG | 20.91 | 32.39 | 35.41 | 48.03 | 39.03 |
| Mem0 | 54.96 | 31.15 | 40.62 | 60.28 | 52.01 |
| A-Mem | 44.32 | 35.82 | 33.33 | 56.59 | 48.57 |
| Memobase | 50.70 | 66.04 | 37.50 | 58.97 | 57.59 |
| Long context LLM | 64.89 | 47.66 | 42.70 | 84.66 | 70.71 |
| TeleMem | 64.53 | 20.56 | 40.62 | 78.47 | 61.49 |
4. Related Work
Text LTM. Recent research on equipping Large Language Models (LLMs) with text long-term memory has primarily evolved through system-level abstractions, cognitive-inspired mechanisms, and structured agentic frameworks. To transcend fixed context windows, operating system paradigms like MemGPT and MemOS leverage virtual memory abstractions and hierarchical scheduling to orchestrate data flow between active context and external storage. Complementing these architectural innovations, bio-inspired models such as MemoryBank, LightMem, and Nemori integrate human cognitive theories—ranging from the Ebbinghaus forgetting curve to the Atkinson-Shiffrin model—to dynamically prioritize, segment, and decay information for efficient retrieval. On the structural front, Mem0, A-Mem, and MIRIX propose modular systems that enable self-evolving knowledge consolidation and multi-agent coordination.
文本长期记忆。 近期为大语言模型(LLM)配备文本长期记忆的研究,主要沿系统级抽象、认知启发机制和结构化智能体框架三个方向发展。 为了突破固定上下文窗口,MemGPT 和 MemOS 等操作系统范式利用虚拟记忆抽象与分层调度,协调活跃上下文和外部存储之间的数据流。 作为这些架构创新的补充,MemoryBank、LightMem 和 Nemori 等生物启发模型融合了人类认知理论,从艾宾浩斯遗忘曲线到 Atkinson-Shiffrin 模型,动态确定信息优先级、进行信息分段和衰减,以实现高效检索。 在结构层面,Mem0、A-Mem 和 MIRIX 提出了支持知识自演化巩固与多智能体协调的模块化系统。
Graph LTM. Recent literature on long-term memory for LLM agents highlights a transition from unstructured storage to graph-based architectures that enhance reasoning, consistency, and scalability. Foundational works like
图长期记忆。 近期有关 LLM 智能体长期记忆的研究表明,该领域正在从非结构化存储转向能够增强推理、一致性和可扩展性的图架构。
Enhancing the reasoning capabilities over these structures, GraphCogent and D-SMART integrate working memory models and dynamic reasoning trees to support complex graph understanding and dialogue consistency, MemQ focuses on optimizing knowledge graph reasoning. Furthermore, Xia et al. introduces trainable graph memories that abstract agent trajectories into strategic meta-cognition. Collectively, these studies demonstrate that structured, hierarchical, and dynamic graph memories are essential for developing autonomous agents capable of coherent, long-term strategic planning and reasoning.
为了增强在这些结构上的推理能力,GraphCogent 和 D-SMART 融合工作记忆模型与动态推理树,以支持复杂图理解和对话一致性,而 MemQ 专注于优化知识图谱推理。 此外,Xia 等人引入了可训练的图记忆,将智能体轨迹抽象为策略性元认知。 总体而言,这些研究证明,结构化、分层且动态的图记忆对于开发能够进行连贯长期策略规划与推理的自主智能体至关重要。
Parametric LTM. Parametric memory aims to encode knowledge or contextual information directly into the weights or persistent hidden states of neural networks, distinguishing itself from non-parametric approaches that rely on external vector databases. Wang et al. propose a decoupled memory mechanism, employing a residual side network to cache long-term context while keeping the base LLM frozen. Similarly, MLPMemory internalizes retrieval by training multilayer perceptrons to approximate k-nearest neighbor distributions as differentiable mappings. Pushing the internalization of retrieval further, Tay et al. introduce the Differentiable Search Index, which eliminates external indices by training the model to map queries directly to document identifiers via its parameters.
参数化长期记忆。 参数化记忆旨在将知识或上下文信息直接编码到神经网络的权重或持久隐藏状态中,这不同于依赖外部向量数据库的非参数方法。 Wang 等人提出一种解耦记忆机制,使用残差侧网络缓存长期上下文,同时保持基础 LLM 冻结。 类似地,MLPMemory 通过训练多层感知机将 k 近邻分布近似为可微映射,从而将检索内化。 Tay 等人进一步推进检索内化,引入可微搜索索引;该方法训练模型通过参数将查询直接映射到文档标识符,从而消除外部索引。
regarding personalized adaptation, Zhang et al. combine LoRA with Bayesian optimization to inject dialogue history into model weights. Complementary to these injection methods, Meng et al. explore the interpretability of parametric storage, proposing ROME to locate and directly edit factual associations within the Transformer's MLP layers. Overall, parametric memory methods offer scalability and unified reasoning but face challenges regarding update costs and potential misalignment with the base model.
在个性化适应方面,Zhang 等人将 LoRA 与贝叶斯优化结合,把对话历史注入模型权重。 作为这些注入方法的补充,Meng 等人探索参数化存储的可解释性,提出 ROME 来定位并直接编辑 Transformer 的 MLP 层中的事实关联。 总体而言,参数化记忆方法提供了可扩展性和统一推理能力,但面临更新成本以及与基础模型潜在不一致的挑战。
Multimodal LTM. Multimodal memory has drawn increasing attention as modern agents must store and reason over long-horizon visual and textual information. Mem0 introduces a multimodal image interface but ultimately reduces visual inputs to captions and continues to operate purely in the textual space. M3-Agent extends memory into the multimodal domain by maintaining entity-level representations across audio–visual streams and enabling agentic retrieval over long video sequences. Inspired by hippocampal mechanisms, HippoMM proposes cross-modal event encoding and temporal consolidation to support richer multimodal recall.
多模态长期记忆。 随着现代智能体必须存储长程视觉和文本信息并在其上进行推理,多模态记忆受到越来越多关注。 Mem0 引入了多模态图像接口,但最终仍将视觉输入转化为图像描述,并继续完全在文本空间中运行。 M3-Agent 通过维护跨视听流的实体级表示,并在长视频序列上启用智能体式检索,将记忆扩展到多模态领域。 受海马体机制启发,HippoMM 提出跨模态事件编码和时序巩固,以支持更丰富的多模态回忆。
MemVerse further explores lifelong multimodal memory through a hierarchical retrieval framework with periodic distillation for compactness. In contrast, VisMem emphasizes preserving visual latent representations rather than relying solely on textual abstractions. Overall, existing multimodal memory systems highlight the need for multi-granular representations and adaptive retrieval, while our approach advances this direction with a lightweight hierarchical design tailored for continuous multimodal streams.
MemVerse 通过采用周期性蒸馏以保持紧凑性的分层检索框架,进一步探索终身多模态记忆。 相比之下,VisMem 强调保留视觉潜在表示,而不是仅依赖文本抽象。 总体而言,现有多模态记忆系统突显了多粒度表示和自适应检索的必要性,而我们的方法通过专为连续多模态流设计的轻量级分层架构推进了这一方向。
5. Conclusion
We introduced TeleMem, a unified long-term and multimodal memory system that overcomes key limitations of existing RAG-based approaches. By extracting narrative-grounded information and employing a structured writing pipeline for batching, clustering, and consolidation, TeleMem maintains coherent user profiles while greatly improving storage and token efficiency. Its multimodal memory module with ReAct-style reasoning further enables accurate observe–think–act processing for complex video content. Experiments on the ZH-4O benchmark show that TeleMem substantially outperforms Mem0 in accuracy, efficiency, and speed, underscoring its effectiveness.
我们提出了 TeleMem,这是一种统一的长期与多模态记忆系统,克服了现有 RAG 方法的关键局限。 通过提取有叙事依据的信息,并采用用于批处理、聚类和巩固的结构化写入流程,TeleMem 在维持连贯用户画像的同时,大幅提升存储效率和 token 效率。 其具有 ReAct 风格推理的多模态记忆模块,进一步实现了对复杂视频内容进行准确的观察—思考—行动处理。 ZH-4O 基准上的实验表明,TeleMem 在准确率、效率和速度上显著优于 Mem0,突显了其有效性。