Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Key Waveform-Aware Contrastive Learning for Imbalanced Classification of Physiological Time Series

  

  • Published:2026-07-10

面向生理时序不平衡分类的波形感知对比学习

Abstract: Physiological time series classification plays a critical role in various healthcare tasks, including sleep monitoring, electrocardiogram diagnosis, and epilepsy detection. However, in practical applications, severe class imbalance makes it challenging to learn effective representations for minority classes. Although these minority samples are scarce, they often contain highly informative signals, and accurate identification of their patterns is crucial for timely disease intervention, precise health assessment, and optimized decision-making in clinical and other application scenarios. Due to the limited number of minority samples and the predominance of background or normal waveforms, models struggle to learn discriminative features from entire sequences. Within these minority samples, a small number of critical local segments exist, whose unique structures or dynamic patterns carry essential class-discriminative information. Recognizing these segments is vital for effective modeling of minority classes. Contrastive learning offers strong generalization and feature distribution awareness and has been widely used to address class imbalance. Yet, most existing approaches rely on global sample representations or originate from image-based methods, making it difficult to capture sparse yet discriminative local waveform segments in minority samples. Moreover, current methods often underutilize frequency-domain information, and data augmentation typically lacks class differentiation, ignoring distributional differences between minority and majority classes. To address these challenges, this study proposes KWave-CL, a key waveform-aware contrastive learning method for class-imbalanced physiological time series classification. Hard-to-learn key segments in minority samples typically exhibit large reconstruction errors. KWave-CL employs a variational autoencoder jointly modeling time- and frequency-domain information to reconstruct minority waveforms. By computing reconstruction errors in both domains, the method identifies key and non-key waveform segments, providing critical guidance for subsequent contrastive learning. To fully exploit local discriminative information in minority samples, a key waveform-aware contrastive loss is designed to pull key segments closer while pushing key and non-key segments apart in the representation space, enhancing the discriminability of minority class embeddings. To increase minority diversity while maintaining the stability of majority features, class-differentiated data augmentation is applied, imposing stronger perturbations on minority samples and weaker perturbations on majority samples, thereby mitigating class distribution shifts in the augmented space. The method adopts a joint optimization strategy, integrating self-supervised contrastive loss, key waveform-aware contrastive loss, and time-frequency variational autoencoder reconstruction loss, enabling cooperative learning of global and local features. KWave-CL is also highly flexible and can be embedded into various time series contrastive learning frameworks. Experiments on three publicly available physiological datasets show that KWave-CL outperforms multiple baseline methods for class-imbalanced learning under two representative contrastive learning frameworks. On the PhysioNet 2017 dataset using an instance-level framework, the overall F1 score improves by up to 6.69%, while the minority class F1 score increases by up to 11.67%. Ablation studies further demonstrate that the key waveform-aware contrastive loss, time-frequency variational autoencoder, and class-differentiated data augmentation all play crucial roles in enhancing minority class performance. These results indicate that KWave-CL effectively mitigates class imbalance and provides reliable decision support for healthcare applications.

摘要: 生理时间序列分类在睡眠监测、心电诊断和癫痫检测等多种医疗健康任务中具有重要意义,但在实际应用中,其严重的类别不平衡问题导致少数类特征难以有效学习,尽管这些少数类样本数量稀少,但它们通常承载着更为重要的信息,其性能的准确识别对于疾病及时干预、健康精确评估及其他应用场景的优化决策至关重要。 由于生理时间序列少数类样本数量有限且多为背景波形,模型很难直接从整体序列中学习到判别性强的特征。这些少数类样本中往往存在少量关键局部片段,其独特结构或变化模式承载了类别判别信息,识别这些关键信息对少数类建模至关重要。对比学习方法具备良好的泛化性和结构感知能力,被广泛应用于改进类别不平衡建模,但现有方法多来源于图像领域或依赖样本全局表示,难以捕获少数类样本中稀疏却具有判别信息的局部关键波形片段,另外,现有不平衡方法对频域上的特征利用不充分,数据增强时也缺少类别区分,忽略了少数类与多数类的类间分布差异。 为解决上述问题,该研究提出了一种面向类别不平衡生理时间序列分类的关键波形感知的对比学习方法KWave-CL。少数类中难以学习的关键波形片段通常表现为重构误差较大,该方法设计了联合时域与频域的变分自编码器对少数类波形片段进行重构,通过计算时域与频域的重构误差识别少数类的关键波形片段与非关键波形片段,从而为后续对比学习提供信息。为了充分挖掘少数类样本中的局部判别信息,基于识别出的关键波形片段,该方法进一步设计了关键波形感知对比损失,通过拉近少数类关键波形片段之间的距离,并拉远关键波形片段与非关键波形片段的距离,使少数类在表示空间中形成更紧密且可分的聚类结构,提升少数类表示的判别性。为了增强少数类的多样性,同时保持多数类的特征稳定性,该方法还引入了类别区分的数据增强,对少数类施加较强的扰动,而对多数类则施加较弱的扰动,从增强空间上缓解类别分布偏移问题。整体方法采用联合优化策略,将自监督对比损失、关键波形感知对比损失和时频变分自编码器重构损失整合训练,实现全局与局部特征的协同学习。KWave-CL方法也具有良好的灵活性,可以嵌入多种时间序列对比学习框架中。 在三个公开的真实生理数据集上的实验表明,KWave-CL在两种代表性对比学习框架下的整体性能优于现有的多种不平衡学习基线模型。在PhysioNet 2017数据集的实例级框架下,整体F1分数最高提升了6.69%,少数类别的F1分数最高提升了11.67%,消融实验进一步表明,关键波形感知对比损失、时频变分自编码器以及类别区分数据增强均对少数类性能提升起到关键作用,证明KWave-CL有效缓解了类别不平衡问题,可以为医疗健康领域提供可靠的辅助决策支持。