Abstract
Deep learning models have shown great promise in healthcare, yet their clinical adoption is hindered by a lack of interpretability, the inability to incorporate complex medical domain knowledge, and a lack of interactive exploration tools. This study introduces DG-RNN, a domain-knowledge-guided recurrent neural network for clinical risk prediction, and DG-Viz, an interactive visual analytics system. By integrating a massive medical knowledge graph into the deep learning process, the DG-RNN model achieves a 1.5% improvement in heart failure risk prediction accuracy over state-of-the-art approaches. The DG-Viz system allows clinicians to explore EHR data, visualize knowledge graph connections, and perform "what-if" simulations to interpret model predictions.
Introduction
Electronic Health Records (EHR) contain rich longitudinal data that deep learning models can leverage to predict patient risks. However, three major limitations persist:
- The Black Box Problem: Clinicians often cannot interpret the reasoning behind a model's high-risk prediction.
- Ignoring Domain Knowledge: Standard models treat medical codes as isolated variables, failing to account for established biological and clinical relationships (e.g., disease causality).
- Lack of Interaction: EHR data is complex and abstract; clinicians need tools to interact with models directly to validate findings or explore hypothetical scenarios.
To address these challenges, we present a deep visual analytics approach that marries medical expertise with deep learning.
Methods
DG-RNN Model Architecture
The proposed DG-RNN model processes sequences of medical events. Its core innovation is a graph-based attention mechanism. When processing a specific medical code, the model "attends" to a relevant subgraph of a massive medical knowledge graph (KnowLife), pulling in contextual domain knowledge. To prevent the model from "forgetting" early patient history—a common issue in standard RNNs—we implemented a global max-pooling layer. This layer captures the most significant features across the entire patient timeline, enhancing both prediction performance and interpretability.
DG-Viz System
DG-Viz is an interactive suite designed to support EHR exploration and model interpretation. It consists of four primary components:
- Distribution View (A): Uses t-SNE to cluster similar patients, allowing for cohort analysis.
- Demographic Distribution (B): Provides context on race and gender distributions within the selected cohort.
- Patient History View (C): Displays a timeline of a patient's risk scores, highlighting how specific visits contribute to the overall risk.
- Knowledge Graph View (D): Visualizes the medical entities and relationships that influenced the model's decision.
The system also supports "What-If" analysis, enabling clinicians to manually add or remove medical codes from a patient's record to observe real-time changes in predicted risk.
Results
The DG-RNN model was evaluated on a real-world longitudinal EHR dataset of 218,680 patients, specifically focusing on heart failure prediction (554 cases, 1,662 controls).
- Performance: DG-RNN consistently outperformed baselines (RETAIN, GRAM, KAME), achieving an AUROC of 0.7863—a 1.5% improvement over the previous state-of-the-art.
- Ablation Study: Removing the medical knowledge graph led to a 2% drop in AUROC, confirming the value of integrating domain knowledge.
- Clinical Case Study: A medical physician collaborator used DG-Viz to validate the model's findings. The system correctly highlighted atrial fibrillation and cardiac dysrhythmia as primary risk factors for heart failure, aligning with clinical expertise.
Conclusion
DG-Viz demonstrates that combining deep learning with visual analytics can create tools that are both accurate and interpretable. By bridging the gap between "black box" algorithms and clinical domain knowledge, this approach paves the way for more trustworthy and collaborative AI in healthcare. Future work will focus on reducing user cognitive load and explicitly visualizing model uncertainty.
Summary updated