arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.07798cs.AI
收藏

轻量级大语言模型代理记忆系统

Lightweight LLM Agent Memory with Small Language Models

University of Electronic Science and Technology of China(电子科学与技术大学);Kyung Hee University(庆熙大学);City University of Hong Kong(香港城市大学);University of Oxford(牛津大学)

Jiaquan Zhang, Chaoning Zhang, Shuxu Chen, Zhenzhen Huang, Pengcheng Zheng, Zhicheng Wang, Ping Guo, Fan Mo, Sung-Ho Bae, Jie Zou, Jiwei Wei, Yang Yang

AI总结:

本文提出LightMem,利用小语言模型实现轻量级代理记忆,通过模块化记忆检索、写入和长期整合,提升效率与准确性,实验显示在LoCoMo数据集上F1值提升2.5,并具有低延迟特点。

摘要:

尽管大语言模型代理可以利用工具完成复杂任务,但它们仍需要记忆来维持跨轮次一致性并在长周期交互中积累可重用信息。然而,基于检索的外部记忆系统虽然在线开销低,但因查询构建和候选过滤有限而准确性不稳定。相比之下,许多系统使用重复的大模型调用进行在线记忆操作,虽然提高了准确性但长期交互中累积了延迟。我们提出LightMem,一种轻量级记忆系统,由小语言模型(SLMs)驱动。LightMem模块化了记忆检索、写入和长期整合,并将在线处理与离线整合分离,以在受限计算下实现高效记忆调用。我们把记忆分为短期记忆(STM)用于即时对话上下文,中期记忆(MTM)用于可重用的交互摘要,长期记忆(LTM)用于整合知识,并使用用户标识符支持多用户环境下的独立检索和增量维护。在线,LightMem在固定检索预算下运行,并通过基于向量的粗检索后接语义一致性重排序的两阶段过程选择记忆。离线,它抽象出可重用的交互证据并逐步将其整合到LTM中。实验显示在模型规模上均获得一致提升,与A-MEM在LoCoMo数据集上的平均F1值提升约2.5,同时实现更高的效率和较低的中位延迟(检索83毫秒,端到端581毫秒)。

英文摘要:

Although LLM agents can leverage tools for complex tasks, they still need memory to maintain cross-turn consistency and accumulate reusable information in long-horizon interactions. However, retrieval-based external memory systems incur low online overhead but suffer from unstable accuracy due to limited query construction and candidate filtering. In contrast, many systems use repeated large-model calls for online memory operations, improving accuracy but accumulating latency over long interactions. We propose LightMem, a lightweight memory system for better agent memory driven by Small Language Models (SLMs). LightMem modularizes memory retrieval, writing, and long-term consolidation, and separates online processing from offline consolidation to enable efficient memory invocation under bounded compute. We organize memory into short-term memory (STM) for immediate conversational context, mid-term memory (MTM) for reusable interaction summaries, and long-term memory (LTM) for consolidated knowledge, and uses user identifiers to support independent retrieval and incremental maintenance in multi-user settings. Online, LightMem operates under a fixed retrieval budget and selects memories via a two-stage procedure: vector-based coarse retrieval followed by semantic consistency re-ranking. Offline, it abstracts reusable interaction evidence and incrementally integrates it into LTM. Experiments show consistent gains across model scales, with an average F1 improvement of about 2.5 over A-MEM on LoCoMo, while achieving higher efficiency and low median latency (83 ms for retrieval and 581 ms end-to-end).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑