TL;DR
This paper introduces DeCode, a novel deep learning model that leverages pretraining on a massive dataset of electronic health records (EHRs) to significantly improve the prediction of future diseases and patient outcomes. By fine-tuning this pretrained model, DeCode demonstrates superior performance over existing state-of-the-art methods, particularly for rare diseases and complex outcomes like intentional self-harm.
What Problem Does This Paper Address?
Predicting future health outcomes for patients is crucial for proactive healthcare. Electronic Health Records (EHRs) contain a wealth of longitudinal patient data that can be used for this purpose. Traditional machine learning approaches and even earlier deep learning models often struggle with the complexity and sheer volume of EHR data, especially when predicting multiple, correlated comorbidities or rare events. These models typically require extensive domain expertise for feature engineering and cohort selection, and may not fully exploit the temporal nature of patient histories. The challenge lies in building models that can effectively learn from the intricate patterns within EHRs to provide accurate and timely predictions for a wide spectrum of health events, including those that are infrequent.
Methods
The core of this work is the DeCode model, an encoder-decoder transformer architecture. DeCode builds upon the BART (Bidirectional and Auto-Regressive Transformers) architecture but introduces novel noising schemes and medical training objectives during its pretraining phase.
Pretraining: DeCode is first pretrained on a large dataset of longitudinal EHRs. The goal of this pretraining is to learn a comprehensive understanding of diagnostic codes and their relationships over time. This is achieved through a "denoising" process where parts of the input EHR data (ICD codes) are masked or corrupted, and the model learns to reconstruct the original sequence. This process allows DeCode to capture complex, non-linear relationships between medical codes and learn a rich representation of patient health trajectories.
Fine-tuning: After pretraining, DeCode is fine-tuned on specific downstream tasks, such as predicting single disease onsets or specific outcomes. This allows the model to adapt its general knowledge to specialized prediction tasks.
The paper also compares DeCode against several baseline models, including logistic regression, LSTM, and BERT.
Datasets
The primary dataset used in this study is the Veterans Health Administration's Clinical Data Warehouse (VA-CDW).
- Pretraining Dataset: A large cohort of 6,475,218 patients from 1/1/2016 to 12/31/2019 was used for pretraining DeCode.
- Downstream Prediction Datasets: A separate 5% split of the VA-CDW data (353,846 patients) was used for evaluating downstream tasks, including disease-agnostic onset prediction and single disease/outcome onset predictions.
The paper does not introduce a new benchmark dataset but rather utilizes a large, real-world EHR dataset for its extensive evaluations.
Key Insights and Ideas
- Pretraining is Paramount: The study strongly emphasizes that pretraining DeCode on a massive EHR dataset is critical for its success. This pretraining allows the model to learn generalizable medical knowledge that significantly boosts performance on downstream tasks, especially for rare events.
- Encoder-Decoder Architecture Advantage: The encoder-decoder structure of DeCode, unlike encoder-only models like BERT, is hypothesized to be better suited for predicting future outcomes by explicitly modeling the transition from past to future states.
- Noising Schemes Matter: The specific noising strategies employed during pretraining (e.g., code masking, visit permutation, span masking, visit masking) have a tangible impact on performance, with "visit masking" emerging as the most effective.
- Rare Diseases are a Sweet Spot: DeCode shows a disproportionately larger improvement in predicting rare diseases or outcomes compared to common ones, suggesting its ability to learn from limited but complex patterns.
- Longitudinal Data is Key: The effectiveness of DeCode, and attention-based models in general, is shown to be significantly enhanced by longer patient histories, highlighting the importance of temporal dependencies in EHR data.
Key Results
- Overall Improvement: DeCode consistently outperformed baseline models (logistic regression, LSTM, BERT) across a broad range of prediction tasks.
- Disease-Agnostic Onset Prediction: DeCode improved Jaccard similarity scores by 66.86% for common diseases and 112.96% for rare diseases compared to a simple "copy" baseline.
- Intentional Self-Harm (PTSD): DeCode achieved a significantly higher AUPRC (16.38) for predicting intentional self-harm among PTSD patients compared to BERT (13.17) and other models. This improvement was even more pronounced when using the full patient history.
- Pancreatic Cancer: DeCode achieved an AUROC of 85.35, outperforming logistic regression (77.71) and BERT (83.42).
- Hospital Admission (Type 2 Diabetes/Hypertension): DeCode showed improved AUPRC for type 2 diabetes prediction (50.03 vs. BERT's 49.56).
- Attention Visualization: The study used attention visualization to show that DeCode can learn meaningful longitudinal relationships, such as the correlation between chronic pain and PTSD, by attending to specific past visits.
Limitations and Future Work
Limitations:
- ICD Code Focus: DeCode is currently trained solely on diagnostic ICD codes. This limits its ability to incorporate other rich EHR data sources.
- Specific Subgroups: The prediction of intentional self-harm was specifically focused on patients with PTSD.
Future Work:
- Incorporate Diverse Data Types: Future research should explore incorporating other EHR data, such as procedure codes, medications, lab results, and information extracted from clinical notes, to further enhance prediction performance.
- Broader Subgroup Analysis: Expanding the prediction of self-harm and suicide death to other patient subgroups beyond PTSD is a promising direction.
- Interactive Tools: The authors mention an interactive figure for exploring DeCode's attention mechanisms, suggesting potential for developing more interpretable AI tools in healthcare.
Summary updated