Interpretable Pre-Trained Transformers for Heart Time-Series Data

25 Sept 2024 (modified: 05 Feb 2025)Submitted to ICLR 2025EveryoneRevisionsBibTeXCC BY 4.0
Keywords: biosignals, interpretability, healthcare, transformers
TL;DR: We create two fully explainable and interpretable transformer models for PPG and ECG data, that are pre-trained to predict the next sample and can be easily fine-tuned for downstream tasks.
Abstract: Interpretability of artificial intelligence models is vital in healthcare, as a poorly informed decision can directly impact the health and well-being of patients. This means that, owing to their black box nature, deep-learning solutions that may even yield high accuracy often fail to be adopted in real-world healthcare settings. To this end, we employ the generative pre-trained transformer (GPT) framework to clinical heart time-series data, to create two pre-trained general purpose cardiac models, termed PPG-PT and ECG-PT. We place a special emphasis on making both such pre-trained models fully interpretable. This is achieved firstly through aggregate attention maps which show that, in order to make predictions, the model focuses on similar points in previous cardiac cycles and gradually broadens its attention in deeper layers. Next, we show that tokens with the same value, which occur at different distinct points in the electrocardiography (ECG) and photoplethysmography (PPG) cycle, form separate clusters in a high dimensional space. Such clusters are formed according to the phase of the cardiac cycle, as the tokens propagate through the transformer blocks. Finally, we highlight that individual attention heads correspond to specific physiologically relevant features, such as the dicrotic notch in PPG and the P-wave in ECG. Importantly, it is also demonstrated that these pre-trained models are straightforward to fine-tune for tasks such as the classification of atrial fibrillation (AF), and beat detection in photoplethysmography. The so introduced PPG-PT and ECG-PT models achieve accuracy comparable to the state-of-the-art for both tasks, whilst crucially retaining their interpretability and explainability. This is demonstrated in the AF-screening fine-tuned model, with attention clearly shifting to regions in the context that are strongly indicative of atrial fibrillation.
Supplementary Material: zip
Primary Area: interpretability and explainable AI
Code Of Ethics: I acknowledge that I and all co-authors of this work have read and commit to adhering to the ICLR Code of Ethics.
Submission Guidelines: I certify that this submission complies with the submission instructions as described on https://iclr.cc/Conferences/2025/AuthorGuide.
Anonymous Url: I certify that there is no URL (e.g., github page) that could be used to find authors’ identity.
No Acknowledgement Section: I certify that there is no acknowledgement section in this submission for double blind review.
Submission Number: 4588
Loading