arXiv:2510.18866cs.CLcs.AI2025-10被引 132

轻量记忆系统LightMem提升大模型历史信息利用效率

LightMem: Lightweight and Efficient Memory-Augmented Generation

  • 模仿人类记忆分三阶段:感性、短期、长期,逐层压缩过滤信息
  • 在两个评测集上,问答准确率最高提升29.3%,调用次数减少55.5倍
  • 适合需要低延迟高效率的实时对话与复杂交互场景

尽管表现卓越,大语言模型在动态复杂环境中难以有效利用历史交互信息。记忆系统通过引入持久化存储、检索与使用机制,使模型摆脱无状态交互。但现有方法常带来显著的时间与计算开销。为此,我们提出LightMem,一种兼顾性能与效率的新记忆系统。受人类记忆的Atkinson-Shiffrin模型启发,LightMem将记忆分为三个互补阶段:首先,认知启发的感官记忆通过轻量压缩快速过滤无关信息,并按主题分组;其次,主题感知的短期记忆对主题分组内容进行整合与摘要,实现更结构化的访问;最后,具有睡眠期更新的长期记忆采用离线过程,将固化与在线推理解耦。在LongMemEval和LoCoMo数据集上,使用GPT和Qwen作为主干模型,LightMem持续超越强基线,问答准确率最高提升7.7% / 29.3%,总令牌使用量减少最多38倍 / 20.9倍,API调用减少最多30倍 / 55.5倍;纯在线测试时成本更低,令牌减少达106倍 / 117倍,API调用减少159倍 / 310倍。代码已开源。

原文摘要 · Abstract (English)

Despite their remarkable capabilities, Large Language Models (LLMs) struggle to effectively leverage historical interaction information in dynamic and complex environments. Memory systems enable LLMs to move beyond stateless interactions by introducing persistent information storage, retrieval, and utilization mechanisms. However, existing memory systems often introduce substantial time and computational overhead. To this end, we introduce a new memory system called LightMem, which strikes a balance between the performance and efficiency of memory systems. Inspired by the Atkinson-Shiffrin model of human memory, LightMem organizes memory into three complementary stages. First, cognition-inspired sensory memory rapidly filters irrelevant information through lightweight compression and groups information according to their topics. Next, topic-aware short-term memory consolidates these topic-based groups, organizing and summarizing content for more structured access. Finally, long-term memory with sleep-time update employs an offline procedure that decouples consolidation from online inference. On LongMemEval and LoCoMo, using GPT and Qwen backbones, LightMem consistently surpasses strong baselines, improving QA accuracy by up to 7.7% / 29.3%, reducing total token usage by up to 38x / 20.9x and API calls by up to 30x / 55.5x, while purely online test-time costs are even lower, achieving up to 106x / 117x token reduction and 159x / 310x fewer API calls. The code is available at https://github.com/zjunlp/LightMem.

大模型记忆机制高效生成轻量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。