cs.AIAug 29, 2026

Selective Forgetting: A Graph-Based Memory Framework for Long-Term LLM Agents

Authors: Theo Rusu, Sourena Khanzadeh, Manar Alalfi

Organizations: Department of Computer Science Toronto Metropolitan University Toronto, Ontario, Canada · The Creative School Toronto Metropolitan University Toronto, Ontario, Canada · Flybits, Creative AI Hub Toronto, Ontario, Canada

Abstract

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.4170.417 against 0.4680.468, and a paired bootstrap over 500 questions gives Δ=−0.050Δ= -0.050 (95% CI [−0.085,−0.016][-0.085, -0.016]). The gap is widest on questions that require recalling a specific prior assistant turn, where judged correctness falls from 0.9110.911 to 0.6070.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+0.001, 95% CI [−0.015,+0.016][-0.015, +0.016]) and judged correctness falls by 1.61.6 points, with the 95% interval bounding any loss at 3.83.8 points ([−0.038,+0.006][-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

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. TAGGRAPH: Tag-Augmented Graphs for Graph Retrieval of Agent Persistent Histories

    Sep 29, 2026Yu-Shu Chen, Yu-Jung Liang, Pengtao XieGraph-Based RetrievalMemory Agent Benchmarks

  2. LazyMem: Retrieve Broadly, Construct Selectively for Efficient Long-Term Agent Memory

    Jul 17, 2026Jing Yu, Yibo Zhao, Jiaming Zhang +1Persistent Memory for Language ModelsLong-Term Conversational Memory