arXiv:2604.07798cs.AI2026-04ACL被引 8

用小模型实现高效低延迟的智能体记忆系统

Lightweight LLM Agent Memory with Small Language Models

论文配图:Lightweight LLM Agent Memory with Small Language Models
图 1 · 摘自论文原文
  • 分层内存架构+两阶段检索,平衡准确与效率
  • 在LoCoMo上平均F1提升2.5,检索延迟仅83毫秒
  • 适合需要长时交互的轻量化智能体应用

尽管大型语言模型(LLM)代理可通过工具完成复杂任务,仍需记忆来保持多轮对话一致性并积累可复用信息。现有基于检索的外部记忆系统在线开销低但准确率不稳定,而依赖大模型重复调用的方案虽准确却累积延迟。本文提出LightMem,一种由小型语言模型(SLMs)驱动的轻量级记忆系统。该系统将记忆分为短期(STM)、中期(MTM)和长期(LTM)三类,支持多用户独立检索与增量维护。在线阶段,在固定预算下采用向量粗筛+语义一致性重排序的两阶段检索;离线阶段,抽象可复用交互证据并增量整合至LTM。实验显示,跨模型规模均取得稳定提升,相比A-MEM在LoCoMo上平均F1提高约2.5,检索中位延迟仅83毫秒,端到端延迟581毫秒。

原文摘要 · Abstract (English)

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).

智能体记忆小模型轻量化多轮对话

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