The demand for ECG datasets, particularly those containing rare classes, poses a significant challenge as deep learning becomes increasingly prevalent in ECG signal research. While Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs) are widely adopted, they encounter difficulties in effectively generating samples for classes with limited instances. To address this issue, we propose a novel Feature Disentanglement Auto-Encoder (FDAE) designed to dissect various generative factors under a contrastive learning framework within ECG data to facilitate the generation of new ECG samples. The FDAE enhances and extends the AE structure with novel methodologies, which involve: (1) partitioning the latent space into three distinct representations to capture various generative factors; (2) utilizing a contrastive loss function to improve feature disentanglement capabilities; and (3) incorporating additional classifiers to enhance representation learning, alongside a discriminator aimed at boosting the realism of synthesized signals. Furthermore, our FDAE generates new signals by swapping latent codes of existing signals and combining freely or substituting patient-independent representations with those randomly generated by a VAE. To validate our approach, we conduct heartbeat classification experiments on the publicly available MIT-BIH arrhythmia database, using FAKE-train/FAKE-test partitions and data augmentation. The results highlight the FDAE's ability to improve ECG classifier performance and excel in synthesizing ECG signals. Furthermore, we apply the model to the Icentia11K dataset and conducted classification enhancement experiments. The results further highlight the model's strong generalization ability in ECG synthesis. This work has the potential to improve the robustness and generalization of deep learning models for ECG analysis, particularly in medical applications where rare cardiac events are often underrepresented in available datasets.
Read full abstract