EngramRAG: Dynamic Usage-Weighted Topology and Synaptic Consolidation for Multi-Hop Agentic Memory
Organizations: Independent Researchers
Abstract
As autonomous LLM agents are deployed across multi-session environments, conventional memory architectures suffer from Associative Blindness (inability to traverse multi-hop relational dependencies), Scaffolding Amnesia (temporal decay evicting core persona invariants), and Static Topology Stagnation (immutable graphs ignoring usage dynamics). Grounded in Complementary Learning Systems (CLS) principles, we propose EngramRAG, an adaptive memory architecture coupling a low-latency Waking State reflex with an asynchronous background Dreaming State consolidation cycle. EngramRAG introduces: (1) Usage-Modulated Personalized PageRank (U-PPR), where transition probabilities adapt via Hebbian plasticity to promote persistent entities into high-centrality Epistemic Macro-Hubs; (2) Consolidation-Activated Topology Decay (CATD), which scales retention half-life by topological load-bearing weight rather than wall-clock recency, protected by a cold-start grace period (N_grace >= 4); (3) Directed SUPERSEDES DAG filtering to suppress obsolete state during fact mutations; and (4) Triple-source hybrid retrieval fusing dense vectors, BM25, and U-PPR via dynamic Reciprocal Rank Fusion (RRF). Evaluating on all 1,982 QA pairs across 10 long-term conversations in the LoCoMo benchmark, EngramRAG achieves +38.9% relative improvement in Recall@5 (53.21% vs. 38.29%, p < 0.001) and +43.1% in MRR (0.4203 vs. 0.2937) over dense vector RAG, significantly outperforming Okapi BM25 (48.66%) and isolated static graph retrieval (8.50%). On temporal reasoning, EngramRAG reaches 62.33% Recall@5 (+16.67 points over dense vectors). In controlled mutation tests, SUPERSEDES suppresses split-brain hallucinations from 70.0% to 0.0%, while 90-day simulations show 100.0% scaffolding retention under a 26.21ms interactive retrieval reflex.
Figures & tables
| Architecture | Primary Memory | Plasticity / | Scaffolding | Ingestion / Retrieval | Contradiction | Typical Retrieval |
|---|---|---|---|---|---|---|
| Topology | Edge Weights | Protection | Decoupling | Resolution | Latency Budget | |
| MemGPT [ 1 ] | Context FIFO / OS Paging | None (Static) | None (LRU Eviction) | Synchronous Tool Call | None (Appends) | High ( ms) |
| HippoRAG [ 2 ] | Static Knowledge Graph | None (Static) | None (Static Graph) | Offline Batch Ingest | None (Static Corpus) | Medium (5–15 ms) |
| GraphRAG [ 3 ] | Hierarchical Communities | None (Static) | None (Static Summary) | Offline Map-Reduce | None (Static Corpus) | Very High ( ms) |
| Mem0 [ 4 ] | Entity Graph + Vector Store | None (Static) | Partial (Distance-based) | Synchronous Pipeline | Overwrite Conflict | Medium (50–100 ms) |
| EngramRAG (Proposed) | Dynamic Attributed Graph | Hebbian Plasticity | CATD Grace Retention | Waking / Dreaming | SUPERSEDES DAG | Low (Sub-30 ms) |
| Architecture / Model | Recall@1 | Recall@3 | Recall@5 | HitRate@5 | MRR | Latency |
|---|---|---|---|---|---|---|
| Static Graph Baseline (Isolated PPR) | 3.99% | 7.07% | 8.50% | 9.38% | 0.0657 | 5.70 ms |
| Dense Vector RAG (all-MiniLM-L6-v2) | 17.17% | 31.32% | 38.29% | 43.09% | 0.2937 | 14.37 ms |
| BM25 Keyword (Okapi) | 28.51% | 43.47% | 48.66% | 52.98% | 0.4059 | 0.63 ms |
| EngramRAG (Proposed) | 27.21% ∗ | 45.40% ∗ | 53.21% ∗† | 58.12% ∗ | 0.4203 ∗‡ | 26.21 ms |
| Relative Gain vs. Dense Vector | +58.5% | +45.0% | +39.0% | +34.9% | +43.1% | — |
| Absolute Gain vs. BM25 | -1.30% | +1.93% | +4.55% † | +5.14% | +0.0144 ‡ | — |
| LoCoMo Question Category | Dense Vector | BM25 | Static Graph | EngramRAG (Proposed) |
|---|---|---|---|---|
| Category 1 (Factual Recall) | 22.13% | 14.84% | 2.22% | 21.89% |
| Category 2 (Temporal Reasoning) | 45.66% | 56.10% | 12.64% | 62.33% (+6.23%) |
| Category 3 (Multi-Session Reasoning) | 19.47% | 18.63% | 6.88% | 25.25% (+5.78%) |
| Category 4 (Multi-Hop Inference) | 48.22% | 56.58% | 8.72% | 61.18% (+4.60%) |
| Category 5 (Conversational / Open) | 28.36% | 55.94% | 9.42% | 57.17% (+1.23%) |
| Memory Architecture | Current Fact Recall | Split-Brain Hallucination | Contradiction Filtering |
|---|---|---|---|
| Dense Vector RAG | 100.0% | 70.0% | None (Cosine Competition) |
| BM25 Keyword (Okapi) | 86.0% | 80.0% | None (Lexical Overlap) |
| EngramRAG (SUPERSEDES DAG) | 100.0% | 0.0% | Topological Suppression |
| Retrieval Backbone | Token F1 | Exact Match (EM) | ROUGE-L | Temporal F1 |
|---|---|---|---|---|
| Dense Vector RAG | 18.34% | 2.56% | 18.34% | 11.77% |
| BM25 Keyword | 17.84% | 2.56% | 17.11% | 23.18% |
| EngramRAG (Proposed) | 17.29% | 2.56% | 17.29% | 18.18% |