Prof. Noam Barda

Know all about my research

Deep learning model design for ECG-based prediction of sex and ventricular dysfunction

A technical exploration of CNN and transformer architectures

Michal Cohen-Shelly, David Hochstein, Noam Barda, Amit Bleiweiss, Estelle Aflalo, Nitzan Bar, Eyal Zimlichman, Eyal Klang, Nisim Rahman, Talia Sela, Robert Klempfner, Elad Maor, Roy Beinart, Amit Segev, Ehud Raanani, Avi Sabbag

Background and objective Artificial intelligence (AI) based analysis of electrocardiogram (ECG) signals has become a powerful tool for predicting clinically important attributes such as sex and cardiac function. The growing use of wearable ECG technologies has increased interest in optimizing deep learning models for rapid and efficient predictions. Convolutional neural networks (CNNs) are the most established architecture in this field, while Vision Transformers (ViTs), successful in image analysis, remain less studied for ECG time-series data. We aimed to compare the performance of ViTs and CNNs in predicting sex and left ventricular dysfunction (LVD), defined as ejection fraction ≤ 35 %, and to evaluate reduced-input models using short ECG segments and single-lead recordings. Methods This retrospective study analyzed 12-lead ECGs recorded between January 2005 and December 2022 at a tertiary medical center. The dataset included 150,691 patients for sex classification and 29,422 for LVD. Binary classification models were developed using full-length ECGs, truncated segments (1–10 s), and individual leads. CNNs were implemented using PyTorch and ViTs via the HuggingFace framework. Model performance was assessed using area under the receiver operating characteristic curve (AUROC), with statistical comparisons by DeLong's test. Results CNNs outperformed ViTs in both tasks. For sex prediction, AUROC was 0.915 (95 % CI: 0.912–0.918) for CNNs and 0.898 (95 % CI: 0.894–0.901) for ViTs (P < 0.001). For LVD, CNNs achieved an AUROC of 0.895 (95 % CI: 0.884–0.906) versus 0.866 (95 % CI: 0.853–0.879) for ViTs (P = 0.023). Over 98 % of peak performance was retained using 2-s segments, similarly single-lead inputs achieved a relatively high performance. Conclusion CNN-based models demonstrated higher accuracy than ViTs for ECG-based prediction of sex and LVD. Compact input models may enable efficient clinical use. Further studies should explore where ViTs may offer added value.

Publication language English
Journal Heliyon
Volume 12
Issue number 2
Publication status Published - 01.02.2026
e44527

Keywords

Cardiology
Convolutional neural networks
Deep learning
ECG
Vision transformers

ASJC Scopus subject areas

General