[Paper Review] Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
COMET is a self-supervised, hierarchical contrastive learning framework that leverages observation, sample, trial, and patient levels in medical time series to learn robust representations, especially under low-label regimes.
Contrastive representation learning is crucial in medical time series analysis as it alleviates dependency on labor-intensive, domain-specific, and scarce expert annotations. However, existing contrastive learning methods primarily focus on one single data level, which fails to fully exploit the intricate nature of medical time series. To address this issue, we present COMET, an innovative hierarchical framework that leverages data consistencies at all inherent levels in medical time series. Our meticulously designed model systematically captures data consistency from four potential levels: observation, sample, trial, and patient levels. By developing contrastive loss at multiple levels, we can learn effective representations that preserve comprehensive data consistency, maximizing information utilization in a self-supervised manner. We conduct experiments in the challenging patient-independent setting. We compare COMET against six baselines using three diverse datasets, which include ECG signals for myocardial infarction and EEG signals for Alzheimer's and Parkinson's diseases. The results demonstrate that COMET consistently outperforms all baselines, particularly in setup with 10% and 1% labeled data fractions across all datasets. These results underscore the significant impact of our framework in advancing contrastive representation learning techniques for medical time series. The source code is available at https://github.com/DL4mHealth/COMET.
Motivation & Objective
- Address the label scarcity in medical time series analysis.
- Leverage the full hierarchical structure of medical time series (observation, sample, trial, patient).
- Develop multi-level contrastive losses and an overall flexible training objective.
- Demonstrate improvements in downstream tasks under patient-independent settings across EEG/ECG datasets.
Proposed method
- Define four data levels: observation, sample, trial, and patient for contrastive learning.
- Design four corresponding contrastive blocks with level-specific positive/negative pairs.
- Introduce level-specific losses: L_O (observation), L_S (sample), L_R (trial), L_P (patient).
- Combine them into a single loss L = λ1 L_O + λ2 L_S + λ3 L_R + λ4 L_P with tunable λs.
- Use a shared encoder G and augmentation strategies to generate positive pairs across levels.
- Enable/disable any level by setting its λ to zero, enabling flexible adaptation to datasets.

Experimental results
Research questions
- RQ1Can a hierarchical contrastive framework effectively utilize all levels of medical time series (observation, sample, trial, patient) for self-supervised pre-training?
- RQ2Does COMET improve downstream performance under limited labeled data, across different diseases and modalities (EEG/ECG)?
- RQ3How do observation- and sample-level primaries interact with higher-level (trial/patient) consistency in representation learning?
- RQ4Is patient-independent evaluation feasible and beneficial for validating robustness across subjects?
Key findings
- COMET consistently outperforms six baselines across three datasets in a patient-independent setting.
- On EEG-based Alzheimer’s detection, COMET achieves 14% and 13% higher F1 scores than SOTA baselines at 10% and 1% labeled data, respectively.
- On myocardial infarction detection with ECG, COMET surpasses SOTA by 0.17% and 2.66% F1 at 10% and 1% labels, respectively.
- On EEG-based Parkinson’s disease diagnosis, COMET achieves 2% and 8% higher F1 scores at 10% and 1% labels, respectively.
- In full fine-tuning with limited labels (10% and 1%), COMET outperforms the best baselines by substantial margins on multiple datasets.
- COMET demonstrates stability and effectiveness of its multi-level, self-supervised pre-training strategy across diverse medical time-series tasks.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.