RecMem:基于递归的记忆巩固用于高效且有效的长运行LLM代理
RecMem: Recurrence-based Memory Consolidation for Efficient and Effective Long-Running LLM Agents
AI总结:
RecMem通过递归机制优化内存巩固,减少token消耗并提升准确性,有效解决长运行LLM代理的内存管理问题。
摘要:
记忆系统通常将用户-代理交互组织为可检索的外部记忆,对长运行代理至关重要,因为它克服了LLM的有限上下文窗口。然而,现有记忆系统每次调用LLM处理交互以提取记忆,导致大量token消耗。为解决此问题,我们提出RecMem,重新思考何时进行记忆巩固。RecMem将输入交互存储在潜意识记忆层,并使用轻量级嵌入模型进行编码以供检索。LLM仅在观察到持续递归且语义相似的交互时才被调用以提取事件性和语义记忆。这种基于递归的巩固工作是因为这些交互对应于具有丰富信息的语义簇,因此值得提取和总结。为了提高准确性,RecMem还结合了语义细化机制,以恢复记忆提取中遗漏的细粒度事实。实验表明,RecMem将三种SOTA记忆系统的内存构建token成本减少了高达87%,同时超过其准确性。
英文摘要:
Memory systems often organize user-agent interactions as retrievable external memory and are crucial for long-running agents by overcoming the limited context windows of LLMs. However, existing memory systems invoke LLMs to process every incoming interaction for memory extraction, and such an eager memory consolidation scheme leads to substantial token consumption. To tackle this problem, we propose RecMem by rethinking when memory consolidation should be conducted. RecMem stores incoming interactions in a subconscious memory layer and encode them using lightweight embedding models for retrieval. LLMs are only invoked to extract episodic and semantic memory when sustained recurrence are observed for semantically similar interactions. Such recurrence-based consolidation works because these interactions correspond to a semantic cluster with rich information and thus are worth extraction and summarization. To improve accuracy, RecMem also incorporates a semantic refinement mechanism that recovers the fine-grained facts omitted by memory extraction. Experiments show that RecMem reduces the memory construction token cost of three SOTA memory systems by up to 87% while exceeding their accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。