Source-linked AI summary

Retrieval-Driven Memory Reconsolidation for Long-Term LLM Agents

Yuanyi Song, Yukai Wang, Xinbei Ma, Zhihui Fu, Jianghao Lin, Weiwen Liu, Jun Wang, Huarong Deng, Yong Yu, Weinan Zhang

arXiv:2609.16053v1cs.CLcs.AI

TL;DR

Existing long-term memory systems mainly update from new information and treat retrieval as an endpoint, leaving retrieval feedback underused for reorganizing memory. REALM organizes memories in a cognitive graph, adapts graph-search retrieval, and reconsolidates memories using retrieval feedback; it outperforms the strongest baselines on both reported benchmarks.

  • Problem

    Existing systems mainly update memory with new information and treat retrieval as a passive endpoint, rather than using retrieval feedback to refine memory structure.

    Source: §1 · pp. 1–2
  • Method

    REALM combines autonomous cognitive-graph organization, adaptively composed graph-search actions, and post-retrieval reconsolidation of activated subgraphs.

    Source: §1 · p. 2
  • Results

    REALM scores 75.97 on LoCoMo, 7.17 points above the strongest baseline, and 65.11 on LongMemEval, 1.31 points above the previous best.

    Source: §4.2 · p. 8
  • Takeaways & Limitations

    Reconsolidation yields larger reported gains in correct answers after evidence retrieval than in successfully retrieving supporting evidence, pointing to improved evidence utilization rather than substantially more retrieval.

    Source: §4.5 · p. 11

Abstract

from arXiv · show

Long-term memory is essential for LLM-based agents operating over extended interactions. Existing memory systems primarily update memory when new information arrives, treating retrieval as the endpoint of memory access rather than a driver of memory evolution. Consequently, retrieval feedback is rarely exploited to reorganize memory for future access continuously. Moreover, most existing approaches rely on predefined memory structures together with fixed retrieval pipelines, limiting the agent's ability to organize and evolve its own memory autonomously. Inspired by memory reconsolidation in cognitive neuroscience, we propose \textbf{REALM}, a \textbf{r}econsolidation-\textbf{e}volution \textbf{a}gentic \textbf{l}ong-term \textbf{m}emory framework. It models long-term memory as a continual lifecycle by autonomously organizing memories into a heterogeneous cognitive graph, retrieving evidence via adaptively composed graph-search atoms, and continually reconsolidating memories based on retrieval feedback. REALM achieves an average accuracy of 75.97\% on LoCoMo and 65.11\% on LongMemEval, outperforming the strongest baselines by 7.17 and 1.31 points respectively. Ablation studies confirm that memory reconsolidation consistently boosts performance, with further analyses revealing that it progressively reorganizes related memory units into more coherent local structures for collective evidence recall and utilization during reasoning. These results suggest that retrieval-driven memory reconsolidation provides an effective mechanism for continually evolving long-term memory in LLM agents.

1 Introduction

The introduction argues that long-term memory should evolve through use, not only through new information. REALM combines autonomous graph organization, adaptive retrieval, and post-retrieval reconsolidation; the reported evaluations show consistent performance gains and reusable memory structures and policies.

1 Introduction

  • Existing systems primarily trigger memory updates with newly acquired information and treat retrieval as a passive endpoint rather than a catalyst for structural refinement.Source: §1 · p. 1
  • The proposed lifecycle draws on reconsolidation, in which recalled memories enter a labile state and their connections may strengthen, weaken, or form anew.The introduction identifies balancing flexible memory structure with adaptive retrieval over evolving topologies as a challenge.Source: §1 · p. 2
  • REALM integrates autonomous organization into a cognitive graph, adaptive retrieval policies, and local reconsolidation of activated subgraphs after each task.Its three components construct local topologies, compose context-tailored search actions, and update connections based on retrieval feedback.Source: §1 · p. 2
  • The paper frames long-term memory as a lifecycle that continually evolves through usage rather than remaining static after construction.Retrieval feedback is used to realign memory organization after each retrieval.Source: §1 · p. 2
  • Lifecycle-driven memory evolution consistently improves long-term memory performance and reveals reusable memory topologies and retrieval policies.The introduction also reports efficient memory organization and retrieval through the agentic cognitive graph.Source: §1 · p. 2

2 Related Work

Prior work develops varied memory representations and retrieval strategies, but generally retains predefined organization and static post-retrieval states. Research on memory evolution includes input-, time-, and value-driven updates; REALM instead reorganizes the activated local graph upon retrieval.

2.1 Agent Long-term Memory

  • Long-term memory systems range from flat stores to trees, graphs, temporal, OS-inspired, and multimodal structures, while retrieval methods include multi-hop reasoning, iterative search, and adaptive graph traversal.These approaches typically retain predefined organization and static post-retrieval states; REALM adds dynamic, autonomous reorganization.Source: §2.1 · p. 3

2.2 Agent Memory Evolution and Lifecycle

  • Memory evolution work explores offline compression, recency or frequency heuristics, temporal decay, selective forgetting, and reinforcement-learned values, but does not reorganize relations based on memory use.REALM instead reorganizes the activated local cognitive graph upon retrieval.Source: §2.2 · p. 3

3 Method

REALM treats retrieval as feedback for evolving memory topology, rather than a terminal access step. It represents memory as a graph, retrieves evidence through adaptive search, and reconsolidates the activated subgraph after use.

3.1 Problem Formulation

  • REALM adds post-retrieval reconsolidation: query and answer feedback drive structural refinement of the activated memory topology.Conventional paradigms update memory upon new observations and passively extract a static subgraph for answering queries.Source: §3.1 · p. 3

3.2.1 Graph Representation

  • Memory is a schema-free graph of typed memory units and directed relations, with node content and topology represented separately.Node types include entities, events, episodes, and facts; relation types include logical, causal, hierarchical, and associative.Source: §3.2.1 · pp. 3–4

3.2.2 Memory Construction

  • For each new observation, the agent selects whether to add, merge, or skip candidate memory units, then infers relations to neighborhood nodes.The neighborhood combines semantically similar and recently processed nodes.Source: §3.2.2 · p. 4

3.3 Memory Retrieval: Strategy Atom Combination

  • REALM composes context-dependent policies from atomic search actions across seeding, expansion, and filtering, beginning with parameterized plans for locating seed nodes.Seed plans specify query strings, keywords, target node types, and temporal constraints, using keyword, query, or hybrid matching.Source: §3.3 · p. 5, §3.3.1 · p. 5

3.3.2 Adaptive Evidence Expansion

  • Expansion continues until the collected evidence is sufficient or search limits are reached, selecting frontier actions and scoring discovered nodes using query-edge similarity, relation confidence, and temporal decay.The access score balances semantic similarity and topology confidence with β, then subtracts a temporal penalty.Source: §3.3.2 · p. 5

3.3.3 Evidence Aggregation

  • After search, REALM reranks retrieved nodes and uses the top-K evidence set to form the activated local subgraph for downstream generation and reconsolidation.The subgraph contains edges among the selected evidence nodes.Source: §3.3.3 · p. 5

3.4 Memory Reconsolidation: Topology Evolution

  • From the retrieved subgraph, the agent infers a topic structure summarizing semantic relations among recalled memories, then proposes local edge additions, strengthening, or weakening.These decisions target nodes in the retrieved set and carry a relation type and confidence.Source: §3.4.1 · p. 6, §3.4.2 · p. 6

3.4.3 Closed-Loop Memory Evolution

  • Confidence-guided, bounded updates protect the graph from destabilization by isolated or duplicate retrievals as repeated task interactions reinforce useful paths and weaken ineffective ones.The resulting memory graph progressively shifts from semantic organization toward a usage-aware cognitive structure.Source: §3.4.2 · p. 6, §3.4.3 · p. 6

4 Experiment

The experiments evaluate REALM on two long-term-memory benchmarks, testing overall performance, reconsolidation, autonomous organization and retrieval, and memory evolution.

4.1 Experimental Setup

  • The evaluation compares REALM with representative systems on LoCoMo and LongMemEval_S, using LLM-as-a-Judge accuracy and excluding unanswerable queries.Baseline results use identical judge prompts and models.Source: §4.1 · pp. 7–8

4.2 RQ1: Overall Performance

  • 75.97 on LoCoMo (7.17 points above the strongest baseline) and 65.11 on LongMemEval (1.31 points above the previous best) give REALM the top overall averages.On LoCoMo, multi-hop and temporal gains exceed 8 and 5 points; on LongMemEval, REALM leads in temporal reasoning and knowledge update while remaining competitive on single-session categories.Source: §4.2 · p. 8

4.3 RQ2: Effect of Memory Reconsolidation

  • Accuracy remains consistent across shuffled LoCoMo question orders, indicating reconsolidation’s gains are largely independent of interaction order.The authors attribute the stability to refining the memory graph through retrieval rather than memorizing a query sequence.Source: Figure 3 · p. 8, §4.3 · p. 9
  • 2.01 points on LoCoMo and 2.13 on LongMemEval: removing reconsolidation lowers overall performance, with the largest reported gains in selected categories.The largest gains are +4.97 on LoCoMo Multi-Hop and +5.21 on Open-Domain, and +6.66 on LongMemEval Single-session Preference and +4.17 on Knowledge Update; graph updates after retrieval strengthen useful associations for later retrieval.Source: §4.3 · pp. 8–9, Table 3 · p. 9

4.4 RQ3: Dissecting Agentic Memory Autonomy

  • Node-type distributions differ by less than 1.5 percentage points between graph and retrieved evidence, while causal and logical relation use rises by 13.39 and 6.57 points.Associative relations become less frequent; the authors describe them as broad connectivity and causal and logical relations as primary reasoning paths.Source: Figure 4 · p. 9, §4.4 · pp. 9–10
  • 84.87% of LoCoMo evidence is found from seed nodes, compared with 40.52% on LongMemEval; a considerable share of the latter requires maximum-depth expansion.This pattern indicates early retrieval for straightforward queries and deeper graph exploration for harder ones.Source: Figure 5 · p. 10, §4.4 · p. 10
  • Adaptive strategy selection achieves the highest accuracy on graph-expansion questions, slightly outperforming fixed strategies, but its benefit depends on reliable selection.The agent usually chooses subgraph-based expansion and switches strategies when needed.Source: Table 4 · p. 10, §4.4 · p. 10

4.5 RQ4: Memory Evolution through Reconsolidation

  • Evidence retrieval rises by only 3.70% and 5.41%, while correct answers after retrieval rise by 20.83% and 19.23%, respectively.The analysis attributes the larger gains to improved evidence utilization through retrieval-driven graph reorganization, rather than substantially expanding retrievable memory.Source: Figure 6 · p. 11, §4.5 · p. 11

5 Conclusion

REALM treats long-term memory as a dynamic, closed-loop lifecycle in which retrieval feedback drives local topology updates. The reported analyses associate this evolution with more compact evidence clustering and collective recall.

5 Conclusion

  • REALM uses retrieval feedback to update local memory topology in a heterogeneous cognitive graph, rather than treating retrieval as a terminal checkpoint.The framework organizes memories, retrieves evidence, and reconsolidates memory based on co-utilization patterns.Source: §5 · p. 11
  • The authors report robust performance gains across long-term memory scenarios after introducing retrieval-driven memory reconsolidation.Source: §5 · p. 11
  • Topology evolution organizes scattered interactions into compact structural subgraphs that facilitate collective evidence recall.Source: §5 · p. 11

A.1 Benchmarks

The appendix describes two long-term memory benchmarks and representative baseline systems spanning several memory-design paradigms. It also includes a sequence for constructing and updating the cognitive graph.

A.1 Benchmarks

  • LoCoMo evaluates agents on multi-session conversations with questions requiring retrieval, integration, and reasoning, while LongMemEval_S tests memory-intensive question answering across question types.LongMemEval_S is the LongMemEval variant used in the experiments.Source: §A.1 · p. 14

A.2 Baselines

  • Baselines span flat retrieval, predefined memory components, temporal graphs, agentic memory formation, predictive coding, and multi-graph traversal.The compared systems include Mem0, MIRIX, Zep, A-Mem, Nemori, and MAGMA.Source: §A.2 · p. 15
  • Mem0 reconciles extracted facts with a flat store using ADD, UPDATE, DELETE, or NOOP operations, whereas MIRIX routes information among six predefined memory components.Source: §A.2 · p. 15
  • Zep uses temporally aware hierarchical subgraphs and combines similarity, BM25, and breadth-first graph search for retrieval.Source: §A.2 · p. 15
  • A-Mem links new atomic notes to nearby notes and evolves their context, keywords, and tags; Nemori distills prediction-error residuals into semantic memory.Source: §A.2 · p. 15
  • MAGMA uses four relation graphs and intent-weighted graph traversal, while separating rapid temporal-edge ingestion from asynchronous causal and entity consolidation.Source: §A.2 · p. 15
  • The graph-organization algorithm extracts memory units, retrieves similar and recent nodes, predicts and executes an operation, then infers relations and updates the graph.Source: §A.2 · p. 16

A.3 Memory Graph Configuration.

Retrieval is bounded by benchmark-specific seed-plan counts and expansion depths, with a shared cap on retrieved nodes. The graph is reconsolidated once after each evaluated question.

A.3 Memory Graph Configuration.

  • LoCoMo retrieval uses one seed plan and depth 3, while LongMemEval uses three seed plans and depth 5; both cap retrieved nodes at 10.Source: §A.3 · p. 16
  • Evidence aggregation uses α = 0.8 and access scoring uses β = 0.6.Source: §A.3 · p. 16
  • The memory graph is reconsolidated once after each question, which is answered only once; experiments use API-based inference and lightweight graph operations on standard computing environments.Source: §A.3 · p. 16

A.4 Evaluation Protocol and Question Scheduling

The evaluation schedules questions sequentially on LoCoMo samples, reconsolidating memory after each answer. LongMemEval samples receive generated historical questions before the benchmark question because each sample contains only one question.

A.4 Evaluation Protocol and Question Scheduling

  • LoCoMo questions are evaluated sequentially within each sample, with one reconsolidation round after every answer.Source: §A.4 · p. 16
  • For LongMemEval, GPT-4o-mini and GPT-4.1 generate one to six questions from the oracle session to simulate prior memory use before the original question.Source: §A.4 · p. 16
  • Unanswerable questions are excluded from both benchmarks, and LoCoMo and LongMemEval_S are selected as widely used long-term-memory benchmarks.The stated goal is to test reconsolidation as a continual memory-organization mechanism, not to optimize leaderboard performance.Source: §A.4 · p. 16

A.5 Evaluation Details

The section specifies evaluation and baseline-handling choices, then provides pseudocode covering REALM’s memory organization, retrieval, and reconsolidation stages.

A.5 Evaluation Details

  • Results reuse official reports when possible, with a shared gpt-4o-mini backbone and judge prompts; A-Mem is reproduced under the same settings.MIRIX and Mem0 results come from MemOS, while MAGMA and Nemori results come from MAGMA.Source: §A.5 · p. 16

B Algorithms for REALM

  • Algorithm 2 plans seed retrieval, repeatedly expands selected frontier nodes, reranks candidates, and returns top evidence with its induced subgraph.Expansion updates access scores before the retrieval set is reranked.Source: §A.5 · p. 17
  • Algorithm 3 uses the question, retrieved subgraph, and feedback to infer topic structure and create, strengthen, or weaken graph edges.The pseudocode summarizes interactions among the LLM, memory graph, and retrieval modules while omitting implementation-specific details.Source: §A.5 · p. 17, B Algorithms for REALM · p. 17

C.1 Strategy Atoms

REALM’s strategy atoms compose retrieval from seed planning through sufficiency checks and graph expansion, while the prompt suite specifies the framework’s functional stages.

C.1 Strategy Atoms

  • Seed plans choose matching mode, node-type and time constraints; query, keyword, or hybrid matching supports semantic, lexical, or combined retrieval.Hybrid matching combines embedding and keyword scores with default weights of 0.6 and 0.4.Source: §C.1 · p. 18
  • Node-type filters relax when they would yield no candidates, while seed-plan time ranges apply only to hybrid matching.Untimestamped nodes are kept by default in the hybrid time-range filter.Source: §C.1 · p. 18
  • Before each expansion round, the sufficiency controller can stop retrieval or select nodes for the next frontier.When its expansion list is empty or invalid, the frontier defaults to the highest-scoring unexpanded nodes.Source: §C.1 · p. 18
  • Expansion scores candidate edges using semantic similarity, edge weight, and temporal decay, then filters candidates by predicates and score threshold.Candidates revisiting a node on the current path or already reached from another seed are discarded before scoring.Source: §C.1 · p. 18
  • Expansion can use subgraph beam selection for aggregated evidence or path search for coherent chains; both modes govern which candidates continue to the next hop.Subgraph beam deduplicates by target node under a shared node budget; path search retains top paths and pruned paths are not reconsidered.Source: §C.1 · p. 19

D Prompts

  • Further prompts plan seeds, assess evidence sufficiency, define retrieval expansion, and guide topology refinement.These prompts correspond to retrieval and topology stages of the framework.Source: D Prompts · p. 19
  • The prompt suite covers memory-unit construction, node operations, relation prediction, and updating the conversation summary from new information.Memory construction prompts also relate new units to past memories and aim to represent the latest information with fewest nodes.Source: D Prompts · pp. 19–20

Task A: Memory Unit Generation

The prompt suite constructs typed memory units and specifies conservative storage decisions, relation types, retrieval controls, and local topology refinement.

Task A: Memory Unit Generation

  • Memory construction represents information as entities, events, episodes, or facts, and adds, modifies, or skips units based on overlap and preservation criteria.Modification is reserved for the same underlying entity, event, or fact when the change adds detail, clarification, or minor correction without losing stored information.Source: Task A: Memory Unit Generation · pp. 20–21

1. Logical

  • Logical relations encode implication, constraint, verification, and contradiction, with contradiction suppressing activation of the opposing memory.The listed predicates distinguish mutual exclusion from evidence or boundary-setting relations.Source: §1 · p. 22

2. Causal

  • Causal relations distinguish temporal precedence from enabling conditions, direct triggers, and resulting state changes.The prompt describes enables as necessary and triggers as sufficient conditions.Source: §2 · p. 22

3. Taxonomic

  • Taxonomic relations represent whole-part, class-instance, and semantic-summary links between memory units.The summary relation is a high-level semantic compression of episodes or events.Source: §3 · p. 22

4. Associative

  • Associative relations include similarity, supersession, analogy, and contextualization; seed planning selects query, keyword, or hybrid matching and node/time constraints.The matching modes respectively target semantic similarity, exact lexical anchors, or both signals.Source: §4 · pp. 22–23
  • The retrieval controller stops when displayed nodes contain the answer or selects relevant expansion seeds; expansion can target broad subgraphs or coherent reasoning paths.The controller selects at most five nodes with expansion potential when evidence remains insufficient.Source: §4 · pp. 23–24

Context Allowed Edge Schema: (Type-Predicate)

  • Topology refinement uses retrieved-node analysis to strengthen relevant links, weaken misleading ones, or add supported connections, while preserving graph structure and restricting edits to recalled nodes.Edge weights change only with clear evidence that the adjustment is likely to improve future retrieval.Source: §4 · p. 25, Context Allowed Edge Schema:… · pp. 25–26
Loading 2609.16053v1…