An Explainable Transformer-Based Deep Learning Model for the Prediction of Incident Heart Failure

Predicting the incidence of complex chronic conditions such as heart failure is challenging. Deep learning models applied to rich electronic health records may improve prediction but remain unexplainable hampering their wider use in medical practice. We developed a novel Transformer deep-learning model for more accurate and yet explainable prediction of incident heart failure involving 100,071 patients from longitudinal linked electronic health records across the UK. On internal 5-fold cross validation and held-out external validation, our model achieved 0.93 and 0.93 area under the receiver operator curve and 0.69 and 0.70 area under the precision-recall curve, respectively and outperformed existing deep learning models. Predictor groups included all community and hospital diagnoses and medications contextualized within the age and calendar year for each patient’s clinical encounter. The importance of contextualized medical information was revealed in a number of sensitivity analyses, and our perturbation method provided a way of identifying factors contributing to risk. Many of the identified risk factors were consistent with existing knowledge from clinical and epidemiological research but several new associations were revealed which had not been considered in expert-driven risk prediction models.

[1]  Z. Varga,et al.  Cardiovascular Risk of Nonsteroidal Anti-Inflammatory Drugs: An Under-Recognized Public Health Issue , 2017, Cureus.

[2]  J. Hippisley-Cox,et al.  Development and validation of risk prediction equations to estimate future risk of heart failure in patients with diabetes: a prospective cohort study , 2015, BMJ Open.

[3]  Marc Pouly,et al.  Text Similarity Estimation Based on Word Embeddings and Matrix Norms for Targeted Marketing , 2019, NAACL.

[4]  G. Braemer International statistical classification of diseases and related health problems. Tenth revision. , 1988, World health statistics quarterly. Rapport trimestriel de statistiques sanitaires mondiales.

[5]  Joseph Beyene,et al.  The ratio of means method as an alternative to mean differences for analyzing continuous outcome variables in meta-analysis: A simulation study , 2008 .

[6]  J. McMurray,et al.  Temporal Trends and Patterns in Mortality After Incident Heart Failure A Longitudinal Analysis of 86 000 Individuals , 2019 .

[7]  Spiros C. Denaxas,et al.  A chronological map of 308 physical and mental health conditions from 4 million individuals in the English National Health Service , 2019, The Lancet. Digital health.

[8]  C. Reid,et al.  Risk Prediction Models for Incident Heart Failure: A Systematic Review of Methodology and Model Performance. , 2017, Journal of cardiac failure.

[9]  H. Curtis,et al.  OpenPrescribing: normalised data and software tool to research trends in English NHS primary care prescribing 1998–2016 , 2018, BMJ Open.

[10]  B. Stricker,et al.  Nonsteroidal Anti-Inflammatory Drugs and Heart Failure , 2012, Drugs.

[11]  Amir H. Payberah,et al.  Deep learning for electronic health records: A comparative review of multiple deep neural architectures , 2020, J. Biomed. Informatics.

[12]  K. Bhaskaran,et al.  Data Resource Profile: Clinical Practice Research Datalink (CPRD) , 2015, International journal of epidemiology.

[13]  Tim Benson,et al.  The history of the Read Codes: the inaugural James Read Memorial Lecture 2011. , 2011, Informatics in primary care.

[14]  Pia Hardelid,et al.  Data Resource Profile: Hospital Episode Statistics Admitted Patient Care (HES APC) , 2017, International journal of epidemiology.

[15]  Amir H. Payberah,et al.  Predicting the risk of emergency admission with machine learning: Development and validation using linked electronic health records , 2018, PLoS medicine.

[16]  Harry Hemingway,et al.  Temporal trends and patterns in heart failure incidence: a population-based study of 4 million individuals , 2017, The Lancet.

[17]  Quanshi Zhang,et al.  Towards a Deep and Unified Understanding of Deep Neural Models in NLP , 2019, ICML.

[18]  Carlos Guestrin,et al.  "Why Should I Trust You?": Explaining the Predictions of Any Classifier , 2016, ArXiv.

[19]  Natalia Gimelshein,et al.  PyTorch: An Imperative Style, High-Performance Deep Learning Library , 2019, NeurIPS.

[20]  T. Cahill,et al.  Heart failure after myocardial infarction in the era of primary percutaneous coronary intervention: Mechanisms, incidence and identification of patients at risk , 2017, World journal of cardiology.