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

Mingyi Jia, Junwen Duan, Yan Song, Jianxin Wang

TL;DR

This paper introduces medIKAL, a novel framework that combines Large Language Models (LLMs) with Knowledge Graphs (KGs) to improve the accuracy and interpretability of clinical diagnosis from Electronic Medical Records (EMRs). By intelligently weighting medical entities and employing a residual network-like approach, medIKAL enhances LLMs' diagnostic capabilities without sacrificing their internal knowledge.

What Problem Does This Paper Address?

Electronic Medical Records (EMRs) are rich with patient information but are often complex and redundant, making clinical reasoning and diagnosis a significant challenge for healthcare professionals. While LLMs show promise in medical domains, they can suffer from generating erroneous knowledge or hallucinations due to a lack of specific medical expertise and the difficulty of updating their knowledge bases. Existing methods that integrate LLMs with KGs often struggle with issues like exceeding context length limits, difficulty understanding complex KG structures, and LLMs becoming overly reliant on KG information, leading to a loss of their internal reasoning capabilities. This paper aims to address these limitations by proposing a more effective and robust integration of LLMs and KGs for EMR-based clinical diagnosis.

Methods

The medIKAL framework comprises three main modules:

  1. EMR Summarization and Direct Diagnosis via LLMs: Initially, LLMs are used to summarize the key information from EMRs, reducing redundancy. Then, the LLM performs a preliminary diagnosis based solely on its internal knowledge, generating a set of potential diseases (DLLM).
  2. Candidate Disease Localization and Reranking via KG:
    • Entity Recognition and Matching: Entities are extracted from the summarized EMRs and then matched to corresponding nodes in a knowledge graph (CPubMedKG).
  3. Entity-Type Weights: A novel approach assigns different weights to entities based on their type (e.g., symptoms, drugs) to prioritize more relevant information during KG search.
  4. Candidate Disease Generation: The KG is searched using these weighted entities to identify potential diseases. This set is merged with the LLM's initial diagnosis set (DLLM) to form a comprehensive candidate disease set (Dcan).
  5. Path-based Reranking: Candidate diseases are reranked based on the shortest path distance between the disease nodes and the extracted EMR entities in the KG, favoring diseases with stronger associations.
  6. Collaborative Reasoning between LLMs and KG Knowledge:
    • KG Knowledge Reconstruction: The retrieved KG information is reconstructed into a semi-structured format, organizing it by aspects like correlation with symptoms, medical history, etc., to make it more interpretable for LLMs.
  7. Clinical Reasoning and Diagnosis Based on Fill-in-the-Blank Prompt Templates: A specialized prompt template guides the LLM to quantitatively evaluate the correlation between candidate diseases and various patient information aspects. This allows for a more rational and refined diagnostic decision, including a self-consistency check between the LLM's evaluation and its initial prediction.

Datasets

  • CMEMR Dataset: A newly introduced, open-sourced Chinese EMR dataset constructed from a Chinese medical website. It was filtered and verified by medical experts.
  • Supplementary Datasets:
    • CMB-Clin: Contains 74 complex, real EMRs with medical QA pairs, simplified for disease diagnosis tasks.
  • GMD: EMR-based dataset with target diseases and explicit/implicit symptom information.
  • CMD: A follow-up to GMD with a wider variety of diseases and symptoms.

Key Insights and Ideas

  • Weighted Entity Importance: Assigning different weights to medical entities based on their type is crucial for accurately localizing candidate diseases within KGs, moving beyond simply treating all entities equally.
  • Residual Network Inspiration: Merging the LLM's initial, internal diagnosis with KG-derived results (akin to residual connections) allows the model to leverage both its inherent knowledge and external, structured information, preventing over-reliance on either.
  • Semi-structured KG Reconstruction: Transforming raw KG triplets into a more organized, aspect-based format significantly improves LLMs' ability to understand and utilize the retrieved knowledge, reducing the risk of hallucinations.
  • Fill-in-the-Blank for Refined Reasoning: The proposed prompt template encourages LLMs to perform a quantitative, step-by-step evaluation of candidate diseases, leading to more rational and interpretable diagnostic decisions.
  • Addressing Chinese EMR Data Scarcity: The creation of the CMEMR dataset is a significant contribution, addressing the lack of high-quality, open-sourced Chinese EMR data for research.

Key Results

  • Superior Performance: medIKAL significantly outperforms other baselines, including LLM-only and LLM+KG approaches, on the CMEMR dataset, demonstrating its effectiveness in EMR-diagnosis tasks.
  • Robustness Across Datasets: The method shows stable performance on CMB-Clin and, with slight degradation, on GMD and CMD datasets, indicating its generalizability.
  • Impact of Modules: Ablation studies reveal that removing the summarization module (SUM) or entity-type weighting (ETW) significantly degrades performance. The residual integration (RI) module is also critical for leveraging LLM's internal knowledge.
  • LLM Internal Knowledge Retention: medIKAL effectively minimizes LLM's over-reliance on KG knowledge, retaining a higher proportion of useful predictions from the LLM's original output compared to other baselines.
  • Efficiency: The plug-and-play and train-free nature of the method allows for flexible deployment with LLMs of varying sizes.

Limitations and Future Work

  • Data Quality and Distribution: While efforts were made to ensure data quality, the CMEMR dataset may still have occasional quality issues, and its departmental distribution is uneven.
  • Input Data Sparsity: medIKAL requires a substantial amount of information from input samples. When input data is sparse, the improvement in reasoning performance decreases, and the risk of hallucinations increases.
  • Specialized Medical Indicators: The framework struggles to fully utilize special types of medical examination indicators (e.g., numerical or symbolic types), which is identified as a key area for future work.
  • Future Directions: Addressing the limitations related to sparse data and specialized indicators are key future research directions. The authors also suggest exploring more advanced KG construction and integration techniques.

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