Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Dec 7;23(1):285.
doi: 10.1186/s12874-023-02112-2.

Attention-based neural networks for clinical prediction modelling on electronic health records

Affiliations

Attention-based neural networks for clinical prediction modelling on electronic health records

Egill A Fridgeirsson et al. BMC Med Res Methodol. .

Abstract

Background: Deep learning models have had a lot of success in various fields. However, on structured data they have struggled. Here we apply four state-of-the-art supervised deep learning models using the attention mechanism and compare against logistic regression and XGBoost using discrimination, calibration and clinical utility.

Methods: We develop the models using a general practitioners database. We implement a recurrent neural network, a transformer with and without reverse distillation and a graph neural network. We measure discrimination using the area under the receiver operating characteristic curve (AUC) and the area under the precision recall curve (AUPRC). We assess smooth calibration using restricted cubic splines and clinical utility with decision curve analysis.

Results: Our results show that deep learning approaches can improve discrimination up to 2.5% points AUC and 7.4% points AUPRC. However, on average the baselines are competitive. Most models are similarly calibrated as the baselines except for the graph neural network. The transformer using reverse distillation shows the best performance in clinical utility on two out of three prediction problems over most of the prediction thresholds.

Conclusion: In this study, we evaluated various approaches in supervised learning using neural networks and attention. Here we do a rigorous comparison, not only looking at discrimination but also calibration and clinical utility. There is value in using deep learning models on electronic health record data since it can improve discrimination and clinical utility while providing good calibration. However, good baseline methods are still competitive.

Keywords: Clinical prediction models; Deep learning; Electronic health records.

PubMed Disclaimer

Conflict of interest statement

DS was a consultant for and has equity in CureAI and ASAPP and has received compensation from speaking at Genentech. DS has a grant from Takeda. EF and PR work for a research group who received unconditional research grants from Boehringer-Ingelheim, GSK, Janssen Research & Development, Novartis, Pfizer, Yamanouchi, Servier. None of these grants result in a conflict of interest to the content of this paper.

Figures

Fig. 1
Fig. 1
Smooth calibration for the three prediction problems (a) Dementia, (b) Readmission and (c) Mortality. On the x-axis is the predicted risk and, on the y-axis, the actual risk. Below each plot is a density plot showing how the predictions of each model are distributed
Fig. 2
Fig. 2
Decision curves showing the net benefit for all the models. It includes the benefit when either treating all or none cases. (a) net benefit in for dementia prediction, (b) net benefit for readmission prediction and (c) net benefit for mortality
Fig. 3
Fig. 3
Feature importance for (a) readmission and (b) mortality. On y-axis are the hyperparameter and on the x-axis are the effects of those on the model output (validation AUC). Red color means higher values of the hyperparameter and blue is lower. lr: learning rates, num_head: number of attention heads, num_hidden: number of neurons in fully connected layers, attn_depth: number of attention layers

References

    1. Goldstein BA, Navar AM, Pencina MJ, Ioannidis JPA. Opportunities and challenges in developing risk prediction models with electronic health records data: a systematic review. J Am Med Inform Assoc. 2017;24(1):198–208. doi: 10.1093/jamia/ocw042. - DOI - PMC - PubMed
    1. Yang C, Kors JA, Ioannou S, John LH, Markus AF, Rekkas A et al. Trends in the conduct and reporting of clinical prediction model development and validation: a systematic review. J Am Med Inform Assoc. 2022. - PMC - PubMed
    1. Hripcsak G, Duke JD, Shah NH, Reich CG, Huser V, Schuemie MJ et al. Observational Health Data Sciences and Informatics (OHDSI): Opportunities for Observational Researchers. In: Studies in Health Technology and Informatics. 2015. - PMC - PubMed
    1. Ayaz M, Pasha MF, Alzahrani MY, Budiarto R, Stiawan D. The fast Health Interoperability resources (FHIR) Standard: Systematic Literature Review of Implementations, applications, challenges and opportunities. JMIR Med Inform. 2021;9(7):e21929. doi: 10.2196/21929. - DOI - PMC - PubMed
    1. Reps JM, Schuemie MJ, Suchard MA, Ryan PB, Rijnbeek PR. Design and implementation of a standardized framework to generate and evaluate patient-level prediction models using observational healthcare data. J Am Med Inform Assoc. 2018;25(8):969–75. doi: 10.1093/jamia/ocy032. - DOI - PMC - PubMed

Publication types

LinkOut - more resources