Enhancing atrial fibrillation detection during normal sinus rhythm using self-supervised electrocardiogram foundation model
EP Europace Journal

Abstract
Multiple research efforts have been conducted to predict atrial fibrillation (AF) during normal sinus rhythm (NSR) electrocardiograms (ECGs). Meanwhile, significant challenges persist in improving diagnostic performance due to the low prevalence of AF and the necessity of detecting subtle ECG changes that may indicate AF occurrence. We investigated the potential enhancement of AF detection during NSR by leveraging an ECG foundation model pretrained through self-supervised learning techniques.
We collected 12-lead ECGs between 2013 and 2020. We defined AF during NSR ECGs as any NSR ECG recorded within the 31-day window before, or at any time after, the first AF ECG. We utilized the automatic rhythm analysis tool of the GE machine to screen AF and NSR. We divided the dataset into training, validation, and test sets. The training set comprised labeled NSR ECGs (AF during NSR or true NSR) and unlabeled ECGs. Other sets contained only the first labeled ECGs. Employing the Vision Transformer (ViT), we pretrained the model on the entire training dataset using the Masked Autoencoder approach. We then finetuned the model using labeled training data to diagnose AF during NSR. We compared the model to baseline models (ResNet, SEResNeXt, and ViT) trained without pre-training. We conducted subgroup analyses for the 'before first AF' and 'after first AF' subgroups.
A total of 1,070,738 ECGs were acquired from 324,014 individuals. 7,397 and 320,857 ECGs were labeled as AF during NSR and true NSR, respectively. Pre-trained ViT model demonstrated the highest area under the receiver operating characteristic curve (AUC) at 0.919 (95% CI: 0.903-0.935) in the test set, while the baseline models evaluated as 0.885 (95% CI: 0.866-0.904), 0.887 (95% CI: 0.869-0.906) and 0.826 (95% CI: 0.805-0.847). The proposed model achieved AUCs of 0.875 (95% CI: 0.826-0.925) and 0.927 (95% CI: 0.910-0.943) in the before first AF group and after first AF group, respectively.
Our study demonstrates the potential of ECG foundation models in enhancing AF detection during NSR. Notably, the model exhibited robust performance across different temporal subgroups. These findings suggest that advanced self-supervised learning techniques can effectively address the challenges of low AF prevalence and subtle ECG changes, presenting a promising approach for early AF detection and potential clinical risk stratification.

