arXiv:2506.06326cs.AI2025-06EMNLP被引 109

为大模型设计分层记忆系统,解决长期对话中的记忆丢失问题。

Memory OS of AI Agent

  • 构建三层次记忆架构,支持短、中、长时记忆动态流转。
  • 在LoCoMo基准上提升49.11%的F1和46.18%的BLEU-1得分。
  • 适合需要个性化持续交互的AI应用开发者使用。

大语言模型受限于固定上下文窗口和薄弱的记忆管理,导致长期记忆能力不足,影响与AI代理的个性化交互体验。为此,我们提出内存操作系统(MemoryOS),借鉴操作系统内存管理思想,实现对AI代理的全面高效记忆管理。MemoryOS采用分层存储架构,包含短期记忆、中期记忆和长期个人记忆三个层级,并设有存储、更新、检索与生成四大核心模块。其中,短期到中期的记忆更新遵循基于对话链的FIFO原则,中期到长期则采用分段页组织策略。该系统实现了记忆的层级整合与动态更新。在LoCoMo基准上的大量实验表明,相较于基线模型,MemoryOS在GPT-4o-mini上平均提升F1达49.11%,BLEU-1提升46.18%,显著增强长对话中的上下文连贯性与个性化记忆保留能力。代码已开源:https://github.com/BAI-LAB/MemoryOS。

原文摘要 · Abstract (English)

Large Language Models (LLMs) face a crucial challenge from fixed context windows and inadequate memory management, leading to a severe shortage of long-term memory capabilities and limited personalization in the interactive experience with AI agents. To overcome this challenge, we innovatively propose a Memory Operating System, i.e., MemoryOS, to achieve comprehensive and efficient memory management for AI agents. Inspired by the memory management principles in operating systems, MemoryOS designs a hierarchical storage architecture and consists of four key modules: Memory Storage, Updating, Retrieval, and Generation. Specifically, the architecture comprises three levels of storage units: short-term memory, mid-term memory, and long-term personal memory. Key operations within MemoryOS include dynamic updates between storage units: short-term to mid-term updates follow a dialogue-chain-based FIFO principle, while mid-term to long-term updates use a segmented page organization strategy. Our pioneering MemoryOS enables hierarchical memory integration and dynamic updating. Extensive experiments on the LoCoMo benchmark show an average improvement of 49.11% on F1 and 46.18% on BLEU-1 over the baselines on GPT-4o-mini, showing contextual coherence and personalized memory retention in long conversations. The implementation code is open-sourced at https://github.com/BAI-LAB/MemoryOS.

记忆系统大模型对话增强

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