medIKAL: Integrating Knowledge Graphs as Assistants of LLMs for Enhanced Clinical Diagnosis on EMRs

Mingyi Jia, Junwen Duan, Yan Song, Jianxin Wang · DOI

Introduction

Electronic Medical Records (EMRs) contain a wealth of patient information critical for accurate clinical diagnosis. However, these records are often unstructured, redundant, and complex, making automated analysis challenging. While Large Language Models (LLMs) have demonstrated significant potential in medical reasoning, their deployment in clinical settings is hindered by issues such as hallucinations, context window limitations, and an inability to effectively balance internal medical intuition with external structured knowledge.

The medIKAL framework (Integrating Knowledge Graphs as Assistants of LLMs) addresses these challenges by reimagining the relationship between LLMs and Knowledge Graphs (KGs). Rather than treating KGs as mere external databases for retrieval, medIKAL positions them as "specialist consultants" that assist the LLM's internal reasoning process.

Challenges in LLM-based Clinical Diagnosis

Current Retrieval-Augmented Generation (RAG) approaches for medical diagnosis face three primary hurdles:

  1. Hallucinations: LLMs may generate plausible but medically incorrect diagnoses when lacking grounded, verifiable knowledge.
  2. Context Overload: Standard RAG methods often inject excessive numbers of KG triplets into the prompt. This can exceed context limits or introduce "noise" that confuses the model.
  3. Over-reliance on Context: LLMs sometimes prioritize retrieved external data over their own robust internal medical training, leading to errors if the retrieved information is slightly irrelevant or misleading.

The medIKAL Framework

The medIKAL pipeline is designed to filter noise and prioritize relevant medical entities through a multi-stage process.

The medIKAL framework pipeline, illustrating the multi-stage process from EMR summarization to final diagnostic decision.

Multi-Stage Pipeline

  • EMR Summarization: The process begins by using an LLM to transform raw, messy EMR notes into a structured summary highlighting main symptoms, disease history, medication usage, and examination results.
  • Residual-like Integration (RI): Drawing inspiration from residual connections in deep learning, medIKAL allows the LLM to perform an initial "blind" diagnosis. These internal insights are then merged with KG-derived results, ensuring the model retains its medical "intuition" while being guided by structured facts.
  • Weighted Entity Search (ETW): Recognizing that not all medical terms carry equal diagnostic weight, medIKAL assigns higher priority to current symptoms and lab results compared to past medical history. This weighting mechanism allows for more precise localization of candidate diseases within the KG.
  • Path-based Reranking: The framework calculates the shortest path distance in the KG between candidate diseases and the entities identified in the patient's EMR. Diseases with closer topological ties to the patient's specific presentation are ranked higher.
  • Collaborative Reasoning: In the final stage, the KG results are converted into a semi-structured "Correlation Information" format. The LLM then acts as a judge, quantitatively scoring the correlation between the patient's data and the candidate diseases to reach a final decision.

Experimental Evaluation

The authors evaluated medIKAL using several benchmarks, including the newly introduced CMEMR (Chinese Multi-department EMR) dataset, which contains over 10,000 real-world records across 14 departments. Other datasets included CMB-Clin, GMD, and CMD. The underlying knowledge source was CPubMed-KG, a comprehensive medical graph with over 4 million triplets.

Key Results

Using the Qwen family of models, medIKAL consistently outperformed LLM-only baselines and existing KG-augmented methods like MindMap and ToG. On the CMEMR dataset with Qwen-72b, medIKAL achieved an F1-score of 40.37, surpassing the direct LLM diagnosis score of 39.06.

Comparison of useful prediction retention across different methods, showing medIKAL's superior ability to preserve internal LLM knowledge.

A critical finding was medIKAL's ability to retain useful internal knowledge. Unlike other RAG methods that often "overwrite" the LLM's logic with noisy retrieved data, medIKAL's residual-inspired approach ensures that the model's internal reasoning is augmented rather than replaced. Ablation studies further confirmed that both Residual Integration (RI) and Entity Type Weighting (ETW) are essential components for achieving high diagnostic accuracy.

Discussion and Future Work

While medIKAL represents a significant step forward, several limitations remain. The model currently struggles with high-precision numerical data (e.g., specific lab values like "EF 27%") without manual mapping to KG nodes. Additionally, the framework's performance is tied to the information density of the input EMR; sparse records provide less "traction" for the KG search, increasing the risk of hallucination.

Future research will focus on improving the handling of symbolic and numerical data to automate the interpretation of complex laboratory results and extending the framework to other languages and medical domains. By treating Knowledge Graphs as active assistants, medIKAL provides a robust blueprint for more reliable and interpretable AI-driven clinical decision support.

Summary updated

BibTeX
@inproceedings{jia2025medikal,
  author = {Mingyi Jia and Junwen Duan and Yan Song and Jianxin Wang},
  title = {{medIKAL: Integrating Knowledge Graphs as Assistants of LLMs for Enhanced Clinical Diagnosis on EMRs}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
}
Figure