A novel explainable ECG classification with spatio-temporal transformers and hybrid loss optimization

IF 4.9 2区 医学 Q1 ENGINEERING, BIOMEDICAL
Inam Abousaber , Hany El-Ghaish , Haitham F. Abdallah
{"title":"A novel explainable ECG classification with spatio-temporal transformers and hybrid loss optimization","authors":"Inam Abousaber ,&nbsp;Hany El-Ghaish ,&nbsp;Haitham F. Abdallah","doi":"10.1016/j.bspc.2025.108142","DOIUrl":null,"url":null,"abstract":"<div><div>This paper presents a novel deep learning framework for ECG arrhythmias detection, integrating Spatio-Temporal Adaptive Embedding (STAE) Transformers and Variational Autoencoders (VAEs) to improve classification accuracy and address class imbalance. Traditional ECG classification models struggle to capture long-range temporal dependencies and handle imbalanced datasets, leading to poor sensitivity for rare arrhythmias. The proposed system employs STAE Transformers to model intricate temporal and spatial relationships within ECG signals to overcome these challenges. At the same time, VAEs generate diverse and realistic ECG samples to enhance model generalization, particularly for underrepresented arrhythmias. Additionally, combining Focal Loss and Dice Loss, a Hybrid Loss Function further optimizes performance by focusing on hard-to-classify arrhythmias. The model is evaluated on the MIT-BIH Arrhythmias Database and PTB Diagnostic ECG Database using 5-fold cross-validation, achieving an accuracy of 99.56% and a macro F1-score of 95.40%, outperforming existing state-of-the-art methods, with a 3.5% improvement in sensitivity for rare arrhythmias. To ensure interpretability, SHapley Additive exPlanations (SHAP) and Gradient-weighted Class Activation Mapping (Grad-CAM) are utilized, highlighting the QRS complex and RR intervals as the most critical features and confirming that the model focuses on clinically relevant waveform regions. These results demonstrate the effectiveness of our approach in developing an accurate, interpretable, and robust deep learning system for ECG arrhythmias detection, paving the way for more reliable clinical decision support systems.</div></div>","PeriodicalId":55362,"journal":{"name":"Biomedical Signal Processing and Control","volume":"110 ","pages":"Article 108142"},"PeriodicalIF":4.9000,"publicationDate":"2025-05-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Biomedical Signal Processing and Control","FirstCategoryId":"5","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1746809425006536","RegionNum":2,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"ENGINEERING, BIOMEDICAL","Score":null,"Total":0}
引用次数: 0

Abstract

This paper presents a novel deep learning framework for ECG arrhythmias detection, integrating Spatio-Temporal Adaptive Embedding (STAE) Transformers and Variational Autoencoders (VAEs) to improve classification accuracy and address class imbalance. Traditional ECG classification models struggle to capture long-range temporal dependencies and handle imbalanced datasets, leading to poor sensitivity for rare arrhythmias. The proposed system employs STAE Transformers to model intricate temporal and spatial relationships within ECG signals to overcome these challenges. At the same time, VAEs generate diverse and realistic ECG samples to enhance model generalization, particularly for underrepresented arrhythmias. Additionally, combining Focal Loss and Dice Loss, a Hybrid Loss Function further optimizes performance by focusing on hard-to-classify arrhythmias. The model is evaluated on the MIT-BIH Arrhythmias Database and PTB Diagnostic ECG Database using 5-fold cross-validation, achieving an accuracy of 99.56% and a macro F1-score of 95.40%, outperforming existing state-of-the-art methods, with a 3.5% improvement in sensitivity for rare arrhythmias. To ensure interpretability, SHapley Additive exPlanations (SHAP) and Gradient-weighted Class Activation Mapping (Grad-CAM) are utilized, highlighting the QRS complex and RR intervals as the most critical features and confirming that the model focuses on clinically relevant waveform regions. These results demonstrate the effectiveness of our approach in developing an accurate, interpretable, and robust deep learning system for ECG arrhythmias detection, paving the way for more reliable clinical decision support systems.
基于时空变压器和混合损耗优化的新型可解释心电分类
本文提出了一种新的心电心律失常检测深度学习框架,该框架将时空自适应嵌入(STAE)变压器和变分自编码器(VAEs)相结合,以提高分类精度和解决分类不平衡问题。传统的心电分类模型难以捕获长期的时间依赖性和处理不平衡的数据集,导致对罕见心律失常的敏感性较差。该系统采用STAE变压器来模拟ECG信号中复杂的时间和空间关系,以克服这些挑战。同时,VAEs生成多样化和真实的ECG样本,以增强模型的泛化,特别是对于代表性不足的心律失常。此外,结合局灶损失和骰子损失,混合损失功能进一步优化性能,专注于难以分类的心律失常。该模型在MIT-BIH心律失常数据库和PTB诊断心电图数据库上进行了5倍交叉验证,准确率为99.56%,宏观f1评分为95.40%,优于现有的最先进方法,对罕见心律失常的敏感性提高了3.5%。为了确保可解释性,使用了SHapley加性解释(SHAP)和梯度加权类激活映射(gradcam),突出QRS复合体和RR间隔是最关键的特征,并确认该模型专注于临床相关的波形区域。这些结果证明了我们的方法在开发准确、可解释和强大的ECG心律失常检测深度学习系统方面的有效性,为更可靠的临床决策支持系统铺平了道路。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Biomedical Signal Processing and Control
Biomedical Signal Processing and Control 工程技术-工程:生物医学
CiteScore
9.80
自引率
13.70%
发文量
822
审稿时长
4 months
期刊介绍: Biomedical Signal Processing and Control aims to provide a cross-disciplinary international forum for the interchange of information on research in the measurement and analysis of signals and images in clinical medicine and the biological sciences. Emphasis is placed on contributions dealing with the practical, applications-led research on the use of methods and devices in clinical diagnosis, patient monitoring and management. Biomedical Signal Processing and Control reflects the main areas in which these methods are being used and developed at the interface of both engineering and clinical science. The scope of the journal is defined to include relevant review papers, technical notes, short communications and letters. Tutorial papers and special issues will also be published.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信