用图结构管理长期对话记忆,自动删减低价值信息。
Selective Forgetting: A Graph-Based Memory Framework for Long-Term LLM Agents
- 将对话转为带类型和属性的节点与边,构建知识图谱。
- 在长时记忆评测中,删减策略使存储减少9.8%,性能基本不变。
- 适合需要长期维护对话历史的智能体系统,尤其关注记忆压缩效率。
知识图谱被视作长时代理记忆的结构化替代方案,假设将对话表示为实体与关系能提升回忆效果。本文直接评估该假设:框架将每个对话轮次转化为带类型的节点和带属性的边,从两跳子图中回答问题,并定期删除在时效性、访问频率、度中心性及年龄加权组合下得分较低的节点。在LongMemEval测试中,图结构在匹配五次检索根的预算下未超越扁平向量基线:令牌F1为0.417,低于基线0.468;500个问题的配对自举检验显示Δ = -0.050(95%置信区间[-0.085, -0.016])。在需回忆特定助手回复的问题上差距最大,判断正确率从0.911降至0.607,表明将对话拆分为实体会丢失依赖表面形式的关键信息。遗忘模块表现更优:对一个持续存在的27,021节点图应用一次后,移除9.8%节点和9.5%存储字节;令牌F1变化+0.001(95%置信区间[-0.015, +0.016]),判断正确率下降1.6点,95%置信区间表明损失不超过3.8点([-0.038, +0.006])。由于提取器仅为单一小型模型,在单一基准测试上评估,结果反映此抽取式流程特性,而非图结构记忆的普遍表现。代码:https://github.com/skhanzad/Selective-Amnesia
原文摘要 · Abstract (English)
Knowledge graphs have been proposed as a structured alternative to flat retrieval-augmented generation for long-term agent memory, on the assumption that representing conversations as entities and relations improves recall. We evaluate that assumption directly. Our framework extracts each conversational turn into typed nodes and attributed edges, answers questions from a two-hop subgraph, and periodically prunes nodes that score low on a weighted combination of recency, access frequency, degree centrality, and age. On LongMemEval, the graph does not outperform a flat vector baseline at a matched candidate-generation budget of five retrieval roots: token F1 is $0.417$ against $0.468$, and a paired bootstrap over 500 questions gives $Δ= -0.050$ (95\% CI $[-0.085, -0.016]$). The gap is widest on questions that require recalling a specific prior assistant turn, where judged correctness falls from $0.911$ to $0.607$, suggesting that decomposing a turn into entities discards the surface form these questions depend on. The forgetting module is more successful. Applied once to a persistent 27{,}021-node graph, it removes 9.8\% of nodes and 9.5\% of stored bytes; token F1 is unchanged ($+0.001$, 95\% CI $[-0.015, +0.016]$) and judged correctness falls by $1.6$ points, with the 95\% interval bounding any loss at $3.8$ points ($[-0.038, +0.006]$). Because our extractor is a single small model evaluated on one benchmark, these results characterise this extraction-based pipeline rather than graph-structured memory in general. Code: https://github.com/skhanzad/Selective-Amnesia
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。