让大模型代理通用记忆模块,用知识图谱提升长期记忆效率
PlugMem: A Task-Agnostic Plugin Memory Module for LLM Agents
- 将记忆抽象为知识图谱,按命题与指令组织而非原始经验
- 在三类任务中均超越通用与专用记忆方法,信息密度最高
- 可插拔部署,适配各类大模型代理,无需重设计
长时记忆对复杂环境中运行的大语言模型代理至关重要,但现有记忆设计要么任务特定不可迁移,要么通用但因信息冗余和上下文爆炸而效果不佳。我们提出PlugMem,一种可附加于任意大模型代理的无任务依赖记忆模块。受认知科学启发,决策相关知识集中表现为抽象知识而非原始经历,因此我们将情景记忆结构化为紧凑、可扩展的知识中心记忆图,显式表示命题性与规约性知识。该表征支持高效的任务相关知识检索与推理,避免冗长原始轨迹。相比GraphRAG等基于实体或文本块的方法,它以知识为记忆访问与组织单元。我们在三个异构基准(长时对话问答、多跳知识检索、网络代理任务)上评估,结果表明PlugMem在不修改的情况下持续优于通用基线,并超越专用记忆设计,同时在统一信息论分析下实现最高信息密度。代码与数据见https://github.com/TIMAN-group/PlugMem。
原文摘要 · Abstract (English)
Long-term memory is essential for large language model (LLM) agents operating in complex environments, yet existing memory designs are either task-specific and non-transferable, or task-agnostic but less effective due to low task-relevance and context explosion from raw memory retrieval. We propose PlugMem, a task-agnostic plugin memory module that can be attached to arbitrary LLM agents without task-specific redesign. Motivated by the fact that decision-relevant information is concentrated as abstract knowledge rather than raw experience, we draw on cognitive science to structure episodic memories into a compact, extensible knowledge-centric memory graph that explicitly represents propositional and prescriptive knowledge. This representation enables efficient memory retrieval and reasoning over task-relevant knowledge, rather than verbose raw trajectories, and departs from other graph-based methods like GraphRAG by treating knowledge as the unit of memory access and organization instead of entities or text chunks. We evaluate PlugMem unchanged across three heterogeneous benchmarks (long-horizon conversational question answering, multi-hop knowledge retrieval, and web agent tasks). The results show that PlugMem consistently outperforms task-agnostic baselines and exceeds task-specific memory designs, while also achieving the highest information density under a unified information-theoretic analysis. Code and data are available at https://github.com/TIMAN-group/PlugMem.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。