Multi-View Contrastive Learning for Robust Domain Adaptation in Medical Time Series Analysis

YongKyung Oh, Alex A. T. BuiCHIL 2025

Abstract

Medical time series analysis often suffers from domain shift, where models trained on specific patient cohorts or devices fail to generalize to new environments. This paper presents a multi-view contrastive learning framework that integrates temporal, derivative, and spectral features through a hierarchical fusion mechanism. By capturing diverse signal dynamics, the proposed method achieves state-of-the-art performance in cross-domain knowledge transfer across EEG, ECG, and EMG datasets.

Introduction

Machine learning models for physiological signals, such as brain activity (EEG) or heart rhythms (ECG), frequently encounter the "domain shift" problem. Variations in sensor placement, sampling rates, and patient demographics across different clinical settings often lead to significant performance degradation when a model is deployed outside its training environment. Traditional methods typically rely on a single data representation—such as the raw signal or the frequency spectrum—which may fail to capture the complex, multi-scale dynamics inherent in medical time series.

Methodology

The proposed framework addresses domain shift through a two-stage process: multi-view contrastive pre-training followed by fine-tuning with hierarchical fusion.

Multi-View Feature Extraction

The architecture employs three parallel Transformer-based encoders to extract distinct "views" of the input signal:

  • Temporal View ($E_t$): Captures raw patterns and long-term trends.
  • Derivative View ($E_d$): Utilizes finite difference interpolation to model local dynamics and the velocity of signal changes.
  • Frequency View ($E_f$): Employs Fast Fourier Transforms (FFT) to extract global spectral characteristics.

Hierarchical Fusion and Contrastive Learning

During pre-training on a large source dataset, an InfoNCE loss is used to learn domain-invariant features. A key innovation is the Hierarchical Fusion mechanism, which uses Multi-Head Attention (MHA) and residual connections to dynamically weigh the importance of each view for a given data segment. This allows the model to prioritize the most relevant features (e.g., frequency components for oscillatory signals) during the classification process.

Overview of the multi-view contrastive learning architecture, illustrating the three-pronged feature extraction and hierarchical fusion mechanism.

Experimental Setup

The framework was evaluated on a diverse set of medical and industrial datasets. Pre-training was conducted on large-scale datasets like SleepEEG (371k samples) and ECG. The model was then fine-tuned on target tasks including epilepsy detection, muscle activity (EMG) analysis, and gesture recognition. An industrial benchmark (FD) was also included to test generalizability.

Summary of datasets used for evaluation, including sample counts, channel information, and representative time-series plots for each domain.

Key Results

The multi-view approach consistently outperformed existing state-of-the-art (SOTA) benchmarks such as TF-C, SimMTM, and TS-TCC:

  • Superior Accuracy: In a direct transfer from SleepEEG to Epilepsy detection, the model achieved an F1 score of 0.931, surpassing the previous SOTA.
  • Robust Transfer: On the FD industrial dataset, the model improved the benchmark F1 score from 0.751 to 0.867.
  • Data Efficiency: The framework demonstrated high efficiency, showing performance gains even when pre-trained on only 1% of the source data.

Ablation studies confirmed that hierarchical fusion via attention mechanisms is superior to simple feature concatenation, as it allows the model to exploit the unique label-relevant information present in different signal views.

Conclusion and Future Work

By combining temporal, derivative, and frequency perspectives, this multi-view framework provides a robust solution for domain adaptation in medical time series. While the use of three parallel encoders increases computational complexity, optimizations like Automatic Mixed Precision (AMP) help mitigate this overhead. Future work will explore multi-source pre-training to develop more universal foundation models for clinical signal analysis and the integration of advanced methods like Neural ODEs for irregularly sampled data.

Summary updated

BibTeX
@inproceedings{oh2025multi,
  author = {YongKyung Oh and Alex A. T. Bui},
  title = {{Multi-View Contrastive Learning for Robust Domain Adaptation in Medical Time Series Analysis}},
  booktitle = {CHIL},
  year = {2025},
  doi = {10.48550/arxiv.2506.22393},
}
Figure