MemGraphRAG: Memory-Based Multi-Agent System for Graph Retrieval-Augmented Generation
> Paper: MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation > Venue: KDD 2026 | Institutions: Xiamen University × Jilin University > arXiv: 2606.00610 | Code: https://github.com/XMUDeepLIT/MemGraphRAG
TL;DR
MemGraphRAG diagnoses existing GraphRAG's "isolated amnesia": each document chunk is extracted independently with no communication, leading to topic confusion, logical conflicts, and fragmented knowledge graph structures. It uses a three-layer global memory (ontology–fact–passage) plus three AI agents (extract → detect → adjudicate) to eliminate hallucinations during offline indexing, then applies memory-aware PPR retrieval for 0.061-second responses, beating SOTA by 2.1% accuracy.
The Problem: Three Core Flaws in GraphRAG
Existing GraphRAG methods share a fundamental blind spot: each document chunk is extracted independently, with no global perspective. The paper's experiments show that removing 40% of low-frequency triples barely changes accuracy — meaning much extracted knowledge is noise.
| Flaw | Manifestation | Consequence | |------|--------------|-------------| | Topic irrelevance | Triples drift from central topics | Retrieval noise | | Logical inconsistency | Contradictory facts in the same subgraph (Newton's birth year 1643 vs 1645) | Broken semantic coherence | | Structural fragmentation | Key entities duplicated or scattered across disconnected subgraphs | No multi-hop traversal |
Core Techniques
1. Three-Layer Global Memory Architecture
- Ontology Layer: schema patterns with extraction frequency (e.g., "Person-Rule-Country": 5 occurrences → Stable; "Company-Create-Product": 2 → Pending). Maintains global topics and schema consistency.
- Fact Layer: concrete facts marked Active/Inactive. Conflicts are flagged, e.g., Inactive: (Newton, Birthyear, 1645); Active: (Newton, Birthyear, 1643).
- Passage Layer: original text passages for evidence grounding and conflict adjudication.
- Schema-Instance Alignment: every fact must strictly follow a schema pattern
- Fact-Evidence Grounding: every fact links to supporting passages, traceable both ways
- Mutual exclusion: Einstein born 1879 vs 1880 → keep only one; more evidence wins
- Temporal: US President Biden vs Trump → add time qualifiers "2021–2025" vs "2017–2021"
- Granularity: birthplace LA vs USA → refine to "Birth city" vs "Birth country"
- Stage I — Multi-layer memory filtering: parallel queries across the three memory layers; top-K candidates with strict semantic filtering; falls back to standard RAG if no structured candidates.
- Stage II — Structure-aware node initialization:
- Entity nodes: average similarity of associated facts (favors well-supported entities)
- Type nodes: schema relevance × 1/log(deg+1) — hub suppression to prevent highly connected nodes like "Person" from over-diffusing
- Passage nodes: semantic relevance × damping × information density (favors passages with rare, high-IDF entities)
- Stage III — Personalized PageRank on the heterogeneous graph with λ=0.5; top-K passages and M entities feed the LLM.
- Paper: arXiv:2606.00610
- Code: https://github.com/XMUDeepLIT/MemGraphRAG
- Baselines compared: RAPTOR, HippoRAG2, LinearRAG, GFM-RAG
- Benchmarks: HotpotQA, 2WikiMultiHopQA, MuSiQue, G-Bench (Medical/Novel)
Bidirectional indexing:
2. Multi-Agent Collaboration: Extract → Detect → Adjudicate
| Agent | Role | Input | Output | |-------|------|-------|--------| | A_ext (Extraction) | Processes chunks, extracts candidate schemas, facts, and passages | chunk c_i | candidate triples + passages | | A_det (Conflict Detection) | Monitors fact-layer updates; finds redundancy, structural anomalies, logical inconsistencies | newly activated facts t_new | conflict set F_conf | | A_res (Conflict Resolution) | Resolves conflicts using ontology constraints and passage-layer evidence | conflicts + evidence | corrected memory |
Three conflict types and strategies:
Topic denoising: extracted schemas start as "Pending" and are promoted to "Stable" only when corpus frequency exceeds threshold τ — only facts aligned with stable schemas get activated. This is the first filtering gate.
3. Memory-Guided Hierarchical Retrieval: The Secret of 0.061s
Why so fast? Topic denoising, conflict adjudication, and structure unification all happen offline; online retrieval only queries the pre-built memory index.
Experiments
Generation accuracy vs. SOTA
| Method | HotpotQA | 2Wiki | MuSiQue | G-Medical | G-Novel | Avg | |--------|----------|-------|---------|-----------|---------|---------| | GPT-4o-mini zero-shot | 39.70 | 31.30 | 15.20 | 42.13 | 31.42 | 30.99 | | Standard RAG Top-5 | 60.30 | 45.40 | 32.00 | 61.07 | 48.35 | 47.97 | | HippoRAG2 | 67.20 | 57.90 | 38.30 | 64.85 | 56.48 | 55.79 | | GFM-RAG | 67.70 | 61.10 | 36.10 | 58.19 | 53.39 | 55.27 | | LinearRAG | 67.30 | 61.90 | 37.80 | 63.85 | 54.15 | 55.27 | | MemGraphRAG | 70.60 | 64.70 | 38.10 | 66.65 | 55.78 | 59.25 |
MemGraphRAG averages 59.25%, beating the strongest baseline LinearRAG by 2.10%. It also achieves 74.6% recall (beating RAPTOR by 10%+) with a 0.061s response time, comparable to standard RAG.
Ablations
| Variant | Accuracy | Loss | |---------|----------|------| | Full MemGraphRAG | 58.37 | — | | w/o unified schema filtering | 56.89 | −1.48 | | w/o global adjudication | 56.45 | −1.92 | | w/o hub suppression | 57.21 | −1.16 | | w/o information density | 57.68 | −0.69 |
Unified schema filtering and global adjudication contribute the most — exactly the two core mechanisms of topic denoising and consistency maintenance.
Deeper Interpretations
1. Global vs. local paradigm shift: the quality of a knowledge graph depends not on individual extractor precision but on collaboration between extractors — like Wikipedia, written by many editors under shared conventions. 2. Heavy offline, light online: quality is guaranteed offline; speed is delivered online — mirroring search engine architecture. 3. Architectural efficiency with lightweight models: the system uses only GPT-4o-mini throughout, showing that elegant specialized-agent design can compensate for less raw model capability (divide and conquer). 4. Dual meaning of "memory": a long-term global memory (slowly built, globally consistent) plus working memory guidance (fast activation, locally precise) — an engineering analog of human memory systems.
Limitations and Extensions
1. Text-only: no multimodal (image/audio) support yet; extending the hierarchical graph to multimodal nodes is future work. 2. Offline build cost: high-quality global memory requires substantial offline LLM calls; efficient incremental updates for fast-changing corpora remain open. 3. Fixed threshold τ: may filter out legitimate schemas in sparse domains. 4. LLM dependence: conflict adjudication quality is bounded by LLM reasoning ability and potential biases.