TL;DR
This paper introduces Hi-BEHRT, a novel hierarchical Transformer model designed to effectively process long and multimodal electronic health records (EHR) for accurate clinical event prediction. By employing a hierarchical approach and a new contrastive pre-training strategy, Hi-BEHRT significantly improves prediction accuracy, especially for patients with extensive medical histories, addressing a key limitation of existing deep learning models in healthcare.
What Problem Does This Paper Address?
Electronic Health Records (EHR) are a rich source of patient information, offering a longitudinal view of their health trajectories. This data holds immense potential for developing accurate risk prediction models for various diseases. While deep learning models have shown promise, a significant challenge remains: their limited capacity to process the extremely long sequences of data found in comprehensive EHR. Standard Transformer models, for instance, struggle with sequences longer than a few hundred records due to their quadratic computational complexity. This limitation means that crucial long-term dependencies within a patient's history might be missed, hindering the development of truly predictive models. The paper aims to bridge this gap by enabling models to effectively leverage the entire patient history, not just a truncated portion.
Methods
The core innovation is the Hi-BEHRT (Hierarchical BEHRT) model. Unlike standard Transformers that process the entire sequence at once, Hi-BEHRT adopts a hierarchical approach:
- Local Feature Extraction: The model first segments the long EHR sequence into smaller, overlapping windows. A Transformer acts as a local feature extractor within each segment, capturing temporal interactions among closely related medical events. This leverages the observation that medical events occurring closer in time are often more semantically related.
- Global Feature Aggregation: Subsequently, another Transformer acts as a feature aggregator. It takes the summarized local features from all segments and globally synthesizes them to form a comprehensive patient representation.
- Contrastive Pre-training (BYOL-based): Recognizing that pre-training strategies for hierarchical Transformers in healthcare are not well-established, the authors propose an effective end-to-end contrastive pre-training strategy. They adapt the Bootstrap Your Own Latent (BYOL) framework, originally designed for image representation learning, to EHR data. This involves using data augmentation techniques (EHR augmentation and segment augmentation) on the online network to encourage it to produce similar representations as the target network for the same input. This pre-training significantly improves the model's transferability, especially when dealing with limited training data.
Datasets
The study utilizes a large-scale, deidentified longitudinal EHR dataset from the Clinical Practice Research Datalink (CPRD) in the UK. This dataset includes primary care records linked to secondary care records and death registration data.
- Pre-training Cohort: 2,844,733 patients.
- Risk Prediction Cohorts:
- Training: 2,438,352 patients
- Tuning: 406,381 patients
- Validation: 1,219,078 patients
The paper focuses on 5-year risk prediction for four conditions: Heart Failure (HF), Diabetes, Chronic Kidney Disease (CKD), and Stroke.
Key Insights and Ideas
- Hierarchy is Key for Long Sequences: The hierarchical structure is crucial for overcoming the quadratic complexity of Transformers. By breaking down long sequences into manageable segments and processing them locally before global aggregation, Hi-BEHRT can effectively handle EHRs spanning decades.
- Pre-training Boosts Transferability: The adapted BYOL pre-training strategy significantly improves the model's performance, especially on smaller datasets. This is vital in healthcare where labeled data can be scarce.
- Multimodality Matters: Incorporating various data types beyond just diagnoses (e.g., medications, procedures, tests, BP, BMI, lifestyle factors) leads to better risk prediction, highlighting the value of a holistic view of patient data.
- Modality Contribution Varies: The impact of including different data modalities is not uniform. Modalities with higher recording frequency (like tests and BP measurements) tend to contribute more significantly to prediction accuracy.
Key Results
- Superior Performance: Hi-BEHRT consistently outperforms existing state-of-the-art models (BEHRT, Med-BERT, CEHR-BERT) across all four risk prediction tasks.
- On average, it achieves 1%-5% improvement in AUROC and 1%-8% improvement in AUPRC for the general population.
- For patients with long medical histories (EHR length > 256), the improvements are even more pronounced: 2%-6% for AUROC and 2%-11% for AUPRC.
- Handling Long EHRs: The model demonstrates a significant advantage for patients with longer EHRs, where traditional Transformer models are limited by their sequence length capacity.
- Pre-training Efficiency: With pre-training, Hi-BEHRT can achieve comparable performance using only 1% of the training data compared to a model trained without pre-training using 5% of the data.
Limitations and Future Work
- Disease Specificity: The study focused on four specific diseases (HF, diabetes, CKD, stroke). Generalizing these findings to other diseases requires further investigation.
- Internal Validation: The study relied on internal validation. Future work should explore model performance under data shifts and in external cohorts to assess real-world robustness.
- Modality Contribution: While the study showed that richer data improves performance, the contribution of low-frequency modalities needs further exploration. Future work could investigate methods to better incorporate these less frequent but potentially important data points.
- Long Sequence Modeling: The authors encourage further exploration of other long sequence modeling strategies (e.g., Longformer) for EHR modeling.
- Robust Architectures: Investigating more robust model architectures to further shift the power-law curve and improve model accuracy, especially beyond 50% of training data, is a promising direction.
Summary updated