journal article·2024-12-27Open access

Use of Attention Maps to Enrich Discriminability in Deep Learning Prediction Models Using Longitudinal Data from Electronic Health Records

Lucía A. Carrasco-Ribelles, Margarita Cabrera-Bean, Jose Llanes-Jurado, Concepción Violán

Applied Sciences· Volume 15· Issue 1

Abstract

Background: In predictive modelling, particularly in fields such as healthcare, the importance of understanding the model’s behaviour rivals, if not surpasses, that of discriminability. To this end, attention mechanisms have been included in deep learning models for years. However, when comparing different models, the one with the best discriminability is usually chosen without considering the clinical plausibility of their predictions. Objective: In this work several attention-based deep learning architectures with increasing degrees of complexity were designed and compared aiming to study the balance between discriminability and plausibility with architecture complexity when working with longitudinal data from Electronic Health Records (EHRs). Methods: We developed four deep learning-based architectures with attention mechanisms that were progressively more complex to handle longitudinal data from EHRs. We evaluated their discriminability and resulting attention maps and compared them amongst architectures and different input processing approaches. We trained them on 10 years of data from EHRs from Catalonia (Spain) and evaluated them using a 5-fold cross-validation to predict 1-year all-cause mortality in a subsample of 500,000 people over 65 years of age. Results: Generally, the simplest architectures led to the best overall discriminability, slightly decreasing with complexity by up to 8.7%. However, the attention maps resulting from the simpler architectures were less informative and less clinically plausible compared to those from more complex architectures. Moreover, the latter could give attention weights both in the time and feature domains. Conclusions: Our results suggest that discriminability and more informative and clinically plausible attention maps do not always go together. Given the preferences within the healthcare field for enhanced explainability, establishing a balance with discriminability is imperative.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Machine Learning in Healthcare · Artificial Intelligence in Healthcare · Explainable Artificial Intelligence (XAI)

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Institut Universitari d’Investigació en Atenció Primària Jordi Gol (IDIAP Jordi Gol), 08007 Barcelona, Spain

Department of Signal Theory and Communications, Universitat Politècnica de Catalunya (UPC), 08034 Barcelona, Spain

Unitat de Suport a la Recerca Metropolitana Nord, Institut Universitari d’Investigació en Atenció Primària Jordi Gol (IDIAP Jordi Gol), 08303 Mataró, Spain

Instituto Universitario de Investigación en Tecnología Centrada en el Ser Humano, Universitat Politècnica de València, 46022 Valencia, Spain

Direcció d’Atenció Primària Metropolitana Nord Institut Català de Salut, 08915 Badalona, Spain

Fundació Institut d’Investigació en Ciències de la Salut Germans Trias i Pujol (IGTP), 08916 Badalona, Spain

Department of Medicine, Universitat Autònoma de Barcelona, 08913 Cerdanyola del Vallès, Spain

Funding

Carlos III Institute of Health, Ministry of Economy and Competitiveness (Spain) · 6-SENSES

References (45)

Show source-provided references
1. Electronic Health Record Challenges, Workarounds, and Solutions Observed in Practices Integrating Behavioral Health and Primary Care10.3122/jabfm.2015.S1.150133 ↗
2. Liu, F., and Panagiotakos, D. (2022). Real-world data: A brief review of the methods, applications, challenges and opportunities. BMC Med. Res. Methodol., 22.10.1186/s12874-022-01768-6 ↗
3. Wang, S., Gao, W., Ngwa, J., Allard, C., Liu, C.T., and Cupples, L.A. (2014). Comparing baseline and longitudinal measures in association studies. BMC Proc., 8.10.1186/1753-6561-8-S1-S84 ↗
4. Nguyen, H.T., Vasconcellos, H.D., Keck, K., Reis, J.P., Lewis, C.E., Sidney, S., Lloyd-Jones, D.M., Schreiner, P.J., Guallar, E., and Wu, C.O. (2023). Multivariate longitudinal data for survival analysis of cardiovascular event prediction in young adults: Insights from a comparative explainable study. BMC Med. Res. Methodol., 23.10.1186/s12874-023-01845-4 ↗
5. Machine and deep learning for longitudinal biomedical data: A review of methods and applications10.1007/s10462-023-10561-w ↗
6. Markus, A.F., Kors, J.A., and Rijnbeek, P.R. (2021). The role of explainability in creating trustworthy artificial intelligence for health care: A comprehensive survey of the terminology, design choices, and evaluation strategies. J. Biomed. Inform., 113.10.1016/j.jbi.2020.103655 ↗
7. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI10.1016/j.inffus.2019.12.012 ↗
8. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., and Polosukhin, I. (2017). Attention Is All You Need. arXiv.
9. Bahdanau, D., Cho, K., and Bengio, Y. (2014). Neural Machine Translation by Jointly Learning to Align and Translate. arXiv.
10. Luong, M.T., Pham, H., and Manning, C.D. (2015). Effective Approaches to Attention-based Neural Machine Translation. arXiv.10.18653/v1/D15-1166 ↗
11. Ross, A.S., Hughes, M.C., and Doshi-Velez, F. (2017). Right for the Right Reasons: Training Differentiable Models by Constraining their Explanations. arXiv.10.24963/ijcai.2017/371 ↗
12. Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13–17). “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA. KDD ’16.10.1145/2939672.2939778 ↗
13. Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (2017). A Unified Approach to Interpreting Model Predictions. Proceedings of the Advances in Neural Information Processing Systems, Curran Associates, Inc.
14. Patient2Vec: A Personalized Interpretable Deep Representation of the Longitudinal Electronic Health Record10.1109/ACCESS.2018.2875677 ↗
15. Sha, Y., and Wang, M.D. (2017, January 20–23). Interpretable Predictions of Clinical Outcomes with An Attention-based Recurrent Neural Network. Proceedings of the 8th ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics, Boston, MA, USA.10.1145/3107411.3107445 ↗
16. Choi, E., Bahadori, M.T., Sun, J., Kulas, J., Schuetz, A., and Stewart, W. (2016, January 5–10). RETAIN: An Interpretable Predictive Model for Healthcare using Reverse Time Attention Mechanism. Proceedings of the NIPS’16: Proceedings of the 30th International Conference on Neural Information Processing Systems, Barcelona, Spain.
17. Adding an attention layer improves the performance of a neural network architecture for synonymy prediction in the UMLS Metathesaurus
18. Prediction models using artificial intelligence and longitudinal data from electronic health records: A systematic methodological review10.1093/jamia/ocad168 ↗
19. Kabeshova, A., Yu, Y., Lukacs, B., Bacry, E., and Gaïffas, S. (2020). ZiMM: A deep learning model for long term and blurry relapses with non-clinical claims data. J. Biomed. Inform., 110.10.1016/j.jbi.2020.103531 ↗
20. Interpretable clinical prediction via attention-based neural network10.1186/s12911-020-1110-7 ↗
21. LIG-Doctor: Efficient patient trajectory prediction using bidirectional minimal gated-recurrent networks10.1016/j.ins.2020.09.024 ↗
22. Med-BERT: Pretrained contextualized embeddings on large-scale structured electronic health records for disease prediction10.1038/s41746-021-00455-y ↗
23. TRIPOD+AI statement: Updated guidance for reporting clinical prediction models that use regression or machine learning methods10.1136/bmj-2023-078378 ↗
24. Baytas, I.M., Xiao, C., Zhang, X., Wang, F., Jain, A.K., and Zhou, J. (2017, January 13–17). Patient Subtyping via Time-Aware LSTM Networks. Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada.10.1145/3097983.3097997 ↗
25. Wang, T., Qiu, R.G., and Yu, M. (2018). Predictive Modeling of the Progression of Alzheimer’s Disease with Recurrent Neural Networks. Sci. Rep., 8.10.1038/s41598-018-27337-w ↗
26. Prediction of treatment medicines with dual adaptive sequential networks10.1109/TKDE.2021.3052992 ↗
27. Jin, B., Yang, H., Sun, L., Liu, C., Qu, Y., and Tong, J. (2018, January 19–23). A Treatment Engine by Predicting Next-Period Prescriptions. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK. KDD ’18.10.1145/3219819.3220095 ↗
28. Temporal convolutional networks allow early prediction of events in critical care10.1093/jamia/ocz205 ↗
29. Li, Y., Rao, S., Solares, J.R.A., Hassaine, A., Ramakrishnan, R., Canoy, D., Zhu, Y., Rahimi, K., and Salimi-Khorshidi, G. (2020). BEHRT: Transformer for Electronic Health Records. Sci. Rep., 10.10.1038/s41598-020-62922-y ↗
30. Santana, A., and Colombini, E. (2021). Neural Attention Models in Deep Learning: Survey and Taxonomy. arXiv.
31. A General Survey on Attention Mechanisms in Deep Learning10.1109/TKDE.2021.3126456 ↗
32. Xu, Q., and Duan, W. (2024). DualAttNet: Synergistic fusion of image-level and fine-grained disease attention for multi-label lesion detection in chest X-rays. Comput. Biol. Med., 168.10.1016/j.compbiomed.2023.107742 ↗
33. Zhang, Z., Gao, L., Li, P., Jin, G., and Wang, J. (2023). DAUF: A disease-related attentional UNet framework for progressive and stable mild cognitive impairment identification. Comput. Biol. Med., 165.10.1016/j.compbiomed.2023.107401 ↗
34. Muresan, S., Nakov, P., and Villavicencio, A. (2022, January 22–27). Is Attention Explanation? An Introduction to the Debate. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Dublin, Ireland.
35. Wiegreffe, S., and Pinter, Y. (2019). Attention is not not Explanation. arXiv.10.18653/v1/D19-1002 ↗
36. Jain, S., and Wallace, B.C. (2019). Attention is not Explanation. arXiv.
37. Jurafsky, D., Chai, J., Schluter, N., and Tetreault, J. (2020, January 5–10). Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words?. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online.
38. Riedl, M.O. (2019). Human-Centered Artificial Intelligence and Machine Learning. arXiv.10.1002/hbe2.117 ↗
39. Zhou, P., Shi, W., Tian, J., Qi, Z., Li, B., Hao, H., and Xu, B. (2016, January 7–12). Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Berlin, Germany.10.18653/v1/P16-2034 ↗
40. Data Resource Profile: The Information System for Research in Primary Care (SIDIAP)10.1093/ije/dyac068 ↗
41. (2024, December 21). GitHub: Comparing Discriminability and Attention Maps from Deep Learning Architectures Using Longitudinal Data from Electronic Health Records Repository. Available online: https://github.com/IDIAPJGol/ComparingAttentionArchitectures.
42. Assessing and Measuring Chronic Multimorbidity in the Older Population: A Proposal for Its Operationalization
43. Orfila, F., Carrasco-Ribelles, L.A., Abellana, R., Roso-Llorach, A., Cegri, F., Reyes, C., and Violán, C. (2022). Validation of an electronic frailty index with electronic health records: eFRAGICAP index. BMC Geriatr., 22.10.1186/s12877-022-03090-8 ↗
44. Kingma, D.P., and Ba, J. (2017). Adam: A Method for Stochastic Optimization. arXiv.
45. The Mythos of Model Interpretability: In machine learning, the concept of interpretability is both important and slippery10.1145/3236386.3241340 ↗