Abstract
Automated International Classification of Diseases (ICD) coding is a critical yet challenging task in clinical informatics due to the extreme length of patient notes and the high dimensionality of the label space. Traditional deep learning approaches often struggle to capture the nuanced medical context from unstructured text alone. This paper proposes a novel framework that extracts patient-level Knowledge Graphs (KGs) to represent medical history structurally. By integrating these KGs with a pre-trained language model via a multi-head label-wise attention mechanism, the proposed method achieves state-of-the-art performance on the MIMIC-III dataset while significantly enhancing model explainability.
Introduction
Clinical coding—assigning standardized ICD codes to patient records—is fundamental for billing, clinical research, and healthcare administration. However, the manual process is labor-intensive and prone to error. Automating this task faces two primary hurdles: the "long-tail" distribution of codes (where many codes are rare) and the sheer volume of unstructured text in discharge summaries. While previous research has utilized external knowledge to better represent the codes, this work focuses on structuring the input document itself. By transforming raw text into a patient-specific Knowledge Graph, the model can more effectively distill relevant medical signals from noisy clinical narratives.
Methodology
The proposed architecture adopts a hybrid approach, processing both unstructured text and structured graph data in parallel to capture a holistic view of the patient's condition.
- Patient-Level Knowledge Graph Construction: Using Named Entity Recognition (NER) and Relation Extraction (RE), the system identifies 14 entity types (e.g., problems, treatments, drugs) and 5 relationship types from the clinical notes.
- Dual Embedding Streams: Raw text is embedded using a pre-trained RoBERTa-PM model. Simultaneously, the patient KG is processed through a Deep Graph Convolutional Neural Network (DGCNN) to capture structural dependencies between medical entities.
- Multi-Head Label-Wise Attention: Separate attention layers for text and graph embeddings allow the model to dynamically weight the importance of specific tokens and graph nodes for each potential ICD code before final concatenation.
Experimental Setup
The model was evaluated on the MIMIC-III database using two standard benchmarks:
- MIMIC-III Full: 52,723 discharge summaries covering the full spectrum of codes.
- MIMIC-III Top-50: A subset focusing on the 50 most frequent diagnosis and procedure codes.
Key Insights
Analysis of the KG extraction process revealed that clinical notes are highly redundant. The extracted KGs reduced input size to 23% of the original text while retaining approximately 90% of the information (measured via Shannon entropy). Ablation studies highlighted that "Problem" entities and "Clinical Relationships" are the most vital components of the graph, aligning with clinical intuition that a patient's core diagnoses are the strongest predictors for ICD codes. Furthermore, the use of KGs forces the model to focus on highly relevant clinical spans, making the AI's reasoning more transparent and trustworthy for clinicians.
Results
The graph-augmented model consistently outperformed the text-only PLM-ICD baseline. On the MIMIC-III Full dataset, it achieved a Macro-F1 score of 11.05% (a 1.36% absolute improvement). On the Top-50 subset, the improvement was even more pronounced, with a Macro-F1 of 67.81% (a 3.20% absolute improvement).
As shown in the performance curves, the KG-integrated model not only reaches higher peak performance but also converges faster than the baseline. This suggests that structured medical knowledge provides a clearer learning signal, helping the model navigate the complex clinical landscape more efficiently. Additionally, t-SNE visualizations indicated that the graph-augmented representations form tighter, more distinct clusters for specific medical codes compared to text-only approaches.
Conclusion and Future Work
This research demonstrates that structuring patient information into Knowledge Graphs significantly boosts the accuracy and explainability of automated ICD coding. Future work will focus on incorporating richer semantic information into graph edges and integrating broader external ontologies like SNOMED-CT. The authors also aim to explore Graph Attention Networks (GATs) to further refine the model's ability to provide interpretable clinical justifications for its predictions.
Summary updated