NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Dipole: Diagnosis Prediction in Healthcare via Attention-based Bidirectional Recurrent Neural Networks

Fenglong Ma, Radha Chitta, Jing Zhou, Quanzeng You, Tong Sun, Jing GaoKDD 2017 · DOI

Abstract

Predicting the future health information of patients from the historical Electronic Health Records (EHR) is a core research task in the development of personalized healthcare. Patient EHR data consist of sequences of visits over time, where each visit contains multiple medical codes, including diagnosis, medication, and procedure codes. The most important challenges for this task are to model the temporality and high dimensionality of sequential EHR data and to interpret the prediction results. Existing work solves this problem by employing recurrent neural networks (RNNs) to model EHR data and utilizing simple attention mechanism to interpret the results. However, RNN-based approaches suffer from the problem that the performance of RNNs drops when the length of sequences is large, and the relationships between subsequent visits are ignored by current RNN-based approaches. To address these issues, we propose Dipole, an end-to-end, simple and robust model for predicting patients' future health information. Dipole employs bidirectional recurrent neural networks to remember all the information of both the past visits and the future visits, and it introduces three attention mechanisms to measure the relationships of different visits for the prediction. With the attention mechanisms, Dipole can interpret the prediction results effectively. Dipole also allows us to interpret the learned medical code representations which are confirmed positively by medical experts. Experimental results on two real world EHR datasets show that the proposed Dipole can significantly improve the prediction accuracy compared with the state-of-the-art diagnosis prediction approaches and provide clinically meaningful interpretation.

Introduction

Predicting a patient's future health status based on historical Electronic Health Records (EHR) is a cornerstone of personalized medicine. However, EHR data is notoriously difficult to model because it is high-dimensional, temporally complex, and requires high interpretability for clinical use. Standard Recurrent Neural Networks (RNNs) often suffer from "forgetfulness" when patient histories are long, leading to performance degradation as the number of visits increases. Furthermore, existing models often fail to capture complex relationships between non-adjacent visits.

Methodology

Dipole addresses these challenges by utilizing Bidirectional Recurrent Neural Networks (BRNNs). Unlike standard unidirectional RNNs that process visits from first to last, a BRNN processes the sequence in both forward and backward directions. This allows the model to capture dependencies from both past and future contexts within the historical sequence, effectively mitigating the performance drop seen in long sequences.

The architecture of the Dipole model, featuring bidirectional RNNs and an attention mechanism.

The core innovation lies in the integration of three distinct attention mechanisms to calculate the "context" of a patient's history:

  • Location-based Attention: Weights are derived solely from the current hidden state.
  • General Attention: Learns a weight matrix to capture relationships between the current visit and all previous visits.
  • Concatenation-based Attention: Uses a multi-layer perceptron (MLP) to identify complex dependencies between visits.

Experimental Setup

The model was evaluated on two large-scale real-world datasets derived from Medicaid claims:

  • The Medicaid Dataset: 147,810 patients with over 1 million visits.
  • The Diabetes Dataset: A subset of 22,820 patients specifically diagnosed with diabetes, containing roughly 466,000 visits. Visits were aggregated by week, and medical codes were mapped to hierarchical categories (ICD-9 for diagnoses and CPT for procedures).

Results and Discussion

Dipole consistently outperformed state-of-the-art baselines, including standard RNNs, Med2Vec, and RETAIN. On the Diabetes dataset, Dipole reached an accuracy of 46.53%, compared to 43.36% for a standard RNN.

Comparison of Weighted Mean Accuracy between Dipole and standard RNN on the Diabetes dataset across different visit groups.

A key finding is that the performance gap between Dipole and standard RNNs widens as the number of patient visits (represented by 'Group' in the figures) increases. This demonstrates Dipole's superior ability to handle longitudinal data and maintain memory over long sequences.

Beyond accuracy, Dipole provides clinical interpretability. Attention weights serve as a heatmap of a patient's medical history, highlighting relevant past visits for a specific prediction. Additionally, the learned medical code embeddings naturally cluster related clinical concepts, such as diabetes-related eye complications, matching established medical knowledge.

Conclusion and Future Work

Dipole offers a robust and interpretable framework for diagnosis prediction by combining bidirectionality with sophisticated attention mechanisms. Future work may focus on explicitly accounting for irregular time intervals between visits and incorporating external medical ontologies to further enhance the model's predictive granularity.

Summary updated

BibTeX
@inproceedings{ma2017dipole,
  author = {Fenglong Ma and Radha Chitta and Jing Zhou and Quanzeng You and Tong Sun and Jing Gao},
  title = {{Dipole: Diagnosis Prediction in Healthcare via Attention-based Bidirectional Recurrent Neural Networks}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2017},
  doi = {10.1145/3097983.3098088},
}
Figure