ChatPaper.aiChatPaper

重新思考如何記憶:在終身LLM代理記憶中超越原子事實

Rethinking How to Remember: Beyond Atomic Facts in Lifelong LLM Agent Memory

May 19, 2026
作者: Jingwei Sun, Jianing Zhu, Jiangchao Yao, Tongliang Liu, Bo Han
cs.AI

摘要

為實現可靠且長期的互動,LLM代理人需要一個能忠實儲存、高效檢索並深度推理累積對話歷史的記憶系統。現有方法多採用基於提取事實的範式:透過人工設計的靜態提示將原始對話壓縮為原子化事實,再進行儲存、匹配並注入下游推理任務。然而,此類以事實為中心的設計不可避免地遺失原始對話中的細微細節,且無法支援對分散孤立事實的深度推理。此外,靜態提示在不同對話風格下難以維持一致的提取粒度。為解決上述限制,我們提出TriMem,該系統維護三種共存表示粒度,包括:由來源識別碼錨定的原始對話片段(確保儲存忠實度)、提取的原子化事實(實現高效記憶檢索)、以及整合分散事實以形成整體語義理解的綜合輪廓(支援深度推理)。我們進一步採用基於TextGrad的提示優化,透過回應品質回饋迭代精煉提取與輪廓生成提示,在不更新任何參數的情況下實現終身演化。在LoCoMo與PerLTQA數據集上,搭配多種LLM主幹網路的廣泛實驗結果顯示,TriMem持續優於強大的記憶基準方法。程式碼已開放於 https://TMLR-TriMem.github.io。
English
To enable reliable long-term interaction, LLM agents require a memory system that can faithfully store, efficiently retrieve, and deeply reason over accumulated dialogue history. Most existing methods adopt an extracted fact based paradigm: handcrafted static prompts compress raw dialogues into atomic facts, which are then stored, matched, and injected into downstream reasoning. Nevertheless, such fact-centric designs inevitably discard fine-grained details in original dialogues and fail to support deep reasoning over scattered isolated facts. Moreover, static prompts cannot maintain consistent extraction granularity across diverse dialogue styles. To address these limitations, we propose TriMem, which maintains three coexisting representation granularities, including raw dialogue segments anchored by source identifiers for storage fidelity, extracted atomic facts for efficient memory retrieval, synthesized profiles that aggregate dispersed facts into holistic semantic understanding for deep reasoning. We further adopt TextGrad-based prompt optimization, which iteratively refines extraction and profiling prompts via response quality feedback, achieving lifelong evolution without any parameter updating. Extensive experiments on LoCoMo and PerLTQA across multiple LLM backbones demonstrate that TriMem consistently outperforms strong memory baselines. The code is available at https://TMLR-TriMem.github.io .