SelectiveFinetuning: Enhancing Transfer Learning In Sleep Staging Through Selective Domain Alignment

Siyuan Zhao, Chenyu Liu, Yi Ding, Xinliang Zhou

Abstract

Automated sleep staging is essential for diagnosing sleep disorders, yet deep learning models often struggle with domain shift—variations in EEG signals caused by differences in recording equipment, patient demographics, and health status. This paper introduces SelectiveFinetuning, a framework designed to mitigate "negative transfer" by selectively aligning source and target domains. By utilizing a Domain Aligner based on Earth Mover’s Distance (EMD), the system identifies and utilizes only the most relevant source data for fine-tuning. Experiments on cross-dataset benchmarks (SHHS and SleepEDF) demonstrate that SelectiveFinetuning achieves state-of-the-art performance, outperforming traditional adaptation methods by focusing on data quality over quantity.

Introduction

Sleep staging, the process of categorizing sleep into stages such as REM, N1, N2, and N3, is a cornerstone of sleep medicine. While deep learning has significantly improved automated staging, these models are notoriously sensitive to domain shift. When a model trained on a large public dataset (the source) is applied to a different clinical population (the target), the discrepancy in data distributions often leads to negative transfer. In these cases, the model’s attempts to apply source-specific knowledge to the target domain actually degrade performance.

Existing solutions typically require extensive labeled target data—which is costly and time-consuming to acquire—or rely on domain-invariant feature learning that may fail to capture the nuances of specific target distributions. SelectiveFinetuning addresses this by filtering the source data itself, ensuring that only the most representative samples contribute to the model's adaptation.

Methodology

The SelectiveFinetuning framework is built upon three primary pillars: a multi-resolution feature extractor, a common feature space, and an innovative Domain Aligner.

1. Multi-Resolution CNN (MRCNN)

The base architecture employs a Multi-Resolution Convolutional Neural Network (MRCNN). To capture the diverse frequency components of EEG signals, the MRCNN uses two parallel convolutional branches:

  • Wide Kernel Branch: Optimized for low-frequency signals, such as delta waves characteristic of deep sleep.
  • Narrow Kernel Branch: Designed to capture higher-frequency oscillations, such as alpha and theta waves.

2. Common Feature Space

To facilitate effective comparison, the model maps both source and target EEG data into a shared feature representation. This ensures that the subsequent alignment process compares the underlying physiological features rather than raw signal noise or hardware-specific artifacts.

3. The Domain Aligner

The core innovation of this work is the Domain Aligner, which uses Earth Mover’s Distance (EMD) to quantify the similarity between source and target data batches. Unlike standard fine-tuning that uses all available source data, the Domain Aligner operates as follows:

  • Similarity Scoring: It calculates the EMD between a batch of source data and the target domain distribution.
  • Selective Filtering: A similarity threshold ($\tau$) is applied. Only source data batches that exceed this threshold—meaning they are sufficiently similar to the target data—are used for fine-tuning.
  • Reward Mechanism: The system assigns a "reward" to source samples based on their proximity to the target distribution, effectively filtering out the "noisy" or irrelevant data that typically triggers negative transfer.

Experimental Evaluation

The researchers evaluated the framework using two prominent public datasets to simulate real-world cross-dataset transfer:

  • SleepEDF: Comprising 153 recordings from 78 healthy individuals (ages 25–101).
  • SHHS (Sleep Heart Health Study): Including Polysomnography (PSG) recordings from 329 participants.

The primary experimental focus was cross-dataset transfer (e.g., training on SHHS and testing on SleepEDF). This setup mimics clinical scenarios where a pre-trained model must be adapted to a new facility with limited labeled data.

Key Results

SelectiveFinetuning consistently outperformed established baselines, including test-time adaptation methods (TENT, SAR) and multi-source unsupervised domain adaptation (MUDA).

  • SHHS $\rightarrow$ SleepEDF-78: The method achieved 75.2% accuracy and a 73.7 F1-score, representing a ~2% improvement over the next best baseline (TTACS).
  • SHHS $\rightarrow$ SleepEDF-20: The model reached 76.7% accuracy and a 74.9 F1-score.

Visual analysis via T-SNE plots confirmed that the selection process successfully reduced domain mismatch, showing a significantly higher overlap between source and target distributions after the aligner filtered the source data.

Discussion and Limitations

The success of SelectiveFinetuning highlights a shift in transfer learning philosophy: Quality over Quantity. By intentionally discarding source data that does not align with the target, the model learns more robust, task-specific features. Furthermore, the Domain Aligner operates in an unsupervised manner, making it highly practical for clinical settings where expert manual scoring is unavailable.

However, some challenges remain:

  • Threshold Sensitivity: The optimal value for the selection threshold $\tau$ can vary between datasets, and the paper does not yet provide an automated mechanism for threshold optimization.
  • Modality Constraints: The current study focuses on single-channel EEG. Future iterations could benefit from integrating EOG and EMG signals to provide a more holistic view of sleep architecture.
  • Computational Cost: While batch-based processing improves efficiency, calculating EMD for extremely large datasets remains computationally demanding.

Conclusion

SelectiveFinetuning provides a robust solution to the problem of negative transfer in automated sleep staging. By selectively aligning domains through EMD-based filtering, the framework ensures that pre-trained models are fine-tuned only on relevant data, leading to superior performance in diverse clinical environments.

Summary updated

BibTeX
@inproceedings{zhao2025selectivefinetuning,
  author = {Siyuan Zhao and Chenyu Liu and Yi Ding and Xinliang Zhou},
  title = {{SelectiveFinetuning: Enhancing Transfer Learning In Sleep Staging Through Selective Domain Alignment}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2025},
  doi = {10.1109/icassp49660.2025.10888948},
}
Figure