Wang Rongjia, Dong Xunde, Liu Xiuling, Dou Jianhong, Qiang Yupeng, Yang Yang, Hu Fei
School of Automation Science and Engineering, South China University of Technology, Guangzhou, 510641, China.
Key Laboratory of Digital Medical Engineering of Hebei Province, College of Electronic and Information Engineering, Hebei University, Baoding, 071002, China.
Comput Methods Programs Biomed. 2025 Oct;270:108918. doi: 10.1016/j.cmpb.2025.108918. Epub 2025 Jul 5.
Cardiovascular diseases are one of the major health threats to humans. Researchers have proposed numerous deep learning-based methods for the automatic analysis of electrocardiogram (ECG), achieving encouraging results. However, many existing methods are limited to task-specific model training and require retraining or full fine-tuning when confronted with a new ECG classification task, thus lacking flexibility in clinical applications.
In this study, we propose a Task-Adaptive Classification method for ECG (TAC-ECG) based on cross-modal contrastive learning and low-rank convolutional adapters. TAC-ECG comprises two main phases. In the first phase, inspired by the Contrastive Language-Image Pre-training, we design the Contrastive ECG-Text Pre-training (CETP) to pre-train a robust ECG encoder. In the second phase, the pre-trained ECG encoder is frozen and integrated with a lightweight plug-in, the Low-Rank Convolutional Adapter (LRC-Adapter), forming an extensible ECG classification model. The frozen encoder extracts more discriminative features from the ECG signal, while the LRC-Adapter enables task-specific adaptation. For diverse ECG classification tasks, TAC-ECG only requires training the LRC-Adapter. This mechanism enables TAC-ECG to efficiently perform different ECG classification tasks, significantly reducing resource consumption and deployment costs in multi-tasking scenarios compared to traditional fully fine-tuned methods.
We conducted extensive experiments using six different network architectures as ECG encoders. Specifically, we performed ECG classification experiments on four datasets: CPSC2018, Cinc2017, PTB-XL, and Chapman, targeting 9-category, 3-category, 5-category, and 4-category classifications respectively. The TAC-ECG achieved highly competitive results using only approximately 3% of the trainable parameters and approximately 25% of the total parameters compared to the fully fine-tuned method. These results demonstrates the effectiveness and practicality of the TAC-ECG method.
The TAC-ECG offers a flexible and efficient method for ECG classification, enabling rapid adaptation to diverse tasks and enhancing clinical diagnostic practicality.
心血管疾病是对人类健康的主要威胁之一。研究人员已经提出了许多基于深度学习的方法用于心电图(ECG)的自动分析,并取得了令人鼓舞的成果。然而,许多现有方法仅限于特定任务的模型训练,在面对新的ECG分类任务时需要重新训练或完全微调,因此在临床应用中缺乏灵活性。
在本研究中,我们提出了一种基于跨模态对比学习和低秩卷积适配器的心电图任务自适应分类方法(TAC-ECG)。TAC-ECG包括两个主要阶段。在第一阶段,受对比语言-图像预训练的启发,我们设计了对比心电图-文本预训练(CETP)来预训练一个强大的ECG编码器。在第二阶段,预训练的ECG编码器被冻结,并与一个轻量级插件低秩卷积适配器(LRC-Adapter)集成,形成一个可扩展的ECG分类模型。冻结的编码器从ECG信号中提取更具判别力的特征,而LRC-Adapter实现特定任务的自适应。对于不同的ECG分类任务,TAC-ECG只需要训练LRC-Adapter。这种机制使TAC-ECG能够高效地执行不同的ECG分类任务,与传统的完全微调方法相比,在多任务场景中显著降低了资源消耗和部署成本。
我们使用六种不同的网络架构作为ECG编码器进行了广泛的实验。具体来说,我们在四个数据集上进行了ECG分类实验:CPSC2018、Cinc2017、PTB-XL和Chapman,分别针对9类、3类、5类和4类分类。与完全微调方法相比,TAC-ECG仅使用约3%的可训练参数和约25%的总参数就取得了极具竞争力的结果。这些结果证明了TAC-ECG方法有效性和实用性。
TAC-ECG为ECG分类提供了一种灵活高效的方法,能够快速适应不同任务并增强临床诊断实用性。