🤖 AI Summary
Real-world ECG analysis faces significant challenges, including strong data heterogeneity, high noise levels, substantial inter-population variability, and complex rhythm-event associations. To address these, we propose AnyECG—the first foundation model tailored for multi-source heterogeneous ECG data. Our method introduces three key innovations: (1) an ECG Tokenizer that encodes continuous, noisy signals into discrete, compact, and clinically interpretable local rhythm tokens; (2) a proxy-task-driven discretized representation learning framework coupled with rhythm-pattern-aware autoregressive pretraining; and (3) joint self-supervised learning across diverse devices and clinical scenarios. Evaluated on four tasks—abnormality detection, arrhythmia classification, lead imputation, and ultra-long ECG analysis—AnyECG consistently surpasses state-of-the-art methods, demonstrating marked improvements in generalization and robustness under realistic, noisy, and heterogeneous conditions.
📝 Abstract
Electrocardiogram (ECG), a non-invasive and affordable tool for cardiac monitoring, is highly sensitive in detecting acute heart attacks. However, due to the lengthy nature of ECG recordings, numerous machine learning methods have been developed for automated heart disease detection to reduce human workload. Despite these efforts, performance remains suboptimal. A key obstacle is the inherent complexity of ECG data, which includes heterogeneity (e.g., varying sampling rates), high levels of noise, demographic-related pattern shifts, and intricate rhythm-event associations. To overcome these challenges, this paper introduces AnyECG, a foundational model designed to extract robust representations from any real-world ECG data. Specifically, a tailored ECG Tokenizer encodes each fixed-duration ECG fragment into a token and, guided by proxy tasks, converts noisy, continuous ECG features into discrete, compact, and clinically meaningful local rhythm codes. These codes encapsulate basic morphological, frequency, and demographic information (e.g., sex), effectively mitigating signal noise. We further pre-train the AnyECG to learn rhythmic pattern associations across ECG tokens, enabling the capture of cardiac event semantics. By being jointly pre-trained on diverse ECG data sources, AnyECG is capable of generalizing across a wide range of downstream tasks where ECG signals are recorded from various devices and scenarios. Experimental results in anomaly detection, arrhythmia detection, corrupted lead generation, and ultra-long ECG signal analysis demonstrate that AnyECG learns common ECG knowledge from data and significantly outperforms cutting-edge methods in each respective task.