Medical time series data, such as EEG and ECG, are vital for diagnosing neurological and cardiovascular diseases. However, their precise interpretation faces significant challenges due to high annotation costs, leading to data scarcity, and the limitations of traditional contrastive learning in capturing complex temporal patterns. To address these issues, we propose CoDAC (Contextual Discrepancy-Aware Contrastive learning), a novel framework that enhances diagnostic accuracy and generalization, particularly in small-sample settings. CoDAC leverages external healthy data and introduces a Contextual Discrepancy Estimator (CDE), built upon a Transformer-based Autoencoder, to precisely quantify abnormal signals through context-aware anomaly scores. These scores dynamically inform a Dynamic Multi-views Contrastive Framework (DMCF), which adaptively weights different temporal views to focus contrastive learning on diagnostically relevant, discrepant regions. Our encoder combines dilated convolutions with multi-head attention for robust feature extraction. Comprehensive experiments on Alzheimer's Disease EEG, Parkinson's Disease EEG, and Myocardial Infarction ECG datasets demonstrate CoDAC's superior performance across all metrics, consistently outperforming state-of-the-art baselines, especially under low label availability. Ablation studies further validate the critical contributions of CDE and DMCF. CoDAC offers a robust and interpretable solution for medical time series diagnosis, effectively mitigating data scarcity challenges.
翻译:医疗时间序列数据(如脑电图和心电图)对神经与心血管疾病的诊断至关重要。然而,由于标注成本高昂导致数据稀缺,以及传统对比学习在捕捉复杂时序模式方面的局限性,其精确解读面临重大挑战。为解决这些问题,我们提出CoDAC(上下文感知差异对比学习框架),该新型框架能提升诊断准确性与泛化能力,尤其适用于小样本场景。CoDAC利用外部健康数据,并引入基于Transformer自编码器构建的上下文差异估计器,通过上下文感知异常评分精确量化异常信号。这些评分动态指导动态多视角对比框架,该框架自适应地加权不同时序视角,使对比学习聚焦于具有诊断相关性的差异区域。我们的编码器结合扩张卷积与多头注意力机制以实现鲁棒特征提取。在阿尔茨海默症脑电图、帕金森症脑电图及心肌梗死心电图数据集上的综合实验表明,CoDAC在所有评估指标上均表现出优越性能,持续超越现有先进基线方法,在低标签可用性条件下优势尤为显著。消融实验进一步验证了上下文差异估计器与动态多视角对比框架的关键贡献。CoDAC为医疗时间序列诊断提供了兼具鲁棒性与可解释性的解决方案,有效缓解了数据稀缺带来的挑战。