Empowering atrial fibrillation detection with TabPFN and SHAP interpretation based on ECG-derived features: a dual-center temporal validation study
摘要
Atrial fibrillation (AF) remains a leading driver of stroke and heart failure, yet timely diagnosis is frequently hindered by its asymptomatic nature and the limitations of current screening methods. This study aimed to develop and validate a highly accurate, interpretable, and scalable machine learning (ML) framework—TabPFN—for AF detection using standard 12-lead electrocardiogram (ECG)-derived features. To this end, we conducted a dual-center temporal validation study utilizing 248,324 ECG records across three distinct datasets: an internal cohort (n = 220,327), an external validation cohort (n = 6,181), and a temporal validation cohort (n = 21,816). The TabPFN model was trained on 12 clinical ECG features, such as PR interval, Paxis, and QTc, and compared against eight other ML architectures, including ensemble learning and neural networks. Model interpretability was established using SHAP (SHapley Additive exPlanations) to quantify feature contributions, and the framework was deployed via a web-based clinical interface. Results indicated that the TabPFN model demonstrated superior diagnostic efficacy, achieving an area under the receiver operating characteristic curve (AUROC) of 0.9711 in the internal cohort, 0.9797 in the external cohort, and 0.9766 in the temporal validation cohort. It outperformed traditional logistic regression (AUC 0.8687) and maintained a remarkably low Brier score (0.0474), indicating excellent calibration. Furthermore, SHAP analysis identified the PR interval and Paxis as the primary diagnostic drivers, revealing non-linear associations and physiological “inflection points” for AF presence, while decision curve analysis confirmed a high net benefit for clinical screening across all cohorts. In conclusion, by leveraging a Prior-Data Fitted approach (TabPFN) on standardized ECG features, we established a robust framework that matches the performance of complex deep-learning models while maintaining high interpretability and computational efficiency. This scalable tool, accessible via a web-based platform, bridges the gap between “black-box” AI and clinical practice, offering a practical solution for population-wide AF screening and the reduction of cardiovascular morbidity