Medical Graph RAG: Towards Safe Medical Large Language Model via Graph Retrieval-Augmented Generation

Junde Wu, Jiayuan Zhu, Yunli Qi · OpenReview

Sure, here's a blog-style summary of the paper "Medical Graph RAG: Towards Safe Medical Large Language Model via Graph Retrieval-Augmented Generation":

TL;DR

This paper introduces MedGraphRAG, a novel graph-based Retrieval-Augmented Generation (RAG) framework designed to make Large Language Models (LLMs) safer and more reliable for medical applications. By constructing a sophisticated, multi-layered knowledge graph from medical documents and leveraging a unique retrieval strategy, MedGraphRAG significantly improves the accuracy and evidence-based nature of LLM responses, outperforming existing methods.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown immense promise, but their application in specialized fields like medicine is fraught with challenges. Firstly, the sheer volume of medical knowledge makes it impossible to fit into an LLM's finite context window, and fine-tuning is often infeasible. Secondly, the medical domain demands extreme accuracy and reliability; even minor inaccuracies or fabricated information can have severe consequences. Existing RAG methods, while helpful, often struggle with synthesizing complex information from long-form documents and providing verifiable, evidence-based responses. This gap highlights the need for a system that can not only access vast medical knowledge but also present it accurately and traceably.

Methods

MedGraphRAG builds upon the concept of GraphRAG but introduces several key innovations tailored for the medical domain:

  • Triple Graph Construction: This is the core of MedGraphRAG's knowledge representation. It involves:
  • Semantic Document Chunking: A hybrid approach combining line breaks with topic-based segmentation to better capture the context of medical documents.
  • Entities Extraction: Identifying key entities (like diseases, drugs, symptoms) from document chunks, along with their types and contextual descriptions, using an LLM.
  • Triple Linking: Creating a three-tiered repository graph. The bottom layer uses medical dictionaries (like UMLS), and the upper layers use medical papers and textbooks. Entities from user documents are linked to this repository graph, forming triples like [RAG entity, source, definition]. This ensures responses are grounded in established medical knowledge.
  • Relationship Linking: Identifying and linking relationships between extracted entities within document chunks to form "Meta-MedGraphs."
    • Tagging Graphs: Summarizing these Meta-MedGraphs using predefined medical tags and iteratively merging similar graphs to create hierarchical tag summaries. This avoids the complexity of building costly graph communities.
  • U-Retrieval: A novel retrieval strategy that balances global context awareness with precise indexing. It works in two phases:
  • Top-down Precise Retrieval: The LLM generates tag summaries for the user query and uses these to identify the most relevant graph.
  • Bottom-up Response Refinement: The LLM iteratively refines the response by incorporating higher-level tags, ensuring a comprehensive and accurate answer.

Datasets

  • RAG Data: MIMIC-IV, a publicly available electronic health record dataset, was used to simulate private patient data.
  • Repository Data:
    • MedC-K: A corpus of 4.8 million biomedical academic papers and 30,000 textbooks.
  • FakeHealth and PubHealth: Datasets for fact-checking public health claims.
  • UMLS Graph: A medical vocabulary and semantic relationship graph.
  • Test Data:
    • MultiMedQA suite (including MedQA, MedMCQA, PubMedQA, MMLU clinic topics).
  • FakeHealth and PubHealth (for fact-checking).
  • DiverseHealth: A newly collected dataset focusing on health equity.

Key Insights and Ideas

  • Hierarchical Knowledge is Key: The paper strongly suggests that a multi-layered, hierarchical knowledge graph structure (linking user data to authoritative medical sources) is crucial for robust medical LLM applications, far more so than simply aggregating data.
  • Evidence-Based Responses are Paramount: The "Triple Linking" mechanism directly addresses the critical need for verifiable sources and definitions, making LLM outputs trustworthy.
  • U-Retrieval Balances Breadth and Depth: The U-Retrieval method effectively navigates the complex graph structure, allowing for both a broad understanding of the query's context and precise retrieval of relevant details.
  • Smaller LLMs Benefit Greatly: MedGraphRAG shows particularly significant improvements for smaller LLMs, indicating that this framework can effectively augment their reasoning capabilities without requiring extensive fine-tuning.

Key Results

  • State-of-the-Art Performance: MedGraphRAG consistently outperformed standard RAG and GraphRAG across 9 medical Q&A benchmarks and 2 health fact-checking benchmarks, achieving new state-of-the-art (SOTA) results.
  • Significant Accuracy Gains: Improvements of nearly 10% in fact-checking and 8% in medical Q&A were observed compared to baselines without retrieval. Compared to GraphRAG, improvements were around 8% and 5%, respectively.
  • Human Evaluation Success: Clinicians and laypersons rated MedGraphRAG responses higher across all evaluated dimensions (pertinence, correctness, citation precision, citation recall, and understandability), especially in citation precision and recall.
  • Ablation Study Validation: Incremental addition of MedGraphRAG's components (Med-MetaGraph, Triple Graph Construction, U-Retrieval) showed a gradual performance increase, with Triple Graph Construction and U-Retrieval providing the most significant boosts.

Limitations and Future Work

  • Limitations: The paper acknowledges that the current implementation is limited to 12 layers for tag summarization, which might not be sufficient for all model variants. The retrieval process is also dependent on the quality of the constructed graph.
  • Future Work: The authors suggest focusing on real-time data updates and validation on real-world clinical data. Further research could explore more dynamic graph construction and retrieval strategies.

Summary updated

Abstract

We introduce a novel graph-based Retrieval-Augmented Generation (RAG) framework specifically designed for the medical domain, called \textbf{MedGraphRAG}, aimed at enhancing Large Language Model (LLM) capabilities and generating evidence-based results, thereby improving safety and reliability when handling private medical data. Our comprehensive pipeline begins with a hybrid static-semantic approach to document chunking, significantly improving context capture over traditional methods. Extracted entities are used to create a three-tier hierarchical graph structure, linking entities to foundational medical knowledge sourced from medical papers and dictionaries. These entities are then interconnected to form meta-graphs, which are merged based on semantic similarities to develop a comprehensive global graph. This structure supports precise information retrieval and response generation. The retrieval process employs a U-retrieve method to balance global awareness and indexing efficiency of the LLM. Our approach is validated through a comprehensive ablation study comparing various methods for document chunking, graph construction, and information retrieval. The results not only demonstrate that our hierarchical graph construction method consistently outperforms state-of-the-art models on multiple medical Q\&A benchmarks, but also confirms that the responses generated include source documentation, significantly enhancing the reliability of medical LLMs in practical applications. Code will be at: https://github.com/MedicineToken/Medical-Graph-RAG/tree/main

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Fake HealthMedGraphRAG (GPT-4)Accuracy86.5%+8.1 vs baselinemodel=GPT-4 · retrieval=MedGraphRAG
Source quote
L164: GPT-4 │ 86.5 │ 83.4 │ 91.3 │ 81.5 │ 83.3 │ 91.5 │ 98.1 │ 95.8 │ 93.2 │ 98.5 │ 96.4
MedQAMedGraphRAG (GPT-4)Accuracy91.3%+2.4 vs baselinemodel=GPT-4 · retrieval=MedGraphRAG
Source quote
L164: GPT-4 │ 86.5 │ 83.4 │ 91.3 │ 81.5 │ 83.3 │ 91.5 │ 98.1 │ 95.8 │ 93.2 │ 98.5 │ 96.4
MultiMedQAMedGraphRAG (human-evaluation table row printed “MedGrapgRAG”)CP (citation precision)92+8 vs baselineevaluation=human evaluation
Source quote
L179: MedGrapgRAG │ 97 │ 94 │ 92 │ 86
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Fake HealthGraphRAG (GPT-4) baselineAccuracy78.4%model=GPT-4 · retrieval=GraphRAG
Source quote
L157: GPT-4 │ 78.4 │ 77.8 │ 88.9 │ 77.2 │ 77.9 │ 82.1 │ 95.1 │ 94.8 │ 82.6 │ 92.5 │ 94.0
MedQAGraphRAG (GPT-4) baselineAccuracy88.9%model=GPT-4 · retrieval=GraphRAG
Source quote
L157: GPT-4 │ 78.4 │ 77.8 │ 88.9 │ 77.2 │ 77.9 │ 82.1 │ 95.1 │ 94.8 │ 82.6 │ 92.5 │ 94.0
MultiMedQAMIRAGE baselineCP (citation precision)84evaluation=human evaluation
Source quote
L178: MIRAGE │ 95 │ 90 │ 84 │ 75 │ 91
BibTeX
@misc{wu2024medical,
  author = {Junde Wu and Jiayuan Zhu and Yunli Qi},
  title = {{Medical Graph RAG: Towards Safe Medical Large Language Model via Graph Retrieval-Augmented Generation}},
  year = {2024},
  eprint = {2408.04187},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.04187},
}
Figure