Abstract
Due to potential applications in chronic disease management and personalized healthcare, the EHRs data analysis has attracted much attention of both researchers and practitioners. There are three main challenges in modeling longitudinal and heterogeneous EHRs data: heterogeneity, irregular temporality and interpretability. A series of deep learning methods have made remarkable progress in resolving these challenges. Nevertheless, most of existing attention models rely on capturing the 1-order temporal dependencies or 2-order multimodal relationships among feature elements. In this paper, we propose a time-guided high-order attention (TGHOA) model. The proposed method has three major advantages. (1) It can model longitudinal heterogeneous EHRs data via capturing the 3-order correlations of different modalities and the irregular temporal impact of historical events. (2) It can be used to identify the potential concerns of medical features to explain the reasoning process of the healthcare model. (3) It can be easily expanded into cases with more modalities and flexibly applied in different prediction tasks. We evaluate the proposed method in two tasks of mortality prediction and disease ranking on two real world EHRs datasets. Extensive experimental results show the effectiveness of the proposed model.
Introduction
Analyzing longitudinal Electronic Health Records (EHRs) is critical for modern healthcare, yet it presents significant computational challenges. EHR data is inherently heterogeneous, combining discrete diagnostic codes with continuous, high-frequency physiological waveforms. Furthermore, it exhibits irregular temporality, as patient visits occur at inconsistent intervals, and the relevance of past medical events often decays over time. Finally, clinical adoption requires interpretability; models must provide a clear rationale for their predictions to be trusted by medical professionals.
While existing deep learning approaches have addressed these issues using standard attention mechanisms, they often focus on low-order dependencies (e.g., how one event follows another). This paper introduces the Time-Guided High-Order Attention (TGHOA) model, which captures complex 3-order correlations between different data modalities and the specific timing of historical events to improve predictive accuracy and clinical transparency.
The TGHOA Framework
The TGHOA model processes EHR data through a multi-stage pipeline designed to handle the complexities of longitudinal patient records. The architecture consists of four primary modules:
- Input Processing: The model handles two distinct data streams. Discrete medical codes ($D^t$) are transformed into vector embeddings, while continuous lab indicators or waveforms ($W^t$) are processed using 1D Convolutional Neural Networks (ConvNets) with max-over-time pooling to extract robust, fixed-length features.
- Time-Guided Querying: To address irregular temporality, the model employs a time-decaying function, $g(\Delta^t) = 1/\log(e + \Delta^t)$, where $\Delta^t$ represents the time elapsed since the previous visit. This ensures that the influence of historical data naturally diminishes as it becomes less clinically relevant.
- High-Order Attention Module: This is the core innovation of the framework. Unlike standard attention, TGHOA calculates a 3-order correlation between medical diagnoses, lab indicators, and the time-guided historical context. This mimics a physician's reasoning process—evaluating current lab results in light of past diagnoses while considering how long ago those diagnoses were recorded.
- Sequence Module: The resulting attended features are fed into a Long Short-Term Memory (LSTM) network. This allows the model to maintain a temporal state and capture the overall health trajectory of the patient across multiple hospital visits.
Experimental Evaluation
The TGHOA model was rigorously evaluated on two large-scale, real-world datasets representing different clinical challenges:
- MIMIC-III (Mortality Prediction): Using data from ICU patients, the model predicted patient survival. TGHOA achieved an AUC-ROC of 0.9071, significantly outperforming standard LSTMs (0.8555) and specialized healthcare models like RETAIN and T-LSTM.
- PPMI (Disease Ranking): In a study of Parkinson’s disease progression, the model achieved a near-perfect AUC-ROC of 0.9883 in ranking the severity of the disease based on motor function scores.
Beyond performance metrics, the model demonstrated high interpretability. In case studies, the attention mechanism correctly prioritized high-risk conditions such as "Acidosis" and "History of kidney neoplasm," aligning the model's internal logic with established clinical knowledge.
Conclusion
The TGHOA model represents a significant step forward in modeling longitudinal heterogeneous healthcare data. By explicitly capturing high-order correlations and integrating time-decaying historical context, it overcomes the limitations of traditional 1-order and 2-order attention models. While future work may explore scaling the model to include more modalities like clinical imaging or notes, the current results demonstrate that TGHOA provides a powerful, interpretable, and accurate tool for predictive healthcare analytics.
Summary updated