TL;DR
ProtoEHR is a new deep learning framework that mirrors the natural, multi-level hierarchy of Electronic Health Records (EHR)—spanning medical codes, hospital visits, and overall patient histories. By combining a Large Language Model (LLM)-constructed medical knowledge graph with a novel "prototype learning" mechanism at every level, it achieves state-of-the-art predictive accuracy across multiple clinical tasks while offering clear, interpretable insights for clinicians.
What Problem Does This Paper Address?
Predictive healthcare models leveraging EHR data hold massive potential for improving clinical decision-making, resource allocation, and patient outcomes. However, EHR data is complex and inherently hierarchical: a patient undergoes multiple hospital visits over time, and each visit contains a cluster of standardized medical codes (diagnoses, procedures, prescriptions).
Existing deep learning approaches often fall short in two ways:
- Isolation: They tend to focus on isolated components of the EHR, failing to fully capture the dependencies across the code-visit-patient hierarchy.
- Ignoring Intrinsic Similarities: While some models look at patient-level similarities (e.g., grouping patients into cohorts), they ignore intrinsic similarities within the code and visit levels (e.g., visits that serve similar routine purposes or codes that share underlying pathological mechanisms).
Furthermore, high-stakes clinical settings demand interpretability. Doctors need to know why a model predicts a high mortality risk or recommends a specific drug, a requirement that traditional "black-box" neural networks fail to meet.
Methods
ProtoEHR tackles these challenges through a four-stage pipeline:
- Medical Knowledge Graph (KG) Construction: To capture rich semantic relationships between medical codes, the authors use a hybrid LLM approach. An open-source model (Llama3-70B) exhaustively retrieves potential triplets, a closed-source model (GPT-4) validates a subset to train a cleaning classifier, and BERT-based clustering refines the relations.
- Hierarchical Representation Learning: The framework processes data sequentially through local encoders matching the EHR structure:
- Code Level: A multi-relational graph convolutional network (CompGCN) updates code embeddings using the medical KG.
- Visit Level: Code representations within a single visit are aggregated via average pooling.
- Patient Level: A Transformer encoder captures the temporal sequence and interactions across a patient's multiple visits.
- Prototype-based Encoder: At each of the three levels, ProtoEHR introduces a prototype module. Using a cross-attention mechanism, the model learns a set of latent "prototypes" (representative clusters) from the data points at that level, and then infuses this shared cohort knowledge back into the individual code, visit, or patient representations.
- Hierarchical Fusion: Finally, the patient representation is fused with the learned prototypes from all three levels using cross-attention. A softmax layer calculates task-specific weights ($\beta_t$) to determine how much the code, visit, or patient level should contribute to the final prediction.
Datasets
The framework was evaluated on two widely used, real-world public clinical databases:
- MIMIC-III: Containing de-identified health data from thousands of critical care patients.
- MIMIC-IV: A larger, updated iteration providing a vast cohort for more stable and robust evaluation.
The authors benchmarked ProtoEHR against six state-of-the-art baselines (including Deepr, AdaCare, GRASP, StageNet, GraphCare, and KerPrint) across five distinct clinical tasks: mortality prediction, readmission prediction, length-of-stay (LoS) prediction, drug recommendation, and phenotype prediction.
Key Insights and Ideas
- Multi-Level Regularization via Prototypes: Infusing prototype knowledge at the code and visit levels acts as a powerful regularizer. It allows the model to share features among similar medical concepts and visit types, drastically improving generalization.
- Dynamic Task-Driven Attention: The hierarchical fusion weights ($\beta_t$) act as an interpretability window. The model dynamically shifts its focus depending on the task. For example, patient-level prototypes dominate mortality prediction (a holistic, history-dependent task), whereas visit-level prototypes become highly critical for phenotype prediction (which relies heavily on the specific mix of diagnoses within a single hospital stay).
- Cost-Effective KG Construction: The hybrid open/closed-source LLM pipeline provides a blueprint for building highly accurate, domain-specific knowledge graphs without incurring the prohibitive API costs of relying solely on commercial LLMs.
Key Results
ProtoEHR achieved the best or second-best performance across 24 out of 24 evaluation metrics across both datasets. Notable highlights include:
- Mortality Prediction: On the MIMIC-III dataset, ProtoEHR achieved a massive 20.7% relative improvement in AUPRC over the best-performing baseline. On MIMIC-IV, it yielded a 17.2% AUPRC improvement.
- Length of Stay (LoS): Achieved a 7.4% F1-score improvement on MIMIC-IV, proving highly capable of distinguishing subtle differences in hospital stay durations.
Qualitatively, the authors verified that the patient-level prototypes successfully mapped to clinically distinct cohorts (e.g., separating patients with severe surgical complications requiring long stays from those with minor chest pains requiring short stays).
Limitations and Future Work
While ProtoEHR marks a significant step forward, the authors note a few areas for improvement:
- Static Knowledge Graphs: The medical KG is constructed offline. Future iterations could dynamically update or learn code correlations directly optimized for the downstream prediction tasks.
- Data Modalities: The current model relies primarily on categorical EHR codes. Incorporating continuous clinical variables, such as real-time laboratory test results and vital signs, could further boost predictive power.
- Cross-Hospital Validation: Testing the framework on more diverse, non-MIMIC datasets is necessary to confirm its generalizability across different healthcare systems.
Summary updated