TL;DR
This paper introduces ILlama, a novel framework that enhances Large Language Models (LLMs) for medical consultations by integrating structured medical knowledge from a Knowledge Graph (KG) with retrieval-augmented generation (RAG). ILlama significantly improves the accuracy, relevance, and reduces hallucinations in AI-generated medical advice, making it a more reliable tool for real-world applications.
What Problem Does This Paper Address?
Traditional online medical consultation platforms often suffer from slow response times due to reliance on human experts. While rule-based systems and early LLM-based approaches have emerged, they face challenges like generating inaccurate or "hallucinated" information, failing to incorporate up-to-date medical knowledge, and struggling to capture complex disease-symptom relationships. This can lead to misdiagnoses or unhelpful advice, especially in nuanced medical scenarios. The paper aims to bridge this gap by creating an LLM that can provide context-aware, accurate, and reliable medical consultations.
Methods
ILlama employs a three-component architecture: Retriever, Reranker, and Generator.
- Knowledge Graph Integration: The core innovation is transforming subgraphs from a structured UMLS-based Knowledge Graph (KG) into natural language documents. This "subgraph-to-text" approach allows LLMs to leverage structured medical knowledge, including causal relationships between symptoms and diseases, more effectively than raw text.
- Retrieval-Augmented Generation (RAG): ILlama uses a RAG approach. A Retriever (a fine-tuned
bge-large-en-v1.5model) identifies relevant subgraphs from the KG based on the user's query. - Reranking: A Reranker (a fine-tuned
bge-reranker-largemodel) then filters and reorders these retrieved subgraphs to prioritize the most contextually appropriate and clinically relevant information. This step is crucial for ensuring accuracy and reducing hallucinations. - Generation: Finally, a fine-tuned LLM (Llama2/Llama3) acts as the Generator, producing the final medical consultation response, incorporating the reranked knowledge.
- Pseudo Query Generation: To improve the training of the retriever and reranker, the authors developed an automated pipeline that generates synthetic, patient-style queries from KG subgraphs, which are then evaluated for relevance and style.
Datasets
- UMLS Knowledge Graph: The authors utilized the 2024 release of the Unified Medical Language System (UMLS) Metathesaurus, a comprehensive biomedical knowledge base.
- HealthCareMagic Dataset: Used for in-distribution training, validation, and testing. This dataset consists of single-turn patient-doctor interactions.
- iCliniq Dataset: Used exclusively for out-of-distribution evaluation to test the model's generalization capabilities on unseen data from a different source.
Key Insights and Ideas
- Subgraph-to-Text Transformation: Converting KG subgraphs into natural language sentences is a powerful way to make structured medical knowledge digestible for LLMs, preserving relationships and context.
- Triple-Centric Structuring: Focusing on central triples and their immediate neighbors in the KG (one-hop subgraphs) provides a targeted and efficient way to retrieve relevant medical information, avoiding the noise of full-graph retrieval.
- Reranking is Crucial: While retrieval is important, the reranking step significantly boosts precision and clinical relevance, especially in a high-stakes domain like medicine where errors can have serious consequences.
- Pseudo Query Generation for Training: Creating synthetic training data for retrieval models is a practical solution to the challenge of manually curating high-quality query-document pairs, especially for specialized domains.
Key Results
- Quantitative Performance: ILlama achieved state-of-the-art performance on both in-distribution and out-of-distribution datasets.
- ILlama8ß achieved a semantic similarity F1 score of 0.884 on the in-distribution dataset and 0.871 on the out-of-distribution dataset.
- It outperformed strong baselines like ChatDoctor across various metrics, including F1, METEOR, and MinosEval (Top-1 Hit Rate of 0.793 and Avg NLI Score of 0.633 on in-distribution).
- Qualitative Improvements:
- Reduced Hallucinations: ILlama demonstrated significant improvements in reducing fabricated or unsupported information compared to baselines.
- Improved Clinical Usefulness: Responses were more accurate, contextually relevant, and helpful for patients.
- Latency: ILlama showed lower latency in search, answer, and end-to-end processing compared to ChatDoctor, making it more suitable for real-time applications.
Limitations and Future Work
- KG and Dataset Coverage: The current KG and datasets are limited in scope, focusing on specific diseases and linguistic patterns, which restricts generalizability to broader clinical domains and multilingual contexts.
- Outdated Information: The KG may not always reflect the latest clinical updates, potentially leading to outdated responses if not synchronized.
- Clinical Safety Assessment: Current metrics (F1, METEOR) don't fully capture clinical safety or decision-making validity, necessitating automated or simulated clinical evaluations.
- Model Size: Reliance on large models limits deployment in resource-constrained settings; developing lightweight and multilingual variants is a future direction.
- Ethical Considerations: While ILlama aims to reduce errors, incorrect diagnoses are still possible, emphasizing the need for users to consult qualified healthcare professionals.
Summary updated