License: CC BY 4.0
arXiv:2606.19847v1 [cs.CL] 18 Jun 2026

AtomMem: Building Simple and Effective Memory System
for LLM Agents via Atomic Facts
AtomMem:通过原子事实为大型语言模型代理构建简洁高效的记忆系统

Yanyu Yao1, Shangze Li1, Zhi Zheng1, Hui Zheng2, Qi Liu1, Tong Xu1, Enhong Chen1
1State Key Laboratory of Cognitive Intelligence,
University of Science and Technology of China, Hefei, China
2Anhui University, Hefei, China
{yyyao, lishangze, liuqilq}@mail.ustc.edu.cn, {zhengzhi97, tongxu, cheneh}@ustc.edu.cn, huizheng@ahu.edu.cn
Abstract摘要

Large language models (LLMs) demonstrate strong reasoning and generation abilities, but their fixed context windows limit long-term information accumulation and reuse across multi-session interactions. Existing memory-augmented systems often construct memory in a coarse and unstable manner, relying on inefficient memory representations or unstable unconstrained updates. To address these challenges, we propose AtomMem, a long-term memory system designed for value-dense storage and stable memory evolution. AtomMem introduces a Fact Executor, which selectively extracts high value atomic facts from long form interactions to serve as highly efficient memory representations. Subsequently, AtomMem organizes these facts into hierarchical event structures and temporal profiles, capturing coherent episodic contexts and tracking dynamically evolving user attributes over time. During retrieval, the system activates an associative memory graph to connect fragmented memories. Experiments on the LoCoMo benchmark confirm that AtomMem achieves state-of-the-art performance across various reasoning tasks, offering a scalable and economically viable solution for deploying intelligent personalized agents. The implementation code is publicly available at https://github.com/MINE-USTC/AtomMem.大型语言模型(LLM)展示了强大的推理和生成能力,但其固定的上下文窗口限制了长期信息的累积和在多轮交互中的复用。现有的记忆增强系统往往以粗糙且不稳定的方式构建记忆,依赖低效的记忆表示或不受约束的更新方式。为了解决这些挑战,我们提出了 AtomMem,这是一种面向价值密集存储和稳定记忆演化的长期记忆系统。AtomMem 引入了事实执行器(Fact Executor),它从长对话中选择性提取高价值的原子事实,作为高效的记忆表示。随后,AtomMem 将这些事实组织成层级事件结构和时间画像,捕获连贯的情景上下文并随时间跟踪动态演化的用户属性。在检索时,系统激活关联记忆图以连接碎片化的记忆。LoCoMo 基准实验表明,AtomMem 在各种推理任务上实现了最先进的性能,提供了可扩展且经济可行的智能个性化代理部署方案。实现代码已公开于 https://github.com/MINE-USTC/AtomMem。

AtomMem: Building Simple and Effective Memory System
for LLM Agents via Atomic Facts

Yanyu Yao1, Shangze Li1, Zhi Zheng1, Hui Zheng2, Qi Liu1, Tong Xu1, Enhong Chen1 1State Key Laboratory of Cognitive Intelligence, University of Science and Technology of China, Hefei, China 2Anhui University, Hefei, China {yyyao, lishangze, liuqilq}@mail.ustc.edu.cn, {zhengzhi97, tongxu, cheneh}@ustc.edu.cn, huizheng@ahu.edu.cn, 姚雁雁1, 李尚泽1, 郑志1, 郑辉2, 刘琦1, 徐彤1, 陈恩宏1 1 中国科学技术大学认知智能国家重点实验室 2 安徽大学 {yyyao, lishangze, liuqilq}@mail.ustc.edu.cn, {zhengzhi97, tongxu, cheneh}@ustc.edu.cn, huizheng@ahu.edu.cn,

1 Introduction1 引言

Large language models (LLMs) have demonstrated remarkable capabilities in language understanding, reasoning, and generationOpenAI (2023); Bubeck et al. (2023); Touvron et al. (2023). Recent advances have extended these models into interactive agents capable of engaging in multi turn conversations spanning days or even months, requiring these agents to accumulate and organize useful memories. However, as these LLM-based systems are deployed in increasingly complex and long-horizon tasks, they face significant challenges regarding degrading reliabilityLiu et al. (2024); Xiao et al. (2024). Constrained by fixed-length context windows, existing models often struggle to maintain coherence and accurate retrieval over extended contexts. This often results in practical failures such as forgetting user preferences, repeating previously resolved questions, or contradicting established facts.大型语言模型(LLM)在语言理解、推理和生成方面展现了卓越能力(OpenAI,2023;Bubeck 等,2023;Touvron 等,2023)。近期进展将这些模型扩展为能够进行跨天甚至跨月多轮对话的交互式代理,需要这些代理累积并组织有用的记忆。然而,随着基于 LLM 的系统被部署到日益复杂和长期的任务中,它们面临可靠性下降的显著挑战(Liu 等,2024;Xiao 等,2024)。受限于固定长度的上下文窗口,现有模型常难以在扩展上下文中保持连贯性和准确检索,导致实际失败,如忘记用户偏好、重复已解决的问题或与已确定事实相矛盾。

To address this limitation, an increasing body of work has explored augmenting LLMs with external memory modules. These memory-augmented agents aim to improve long-term performance by optimizing memory management and utilization, primarily through the design of effective mechanisms for memory storage, update, and retrieval. Advanced systems like Mem0Chhikara et al. (2025) incorporate graph databases to enhance relational organization, and AMemXu et al. (2025) enables dynamic memory evolution without predefined rules.为了解决此限制,越来越多的工作探索了为 LLM 增加外部记忆模块。这些记忆增强代理旨在通过优化记忆管理和利用来提升长期性能,主要通过设计有效的记忆存储、更新和检索机制实现。诸如 Mem0(Chhikara 等,2025)等先进系统引入图数据库以增强关系组织,AMem(Xu 等,2025)实现了无需预定义规则的动态记忆演化。

Refer to caption
Figure 1: Architecture comparison. AtomMem overcomes the bloated storage and isolated matching of previous methods by organizing atomic facts into associative graphs for precise hierarchical retrieval. 图 1: 架构对比。AtomMem 通过将原子事实组织成关联图,实现精确的层级检索,克服了以往方法的存储膨胀和孤立匹配问题。

Despite these advances, existing memory-augmented systems still face fundamental challenges in constructing reliable long-term memory due to a fundamental dilemma. Storing raw conversations maximizes information retention but overwhelms retrieval augmented generation paradigms Lewis et al. (2020) with redundant noise. This bloat forces models to process irrelevant contexts. Conversely, condensed representations achieve compact formats but inevitably discard fine-grained details and accumulate noise generated by LLMs over time. Therefore, achieving a balance between high information density and contextual fidelity is crucial. A precise and reliable underlying memory representation is the fundamental prerequisite for any effective memory system.尽管取得了这些进展,现有的记忆增强系统在构建可靠的长期记忆时仍面临根本性挑战,这源于一个基本的两难困境。存储原始对话可最大化信息保留,但会在检索增强生成范式(Lewis 等,2020)中引入冗余噪声,迫使模型处理无关上下文。相反,压缩表示虽能实现紧凑格式,却不可避免地丢失细粒度细节,并随时间累积 LLM 产生的噪声。因此,在高信息密度与上下文保真度之间取得平衡至关重要。精确可靠的底层记忆表示是任何有效记忆系统的根本前提。

Beyond basic representation, user memory is inherently dynamic. Preferences, experiences, and goals naturally evolve over time, requiring systems to effectively accumulate and maintain a consistent user state. Recent work has explored dynamic memory evolution, but these methods typically rely on frequent LLM-driven rewrites to update existing entries. While this design enables flexible knowledge organization and continuous adaptation, unconstrained updates introduce severe instability. Hallucinations or erroneous edits can repeatedly modify the same memory entry, leading to uncontrolled expansion and the destruction of original facts. Therefore, designing stable and controllable memory update mechanisms remains another key challenge for long-term memory systems. Furthermore, useful memories are often distributed across multiple sessions. Current memory systems often rely on flat retrieval over isolated items. This flat approach struggles to capture complex associations across sessions, failing to recover associative evidence required for personalized assistance.除基本表示外,用户记忆本质上是动态的。偏好、经验和目标会随时间自然演化,系统需要有效累积并保持一致的用户状态。近期工作探索了动态记忆演化,但这些方法通常依赖频繁的 LLM 驱动重写来更新已有条目。虽然此设计实现了灵活的知识组织和持续适应,但不受约束的更新会导致严重不稳定。幻觉或错误编辑可能反复修改同一记忆条目,导致失控的扩张并破坏原始事实。因此,设计稳定可控的记忆更新机制仍是长期记忆系统的关键挑战。此外,有用的记忆往往分布在多个会话中。当前记忆系统常采用对孤立条目的平面检索,这种平面方式难以捕获跨会话的复杂关联,无法恢复个性化辅助所需的关联证据。

In this paper, we propose AtomMem, a long-term memory system centered on atomic facts that organizes user interactions into a hierarchical memory structure and activates relevant memories through graph-based associative recall. At its core, an SFT-tuned Fact Executor extract self-contained atomic facts from raw conversations by selecting high value information and performing lightweight reasoning such as coreference resolution and temporal anchoring. Serving as the basic semantic units of memory, these atomic facts allow AtomMem to construct event memory by associating new information with existing events or creating new ones via semantic and temporal reasoning, thereby transforming isolated facts into episodic memory. To maintain long-term user states, AtomMem builds temporal profile memory from accumulated factual evidence to incrementally track stable attributes and adapt to preference shifts while preserving historical information. During retrieval, AtomMem activates a memory graph, which connects facts through entity overlap, shared events, and dialogue continuity, facilitating the recall of associated memories. Together, these coordinated components enable rich yet stable memory representations, allowing LLM agents to maintain a consistent and reliable understanding of users over long-term interactions.本文提出 AtomMem,这是一种以原子事实为中心的长期记忆系统,能够将用户交互组织为层级记忆结构,并通过基于图的关联召回激活相关记忆。核心是经 SFT 调优的事实执行器(Fact Executor),它通过选择高价值信息并执行轻量推理(如指代消解和时间锚定),从原始对话中提取自包含的原子事实。作为记忆的基本语义单元,这些原子事实使 AtomMem 能够通过语义和时间推理,将新信息与已有事件关联或创建新事件,从而将孤立事实转化为情景记忆。为维护长期用户状态,AtomMem 基于累积的事实证据构建时间画像记忆,增量追踪稳定属性并适应偏好变化,同时保留历史信息。检索时,AtomMem 激活记忆图,通过实体重叠、共享事件和对话连续性连接事实,促进关联记忆的召回。上述协同组件共同实现了丰富且稳定的记忆表示,使 LLM 代理能够在长期交互中保持对用户的一致可靠理解。

Our main contributions are summarized as follows:我们的主要贡献概括如下:

  • We propose AtomMem, a long-term memory framework centered on atomic facts that generates memory-aware responses through graph-based associative recall. This framework provides a stable and scalable long-term storage solution for LLM agents.我们提出 AtomMem,这一以原子事实为中心的长期记忆框架通过基于图的关联召回生成记忆感知的响应。该框架为 LLM 代理提供了稳定且可扩展的长期存储解决方案。

  • We introduce an atomic fact extraction module that converts noisy raw dialogues into self-contained storage units with structured metadata. This module provides a compact and faithful base representation for long-term memory. Additionally, we release a high-quality dataset to facilitate the fine-tuning of robust conversational fact extraction.我们引入原子事实抽取模块,将嘈杂的原始对话转换为自包含的存储单元并附带结构化元数据。该模块为长期记忆提供了紧凑且忠实的基础表示。此外,我们发布了高质量数据集,以促进稳健对话事实抽取的微调。

  • Comprehensive evaluations on long-term benchmarks demonstrate that AtomMem consistently outperforms state-of-the-art baselines. Notably, our simplified fact-level variant achieves competitive performance at minimal computational cost, while the full modular design yields further significant gains.在长期基准上的全面评估表明,AtomMem 始终优于最先进的基线。值得注意的是,我们的简化事实级变体在极低计算成本下实现了竞争性能,而完整的模块化设计则带来了进一步的显著提升。

2 Realted Work2 相关工作

2.1 Retrieval-Augmented Generation2.1 检索增强生成

Retrieval-Augmented Generation (RAG) augments language models with external non-parametric knowledge, enabling generated outputs to be grounded in retrieved evidence rather than relying solely on parametric knowledge Lewis et al. (2020). Early frameworks like REALM Guu et al. (2020) proved that explicit retrieval can improve open-domain question answering while offering benefits in interpretability. Subsequent work has refined the RAG pipeline beyond simple retrieve-and-read designs. Advanced systems evolved to optimize retrieval quality through query processing and neural reranking Nogueira and Cho (2019); Gao et al. (2023). Adaptive variants like ActiveRAG and Self-RAG Jiang et al. (2023); Asai et al. (2024) further introduced dynamic retrieval timing and output critiquing. In LLM agents, retrieval-based access has become an important mechanism for exposing external knowledge and long-term memory to the agent Park et al. (2023); Xi et al. (2023).检索增强生成(RAG)通过外部非参数知识增强语言模型,使生成的输出基于检索到的证据而非仅依赖参数化知识(Lewis 等,2020)。早期框架如 REALM(Guu 等,2020)证明显式检索可提升开放域问答并带来可解释性优势。随后工作在检索-阅读基础上进一步优化 RAG 流程。高级系统通过查询处理和神经重排提升检索质量(Nogueira 和 Cho,2019;Gao 等,2023)。ActiveRAG、Self‑RAG(Jiang 等,2023;Asai 等,2024)等自适应变体进一步引入动态检索时机和输出批评。在 LLM 代理中,基于检索的访问已成为向代理暴露外部知识和长期记忆的重要机制(Park 等,2023;Xi 等,2023)。

2.2 Memory for LLM Agents2.2 LLM 代理的记忆

The architectural design of memory-augmented LLM agents is fundamentally defined by their primary memory abstraction. Some systems represent memory as textual experiences or higher-level reflections. For example, Think-in-MemoryLiu et al. (2023) stores evolving historical thoughts, and RMMTan et al. (2025) dynamically summarizes dialogue history across granularities. A second category focuses on symbolic or relational memory. This approach anchors information on structured objects, such as triplets in RET-LLMModarressi et al. (2023), and knowledge graphs in Mem0Chhikara et al. (2025). Furthermore, frameworks like MemGPTPacker et al. (2023) and MemoryOSKang et al. (2025) manage memory through explicit hierarchical interfaces. Recent studies such as A-MemXu et al. (2025) and MEM1 Zhou et al. (2025) also explore self-organizing or learned memory strategies. For comprehensive evaluation, datasets like LoCoMo Maharana et al. (2024) and LongMemEvalWu et al. (2025) assess ultra-long conversational memory, while personalization-oriented benchmarks such as PERMA Liu et al. (2026) specifically test dynamic user profiling and preference evolution.记忆增强 LLM 代理的架构设计根本上由其主要记忆抽象决定。部分系统将记忆表示为文本经验或更高层次的反思。例如,Think‑in‑Memory(Liu 等,2023)存储演化的历史思考,RMM(Tan 等,2025)在不同粒度上动态摘要对话历史。第二类聚焦于符号或关系记忆。此类方法将信息锚定在结构化对象上,如 RET‑LLM 中的三元组(Modarressi 等,2023)和 Mem0 中的知识图谱(Chhikara 等,2025)。此外,MemGPT(Packer 等,2023)和 MemoryOS(Kang 等,2025)通过显式层级接口管理记忆。近期研究如 A‑Mem(Xu 等,2025)和 MEM1(Zhou 等,2025)也探索了自组织或学习型记忆策略。为进行全面评估,LoCoMo(Maharana 等,2024)和 LongMemEval(Wu 等,2025)等数据集评估超长对话记忆,而 PERMA(Liu 等,2026)等个性化基准专门测试动态用户画像和偏好演化。

3 Methods3 方法

Refer to caption
Figure 2: The overall architecture of AtomMem. It is designed to support high-density memory storage, stable user-state evolution, and efficient retrieval for long-term personalized agents. 图 2: AtomMem 的整体架构。它旨在支持高密度记忆存储、稳定的用户状态演化以及面向长期个性化代理的高效检索。

AtomMem is designed to transform unstructured dialogue streams into a structured and retrieval-friendly memory representations. It first extracts self-contained atomic facts and consolidates related facts into contextual event memory while dynamically modeling user states with temporal profiles. During retrieval, AtomMem activates related memories through a memory graph and integrates the activated memories to generate the final response.AtomMem 旨在将非结构化对话流转化为结构化且易于检索的记忆表示。它首先抽取自包含的原子事实,并将相关事实整合为情境事件记忆,同时通过时间画像动态建模用户状态。检索时,AtomMem 通过记忆图激活相关记忆,并将激活的记忆整合生成最终响应。

3.1 Base Representation: Atomic Fact Extraction3.1 基础表示:原子事实抽取

As interactions lengthen, useful information is sparsely distributed across noisy dialogue turns. Moreover, these raw dialogues frequently rely on implicit context such as unresolved pronouns (e.g., "he", "it") and relative temporal references (e.g., "last Friday"), which become ambiguous when retrieved in isolation. Therefore, our goal is to transform raw dialogue sessions into a set of structured, self-contained atomic facts FF, thereby providing a superior memory representation.随着交互的延长,有用信息稀疏分布在嘈杂的对话轮次中。此外,这些原始对话常依赖隐式上下文,如未解析的代词(如“他”“它”)和相对时间引用(如“上周五”),在单独检索时会产生歧义。因此,我们的目标是将原始对话会话转化为一组结构化、自包含的原子事实 FF,从而提供更优的记忆表示。

3.1.1 Atomic Fact Extractor3.1.1 原子事实抽取器

To address redundancy and noise, we introduce an Atomic Fact Extractor trained via supervised fine-tuning (SFT) that performs essential denoising and lightweight reasoning such as coreference resolution. Since generating high-quality atomic facts requires complex reasoning, relying solely on heuristic rules or zero-shot prompting often yields suboptimal results. To overcome this, we construct a high-quality dataset 𝒟\mathcal{D} (see Appendix A.1 for data Construction details) through a two-stage data construction pipeline.为解决冗余和噪声问题,我们引入了通过监督微调(SFT)训练的原子事实抽取器,执行必要的去噪和轻量推理(如指代消解)。由于生成高质量原子事实需要复杂推理,仅依赖启发式规则或零样本提示往往效果不佳。为克服此问题,我们通过两阶段数据构建管线构建了高质量数据集 𝒟(详见附录 A.1),并在其上训练轻量 LLM。

We train a lightweight LLM using the constructed dataset. Formally, given the instruction II and the dialogue context CC, we optimize the model parameters θ\theta to maximize the likelihood of the target atomic facts FF:我们在构建的数据集上训练轻量 LLM。形式上,给定指令 I 和对话上下文 C,优化模型参数 θ 以最大化目标原子事实 F 的似然:

maxθ(I,C,F)𝒟logPθ(FI,C)\max_{\theta}\sum_{(I,C,F)\in\mathcal{D}}\log P_{\theta}(F\mid I,C) (1)

By fine-tuning on this specialized distribution, the model acts as an efficient information filter. It compresses raw interactions into a dense representation before they enter the memory system, while ensuring that each generated fact is independent and comprehensible without external context.通过在该专门分布上微调,模型充当高效的信息过滤器。它在进入记忆系统前将原始交互压缩为密集表示,同时确保每个生成的事实都是独立且无需外部上下文即可理解的。

3.1.2 Structured Fact Construction3.1.2 结构化事实构建

While the Atomic Fact Extractor provides clean textual content, efficient retrieval and memory management require structured metadata. We therefore encapsulate the extracted text into a Structured Atomic Fact, serving as the minimum semantic unit of the memory system. Formally, we define an atomic fact FF as:虽然原子事实抽取器提供了干净的文本内容,但高效检索和记忆管理需要结构化元数据。因此,我们将提取的文本封装为结构化原子事实,作为记忆系统的最小语义单元。形式上,我们定义原子事实 F 为:

F={id,c,𝐯,𝒫,𝒦,𝒯,}F=\{id,c,\mathbf{v},\mathcal{P},\mathcal{K},\mathcal{T},\mathcal{E}\}

where idid is the fact identifier, cc is the self-contained text generated by the extractor, and 𝐯\mathbf{v} denotes its dense semantic embedding. To obtain precise symbolic metadata, we leverage the LLM to parse the conversation and extract the following key attributes. Specifically, 𝒫\mathcal{P} denotes the participants involved in the interaction, 𝒦\mathcal{K} represents the topical keywords, and 𝒯\mathcal{T} captures the temporal information that anchors each fact to a specific timestamp or interval. Additionally, \mathcal{E} is a list of associated Event idids, which is initialized as empty and links the fact to higher-level event blocks.其中 id 是事实标识符,c 是抽取器生成的自包含文本,v 表示其密集语义嵌入。为获得精确的符号元数据,我们利用 LLM 解析对话并提取以下关键属性:𝒫 表示交互参与者,𝒦 表示主题关键词,𝒯 捕获将每个事实锚定到特定时间戳或时间区间的时间信息。此外,𝔈 是关联事件 id 的列表,初始为空,用于将事实链接到更高层的事件块。

3.1.3 Fact Verification3.1.3 事实验证

Before fact storage, AtomMem verifies whether the newly generated fact FnewF_{new} duplicates or conflicts with existing records. To narrow the search space and ensure contextual relevance, we first construct a candidate set by filtering the global memory based on shared metadata such as participants and temporal contexts. This symbolic filtering effectively eliminates irrelevant facts before expensive vector computations. To retrieve the top-kk items from this candidate set, we define a universal hybrid similarity metric combining semantic embedding and keyword Jaccard similarities for any two inputs xx and yy:在事实存储之前,AtomMem 会验证新生成的事实 F_new 是否与已有记录重复或冲突。为缩小搜索空间并确保上下文相关性,我们首先基于参与者和时间上下文等共享元数据过滤全局记忆,构建候选集合。该符号过滤在进行昂贵的向量计算前有效剔除无关事实。为从候选集合中检索前 k 项,我们定义了一个通用的混合相似度度量,结合语义嵌入和关键词 Jaccard 相似度,对任意两个输入 x 和 y:

Sh(x,y)=αsime(𝐯x,𝐯y)+βJac(𝒦x,𝒦y)S_{h}(x,y)=\alpha\ \cdot\operatorname{sim}_{e}(\mathbf{v}_{x},\mathbf{v}_{y})+\beta\ \cdot\operatorname{Jac}(\mathcal{K}_{x},\mathcal{K}_{y}) (2)

where 𝐯\mathbf{v} and 𝒦\mathcal{K} denote vector embeddings and keyword sets while α\alpha and β\beta balance semantic density and keyword overlap. AtomMem then ranks the candidates using Sh(Fnew,Fi)S_{h}(F_{new},F_{i}) (Eq. 2) and selects the top kk facts 𝒞ret={F1,,Fk}\mathcal{C}_{ret}=\{F_{1},...,F_{k}\} with the highest scores as the relevant context.其中 v 和 K 分别表示向量嵌入和关键词集合,α 和 β 平衡语义密度与关键词重叠。AtomMem 随后使用 S_h(F_new, F_i)(式 2)对候选进行排序,并选取得分最高的前 k 条作为相关上下文 𝒞_ret = {F_1,…,F_k}。

Based on the retrieved candidates, the LLM analyzes the relationship between the new input cnewc_{new} and the retrieved context 𝒞ret\mathcal{C}_{ret} to generate precise content for storage or update. We formalize the verification as a function mapping the new input and context to a residual content and a set of updates:基于检索到的候选,LLM 分析新输入 c_new 与检索上下文 𝒞_ret 的关系,以生成用于存储或更新的精确内容。我们将验证形式化为一个函数,将新输入和上下文映射为残余内容和更新集合:

(cnew,𝒰)LLM(cnew𝒞ret)(c^{\prime}_{new},\mathcal{U})\leftarrow\text{LLM}(c_{new}\parallel\mathcal{C}_{ret})

where cnewc^{\prime}_{new} represents the residual novel information not entailed by the existing context. The system stores this non-redundant content as a new atomic fact. Additionally, 𝒰\mathcal{U} denotes a set of update tuples for existing facts, generated only when logical conflicts are detected. This joint mechanism effectively prevents memory redundancy and dynamically maintains global consistency.其中 c_new′ 表示未被现有上下文蕴含的残余新信息。系统将该非冗余内容存为新原子事实。此外,𝒰 表示仅在检测到逻辑冲突时为已有事实生成的更新元组集合。该联合机制有效防止记忆冗余并动态维护全局一致性。

3.2 Episodic Consolidation: Event Memory Construction3.2 情景整合:事件记忆构建

While atomic facts provide precise details, they lack the contextual continuity of broader experiences. Therefore, we structure memory into Events, which aggregate related facts into coherent narrative blocks. Formally, an Event EE is defined as:虽然原子事实提供了精确细节,但缺乏更广泛经验的情境连贯性。因此,我们将记忆结构化为事件(Event),将相关事实聚合为连贯的叙事块。形式上,事件 E 定义为:

E={id,𝒮,ids,𝒫e,𝒦e,𝒯e}E=\{id,\mathcal{S},\mathcal{F}_{ids},\mathcal{P}_{e},\mathcal{K}_{e},\mathcal{T}_{e}\}

where 𝒮\mathcal{S} is the concise summary, ids\mathcal{F}_{ids} is the set of constituent Fact idids, and 𝒫e\mathcal{P}_{e}, 𝒦e\mathcal{K}_{e}, and 𝒯e\mathcal{T}_{e} describe the participants, keywords, and temporal span of the event. To maintain this structure, AtomMem dynamically absorbs new logically aligned facts into existing events or triggers the creation of new ones. The complete event construction and update algorithm is detailed in Appendix A.2.其中 S 为简要摘要,F_ids 为组成事实的 id 集,P_e、K_e、T_e 分别描述事件的参与者、关键词和时间跨度。为维护此结构,AtomMem 动态将逻辑对齐的新事实吸收进已有事件,或触发创建新事件。完整的事件构建与更新算法详见附录 A.2。

3.3 State Evolution: Temporal Profile Modeling3.3 状态演化:时间画像建模

Beyond episodic events, understanding users requires modeling stable long-term attributes such as preferences, habits, and background information. Therefore, we introduce a profile layer to capture these persistent yet dynamic user states. Formally, a profile entry PP is structured as follows:除情景事件外,理解用户还需建模如偏好、习惯和背景信息等稳定的长期属性。因此,我们引入画像层以捕获这些持久且动态的用户状态。形式上,画像条目 P 的结构如下:

P={id,u,c,vp,𝒦p,evi,tfrom,}P=\{id,u,c,v_{p},\mathcal{K}_{p},\mathcal{E}_{evi},t_{from},\mathcal{H}\}

where uu denotes the user, cc describes the stable attribute of user, vpv_{p} represents the vector embedding of the content, 𝒦p\mathcal{K}_{p} is the keyword set, tfromt_{from} is the effective timestamp, \mathcal{H} stores historical versions, and evi\mathcal{E}_{evi} tracks supporting fact idids for traceability.其中 u 表示用户,c 描述用户的稳定属性,v_p 为内容的向量嵌入,K_p 为关键词集合,t_from 为生效时间戳,H 存储历史版本,E_evi 追踪支持该条目的事实 id 以实现可追溯性。

Unlike the real-time updates for facts and events, profile construction employs a session-based batch mechanism. During atomic fact extraction, the LLM identifies facts implying potential long-term characteristics and temporarily adds them to a waiting queue. At the end of a dialogue session, the system processes these queued candidate facts in a batch to generate structured profiles.与事实和事件的实时更新不同,画像构建采用基于会话的批处理机制。在原子事实抽取阶段,LLM 识别暗示潜在长期特征的事实,并暂时加入待处理队列。对话会话结束时,系统批量处理这些候选事实,生成结构化画像。

For each queued candidate, AtomMem retrieves the top-kpk_{p} most relevant existing profiles for the same user uu using Sh(Pnew,Pi)S_{h}(P_{new},P_{i}) (Eq. 2). An LLM-driven updater then decides whether to mark the candidate as redundant, update the current profile, modify a historical version, or create an entirely new entry. When the current profile changes, AtomMem copies the previous state into the history \mathcal{H} and records its valid time interval or updates the corresponding historical version. This mechanism allows the system to accumulate stable preferences while preserving past user states.对于每个排队的候选,AtomMem 检索同一用户的前 k_p 个最相关已有画像,使用 S_h(P_new, P_i)(式 2)进行排序。LLM 驱动的更新器随后决定将候选标记为冗余、更新当前画像、修改历史版本或创建全新条目。当当前画像变化时,AtomMem 将先前状态复制到历史 H 中,并记录其有效时间区间或更新相应的历史版本。此机制使系统在累积稳定偏好的同时保留过去的用户状态。

3.4 Associative Recall: Memory Graph Activation3.4 关联召回:记忆图激活

Long-term memory often relies on associative recall. These useful memories naturally connect through past events, shared topics, or adjacent dialogue contexts. Therefore, AtomMem activates a memory graph over the atomic facts. This graph uses atomic facts as nodes and encodes three distinct types of associations as edges.长期记忆常依赖关联召回。这些有用记忆自然通过过去事件、共享主题或相邻对话上下文相连。因此,AtomMem 在原子事实上激活记忆图。该图以原子事实为节点,编码三种不同类型的关联作为边。

Entity Edge实体边

Two facts connect if they share keywords. To mitigate the noisy connections introduced by frequent keywords, AtomMem calculates a local edge weight between two facts FiF_{i} and FjF_{j} using an IDF-weighted overlap:若两条事实共享关键词则相连。为减轻高频关键词带来的噪声,AtomMem 使用基于 IDF 加权的重叠计算两条事实 F_i 与 F_j 之间的局部边权:

wkw(Fi,Fj)=k𝒦i𝒦jω(k)k𝒦iω(k)k𝒦jω(k)+ϵw_{\mathrm{kw}}(F_{i},F_{j})=\frac{\sum_{k\in\mathcal{K}_{i}\cap\mathcal{K}_{j}}\omega(k)}{\sqrt{\sum_{k\in\mathcal{K}_{i}}\omega(k)\sum_{k\in\mathcal{K}_{j}}\omega(k)+\epsilon}} (3)

where 𝒦i\mathcal{K}_{i} and 𝒦j\mathcal{K}_{j} are the respective keyword sets. The query-aware weight ω(k)\omega(k) boosts query-relevant keywords and penalizes frequent non-informative terms, while ϵ\epsilon is a small constant added to prevent division by zero and ensure numerical stability.其中 K_i、K_j 为各自的关键词集合。查询感知权重 ω(k) 提升查询相关关键词并惩罚高频无信息词,ε 为防止除零的微小常数,确保数值稳定。

Event Edge事件边

Two facts connect when they belong to the same event. This edge allows the system to recall facts based on a coherent episodic background even if they lack keyword similarity. To reduce noise from overly broad events, the edge weight incorporates a penalty based on event size:若两条事实属于同一事件则相连。该边使系统即使在缺乏关键词相似性时,也能基于连贯的情景背景召回事实。为降低过宽事件带来的噪声,边权加入基于事件规模的惩罚:

wevent(Fi,Fj)=eij1(|e|1)γew_{\mathrm{event}}(F_{i},F_{j})=\sum_{e\in\mathcal{E}_{i}\cap\mathcal{E}_{j}}\frac{1}{\left(|\mathcal{F}_{e}|-1\right)^{\gamma_{e}}} (4)

where i\mathcal{E}_{i} and j\mathcal{E}_{j} denote the event sets for the two facts, and e\mathcal{F}_{e} is the set of member facts within event ee. The penalty coefficient γe\gamma_{e} controls the edge weight decay rate for large events.其中 E_i、E_j 为两条事实的事件集合,F_e 为事件 e 中的成员事实集合。惩罚系数 γ_e 控制大事件的边权衰减速率。

Temporal Edge时间边

Two facts connect when they appear in adjacent dialogue turns within the same session. The edge weight decays according to the turn distance:若两条事实在同一会话的相邻对话轮次出现则相连。边权随轮次距离衰减:

wturn(Fi,Fj)=exp(|posiposj|τ)w_{\mathrm{turn}}(F_{i},F_{j})=\exp\left(-\frac{|\mathrm{pos}_{i}-\mathrm{pos}_{j}|}{\tau}\right) (5)

where posi\mathrm{pos}_{i} and posj\mathrm{pos}_{j} denote dialogue positions, and the decay coefficient τ\tau controls the impact of turn distance. AtomMem restricts turn edges to intra-dialogue facts within a maximum window WW.其中 pos_i、pos_j 为对话位置,衰减系数 τ 控制轮次距离的影响。AtomMem 将轮次边限制在同一对话内的最大窗口 W 之内。

3.5 Response Generation: Hierarchical Memory Integration3.5 响应生成:层级记忆整合

To ensure that the agent responds with accurate and contextually complete information, we design a hierarchical retrieval mechanism. This process transforms a user’s natural language query into a structured search command, executes a multi-strategy recall, and synthesizes the final response.为确保代理的回答准确且上下文完整,我们设计了层级检索机制。该过程将用户自然语言查询转化为结构化检索指令,执行多策略召回,并合成最终响应。

3.5.1 Query Intent Analysis3.5.1 查询意图分析

The retrieval process begins by analyzing the user’s input query qq to determine the specific information needs. We employ an LLM to parse qq and extract a structured query object QparsedQ_{parsed}, defined as:检索过程首先分析用户输入查询 q,以确定具体的信息需求。我们使用 LLM 解析 q 并提取结构化查询对象 Q_parsed,定义为:

Qparsed={Iprof,𝒫q,𝒦q,𝒯q}Q_{parsed}=\{\mathrm{I}_{prof},\mathcal{P}_{q},\mathcal{K}_{q},\mathcal{T}_{q}\}

where Iprof{0,1}\mathrm{I}_{prof}\in\{0,1\} indicates whether user profiles are required, 𝒫q\mathcal{P}_{q} denotes the involved participants, 𝒦q\mathcal{K}_{q} captures the core intent via extracted keywords, and 𝒯q\mathcal{T}_{q} specifies the relevant time range.其中 I_prof∈{0,1} 表示是否需要用户画像,P_q 表示涉及的参与者,K_q 捕获通过关键词提取的核心意图,T_q 指定相关时间范围。

3.5.2 Hierarchical Hybrid Retrieval3.5.2 层级混合检索

To balance precision and contextual breadth, we implement a hierarchical retrieval strategy consisting of three stages.为平衡精确度与上下文广度,我们实现了包含三个阶段的层级检索策略。

(1) Primary Recall: AtomMem first filters global facts using participant (𝒫q\mathcal{P}_{q}) and temporal (𝒯q\mathcal{T}_{q}) constraints. We evaluate the remaining candidates against the query QQ using the predefined metric Sh(F,Q)S_{h}(F,Q)(Eq. 2). The top ks2\frac{k_{s}}{2} facts form the primary set pri\mathcal{R}_{pri}.(1) 初始召回:AtomMem 首先依据参与者 (P_q) 和时间 (T_q) 约束过滤全局事实。我们使用预定义度量 S_h(F, Q)(式 2)评估剩余候选与查询 Q 的匹配度。得分最高的前 k_s/2 条事实构成初始集合 R_pri。

(2) Compensatory Recall: Direct retrieval often misses implicit yet relevant context. Therefore, AtomMem evaluates the event layer. After applying metadata filters, the system ranks events using Sh(E,Q)S_{h}(E,Q)(Eq. 2) to identify the top events. We extract all constituent facts from these events into a candidate pool. We exclude items already in pri\mathcal{R}_{pri} to avoid redundancy. AtomMem then ranks these candidates using a fusion score:(2) 补偿召回:直接检索常遗漏隐含但相关的上下文。因此,AtomMem 评估事件层。经过元数据过滤后,系统对事件使用 S_h(E, Q)(式 2)排序,挑选出顶层事件。我们从这些事件中提取所有组成事实形成候选池,并剔除已在 R_pri 中的条目以避免冗余。随后,AtomMem 使用融合得分对这些候选进行排序:

Sf(F)=weSh(E,Q)+(1we)Sh(F,Q)S_{f}(F)=w_{e}\cdot S_{h}(E,Q)+(1-w_{e})\cdot S_{h}(F,Q)

where wew_{e} and wfw_{f} balance global event relevance and local fact precision. The top ks2\frac{k_{s}}{2} facts from this pool form the compensatory set comp\mathcal{R}_{comp}. The combined set seed=pricomp\mathcal{R}_{seed}=\mathcal{R}_{pri}\cup\mathcal{R}_{comp} ensures both direct precision and contextual completeness.其中 w_e 与 w_f 平衡全局事件相关性和局部事实精确度。得分最高的前 k_s/2 条事实构成补偿集合 R_comp。合并集合 R_seed = R_pri ∪ R_comp 确保既有直接精确也有上下文完整。

(3) Associative Recall: We use seed\mathcal{R}_{seed} as seeds to activate the memory graph. AtomMem constructs a localized graph around these seeds by expanding limited hops and retaining only top neighbors that satisfy participant and temporal constraints. AtomMem then applies Random Walk with Restart (RWR) to propagate activations across entity, event and temporal edges. Finally, the system selects the top kfk_{f} facts with the highest activation scores across all nodes to output the final retrieved context fact\mathcal{R}_{fact}.(3) 关联召回:我们以 R_seed 为种子激活记忆图。AtomMem 在这些种子周围构建局部图,扩展有限跳数并仅保留满足参与者和时间约束的顶邻居。随后,AtomMem 对实体、事件和时间边执行随机游走重启(RWR),将激活在图中传播。最终,系统选取激活分数最高的前 k_f 条事实作为最终检索上下文 R_fact。

3.5.3 Profile Augmentation and Response Generation3.5.3 画像增强与响应生成

If the intent analysis sets the flag Iprof=1\mathrm{I}_{prof}=1, AtomMem executes profile recall to retrieve stable user attributes. The system first filters the global repository to retain profiles matching the query participants 𝒫q\mathcal{P}_{q} and then ranks these candidates using the hybrid similarity metric Sh(𝒫q,Q)S_{h}(\mathcal{P}_{q},Q) (Eq. 2). The top kpk_{p} items form the profile context set prof\mathcal{R}_{prof}. If the input contains temporal constraints, the system selects profile versions valid during that specific time. This ensures the response reflects both current user preferences and historical user states.若意图分析标记 I_prof=1,AtomMem 将执行画像召回以获取稳定的用户属性。系统首先过滤全局库,保留匹配查询参与者 P_q 的画像,然后使用混合相似度 S_h(P_q, Q)(式 2)对这些候选进行排序。得分最高的前 k_p 条构成画像上下文集合 R_prof。若输入包含时间约束,系统会选择在该时间段有效的画像版本,以确保响应既反映当前偏好又兼顾历史状态。

Finally, AtomMem constructs a comprehensive context 𝒞\mathcal{C} by concatenating the retrieved episodic fact set fact\mathcal{R}_{fact} and the semantic profile set prof\mathcal{R}_{prof}. This context CC, along with the original query qq, is fed into the LLM to generate the final response. This multi-source injection mechanism ensures that the agent’s answer is grounded in specific atomic details, enriched by event-level context, and personalized by long-term user attributes.最后,AtomMem 将检索到的情景事实集合 R_fact 与语义画像集合 R_prof 拼接构成综合上下文 C。该上下文 C 与原始查询 q 一同输入 LLM,生成最终响应。此多源注入机制确保代理的答案基于具体原子细节、事件层上下文以及长期用户属性进行充分 grounding。

4 Experiments4 实验

Method Single Hop Multi-Hop Temporal Open Domain Tokens(K)
F1F_{1}\uparrow BLEU-1 \uparrow JJ\uparrow F1F_{1}\uparrow BLEU-1 \uparrow JJ\uparrow F1F_{1}\uparrow BLEU-1 \uparrow JJ\uparrow JJ\uparrow
LoCoMo 37.81 26.23 57.07 20.97 11.09 48.58 34.79 15.46 38.01 41.67 827.20
MemoryBank 17.85 12.13 46.61 11.25 8.20 28.01 14.26 9.60 34.27 23.96 926.98
A-Mem 33.87 27.64 54.10 21.17 15.40 43.26 34.13 29.98 34.89 32.29 11687.58
MEM0 54.95 44.71 78.00 36.02 25.25 62.41 30.36 29.69 30.53 54.17 55300.30
MemoryOS 49.72 43.58 66.47 37.15 26.87 60.99 41.99 36.32 34.58 51.04 19207.67
LightMem 49.30 42.45 68.97 36.59 27.27 64.89 47.41 41.29 51.09 43.75 5021.56
AtomMem-Flat 47.08 40.40 67.66 37.03 29.50 55.67 56.45 48.98 59.50 52.08 722.75
AtomMem 56.66 49.56 78.48 42.50 33.26 68.44 62.78 57.64 66.98 64.58 21357.06
Table 1: Performance comparison of various memory methods on the LoCoMo benchmark. The best and second best results are bolded and underlined. 表 1: 不同记忆方法在 LoCoMo 基准上的性能比较。最佳和第二佳结果分别加粗和下划线。

4.1 Experimental Settings4.1 实验设置

Datasets数据集

We evaluate AtomMem on the LoCoMo Maharana et al. (2024) and LongMemEval Wu et al. (2025) benchmarks. LoCoMo is a challenging dataset widely adopted for assessing long-context capabilities in memory-augmented LLMs. Designed to test the management of remote dependencies and consistency, LoCoMo consists of long-term interactions that average over 600 turns across 35 sessions, paired with comprehensive question sets. Additionally, LongMemEval specifically targets the interactive memory capabilities of chat assistants by using 500 curated questions to evaluate diverse functions. The experimental results on LongMemEval are detailed in Appendix 3.我们在 LoCoMo(Maharana 等,2024)和 LongMemEval(Wu 等,2025)基准上评估 AtomMem。LoCoMo 是广泛采用的用于评估记忆增强 LLM 长上下文能力的挑战性数据集,旨在测试远程依赖管理和一致性,包含平均 600 轮、35 场会话的长互动,并配有完整问答集。LongMemEval 则专注于聊天助手的交互记忆能力,使用 500 条精心策划的问题评估多种功能。LongMemEval 的实验结果详见附录 3。

Baselines and Metrics基线与评估指标

To validate the effectiveness of our approach, we benchmark AtomMem against representative memory modeling systems, including LoCoMo Maharana et al. (2024), MemoryBank Zhong et al. (2023), A-MEM Xu et al. (2025), MEM0 Chhikara et al. (2025), MemoryOS Kang et al. (2025) and LightMem Fang et al. (2026). For fair comparison, we re-implemented all baselines using GPT-4o-mini as the uniform backbone model. Performance is measured using three complementary metrics: Token-level F1 Score (F1), BLEU-1, and LLM-as-a-Judge (J). The LLM-as-a-Judge metric employs deepseek-v4-pro with a rigorous evaluation prompt to assess semantic correctness, providing a closer approximation to human judgment. Additionally, we track the total API token consumption across the entire pipeline to evaluate cost efficiency.为验证我们方法的有效性,我们将 AtomMem 与代表性记忆建模系统进行基准比较,包括 LoCoMo(Maharana 等,2024)、MemoryBank(Zhong 等,2023)、A‑MEM(Xu 等,2025)、MEM0(Chhikara 等,2025)、MemoryOS(Kang 等,2025)和 LightMem(Fang 等,2026)。为公平比较,所有基线均使用 GPT‑4o‑mini 作为统一的骨干模型重新实现。性能通过三项互补指标衡量:Token 级别 F1(F1)、BLEU‑1 和 LLM‑as‑a‑Judge(J)。LLM‑as‑a‑Judge 指标采用 deepseek‑v4‑pro 并使用严格评估提示,以评估语义正确性,接近人工判断。此外,我们统计整个流水线的总 API Token 消耗,以评估成本效率。

Experimental Details实验细节

We fine-tuned a Qwen3-14B model as our fact extractor using SFT LoRA on a single NVIDIA A100 GPU. The training configuration included a learning rate of 5e-5, a LoRA rank of 128, and an effective global batch size of 8 over 3 epochs. To ensure consistent experimental conditions, we employed all-minilm-L6-v2 as the unified text embedding model for both our approach and all baseline systems. Furthermore, we standardized the retrieval capacity by setting the top-kk to 10 for all comparative baselines and our method. Detailed hyperparameter configurations for AtomMem’s hierarchical retrieval and fusion mechanisms are provided in Appendix A.7.我们在单张 NVIDIA A100 GPU 上使用 LoRA 对 Qwen3‑14B 模型进行事实抽取器的 SFT 微调。训练配置包括学习率 5e‑5、LoRA rank 为 128、全局批大小 8,训练 3 个 epoch。为确保实验条件一致,所有方法(包括我们的)统一使用 all‑minilm‑L6‑v2 作为文本嵌入模型。此外,我们将检索容量 top‑k 统一设为 10。AtomMem 层级检索与融合机制的详细超参数见附录 A.7。

4.2 Main Results4.2 主要结果

Method Single Hop Multi-Hop Temporal Open Domain
F1F_{1} BLEU-1 R@10 JJ F1F_{1} BLEU-1 R@10 JJ F1F_{1} BLEU-1 R@10 JJ R@10 JJ
LoCoMo 37.81 26.23 56.98 57.07 20.97 11.09 32.91 48.58 34.79 15.46 56.10 38.01 33.55 41.67
AtomMem-FLAT 47.08 40.40 72.18 67.66 37.03 29.50 41.75 55.67 56.45 48.98 79.89 59.50 42.46 52.08
w/o Profile 50.91 44.59 75.21 68.73 38.33 30.29 44.56 59.22 57.77 51.44 79.00 62.93 44.96 54.17
w/o Graph 50.55 44.14 74.08 71.82 39.76 30.91 46.72 62.76 60.90 54.74 80.33 62.93 47.73 60.42
AtomMem 56.66 49.56 76.30 78.48 42.50 33.26 48.15 68.44 62.78 57.64 81.10 66.98 48.98 64.58
Table 2: Ablation study of AtomMem on LoCoMo using GPT-4o-mini. R@10 denotes Recall@10. The best results are highlighted in bold, and the second-best results are underlined. “AtomMem-FLAT” removes the hierarchical memory structure; “w/o Profile” removes profile memory; and “w/o Graph” removes graph-based associative recall. 表 2: AtomMem 在 LoCoMo 上的消融研究(使用 GPT‑4o‑mini)。R@10 表示 Recall@10。最佳结果加粗,第二佳结果下划线。 “AtomMem‑FLAT” 移除层级记忆结构; “w/o Profile” 移除画像记忆; “w/o Graph” 移除基于图的关联召回。
Superior Performance卓越性能

As presented in Table 1, AtomMem achieves state-of-the-art results across all evaluated metrics. While maintaining a steady lead in Single Hop tasks, our system demonstrates its distinct advantage in scenarios requiring long-context integration and complex reasoning. Specifically, in Multi-Hop and Temporal tasks, AtomMem achieves substantial improvements over the strongest baseline, LightMem, increasing the J-score by 5.5% and 31.1%, respectively. AtomMem also dominates the Open Domain task by raising the J-score to 64.58 compared to 54.17 for MEM0. This consistent enhancement confirms that our hierarchical memory architecture successfully bridges the semantic gap between queries and distant historical context. AtomMem traces implicit narrative connections beyond surface similarity to ensure accurate retrieval of subtle information.如表 1 所示,AtomMem 在所有评估指标上均实现了最先进的结果。虽然在 Single Hop 任务上保持稳固领先,但系统在需要长上下文整合和复杂推理的场景中展现出显著优势。具体而言,在 Multi‑Hop 与 Temporal 任务上,AtomMem 相较最强基线 LightMem 的 J 分别提升了 5.5% 和 31.1%。在 Open Domain 任务中,AtomMem 将 J 分提升至 64.58,远超 MEM0 的 54.17。此一致提升验证了我们的层级记忆架构成功弥合了查询与遥远历史上下文之间的语义鸿沟。AtomMem 能够追踪表层相似度之外的隐含叙事关联,确保检索到细微信息的准确性。

Computational Efficiency计算效率

AtomMem demonstrates competitive cost efficiency alongside its robust reasoning capabilities. Despite the overhead associated with memory construction, our system significantly reduces total token consumption by approximately 61.4% compared to the highly performant Mem0. This efficiency stems from our strategy of compressing redundant conversational streams into compact, high-value atomic units, which prevents the context window from being flooded by low-utility tokens during retrieval. AtomMem strikes an optimal balance between resource consumption and advanced reasoning to offer a scalable solution for practical deployment.AtomMem 在保持强大推理能力的同时展现出竞争性的成本效率。尽管记忆构建带来一定开销,但相比性能极佳的 Mem0,系统的总 Token 消耗约降低 61.4%。这种效率来源于我们将冗余对话流压缩为高价值原子单元的策略,防止检索时上下文窗口被低效 Token 塞满。AtomMem 在资源消耗与高级推理之间取得了最佳平衡,为实际部署提供了可扩展的解决方案。

Validation of Atomic Fact Extraction原子事实抽取的验证

We validate the effectiveness of our core extraction mechanism using the AtomMem-Flat variant. This simplified version lacks hierarchical event structures and relies solely on retrieving atomic facts. Despite this simplicity, AtomMem-Flat significantly outperforms the standard LoCoMo baseline operating on raw dialogue history. For instance, on the challenging Multi-Hop reasoning tasks, it raises the F1 score from 20.97 to 37.03, yielding a 76.6% relative improvement. Critically, AtomMem-Flat achieves this performance while using the absolute lowest number of tokens (722k) among all methods, comparable to LoCoMo yet delivering performance competitive with the strongest existing baseline. This result provides compelling evidence that memory storage quality is paramount. Sophisticated system orchestration cannot compensate for flawed memory representations or information loss.我们使用 AtomMem‑Flat 变体验证核心抽取机制的有效性。该简化版本缺乏层级事件结构,仅依赖原子事实检索。尽管如此,AtomMem‑Flat 仍显著超越基于原始对话历史的 LoCoMo 基线。例如,在具挑战性的 Multi‑Hop 推理任务上,F1 分从 20.97 提升至 37.03,提升幅度达 76.6%。关键是,AtomMem‑Flat 在使用绝对最低 Token 数(722k)时仍能与最强基线竞争,说明记忆存储质量是关键因素。再高级的系统编排也无法弥补糟糕的记忆表示或信息丢失。

4.3 Ablation Study4.3 消融研究

To verify the contribution of each component, we benchmarked the full AtomMem against three variants, as shown in Table 2. The AtomMem FLAT variant uses simple flat retrieval without hierarchical structures but significantly outperforms the standard LoCoMo baseline. This proves that structured atomic facts provide a highly superior memory representation. The results also validate our temporal profile memory. Without this profile, the Single Hop F1F_{1} score drops from 56.66 to 50.91. This demonstrates that tracking stable user attributes is crucial. Furthermore, removing the graph recall impairs complex reasoning. The notable drop in Multi Hop performance serves as a prime example. This highlights that isolated atomic facts cannot resolve remote dependencies without relational chaining to connect distant clues.为验证各组件贡献,我们将完整的 AtomMem 与三种变体进行对比,结果见表 2。AtomMem‑FLAT 采用平面检索而无层级结构,但仍显著优于标准 LoCoMo 基线,证明结构化原子事实提供了极佳的记忆表示。结果亦验证了时间画像记忆的价值。去除画像后,Single Hop 的 F1 分从 56.66 降至 50.91,表明追踪稳定用户属性至关重要。进一步,去除图召回会削弱复杂推理能力,Multi‑Hop 性能出现明显下降,说明孤立的原子事实若无关联链路难以解决远程依赖。

4.4 Hyperparameter Analysis4.4 超参数分析

We evaluate the retrieval capacity kfk_{f} below. Additional analyses are detailed in Appendix A.6.我们评估了检索容量 k_f 的影响,更多分析见附录 A.6。

Impact of Retrieval Capacity kfk_{f} 检索容量 k_f 的影响

We evaluated performance by varying the number of retrieved atomic facts from 5 to 40. As shown in Figure 3, increasing kk initially yields significant gains for all tasks, particularly in reasoning-intensive tasks. This confirms that a broader context provides necessary evidence for complex deduction. Despite continuous increases in Recall, system performance drops when kk is greater than 20. This indicates that excessive irrelevant noise degrades the reasoning quality of the LLM. Consequently, we selected a moderate setting (kf=10k_{f}=10) for our main experiments to strike an optimal balance between retrieval accuracy, token consumption, and response latency.我们将检索的原子事实数量从 5 调至 40 进行实验。如图 3 所示,增加 k 初期显著提升所有任务的表现,尤其是推理密集任务,说明更广的上下文提供了必要的证据。然而,当 k 超过 20 后,尽管 Recall 仍上升,系统性能出现下降,说明过多无关噪声会削弱 LLM 的推理质量。因此,我们在主实验中选择适中的 k_f=10,以在检索准确性、Token 消耗和响应时延之间取得最佳平衡。

Refer to caption
Figure 3: Performance sensitivity analysis under varying the memory retrieval parameter kk.图 3:在不同记忆检索参数 k 下的性能敏感性分析。

5 Conclusion5 结论

We introduced AtomMem as a robust long-term memory framework. It distills raw dialogues into precise atomic facts to serve as a highly efficient memory representation. The system organizes these facts into hierarchical event structures and temporal profiles. This design captures coherent episodic contexts and tracks dynamically evolving user attributes. AtomMem then activates an associative memory graph to connect scattered facts during retrieval. Experiments on the LoCoMo benchmark confirm that AtomMem achieves state-of-the-art performance. The superior results of our simplified flat variant further validate that memory storage quality is paramount. This proves that structured facts provide a fundamentally better retrieval basis than unstructured history. Ultimately, AtomMem offers a scalable and economically viable solution to deploy intelligent agents capable of sustaining personalized long term interactions.我们引入了 AtomMem 作为一个强大的长期记忆框架。它将原始对话提炼为精确的原子事实,以作为高效的记忆表示。系统将这些事实组织成层次化的事件结构和时间画像。该设计捕捉连贯的情景上下文,并跟踪动态演化的用户属性。随后,AtomMem 激活关联记忆图,在检索时连接分散的事实。对 LoCoMo 基准的实验验证了 AtomMem 达到了最新水平的性能。我们简化的平面变体取得的卓越结果进一步证明,记忆存储质量至关重要。这表明结构化事实提供了比非结构化历史更根本的检索基础。最终,AtomMem 提供了一种可扩展且经济可行的解决方案,以部署能够维持个性化长期交互的智能体。

Limitations局限性

We acknowledge a few limitations of the current AtomMem framework. First, multiple stages rely on the capabilities of the underlying LLM, making performance sensitive to the generation stability of the base model. Second, the current framework processes only textual interactions. Real world conversations often involve multimodal inputs like images and audio, making system extension a natural progression for future research. Lastly, although our system achieves a favorable balance between token efficiency and system performance, token efficiency can be further optimized.我们承认当前 AtomMem 框架存在一些局限。首先,多个阶段依赖底层大语言模型的能力,使得性能对基础模型的生成稳定性敏感。其次,当前框架仅处理文本交互。现实对话常常涉及图像、音频等多模态输入,这使得系统扩展成为未来研究的自然方向。最后,虽然我们的系统在令牌效率与系统性能之间实现了良好的平衡,但令牌效率仍有进一步优化的空间。

References参考文献

  • Asai et al. (2024) Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. 2024. Self-RAG: Learning to retrieve, generate, and critique through self-reflection. In The Twelfth International Conference on Learning Representations. Asai 等 (2024) Akari Asai、Zeqiu Wu、Yizhong Wang、Avirup Sil 和 Hannaneh Hajishirzi. 2024. Self-RAG: 通过自我反思学习检索、生成和批评。 发表于第十二届国际学习表征会议。
  • Bubeck et al. (2023) Sébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, and 1 others. 2023. Sparks of artificial general intelligence: Early experiments with GPT-4. Preprint, arXiv:2303.12712. Bubeck 等 (2023) Sébastien Bubeck、Varun Chandrasekaran、Ronen Eldan、Johannes Gehrke、Eric Horvitz、Ece Kamar、Peter Lee、Yin Tat Lee、Yuanzhi Li、Scott Lundberg 等. 2023. 人工通用智能的火花:对 GPT-4 的早期实验。 预印本,arXiv:2303.12712。
  • Chhikara et al. (2025) Prateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh, and Deshraj Yadav. 2025. Mem0: Building production-ready AI agents with scalable long-term memory. Preprint, arXiv:2504.19413. Chhikara 等人 (2025) Prateek Chhikara、Dev Khant、Saket Aryan、Taranjeet Singh 和 Deshraj Yadav。 2025。 Mem0:构建具备可扩展长期记忆的生产就绪 AI 代理。 预印本,arXiv:2504.19413。
  • Fang et al. (2026) Jizhan Fang, Xinle Deng, Haoming Xu, Ziyan Jiang, Yuqi Tang, Ziwen Xu, Shumin Deng, Yunzhi Yao, Mengru Wang, Shuofei Qiao, Huajun Chen, and Ningyu Zhang. 2026. LightMem: Lightweight and efficient memory-augmented generation. In The Fourteenth International Conference on Learning Representations. Fang 等人 (2026) Jizhan Fang、Xinle Deng、Haoming Xu、Ziyan Jiang、Yuqi Tang、Ziwen Xu、Shumin Deng、Yunzhi Yao、Mengru Wang、Shuofei Qiao、Huajun Chen 和 Ningyu Zhang。 2026。 LightMem:轻量高效的记忆增强生成。 发表于第十四届国际学习表征会议。
  • Gao et al. (2023) Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yi Dai, Jiawei Sun, Meng Wang, and Haofen Wang. 2023. Retrieval-augmented generation for large language models: A survey. Preprint, arXiv:2312.10997. Gao 等人 (2023) Yunfan Gao、Yun Xiong、Xinyu Gao、Kangxiang Jia、Jinliu Pan、Yuxi Bi、Yi Dai、Jiawei Sun、Meng Wang 和 Haofen Wang。2023。 检索增强的大语言模型生成:综述。 预印本,arXiv:2312.10997。
  • Guu et al. (2020) Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 3929–3938. PMLR. Guu 等人 (2020) Kelvin Guu、Kenton Lee、Zora Tung、Panupong Pasupat 和 Mingwei Chang。2020。 检索增强语言模型预训练。 收录于第 37 届国际机器学习会议论文集,卷 119,页 3929–3938。PMLR。
  • Jiang et al. (2023) Zhengbao Jiang, Frank Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023. Active retrieval augmented generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 7969–7992, Singapore. Association for Computational Linguistics. Jiang 等人 (2023) Zhengbao Jiang、Frank Xu、Luyu Gao、Zhiqing Sun、Qian Liu、Jane Dwivedi‑Yu、Yiming Yang、Jamie Callan 和 Graham Neubig。2023。 主动检索增强生成。 收录于 2023 年自然语言处理实证方法会议论文集,页 7969–7992,新加坡。计算语言学协会。
  • Kang et al. (2025) Jiazheng Kang, Mingming Ji, Zhe Zhao, and Ting Bai. 2025. Memory OS of AI agent. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 25961–25970, Suzhou, China. Association for Computational Linguistics. Kang 等人 (2025) Jiazheng Kang、Mingming Ji、Zhe Zhao 和 Ting Bai。2025。 AI 代理的记忆操作系统。 收录于 2025 年自然语言处理实证方法会议论文集,页 25961–25970,苏州,中国。计算语言学协会。
  • Lewis et al. (2020) Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems, volume 33, pages 9459–9474. Lewis 等人 (2020) Patrick Lewis、Ethan Perez、Aleksandra Piktus、Fabio Petroni、Vladimir Karpukhin、Naman Goyal、Heinrich Küttler、Mike Lewis、Wen‑tau Yih、Tim Rocktäschel、Sebastian Riedel 和 Douwe Kiela。2020。 检索增强生成用于知识密集型 NLP 任务。 收录于神经信息处理系统进展,第 33 卷,页 9459–9474。
  • Liu et al. (2023) Lei Liu, Xiaoyan Yang, Yue Shen, Binbin Hu, Zhiqiang Zhang, Jinjie Gu, and Guannan Zhang. 2023. Think-in-memory: Recalling and post-thinking enable LLMs with long-term memory. Preprint, arXiv:2311.08719. Liu 等人 (2023) Lei Liu、Xiaoyan Yang、Yue Shen、Binbin Hu、Zhiqiang Zhang、Jinjie Gu 和 Guannan Zhang。2023。 Think‑in‑memory:回忆与后思考赋予 LLM 长期记忆能力。 预印本,arXiv:2311.08719。
  • Liu et al. (2024) Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157–173. Liu 等人 (2024) Nelson F. Liu、Kevin Lin、John Hewitt、Ashwin Paranjape、Michele Bevilacqua、Fabio Petroni 和 Percy Liang。2024。 迷失在中间:语言模型如何使用长上下文。 计算语言学协会汇刊,12:157–173。
  • Liu et al. (2026) Shuochen Liu, Junyi Zhu, Long Shu, Junda Lin, Yuhao Chen, Haotian Zhang, Chao Zhang, Derong Xu, Jia Li, Bo Tang, Zhiyu Li, Feiyu Xiong, Enhong Chen, and Tong Xu. 2026. PERMA: Benchmarking personalized memory agents via event-driven preference and realistic task environments. Preprint, arXiv:2603.23231. Liu 等人 (2026) Shuochen Liu、Junyi Zhu、Long Shu、Junda Lin、Yuhao Chen、Haotian Zhang、Chao Zhang、Derong Xu、Jia Li、Bo Tang、Zhiyu Li、Feiyu Xiong、Enhong Chen 和 Tong Xu。2026。 PERMA:通过事件驱动偏好和真实任务环境对个性化记忆代理进行基准测试。 预印本,arXiv:2603.23231。
  • Maharana et al. (2024) Adyasha Maharana, Dong-Ho Lee, Sergey Tulyakov, Mohit Bansal, Francesco Barbieri, and Yuwei Fang. 2024. Evaluating very long-term conversational memory of LLM agents. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13851–13870, Bangkok, Thailand. Association for Computational Linguistics. Maharana 等人 (2024) Adyasha Maharana、Dong‑Ho Lee、Sergey Tulyakov、Mohit Bansal、Francesco Barbieri 和 Yuwei Fang。2024。 评估 LLM 代理的超长期对话记忆。 收录于第 62 届计算语言学协会年会论文集(卷 1:长文),页 13851–13870,曼谷,泰国。计算语言学协会。
  • Modarressi et al. (2023) Ali Modarressi, Ayyoob Imani, Mohsen Fayyaz, and Hinrich Schütze. 2023. RET-LLM: Towards a general read-write memory for large language models. Preprint, arXiv:2305.14322. Modarressi 等人 (2023) Ali Modarressi、Ayyoob Imani、Mohsen Fayyaz 和 Hinrich Schütze。2023。 RET‑LLM:面向大语言模型的通用读写记忆。 预印本,arXiv:2305.14322。
  • Nogueira and Cho (2019) Rodrigo Nogueira and Kyunghyun Cho. 2019. Passage re-ranking with BERT. Preprint, arXiv:1901.04085. Nogueira 和 Cho (2019) Rodrigo Nogueira 和 Kyunghyun Cho。2019。 使用 BERT 进行段落重新排序。 预印本,arXiv:1901.04085。
  • OpenAI (2023) OpenAI. 2023. GPT-4 technical report. Preprint, arXiv:2303.08774. OpenAI (2023) OpenAI。2023。 GPT‑4 技术报告。 预印本,arXiv:2303.08774。
  • Packer et al. (2023) Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica, and Joseph E. Gonzalez. 2023. MemGPT: Towards LLMs as operating systems. Preprint, arXiv:2310.08560. Packer 等人 (2023) Charles Packer、Sarah Wooders、Kevin Lin、Vivian Fang、Shishir G. Patil、Ion Stoica 和 Joseph E. Gonzalez。2023。 MemGPT:迈向将 LLM 作为操作系统。 预印本,arXiv:2310.08560。
  • Park et al. (2023) Joon Sung Park, Joseph C. O’Brien, Carrie J. Cai, Meredith Ringel Morris, Percy Liang, and Michael S. Bernstein. 2023. Generative agents: Interactive simulacra of human behavior. In Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology, pages 1–22. Association for Computing Machinery. Park 等人 (2023) Joon Sung Park、Joseph C. O’Brien、Carrie J. Cai、Meredith Ringel Morris、Percy Liang 和 Michael S. Bernstein。2023。 生成式代理:人类行为的交互式模拟。 收录于第 36 届 ACM 用户界面软件与技术年会论文集,页 1–22。计算机协会。
  • Tan et al. (2025) Zhen Tan, Jun Yan, I-Hung Hsu, Rujun Han, Zifeng Wang, Long Le, Yiwen Song, Yanfei Chen, Hamid Palangi, George Lee, Anand Rajan Iyer, Tianlong Chen, Huan Liu, Chen-Yu Lee, and Tomas Pfister. 2025. In prospect and retrospect: Reflective memory management for long-term personalized dialogue agents. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8416–8439, Vienna, Austria. Association for Computational Linguistics. Tan 等人 (2025) Zhen Tan、Jun Yan、I‑Hung Hsu、Rujun Han、Zifeng Wang、Long Le、Yiwen Song、Yanfei Chen、Hamid Palangi、George Lee、Anand Rajan Iyer、Tianlong Chen、Huan Liu、Chen‑Yu Lee 和 Tomas Pfister。2025。 前瞻与回顾:面向长期个性化对话代理的反思记忆管理。 收录于第 63 届计算语言学协会年会论文集(卷 1:长文),页 8416–8439,维也纳,奥地利。计算语言学协会。
  • Touvron et al. (2023) Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, and 1 others. 2023. Llama 2: Open foundation and fine-tuned chat models. Preprint, arXiv:2307.09288. Touvron 等人 (2023) Hugo Touvron、Louis Martin、Kevin Stone、Peter Albert、Amjad Almahairi、Yasmine Babaei、Nikolay Bashlykov、Soumya Batra、Prajjwal Bhargava、Shruti Bhosale 等。2023。 Llama 2:开放基础模型与微调聊天模型。 预印本,arXiv:2307.09288。
  • Wu et al. (2025) Di Wu, Hongwei Wang, Wenhao Yu, Yuwei Zhang, Kai-Wei Chang, and Dong Yu. 2025. LongMemEval: Benchmarking chat assistants on long-term interactive memory. In The Thirteenth International Conference on Learning Representations. Wu 等人 (2025) Di Wu、Hongwei Wang、Wenhao Yu、Yuwei Zhang、Kai‑Wei Chang 和 Dong Yu。2025。 LongMemEval:对长时交互记忆的聊天助手基准测试。 收录于第十三届国际学习表征会议。
  • Xi et al. (2023) Zhiheng Xi, Wenxiang Chen, Xin Guo, Wei He, Yiwen Ding, Boyang Hong, Ming Zhang, Junzhe Wang, Senjie Jin, and 1 others. 2023. The rise and potential of large language model based agents: A survey. Preprint, arXiv:2309.07864. Xi 等人 (2023) Zhiheng Xi、Wenxiang Chen、Xin Guo、Wei He、Yiwen Ding、Boyang Hong、Ming Zhang、Junzhe Wang、Senjie Jin 等。2023。 大型语言模型代理的崛起与潜力:综述。 预印本,arXiv:2309.07864。
  • Xiao et al. (2024) Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. 2024. Efficient streaming language models with attention sinks. In The Twelfth International Conference on Learning Representations. Xiao 等人 (2024) Guangxuan Xiao、Yuandong Tian、Beidi Chen、Song Han 和 Mike Lewis。2024。 使用注意力汇聚的高效流式语言模型。 收录于第十二届国际学习表征会议。
  • Xu et al. (2025) Wujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, and Yongfeng Zhang. 2025. A-MEM: Agentic memory for LLM agents. In Advances in Neural Information Processing Systems. Xu 等人 (2025) Wujiang Xu、Zujie Liang、Kai Mei、Hang Gao、Juntao Tan 和 Yongfeng Zhang。2025。 A‑MEM:面向 LLM 代理的代理记忆。 收录于神经信息处理系统进展。
  • Zhong et al. (2023) Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang. 2023. MemoryBank: Enhancing large language models with long-term memory. Preprint, arXiv:2305.10250. Zhong 等人 (2023) Wanjun Zhong、Lianghong Guo、Qiqi Gao、He Ye 和 Yanlin Wang。2023。 MemoryBank:通过长期记忆增强大语言模型。 预印本,arXiv:2305.10250。
  • Zhou et al. (2025) Zijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim, Alok Prakash, Daniela Rus, Jinhua Zhao, Bryan Kian Hsiang Low, and Paul Pu Liang. 2025. MEM1: Learning to synergize memory and reasoning for efficient long-horizon agents. Preprint, arXiv:2506.15841. Zhou 等人 (2025) Zijian Zhou、Ao Qu、Zhaoxuan Wu、Sunghwan Kim、Alok Prakash、Daniela Rus、Jinhua Zhao、Bryan Kian Hsiang Low 和 Paul Pu Liang。2025。 MEM1:学习将记忆与推理协同用于高效长视距代理。 预印本,arXiv:2506.15841。

Appendix A Appendix附录 A 附录

A.1 Details of Dataset ConstructionA.1 数据集构建细节

In this section, we provide a detailed description of the data construction process for our instruction-tuning dataset 𝒟\mathcal{D}. This includes the source of the raw dialogues, the specific guidelines used for fact extraction, and the final dataset statistics.在本节中,我们详细描述指令微调数据集 𝒟\mathcal{D} 的数据构建过程,包括原始对话的来源、事实抽取的具体指南以及最终的数据集统计信息。

A.1.1 Data Source and DiversityA.1.1 数据来源与多样性

We utilized the generation pipeline of the LOCOMO project to obtain high quality raw dialogues. This pipeline utilizes LLM-based agents driven by specific character profiles and temporal event graphs, ensuring that conversations are grounded in consistent long-term contexts.我们使用 LOCOMO 项目的生成流水线获取高质量原始对话。该流水线利用基于 LLM 的代理,依据特定角色画像和时间事件图生成对话,确保对话在一致的长期上下文中进行。

We meticulously designed 10 distinct character groups to cover a wide range of demographics, including varying ages, occupations, personalities, cultural backgrounds, and life stages. Specifically, our SFT training set employs custom characters like Elena the Chef and Kenji the Novelist, keeping them entirely independent of the LOCOMO evaluation set characters such as Caroline and Melanie. This configuration ensures zero overlap between our SFT dataset and the LOCOMO test set. Therefore, all training entities and events and themes remain strictly distinct from the evaluation set. Our SFT dataset covers extensive conversational topics grounded in realistic life scenarios across specific themes, including but not limited to:我们精心设计了 10 种不同的角色组,覆盖广泛的人口统计特征,包括不同年龄、职业、性格、文化背景和人生阶段。具体而言,我们的 SFT 训练集使用了自定义角色,如厨师 Elena 和小说家 Kenji,且这些角色与 LOCOMO 评估集中的角色(如 Caroline、Melanie)完全独立。此配置确保我们的 SFT 数据集与 LOCOMO 测试集之间零重叠。因此,所有训练实体、事件和主题均严格区别于评估集。我们的 SFT 数据集涵盖了基于真实生活场景的广泛对话主题,具体包括但不限于:

  • Professional & Academic Dynamics: Ranging from technical discussions on frontend engineering and performance optimization, to the daily routines of hospital nursing, travel blogging, and the academic pressure of college majors (e.g., Psychology, Mechanical Engineering).专业与学术动态:从前端工程和性能优化的技术讨论,到医院护理的日常、旅行博客以及大学专业(如心理学、机械工程)的学业压力。

  • Family & Lifestyle: Covering complex domestic challenges such as managing multi-child households, stay-at-home parenting, housing renovation investments, and balancing urban versus rural living.家庭与生活方式:涉及多子女家庭管理、全职育儿、住房装修投资以及城镇与农村生活平衡等复杂家庭挑战。

  • Interests & Culture: Spanning diverse hobbies like K-pop music, traditional Italian cuisine (e.g., ossobuco, risotto), organic gardening, handmade crafts, and historical novel reading.兴趣与文化:涵盖 K‑pop 音乐、传统意大利料理(如炖小牛膝、烩饭)、有机园艺、手工艺以及历史小说阅读等多元爱好。

  • Values & Emotional Depth: Exploring deep personal issues such as career burnout, homesickness in new environments, animal rights advocacy, and discussions on minimalism versus consumerism.价值观与情感深度:探讨职业倦怠、新环境思乡、动物权利倡导以及极简主义与消费主义的讨论等深层个人议题。

These scenarios range from mundane daily trivia to significant life decisions, providing a rich and authentic foundation for testing long-term memory capabilities.这些情景从日常琐事到重大人生决策不等,为测试长期记忆能力提供了丰富且真实的基础。

A.1.2 Extraction Pipeline and Prompt GuidelinesA.1.2 抽取流水线与提示指南

We employed a two-stage pipeline to construct the dataset: Teacher-Model Preliminary Extraction followed by Human-Guided Refinement.我们采用两阶段流水线构建数据集:教师模型初步抽取 → 人工引导精炼。

(1) Stage 1: Teacher-Model Extraction(1) 阶段 1:教师模型抽取

We utilized GPT-4o as the teacher model to perform the initial extraction. The model was provided with specific guidelines to filter noise and resolve contextual dependencies. The exact system prompt used is presented in Figure 4.我们使用 GPT‑4o 作为教师模型执行初始抽取。模型被提供了特定指南,以过滤噪声并解决上下文依赖。具体的系统提示如图 4 所示。

(2) Stage 2: Human-Guided Refinement(2) 阶段 2:人工引导精炼

Human annotators reviewed all samples generated by the teacher model to guarantee high data quality. Rigorous manual verification confirmed comprehensive denoising, unambiguous coreference resolution, the decomposition of long sentences, and the elimination of hallucinations. Their primary responsibilities were:人工标注者审阅教师模型生成的所有样本,以保证高数据质量。严格的人工验证确认了全面去噪、明确的指代消解、长句拆分以及幻觉的消除。他们的主要职责包括:

  • Verification: Checking whether the extracted facts accurately reflected the original dialogue without hallucination.验证:检查抽取的事实是否准确反映原始对话且无幻觉。

  • Refinement: Correcting any unresolved pronouns or vague temporal references that the teacher model missed.精炼:纠正教师模型遗漏的未解析代词或模糊时间指代。

  • Filtering: Removing any residual conversational noise or redundant information.过滤:删除残余的对话噪声或冗余信息。

  • Decomposition: Splitting lengthy dialogue segments into semantically independent atomic facts.拆分:将冗长的对话片段拆分为语义上独立的原子事实。

A.1.3 Dataset Statistics and ExamplesA.1.3 数据集统计与示例

The final constructed dataset 𝒟\mathcal{D} consists of 4,352 high-quality samples. Each sample contains a structured instruction, the dialogue context with metadata, and the target output. Figure 5 presents a representative training instance that illustrates the model’s capability to resolve context-dependent references. Specifically, the example demonstrates how the model simultaneously disambiguates pronouns (e.g., resolving "I" and "my" to "Emma") and grounds relative timestamps (e.g., converting "last Friday" into an absolute date) to produce a standalone, objective fact.最终构建的数据集 𝒟\mathcal{D} 包含 4,352 条高质量样本。每条样本包括结构化指令、带元数据的对话上下文以及目标输出。图 5 展示了一个代表性的训练实例,说明模型如何同时消解代词(如将 “I” 与 “my” 解析为 “Emma”)并将相对时间戳(如 “last Friday”)转换为绝对日期,从而生成独立客观的事实。

Figure A.1: System Prompt for Atomic Fact Extraction
Figure 4: System prompt for atomic fact extraction. The prompt instructs the fact executor to filter low-value content, resolve references, rewrite extracted information as standalone third-person facts, integrate multimodal evidence, and output the extracted facts in JSON format. 图 4: 原子事实抽取的系统提示。 该提示指示事实执行器过滤低价值内容、消解指代、将抽取信息改写为独立的第三人称事实、整合多模态证据,并以 JSON 格式输出抽取的事实。
Figure A.2: Training Sample from Dataset 𝒟\mathcal{D}
Figure 5: Training sample from dataset 𝒟\mathcal{D}. The example shows an instruction-output pair used for training the fact executor to extract standalone, high-value third-person facts from dialogue. 图 5: 数据集 𝒟\mathcal{D} 的训练样本。 该示例展示了用于训练事实执行器从对话中抽取独立、高价值第三人称事实的指令‑输出对。

A.2 Details of Event Memory ConstructionA.2 事件记忆构建细节

This section details the complete algorithmic workflow for constructing and updating event memory in AtomMem as outlined in Algorithm 1. Upon receiving a verified new atomic fact FnewF_{new}, the system aims to integrate it into the broader episodic context. To achieve this, AtomMem leverages the retrieved relevant facts 𝒞ret\mathcal{C}_{ret} to track potential event associations.本节详细说明 AtomMem 中事件记忆的完整算法工作流(见算法 1)。在收到经验证的新的原子事实 Fn​e​wF_{new} 后,系统旨在将其整合进更广的情节上下文。为此,AtomMem 利用检索到的相关事实 𝒞r​e​t\mathcal{C}_{ret} 来追踪潜在的事件关联。

Candidate Generation. The system forms a candidate set cand\mathcal{E}_{cand} based on these retrieved facts. If a retrieved fact belongs to existing events, those events are added to the candidate set. If a retrieved fact is not yet linked to any event, the system includes it as a standalone candidate.候选生成。系统基于这些检索到的事实形成候选集合 ℰc​a​n​d\mathcal{E}_{cand}。若检索到的事实属于已有事件,则将这些事件加入候选集合;若检索到的事实尚未关联任何事件,则将其作为独立候选加入。

Semantic Routing. AtomMem prompts the LLM to verify whether FnewF_{new} logically aligns with any items in this candidate set. Based on this analysis, the LLM makes routing decisions. It can select existing events to absorb FnewF_{new} or select standalone facts to trigger the creation of new events. The model possesses the flexibility to select multiple candidates if FnewF_{new} provides different episodic contexts. Alternatively, it can choose none, opting to store the new fact independently without event affiliation.语义路由。AtomMem 提示 LLM 验证 Fn​e​wF_{new} 是否在逻辑上与候选集合中的任意项对齐。基于此分析,LLM 做出路由决策:可以选择已有事件吸收 Fn​e​wF_{new},或选择独立事实触发新事件的创建。模型可在 Fn​e​wF_{new} 提供不同情节上下文时选择多个候选;亦可选择不选,直接将新事实独立存储而不归属任何事件。

State Execution. AtomMem applies these selections to update the memory state. For absorption, it appends FnewF_{new} to the member facts of all affected events. The system then prompts the LLM to regenerate the summary 𝒮\mathcal{S} and keywords 𝒦e\mathcal{K}_{e} based on the newly added information. Concurrently, set union operations expand the participant set 𝒫e\mathcal{P}_{e} and the temporal span 𝒯e\mathcal{T}_{e}. For new event triggers, AtomMem iterates through each matched standalone fact and instantiates a separate new event pairing it with FnewF_{new} while initializing all required event attributes.状态执行。AtomMem 将这些选择应用于更新记忆状态。对于吸收操作,系统将 Fn​e​wF_{new} 追加到所有受影响事件的成员事实中。随后系统提示 LLM 基于新加入的信息重新生成摘要 𝒮\mathcal{S} 与关键词 𝒦e\mathcal{K}_{e}。同时,集合并操作扩展参与者集合 𝒫e\mathcal{P}_{e} 与时间跨度 𝒯e\mathcal{T}_{e}。对于新事件触发,AtomMem 对每个匹配的独立事实进行迭代,并实例化一个新的事件,将其与 Fn​e​wF_{new} 配对,同时初始化所有必需的事件属性。

Algorithm 1 Event Memory Construction and Update算法 1 事件记忆构建与更新
1:Input:输入: Verified new fact FnewF_{\mathrm{new}}, retrieved context facts 𝒞ret\mathcal{C}_{\mathrm{ret}} with top-kk facts
2:Output:输出: Updated memory system state 输出:更新后的记忆系统状态
3: Initialize event candidate set cand\mathcal{E}_{\mathrm{cand}}\leftarrow\emptyset
4: Initialize standalone fact set alone\mathcal{F}_{\mathrm{alone}}\leftarrow\emptyset
5:for all对所有 F𝒞retF\in\mathcal{C}_{\mathrm{ret}} do
6:  if FF is linked to existing events then
7:   candcandGetEvents(F)\mathcal{E}_{\mathrm{cand}}\leftarrow\mathcal{E}_{\mathrm{cand}}\cup\operatorname{GetEvents}(F)
8:  else否则
9:   alonealone{F}\mathcal{F}_{\mathrm{alone}}\leftarrow\mathcal{F}_{\mathrm{alone}}\cup\{F\}
10:10:  end结束 if
11:11:end for对于
12:12:𝒞targetcandalone\mathcal{C}_{\mathrm{target}}\leftarrow\mathcal{E}_{\mathrm{cand}}\cup\mathcal{F}_{\mathrm{alone}}
13:13:match,matchLLMverify(Fnew,𝒞target)\mathcal{E}_{\mathrm{match}},\mathcal{F}_{\mathrm{match}}\leftarrow\operatorname{LLM}_{\mathrm{verify}}(F_{\mathrm{new}},\mathcal{C}_{\mathrm{target}})
14:14:if match\mathcal{E}_{\mathrm{match}}\neq\emptyset then
15:15:  for all EmatchE\in\mathcal{E}_{\mathrm{match}} do
16:16:   E.idsE.ids{Fnew.id}E.\mathcal{F}_{\mathrm{ids}}\leftarrow E.\mathcal{F}_{\mathrm{ids}}\cup\{F_{\mathrm{new}}.\mathrm{id}\}
17:17:   E.𝒫eE.𝒫eFnew.𝒫E.\mathcal{P}_{e}\leftarrow E.\mathcal{P}_{e}\cup F_{\mathrm{new}}.\mathcal{P}
18:18:   E.𝒯eTimeUnion(E.𝒯e,Fnew.𝒯)E.\mathcal{T}_{e}\leftarrow\operatorname{TimeUnion}(E.\mathcal{T}_{e},F_{\mathrm{new}}.\mathcal{T})
19:19:   E.𝒮,E.𝒦eLLMsummarize(E.ids)E.\mathcal{S},E.\mathcal{K}_{e}\leftarrow\operatorname{LLM}_{\mathrm{summarize}}(E.\mathcal{F}_{\mathrm{ids}})
20:20:  end for
21:21:end if
22:22:if match\mathcal{F}_{match}\neq\emptyset then
23:23:  for all FalonematchF_{alone}\in\mathcal{F}_{match} do
24:24:   CreateNewEvent({Fnew,Falone})\text{CreateNewEvent}(\{F_{new},F_{alone}\})
25:25:  end for
26:26:end if
27:27:if match=match=\mathcal{E}_{\mathrm{match}}=\emptyset\land\mathcal{F}_{\mathrm{match}}=\emptyset then
28:28:  StoreIndependently(Fnew)\operatorname{StoreIndependently}(F_{\mathrm{new}})
29:29:end if

A.3 Details of Associative Graph RetrievalA.3 关联图检索细节

Building upon the memory graph concepts introduced in Section section˜3.4, this section details the ranking of candidate facts through a multi-channel fact graph and Personalized PageRank (PPR). To execute this, AtomMem constructs a localized, query-specific subgraph anchored by the initial seed facts seed\mathcal{R}_{seed}. From these seeds, the graph expands by retrieving candidate neighbors across three relational channels: Keyword, Event, and Dialogue Turn. These channels respectively capture topical similarity, event co-occurrence, and local temporal proximity.基于第 3.4 节提出的记忆图概念,本节详细说明通过多通道事实图和 Personalized PageRank(PPR)对候选事实进行排序的过程。为此,AtomMem 构建一个以初始种子事实 ℛs​e​e​d\mathcal{R}_{seed} 为锚点的局部、查询特定子图。该子图通过检索三个关系通道的候选邻居进行扩展:关键词、事件和对话轮次。这些通道分别捕获主题相似性、事件共现以及局部时间邻近性。

A.3.1 Query-Aware Keyword WeightingA.3.1 查询感知关键词加权

As defined in Section section˜3.4, the entity edge weight relies on a query-aware function ω(k)\omega(k) to balance term specificity and relevance. Simply using Term Frequency-Inverse Document Frequency (TF-IDF) can inadvertently bridge unrelated facts through high-frequency conversational stop-words. Therefore, ω(k)\omega(k) is implemented as a composite function:如第 3.4 节所定义,实体边权重依赖于查询感知函数 ω​(k)\omega(k),用于平衡词项的特异性与相关性。仅使用 TF‑IDF 可能因高频对话停用词而错误地桥接不相关事实。因此,ω​(k)\omega(k) 实现为复合函数:

ω(k)=IDF(k)βq(k)π(k)\omega(k)=\mathrm{IDF}(k)\cdot\beta_{q}(k)\cdot\pi(k) (6)

where IDF(k)\mathrm{IDF}(k) represents the global inverse document frequency of the keyword. βq(k)\beta_{q}(k) is a boosting multiplier that amplifies the weight if kk is present in the keyword set of the user query, otherwise βq(k)=1\beta_{q}(k)=1. Furthermore, π(k)\pi(k) applies a nonlinear frequency penalty that aggressively decays the weight of keywords whose occurrence frequency exceeds a certain threshold across the memory bank. This ensures that entity edges reflect genuine semantic overlap.其中 IDF​(k)\mathrm{IDF}(k) 表示关键词的全局逆文档频率。βq​(k)\beta_{q}(k) 为提升乘子,若 k 出现在用户查询的关键词集合中则放大权重,否则 βq​(k)=1\beta_{q}(k)=1。进一步,π​(k)\pi(k) 施加非线性频率惩罚,对在记忆库中出现频率超过阈值的关键词权重进行急剧衰减,从而确保实体边反映真实的语义重叠。

A.3.2 Multi-Channel Transition MatrixA.3.2 多通道转移矩阵

The memory graph contains three distinct topological channels: Entity, Event, and Temporal edges. Simply adding the edge weights together would cause dense channels to overwhelm sparse ones. To address this issue, AtomMem treats them as parallel transition matrices.记忆图包含三种不同的拓扑通道:实体、事件和时间边。若直接将边权相加,密集通道会压倒稀疏通道。为解决此问题,AtomMem 将它们视为并行的转移矩阵。

For each channel c{kw,event,turn}c\in\{\mathrm{kw},\mathrm{event},\mathrm{turn}\}, we first independently normalize the edge weights into a channel-specific transition matrix 𝐏c\mathbf{P}_{c}, where each row sums to 1. The overall transition matrix 𝐏\mathbf{P} is then computed as a weighted fusion of the available channels:对于每个通道 c∈{kw,event,turn}c\in\{\mathrm{kw},\mathrm{event},\mathrm{turn}\},我们首先独立地将边权归一化为通道特定的转移矩阵 𝐏c\mathbf{P}_{c},使每行之和为 1。整体转移矩阵 𝐏\mathbf{P} 随后通过可用通道的加权融合计算得到:

𝐏i,j=c𝒞iρ¯i,c(𝐏c)i,j\mathbf{P}_{i,j}=\sum_{c\in\mathcal{C}_{i}}\bar{\rho}_{i,c}(\mathbf{P}_{c})_{i,j} (7)

where 𝒞i\mathcal{C}_{i} denotes the specific set of channels containing at least one outgoing neighbor for node FiF_{i}. To compute the dynamic channel prior ρ¯i,c\bar{\rho}_{i,c}, the static prior ρc\rho_{c} is adaptively renormalized over these valid channels:其中 𝒞i\mathcal{C}_{i} 表示包含至少一个出边邻居的特定通道集合。为计算动态通道先验 ρ¯i,c\bar{\rho}_{i,c},静态先验 ρc\rho_{c} 在这些有效通道上自适应重新归一化:

ρ¯i,c=ρcc𝒞iρc.\bar{\rho}_{i,c}=\frac{\rho_{c}}{\sum_{c^{\prime}\in\mathcal{C}_{i}}\rho_{c^{\prime}}}. (8)

This node-wise normalization ensures that transition probabilities are properly normalized over the available outgoing channels, even when a fact does not possess all edge types.此节点级归一化确保即使某事实不具备所有边类型,转移概率仍在可用的出边通道上得到正确归一化。

A.3.3 Execution of Personalized PageRankA.3.3 Personalized PageRank 执行

To initialize the PPR process, the retrieval scores of the seed facts in seed\mathcal{R}_{seed} (obtained from the Primary and Compensatory recall stages) are transformed into a personalized restart probability distribution 𝐩\mathbf{p}. Specifically, the system applies a power transformation to the raw seed score s~i\tilde{s}_{i}:为初始化 PPR 过程,种子事实 ℛs​e​e​d\mathcal{R}_{seed} 的检索分数(来源于主检索和补偿检索阶段)被转换为个性化重启概率分布 𝐩\mathbf{p}。具体而言,系统对原始种子分数 s~i\tilde{s}_{i} 进行幂变换:

pi=s~iγsFjseeds~jγsp_{i}=\frac{\tilde{s}_{i}^{\gamma_{s}}}{\sum_{F_{j}\in\mathcal{R}_{seed}}\tilde{s}_{j}^{\gamma_{s}}} (9)

where the scaling exponent γs\gamma_{s} dictates the sharpness of the distribution. This design ensures that high-confidence seeds exert a stronger restart attraction during the random walk, while still allowing the graph structure to propagate probability mass to non-seed facts that are semantically, event-wise, or temporally related.其中缩放指数 γs\gamma_{s} 决定分布的锐度。该设计确保高置信度的种子在随机游走期间产生更强的重启吸引力,同时仍允许图结构将概率质量传播至在语义、事件或时间上相关的非种子事实。

Let 𝐫(t)\mathbf{r}^{(t)} denote the vector of activation scores for all nodes in the localized graph at iteration tt. The PageRank iteration takes the form of a Random Walk with Restart (RWR), updating the activation scores iteratively:设 𝐫(t)\mathbf{r}^{(t)} 为局部图中所有节点在第 t 次迭代的激活分数向量。PageRank 迭代采用带重启的随机游走(RWR)形式,迭代更新激活分数:

𝐫(t+1)=η𝐩+(1η)𝐏T𝐫(t)\mathbf{r}^{(t+1)}=\eta\mathbf{p}+(1-\eta)\mathbf{P}^{T}\mathbf{r}^{(t)} (10)

where η(0,1)\eta\in(0,1) is the restart probability. A higher η\eta forces the walk to stay close to the seed facts, preventing the context from drifting too far from the original query intent. For dangling nodes without valid outgoing edges, their probability mass is redistributed according to the restart distribution 𝐩\mathbf{p}, which prevents probability mass leakage during the random walk.其中 η∈(0,1)\eta\in(0,1) 为重启概率。更高的 η\eta 会使游走更靠近种子事实,防止上下文漂移过远脱离原始查询意图。对于没有有效出边的悬挂节点,其概率质量会根据重启分布 𝐩\mathbf{p} 重新分配,从而防止随机游走期间的概率泄漏。

The iteration proceeds until it reaches a maximum number of steps or satisfies the convergence criterion:迭代持续至达到最大步数或满足收敛准则:

𝐫(t+1)𝐫(t)1<ϵc\|\mathbf{r}^{(t+1)}-\mathbf{r}^{(t)}\|_{1}<\epsilon_{c} (11)

where ϵc\epsilon_{c} is a predefined convergence threshold. Upon convergence, the stationary distribution 𝐫()\mathbf{r}^{(\infty)} assigns a final activation score to each fact in the local graph. AtomMem subsequently ranks all nodes according to 𝐫()\mathbf{r}^{(\infty)} and extracts the top kfk_{f} facts to construct the final retrieved context fact\mathcal{R}_{fact}. Ultimately, this framework ensures that the retrieval process remains tightly anchored to the query intent via the personalized restart distribution. Within the graph, Entity Edges drive topic-level propagation, Event Edges facilitate cross-turn episodic aggregation, and Temporal Edges preserve short-range contextual continuity. Consequently, AtomMem effectively surfaces indirectly related facts in long conversational scenarios that isolated similarity retrieval typically misses, while mitigating semantic drift through localized subgraph constraints and nonlinear frequency penalties.其中 ϵc\epsilon_{c} 为预设的收敛阈值。收敛后,稳态分布 𝐫(∞)\mathbf{r}^{(\infty)} 为局部图中每个事实分配最终激活分数。AtomMem 随后依据 𝐫(∞)\mathbf{r}^{(\infty)} 对所有节点进行排序,并提取前 kfk_{f} 条事实构建最终检索上下文 ℛf​a​c​t\mathcal{R}_{fact}。最终,该框架确保检索过程通过个性化重启分布紧密锚定于查询意图。图中,实体边驱动主题层面的传播,事件边促进跨轮次情节聚合,时间边保持短程上下文连续性。因此,AtomMem 能有效在长对话场景中发现孤立相似检索难以捕获的间接相关事实,同时通过局部子图约束和非线性频率惩罚抑制语义漂移。

A.4 Details of Experimental Results on LongMemEvalA.4 LongMemEval 实验结果细节

Stage Avg (ms) P95 (ms) Max (ms)
Total online latency 3585.11 4559.80 9596.74
Query intent 2079.86 2690.29 5399.86
Answer generation 1346.14 1970.20 7678.18
Retrieval pipeline only 145.80 235.87 3107.25
  Query embedding 13.23 20.71 1018.54
  Base retrieval 35.29 89.54 2933.75
  Graph rerank 109.90 184.16 2002.02
Table 3: End-to-end latency breakdown of the AtomMem system across different processing stages. 表 3: AtomMem 系统在不同处理阶段的端到端延迟拆分。

To rigorously demonstrate that our system does not suffer from data bias toward the LoCoMo benchmark, we conduct supplementary evaluations on the completely independent LongMemEval dataset. For these evaluations, we employ GPT-4o-mini as the backbone model and utilize DeepSeek-v4-Pro as the judge model to ensure objective scoring.为严格证明我们的系统在 LoCoMo 基准上不存在数据偏差,我们在完全独立的 LongMemEval 数据集上进行补充评估。此评估使用 GPT‑4o‑mini 作为主模型,DeepSeek‑v4‑Pro 作为评判模型,以确保客观评分。

Table 4 presents the detailed performance of AtomMem across the six distinct question categories defined in the LongMemEval framework. Notably, the SSP category evaluates subjective and personalized generation quality rather than exact factual retrieval. Because this assessment relies on whether the model satisfies a specific grading rubric instead of matching precise short answers, traditional token matching metrics such as the F1F_{1} score and BLEU-1 are inherently inapplicable. Consequently, we report only the comprehensive judge score JJ for this specific category.表 4 展示了 AtomMem 在 LongMemEval 框架定义的六个问题类别上的详细表现。值得注意的是,SSP 类别评估的是主观和个性化的生成质量,而非精确事实检索。由于该评估依赖模型是否满足特定评分标准,而非匹配精确短答案,传统的 F1F_{1} 分数和 BLEU‑1 等指标并不适用。因此,我们仅报告该类别的综合评判分数 JJ。

Category 𝑭𝟏\boldsymbol{F_{1}} BLEU-1 𝑱\boldsymbol{J}
SSU 80.70 75.84 90.00
MS 57.50 54.85 67.67
TR 42.10 33.16 52.63
KU 66.35 62.27 79.49
SSA 61.09 52.17 76.79
SSP 80.00
Table 4: Performance of AtomMem on the LongMemEval benchmark across various task categories. The abbreviations correspond to Single-Session-User (SSU), Single-Session-Assistant (SSA), Single-Session-Preference (SSP), Multi-Session (MS), Knowledge-Update (KU), and Temporal-Reasoning (TR). 表 4: AtomMem 在 LongMemEval 基准上各任务类别的表现。缩写分别对应 Single‑Session‑User (SSU)、Single‑Session‑Assistant (SSA)、Single‑Session‑Preference (SSP)、Multi‑Session (MS)、Knowledge‑Update (KU) 与 Temporal‑Reasoning (TR)。

A.5 Details of End-to-End Efficiency AnalysisA.5 端到端效率分析细节

To evaluate the practical deployment viability of AtomMem, we conduct a comprehensive latency analysis across all processing stages using 1540 questions from the LoCoMo dataset. The experiments are executed locally on an Intel Core i7-10750H CPU (6 physical cores, 12 logical threads) to accurately evaluate the computational overhead.为评估 AtomMem 的实际部署可行性,我们在 LoCoMo 数据集的 1540 条问题上进行全面的延迟分析,所有实验在 Intel Core i7‑10750H CPU(6 核 12 线程)本地执行,以准确评估计算开销。

As detailed in Table 3, the total online processing latency averages approximately 3.6 seconds. The vast majority of this execution time is consumed by the fundamental LLM inference calls. In stark contrast, our core memory retrieval pipeline introduces negligible computational overhead. The entire retrieval process averages only 145.80 milliseconds. Furthermore, our proposed graph-based reranking mechanism operates with extreme efficiency, completing in just 109.90 milliseconds on average. These results clearly demonstrate that the structural complexity of AtomMem does not compromise its speed, rendering the system highly responsive and perfectly suited for real-time interactive chat applications.如表 3 所示,整体在线处理延迟平均约为 3.6 秒。其中绝大部分时间消耗在基础 LLM 推理调用上。相比之下,我们的核心记忆检索管线几乎不产生额外计算开销,整个检索过程平均仅 145.80 毫秒。此外,基于图的重新排序机制极为高效,平均仅耗时 109.90 毫秒。这些结果清晰表明,AtomMem 的结构复杂性并未牺牲速度,使系统高度响应,完全适用于实时交互式聊天应用。

A.6 Details of Hyperparameter AnalysisA.6 超参数分析细节

Complementing the hyperparameter analysis provided in the main text, this section presents supplementary evaluations to determine the optimal configurations for other critical components within the AtomMem retrieval pipeline. Specifically, we investigate the sensitivity of the overall system performance to the initial seed count for local graph construction and the compensatory fusion weight. All experiments are evaluated on the LoCoMo benchmark.补充主文中的超参数分析,本节提供了对 AtomMem 检索管线其他关键组件的补充评估,以确定最佳配置。具体而言,我们研究了局部图构建的初始种子数量以及补偿融合权重对整体系统性能的敏感性。所有实验均在 LoCoMo 基准上评估。

A.6.1 Impact of Graph Retrieval Initial Seed Count ksk_{s} A.6.1 初始种子数量 ks 的影响

To investigate the impact of the initial seed count on local graph construction, we conduct a detailed parametric sweep over the total seed capacity ksk_{s}. This hyperparameter directly controls the number of entry points injected into the personalized PageRank algorithm.为研究初始种子数量对局部图构建的影响,我们对种子容量 ks 进行细致的参数扫描。该超参数直接控制注入 Personalized PageRank 算法的入口点数量。

As illustrated in Figure 6, the system performance varies systematically with respect to the seed density. When ksk_{s} is set to a conservative value of 5, the initial memory activation remains insufficient, leading to sub-optimal recall metrics. Conversely, expanding the seed count beyond 10 introduces a performance degradation across all evaluation dimensions, where the aggregate semantic accuracy metrics such as average F1 and BLEU-1 experience notable declines. This trend demonstrates that excessive initial seeds inevitably pollute the local graph structure with irrelevant conversational contexts and redundant relational edges. This semantic noise degrades the random walk propagation, allowing unrelated facts to accumulate high stationary probabilities. Consequently, optimizing the configuration at ks=10k_{s}=10, where the main seed and compensation seed are both set to 5, provides the ideal trade-off between informational coverage and noise suppression. We therefore freeze ks=10k_{s}=10 as the default setting for all primary experiments.如图 6 所示,系统性能随种子密度系统性变化。当 ks 设为保守的 5 时,初始记忆激活不足,导致召回指标不佳;而将种子数量扩展至超过 10 则在所有评估维度上出现性能下降,平均 F1 与 BLEU‑1 等语义准确性指标显著下降。这一趋势表明,过多的初始种子会向局部图结构注入无关对话上下文和冗余关系边,产生语义噪声,削弱随机游走传播,使不相关事实获得高稳态概率。因此,将 ks=10(主种子与补偿种子各为 5)设为默认配置,可在信息覆盖与噪声抑制之间取得最佳平衡。

Refer to caption
Figure 6: Hyperparameter analysis of the graph retrieval initial seed count ksk_{s}. The performance curves indicate that ks=10k_{s}=10 achieves the optimal trade-off between informational coverage and noise suppression. 图 6: 初始种子数量 ks 的超参数分析。性能曲线表明 ks=10 达到信息覆盖与噪声抑制的最佳折中。

A.6.2 Impact of Compensatory Fusion Weight wew_{e} A.6.2 补偿融合权重 we 的影响

To systematically determine the optimal balance between global event relevance and local fact precision during the compensatory recall phase, we analyze the sensitivity of the retrieval performance to the fusion weight wew_{e}. This hyperparameter controls the proportional contribution of the event-level hybrid score and the fact-level hybrid score when ranking candidate facts extracted from matched events.为系统性确定全局事件相关性与局部事实精度在补偿检索阶段的最佳平衡,我们分析了融合权重 we 对检索性能的敏感性。该超参数控制事件层混合得分与事实层混合得分在候选事实排序时的比例贡献。

As illustrated in Figure 7, the system performance varies systematically across different wew_{e} configurations. The metrics reveal a steady improvement as wew_{e} increases from 0.5 to 0.7, reaching a distinct optimal peak at we=0.7w_{e}=0.7 across all core evaluation dimensions, including average F1, BLEU-1, and Recall@10. Conversely, elevating the weight beyond 0.7 introduces a noticeable performance degradation. This trend effectively validates our hierarchical retrieval design. Specifically, when wew_{e} is set too low, the system underutilizes the broader episodic context provided by the event layer, causing the compensatory recall to regress toward a standard fact-level semantic search. When wew_{e} exceeds 0.7, the fusion score becomes overly dominated by global event relevance, forcing the system to retrieve constituent facts that belong to highly relevant events but lack direct semantic alignment with the specific user query. Consequently, optimizing the configuration at we=0.7w_{e}=0.7 provides the ideal trade-off, ensuring that the retrieved facts are both contextually grounded in the correct episode and individually precise.如图7所示,系统性能在不同 wew_{e} 配置下呈系统性变化。指标显示,随着 wew_{e} 从 0.5 增加到 0.7,性能稳步提升,在所有核心评估维度(包括平均 F1、BLEU-1 和 Recall@10)上均在 we=0.7w_{e}=0.7 处达到明显的最佳峰值。相反,权重超过 0.7 会导致性能明显下降。这一趋势有效验证了我们的层次检索设计。具体而言,当 wew_{e} 设置过低时,系统未能充分利用事件层提供的更广泛情境,导致补偿召回退化为标准的事实级语义搜索。当 wew_{e} 超过 0.7 时,融合得分过度受全局事件相关性的支配,迫使系统检索属于高度相关事件但与特定用户查询缺乏直接语义对齐的事实。因此,将配置优化为 we=0.7w_{e}=0.7 可实现理想的权衡,确保检索到的事实既在正确情节中具备情境依据,又在单个层面上精确。

Refer to caption
Figure 7: Hyperparameter analysis of the compensatory fusion weight wew_{e}. The performance curves indicate that we=0.7w_{e}=0.7 achieves the optimal balance between global event relevance and local fact precision. 图7: 补偿融合权重 wew_{e} 的超参数分析。性能曲线表明 we=0.7w_{e}=0.7 在全局事件相关性与局部事实精度之间实现了最佳平衡。

A.7 Hyperparameter SettingsA.7 超参数设置

This section details the comprehensive hyperparameter configurations used for the AtomMem system. As discussed in Section section˜4.4, while the final fact retrieval count is standardized at kf=10k_{f}=10, our hierarchical architecture requires additional parameters to govern event retrieval, profile matching, and graph-based score fusion. These specific values were empirically determined through extensive hyperparameter analysis to optimize the overall performance of the memory retrieval pipeline. To ensure full reproducibility, all configurations governing the local graph construction and random walk mechanics are explicitly detailed in Table 5.本节详细说明了 AtomMem 系统使用的完整超参数配置。如第 4.4 节所述,虽然最终的事实检索数量统一为 kf=10k_{f}=10,但我们的层次结构需要额外的参数来控制事件检索、画像匹配和基于图的得分融合。这些具体数值是通过大量超参数分析经验性确定的,以优化记忆检索流水线的整体性能。为确保完全可复现,所有关于局部图构建和随机游走机制的配置均在表 5 中明确列出。

Module Component Hyperparameter Value
Base Capacities Initial Graph Seed Count (ksk_{s}) 10
Final Retrieved Fact Count (kfk_{f}) 10
Profile Item Retrieval Count (kpk_{p}) 5
Similarity Weighting Embedding Similarity Weight (α\alpha) 0.7
Keyword Jaccard Weight (β\beta) 0.3
Compensatory Fusion Event Relevance Weight (wew_{e}) 0.7
Fact Self-Relevance Weight (wfw_{f}) 0.3
Graph Channel Mixture Entity Edge Weight (ρent\rho_{ent}) 0.45
Event Edge Weight (ρevent\rho_{event}) 0.40
Temporal Edge Weight (ρturn\rho_{turn}) 0.15
Random Walk Restart Restart Probability (η\eta) 0.34
Maximum Iterations 20
Convergence Tolerance (ϵc\epsilon_{c}) 10610^{-6}
Seed Score Sharpening Power (γs\gamma_{s}) 5.0
Graph Construction Maximum Seed Facts 10
Maximum Expansion Hops 2
Maximum Local Graph Nodes 180
Maximum Neighbors per Fact 30
Edge Weight Epsilon 10810^{-8}
Entity Edge Weighting Query Keyword Boost 2.5
Query Keyword Penalty Floor 0.45
Query Keyword Penalty Threshold τq\tau_{q} 0.05
Query Keyword Penalty Exponent γq\gamma_{q} 0.7
Non-query Keyword Penalty Threshold τnq\tau_{nq} 0.10
Non-query Keyword Penalty Exponent γnq\gamma_{nq} 1.0
Event Edge Constraints Event Size Penalty Exponent (λ\lambda) 1.25
Maximum Event Size 60
Maximum Event-edge Expansion Hops 2
Temporal Constraints Turn Window Size 2
Turn Distance Decay Temperature (τ\tau) 2.0
Maximum Turn-edge Expansion Hops 1
Table 5: Comprehensive empirical hyperparameter configurations optimized for the AtomMem retrieval pipeline. 表 5: 为 AtomMem 检索流水线优化的全面经验超参数配置。

A.8 PromptsA.8 提示词

This section details the system prompts utilized throughout our experiments, covering both the response generation phase and the LLM judgment phase.本节详细说明了实验中使用的系统提示词,涵盖响应生成阶段和 LLM 判决阶段。

Figure 8 presents the generation prompt applied to exact extraction tasks including single-hop, multi-hop, and temporal reasoning. For open-domain queries that necessitate broader reasoning and integration with external world knowledge, we utilize the prompt detailed in Figure 9. Additionally, Figure 10 outlines the evaluation prompt used for the LLM judge to score the generated responses against the ground-truth answers.图 8 展示了用于精确抽取任务(包括单跳、多跳和时间推理)的生成提示词。对于需要更广泛推理并结合外部世界知识的开放域查询,我们使用图 9 中详细的提示词。此外,图 10 则概述了用于 LLM 判官对生成响应进行评分的评估提示词,以对照真实答案进行比较。

Figure A.3: System Prompt for Response Generation - Single-Hop / Multi-Hop / Temporal Reasoning
Figure 8: System Prompt for Response Generation. This prompt is utilized for single-hop, multi-hop, and temporal reasoning tasks where precise extraction is required. 图 8: 响应生成系统提示词。该提示词用于需要精确抽取的单跳、多跳和时间推理任务。
Figure A.4: System Prompt for Response Generation - Open Domain
Figure 9: System Prompt for Response Generation (Open Domain). This prompt guides the model to integrate retrieved memory with external knowledge for comprehensive reasoning. 图 9: 响应生成系统提示词(开放域)。该提示词引导模型将检索到的记忆与外部知识结合,以实现全面推理。
Figure A.5: System Prompt for Answer Judgment
Figure 10: System Prompt for Answer Judgment. This prompt configures the LLM judge to evaluate generated answers against ground-truth references. 图 10: 答案判定系统提示词。该提示词配置 LLM 判官对生成的答案相对于真实参考进行评估。