Table of Contents
Fetching ...

Contextual Discrepancy-Aware Contrastive Learning for Robust Medical Time Series Diagnosis in Small-Sample Scenarios

Kaito Tanaka, Aya Nakayama, Masato Ito, Yuji Nishimura, Keisuke Matsuda

TL;DR

CoDAC tackles the problem of diagnosing diseases from medical time series under extreme label scarcity by learning normal physiological patterns from external healthy data using a Transformer-based Contextual Discrepancy Estimator (CDE). The context-aware anomaly scores produced by CDE guide a Dynamic Multi-views Contrastive Framework (DMCF) that adaptively weights temporal views during contrastive learning, supplemented by a dilated-convolutional, multi-head attention encoder. Through a multi-stage training pipeline—CDE pretraining, unsupervised DMCF training, and supervised fine-tuning—CoDAC achieves state-of-the-art performance on Alzheimer's EEG, Parkinson's EEG, and myocardial infarction ECG tasks, especially in 10% label scenarios. The framework also demonstrates ablation-based validation of CDE and DMCF contributions and explores interpretability via a hypothetical clinician study, highlighting potential translational impact for robust, data-efficient medical time-series diagnosis.

Abstract

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.

Contextual Discrepancy-Aware Contrastive Learning for Robust Medical Time Series Diagnosis in Small-Sample Scenarios

TL;DR

CoDAC tackles the problem of diagnosing diseases from medical time series under extreme label scarcity by learning normal physiological patterns from external healthy data using a Transformer-based Contextual Discrepancy Estimator (CDE). The context-aware anomaly scores produced by CDE guide a Dynamic Multi-views Contrastive Framework (DMCF) that adaptively weights temporal views during contrastive learning, supplemented by a dilated-convolutional, multi-head attention encoder. Through a multi-stage training pipeline—CDE pretraining, unsupervised DMCF training, and supervised fine-tuning—CoDAC achieves state-of-the-art performance on Alzheimer's EEG, Parkinson's EEG, and myocardial infarction ECG tasks, especially in 10% label scenarios. The framework also demonstrates ablation-based validation of CDE and DMCF contributions and explores interpretability via a hypothetical clinician study, highlighting potential translational impact for robust, data-efficient medical time-series diagnosis.

Abstract

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.
Paper Structure (31 sections, 8 equations, 4 figures, 5 tables)

This paper contains 31 sections, 8 equations, 4 figures, 5 tables.

Figures (4)

  • Figure 1: Conceptual overview illustrating the research motivation, the critical challenges in medical time series diagnosis (data scarcity and limitations of traditional contrastive learning), and how the proposed CoDAC method conceptually addresses these challenges to enable early and accurate diagnosis through efficient learning and robust representations.
  • Figure 2: Overall architecture of the proposed CoDAC method, illustrating its three primary components: the Shared Encoder, Contextual Discrepancy Estimator (CDE), and Dynamic Multi-views Contrastive Framework (DMCF). The multi-stage training paradigm (Stage 1: CDE Pre-training, Stage 2: Unsupervised/Self-supervised Training, Stage 3: Supervised Fine-tuning) and the flow of contextual anomaly scores are also depicted.
  • Figure 3: Comparison of Fine-tuning Strategies (PFT vs. FFT) on AD target dataset (10% labels, Fictitious Data). Acc: Accuracy, AUROC: Area Under the Receiver Operating Characteristic Curve, AUPRC: Area Under the Precision-Recall Curve.
  • Figure 4: Impact of Dynamic View Weighting on Performance and Representation Separability on AD target dataset (10% labels, FFT, Fictitious Data). Acc: Accuracy, AUROC: Area Under the Receiver Operating Characteristic Curve, AUPRC: Area Under the Precision-Recall Curve, Rep. Sep. Score: Representation Separability Score.