Source-linked AI summary
Towards More Accurate Automatic Sleep Staging via Deep Transfer Learning
Huy Phan, Oliver Y. Chén, Philipp Koch, Zongqing Lu, Ian McLoughlin, Alfred Mertins, Maarten De Vos
TL;DR
Small sleep cohorts and differences between recording setups challenge automatic sleep staging, while collecting labeled data for every setup can be costly or infeasible. The paper derives two sequence-to-sequence networks, trains them on MASS, and finetunes them on target cohorts. Transfer learning improved staging across the target databases and outperformed tested baselines and existing works.
Problem
Sleep staging models face data variability across recording setups and data inefficiency in small cohorts, while collecting labeled data for every setup can be costly or infeasible.
Source: §I · pp. 1–2Method
The approach derives SeqSleepNet+ and DeepSleepNet+ from a generic sequence-to-sequence framework, pretrains them on MASS, and finetunes them on target cohorts.
Source: §I · p. 2, A. The framework · p. 4, B. The derived networks · p. 5Results
Transfer learning improved sleep staging across the target databases and outperformed all tested baselines and existing works.
Source: §I · p. 2, §VI · p. 10Takeaways & Limitations
The approach may improve staging with small cohorts while requiring only a handful of target subjects to be labeled rather than the entire cohort.
Source: §I · p. 2, D. Discussion · p. 10
Abstract
from arXiv · showhide
Background: Despite recent significant progress in the development of automatic sleep staging methods, building a good model still remains a big challenge for sleep studies with a small cohort due to the data-variability and data-inefficiency issues. This work presents a deep transfer learning approach to overcome these issues and enable transferring knowledge from a large dataset to a small cohort for automatic sleep staging. Methods: We start from a generic end-to-end deep learning framework for sequence-to-sequence sleep staging and derive two networks as the means for transfer learning. The networks are first trained in the source domain (i.e. the large database). The pretrained networks are then finetuned in the target domain (i.e. the small cohort) to complete knowledge transfer. We employ the Montreal Archive of Sleep Studies (MASS) database consisting of 200 subjects as the source domain and study deep transfer learning on three different target domains: the Sleep Cassette subset and the Sleep Telemetry subset of the Sleep-EDF Expanded database, and the Surrey-cEEGrid database. The target domains are purposely adopted to cover different degrees of data mismatch to the source domains. Results: Our experimental results show significant performance improvement on automatic sleep staging on the target domains achieved with the proposed deep transfer learning approach. Conclusions: These results suggest the efficacy of the proposed approach in addressing the above-mentioned data-variability and data-inefficiency issues. Significance: As a consequence, it would enable one to improve the quality of automatic sleep staging models when the amount of data is relatively small. The source code and the pretrained models are available at http://github.com/pquochuy/sleep_transfer_learning.
I. INTRODUCTION
Automatic sleep staging faces data variability across recording setups and data inefficiency in small cohorts, while gathering labeled data for every setup can be costly or infeasible. The paper uses source-domain pretraining and target-domain finetuning to study whether transfer learning can address these challenges.
I. INTRODUCTION
- Recording hardware, processing pipelines, channel layouts, and cohort differences create domain mismatch that can reduce accuracy on unseen sleep data.Deep sleep-staging models also perform less well when trained on small cohorts, which are common in practice.Source: §I · pp. 1–2
- Collecting labeled data across all foreseeable recording setups is expensive, time-consuming, and sometimes infeasible.Large sleep databases may be proprietary, manual scoring requires substantial effort, and novel setups may emerge.Source: §I · p. 2
- The approach trains a sleep-staging network on a large source database, then finetunes it on a small target cohort with a different setup.Finetuning further trains part or all of the pretrained network using target-domain data.Source: §I · p. 2
- The study derives SeqSleepNet+ and DeepSleepNet+ from a generic sequence-to-sequence framework and examines how target-subject count affects transfer performance.It also covers multiple target domains with varying channel mismatch and compares distinct network architectures.Source: §I · p. 2
- Transfer learning outperformed all tested baselines and existing works on the target sleep databases.The study varies target domains, input-channel scenarios, finetuning strategies, and model architectures.Source: §I · p. 2
II. MATERIALS
MASS is the 200-subject source database, and the target datasets span traditional PSG recordings and wearable around-the-ear EEG with differing degrees of mismatch. The materials describe each cohort, its selected signals, and the Surrey-cEEGrid recording choices.
A. Source Domain
- MASS supplied whole-night recordings from 200 subjects, with C4-A1 EEG, ROC-LOC EOG, and CHIN1-CHIN2 EMG used as source signals.Annotations from AASM and R&K standards were converted to five sleep stages.Source: A. Source Domain · p. 2
B. Target Domains
- The target domains span healthy Sleep-EDF-SC, mild-sleep-difficulty Sleep-EDF-ST, and wearable around-the-ear Surrey-cEEGrid recordings.Sleep-EDF-SC had 20 subjects and used in-bed epochs, with N3/N4 merged and movement/unknown categories excluded; Sleep-EDF-ST had 22 subjects and only placebo nights available.Source: B. Target Domains · p. 3
- Surrey-cEEGrid retained 12 of 20 participants after eight recordings were lost or discarded, using the best FB(R) derivation and deliberately mismatched added PSG channels.ROC-A2 EOG and CHIN1-CHIN3 EMG were added for simulated two- and three-channel settings to maintain mismatch with the source domain.Source: B. Target Domains · p. 3
- The datasets range from slight mismatch in the Sleep-EDF PSG signals to severe mismatch from Surrey-cEEGrid’s new electrode placement.All signals were downsampled to 100 Hz.Source: B. Target Domains · p. 3
III. THE GENERIC DEEP LEARNING FRAMEWORK FOR SEQUENCE-TO-SEQUENCE SLEEP STAGING
The framework casts sleep staging as sequence-to-sequence classification, processing consecutive epochs together. It combines shared epoch-level features, bidirectional sequence modeling, and classification across sequence indices.
III. THE GENERIC DEEP LEARNING FRAMEWORK FOR SEQUENCE-TO-SEQUENCE SLEEP STAGING
- Sequence-to-sequence staging processes multiple consecutive epochs simultaneously and classifies them as a corresponding sequence of sleep stages.The framework formulates the task as maximizing the conditional probability of the stage sequence given the input epochs.Source: §III · p. 3, A. The framework · p. 3
A. The framework
- The tied EPB learns and extracts an epoch-wise feature vector from each input epoch, using shared processing across the sequence.Epoch inputs may be raw signals or time-frequency features, with single- or multi-channel inputs.Source: A. The framework · p. 4, Figure 2 · p. 4
- A bidirectional recurrent SPB encodes epoch features into sequence-level output vectors, with its hidden function implemented by LSTM or GRU.The optional residual connection can combine epoch-wise and sequence-wise features for classification.Source: A. The framework · p. 4
- A shared softmax layer produces sleep-stage probabilities at every sequence index, reducing parameters compared with separate index-specific softmax layers.Training minimizes sequence classification loss with an ℓ2-norm regularization term.Source: A. The framework · p. 4
B. The derived networks
The framework yields two transfer-learning base networks with different input representations and epoch- and sequence-processing designs. Their architectural differences are expected to produce different transfer-learning behavior.
B. The derived networks
- SeqSleepNet+ uses log-scale time-frequency inputs, filterbank layers, and an attentional biRNN in its EPB; its shared softmax makes it more compact than SeqSleepNet.Its recurrent layers use GRU cells, and its SPB has no residual connection.Source: B. The derived networks · pp. 4–5
- DeepSleepNet+ takes raw signals and uses a two-branch, four-layer-per-branch CNN EPB with different kernel sizes for fine- and coarse-resolution features.Its SPB uses two stacked bidirectional LSTM layers and a residual connection; the shared softmax distinguishes it from DeepSleepNet.Source: B. The derived networks · p. 5
- Because the networks differ in input, EPB, and SPB design, the paper expects them to behave differently during transfer learning.Source: B. The derived networks · p. 5
IV. TRANSFER LEARNING SCENARIOS FOR AUTOMATIC SLEEP STAGING ON SMALL COHORTS
The study transfers sleep-staging knowledge by pretraining on a source domain and adapting selected network parameters with target-domain data. It examines same- and cross-modality channel scenarios, with target-domain adaptation choices varying across pretrained model components.
IV. TRANSFER LEARNING SCENARIOS FOR AUTOMATIC SLEEP STAGING ON SMALL COHORTS
- Transfer learning uses source-domain information to improve target-domain sleep staging, where the task is shared but the domains differ.The source and target domains may differ in feature space or data distributions; both use the same sleep-staging task.Source: §IV · p. 5
- A model is pretrained by minimizing source-domain loss, then a selected subset of its parameters is finetuned on target data while the rest remains fixed.Finetuning may involve the entire network or no parameters, the latter corresponding to direct use of the pretrained model.Source: §IV · p. 5
- Four target-adaptation strategies update all parameters, EPB plus softmax, SPB plus softmax, or softmax alone; direct transfer without finetuning is the baseline.The chosen parameter subset is adapted using target-domain data while the remaining parameters are reused unchanged.Source: §IV · p. 5
- The scenarios cover three-channel EEG·EOG·EMG, two-channel EEG·EOG, single-channel EEG and EOG, and cross-modality EEG-to-EOG transfer.The three-channel scenario applies where all three recordings are available; the cross-modality scenario tests transfer from EEG-trained models to target EOG.Source: §IV · pp. 5–6
- The cross-modality EEG-to-EOG case is intended to test transfer under heavier data mismatch than same-modality scenarios.Same-modality scenarios also examine whether transfer remains useful despite differences such as recording devices or electrode placements.Source: §IV · p. 6
A. Experimental Setup
The pretrained networks were evaluated on three small target cohorts using cross-validation, with held-out subjects used for testing and validation.
A. Experimental Setup
- SeqSleepNet+ and DeepSleepNet+ were pretrained on all 200 MASS subjects, then finetuned in each target domain and evaluated by cross-validation.The target domains were Sleep-EDF-SC, Sleep-EDF-ST, and Surrey-cEEGrid.Source: A. Experimental Setup · p. 6
- Leave-one-out cross-validation used 20 Sleep-EDF-SC subjects and 12 Surrey-cEEGrid subjects; Sleep-EDF-ST used 11 folds across 22 subjects.The Sleep-EDF-ST fold design yielded two test subjects per fold.Source: A. Experimental Setup · p. 6
- At each fold, validation subjects were randomly selected for early stopping: four in each Sleep-EDF subset and two in Surrey-cEEGrid.Performance was calculated across all cross-validation folds.Source: A. Experimental Setup · p. 6
B. Network Parameters
The networks use overlapping epoch sequences for training and testing, are pretrained and finetuned with Adam, and are evaluated with a subject-level source-domain cross-validation protocol.
B. Network Parameters
- Input sequences contain 20 epochs and advance by one epoch; testing aggregates 20 overlapping sequence decisions probabilistically for each epoch.The networks were implemented in TensorFlow.Source: B. Network Parameters · p. 6
- Source pretraining and target finetuning each run for 10 epochs, with finetuning stopped early after 50 validation steps without accuracy improvement.Both stages use Adam with an initial learning rate of 10^-4 and minibatches of 32 sequences for source pretraining.Source: B. Network Parameters · p. 6
C. Experimental Results
- Source-domain results pool 10-fold cross-validation, with 180 subjects for training, 10 for validation, and 10 for testing per fold.Overall metrics include accuracy, macro F1-score, and Cohen’s kappa.Source: 1) Performance on the source domain · p. 6
1) Performance on the source domain:
Transfer learning improves target-domain sleep staging compared with training from scratch across the tested networks, domains, and scenarios. The results also show that effective finetuning strategies differ between the two networks.
1) Performance on the source domain:
- On MASS, adding EOG and EMG to EEG improves staging, while standalone EOG performs only marginally below standalone EEG.The source-domain comparison reports this pattern for both SeqSleepNet+ and DeepSleepNet+.Source: Table III · p. 6, 1) Performance on the source domain · p. 7
2) The effect of transfer learning on the target domains:
- SeqSleepNet+ benefits from finetuning feature-learning components in addition to softmax across the reported cases; softmax alone beats scratch only in some cases.The feature-learning components are the EPB and SPB, which can be finetuned separately or together.Source: Figure 5 · p. 7, 2) The effect of transfer learning on… · p. 7
- DeepSleepNet+ shows scenario-dependent results: softmax-only finetuning can match or exceed other strategies for EEG-to-EEG, but feature-learning finetuning is needed across modalities.Despite feature persistence across domains, DeepSleepNet+ finetuning results are inferior to SeqSleepNet+ in Table IV.Source: Figure 6 · p. 7, 2) The effect of transfer learning on… · p. 7
- Transfer learning consistently improves on scratch models across network types, target domains, and transfer scenarios.The paper compares representative finetuned models with scratch and direct-transfer baselines across target domains and scenarios.Source: 2) The effect of transfer learning on… · pp. 7–8
- Except for softmax-only finetuning, SeqSleepNet+ curves show better generalization and faster convergence than scratch; DeepSleepNet+ softmax-only generalizes comparably but converges slower.The curves average results across cross-validation folds; shorter folds were padded before averaging.Source: Figure 7 · p. 8, 2) The effect of transfer learning on… · p. 8
3) Performance comparison on the target domains:
Finetuned transfer-learning systems outperform prior work across the target databases, while direct transfer often performs poorly and gains vary by model, dataset, and input modality.
3) Performance comparison on the target domains:
- Finetuning improved accuracy over scratch training across datasets, with average gains ranging from 1.4% to 10.9%, and EEG-to-EOG transfer yielded average gains of 1.0% for SeqSleepNet+ and 7.4% for DeepSleepNet+.SeqSleepNet+ outperformed DeepSleepNet+ in most cases, including by 0.8%, 1.5%, and 7.7% in transfer-learning accuracy on Sleep-EDF-SC, Sleep-EDF-ST, and Surrey-cEEGrid.Source: 3) Performance comparison on the… · p. 8
- Direct transfer was often suboptimal: compared with finetuning, accuracy was lower by 10.3%, 5.7%, and 62.2% for SeqSleepNet+ and 16.8%, 9.1%, and 32.6% for DeepSleepNet+ across the three targets.The largest gaps occurred under heavy mismatch, including EEG7→EOG and EEG7→EEG on Surrey-cEEGrid.Source: 3) Performance comparison on the… · p. 8
- Transfer-learning systems set state-of-the-art performance on all three target databases, although DeepSleepNet+ dropped 11.8% on single-channel Surrey-cEEGrid versus while gaining 5.8% with two-channel EEG·EOG.The comparison table notes that prior-work evaluations may differ in experimental setup.Source: 3) Performance comparison on the… · p. 8, Table IV · p. 9, GMM [65]‡ · p. 10
GMM [65]‡
- On Sleep-EDF-SC, transfer-learning SeqSleepNet+ reached 84.3% accuracy with two-channel EEG·EOG and 85.2% with single-channel EEG, gaining 2.0% and 3.2% over the respective best non-transfer systems.Those reference systems were Multitask 1-max CNN at 82.3% and DeepSleepNet at 82.0%, respectively.Source: 3) Performance comparison on the… · p. 8, GMM [65]‡ · p. 9, Table IV · p. 9
- The subject-count experiment used 25% of each target cohort for testing and finetuned pretrained models for 500 steps, adding two subjects per iteration from an initial one.The comparison considered EEG·EOG7→EEG·EOG with entire-network finetuning.Source: 4) Influence of the number of… · p. 10
4) Influence of the number of finetuning subjects:
The learning-curve analysis suggests that the number and selection of finetuning subjects affect generalization differently across networks and target cohorts.
4) Influence of the number of finetuning subjects:
- More finetuning subjects generally supported more generalizable feature-learning solutions when adaptation was needed, while less data could lead to subject-specific overfitting.The authors speculate that around 11–13 subjects may suffice for a generalizable solution in those cases.Source: 4) Influence of the number of… · p. 10
- The number of finetuning subjects had a strong impact on SeqSleepNet+ curves, but a less noticeable effect on DeepSleepNet+ except on Surrey-cEEGrid.The authors relate the difference to whether each model’s feature-learning parts need adaptation to the target domain.Source: 4) Influence of the number of… · p. 10
- Sleep-EDF-ST curves were irregular, which the authors relate to its broad 18–79 age range and the possibility that an age-distant subject can hurt rather than help finetuning.They identify selecting the most beneficial subjects as a topic for further study.Source: 4) Influence of the number of… · p. 10
D. Discussion
The discussion presents transfer learning as a practical way to reduce labeling and training burdens, while noting that validation still requires subject data.
D. Discussion
- Finetuning may also benefit larger cohorts by requiring labels for only a handful of subjects and converging faster than training from scratch.The pretrained model has already reached reasonable accuracy and can converge after a few additional finetuning epochs.Source: D. Discussion · p. 10
- Validation still requires data from some subjects; the authors identify regularization such as Kullback–Leibler divergence as future work to remove that requirement.Source: D. Discussion · p. 10
VI. CONCLUSION
- The conclusion reports significant gains over target-only scratch models across learning cases, with SeqSleepNet+ more consistent and stable and outperforming DeepSleepNet+ in most transfer experiments.Overall, a small number of finetuning subjects was sufficient for the networks to converge to a generalizable solution.Source: §VI · p. 10