Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, yet they often struggle with factual consistency and "hallucinations" in specialized fields like medicine. While continued pre-training on medical corpora is a common remedy, it is computationally intensive and may fail to capture the structured, relational nature of medical knowledge.
Medical Knowledge Graphs (KGs), such as the Unified Medical Language System (UMLS), provide expert-verified, structured facts. However, bridging the gap between discrete graph structures and the continuous vector space of LLMs remains a significant challenge. This paper introduces MEG (MEdical knowledGe-augmented LLMs), a parameter-efficient framework designed to inject structured Knowledge Graph Embeddings (KGEs) directly into the token space of LLMs.
Methodology: The MEG Framework
The MEG architecture integrates structured knowledge into an LLM through a multi-stage pipeline that avoids the need for expensive full-model retraining.
The framework consists of four primary components:
- KG Encoder: Utilizes GraphSAGE to produce dense vector representations (KGEs) for entities within the UMLS.
- KG Grounding Module: Employs an entity linker (scispaCy) to identify medical concepts in user prompts and map them to corresponding KG nodes.
- Mapping Network: A lightweight 4-layer Multi-Layer Perceptron (MLP) that translates KGEs into the LLM’s native embedding space.
- Instruction-Tuned Decoder: A base LLM (e.g., Mistral-7B or Llama-3-8B) that processes these translated graph embeddings alongside standard text tokens.
Training Strategy
MEG employs a two-phase training approach:
- Phase I (Embedding Transfer): The mapping network is trained to align graph embeddings with the LLM's internal representations. This is achieved using a combination of contrastive loss to maintain semantic proximity and back-translation loss to ensure the transformation preserves original information.
- Phase II (Fine-tuning): The entire system is fine-tuned on medical QA tasks using LoRA (Low-Rank Adaptation). By keeping the majority of the LLM parameters frozen, MEG remains computationally efficient.
Experimental Setup and Datasets
The researchers evaluated MEG using the MultiMedQA benchmark, a comprehensive suite of clinical question-answering tasks including MedQA (USMLE), PubMedQA, MedMCQA, and the medical subset of MMLU.
Key Results and Performance
MEG demonstrates significant performance improvements over both general-purpose and specialized biomedical models.
Key findings include:
- Accuracy Gains: MEG achieved an average accuracy boost of +6.7% over BioMistral-7B and +9.9% over MediTron-7B.
- State-of-the-Art Performance: The MEG-LLAMA (8B) variant reached an average accuracy of 69.9% across benchmarks, rivaling much larger models.
- Efficiency: MEG can be trained on four A10G GPUs in just a few hours, a stark contrast to the massive resource requirements of models like Meerkat-7B.
Discussion and Insights
A critical insight from the study is that dense KGEs are more effective than raw text triples. Directly inserting triples (e.g., "Heart Attack IS_A Disease") into prompts often introduced noise that degraded zero-shot performance. In contrast, MEG's embedding-based approach provides a condensed, high-signal representation of knowledge.
Qualitative analysis via t-SNE visualizations suggests a "semantic activation" effect: the mapping network successfully steers the LLM's attention toward specific semantic regions, making internal representations of medical concepts more cohesive.
Conclusion and Future Work
MEG offers a scalable, efficient method for grounding LLMs in structured medical knowledge. While the current framework shows great promise, future work will address positional bias in multiple-choice settings and explore the integration of Knowledge Graph Embeddings with multi-step Chain-of-Thought (CoT) reasoning to further enhance diagnostic accuracy.
Summary updated