Introduction
Sleep staging is a fundamental task in diagnosing sleep disorders, traditionally requiring clinicians to manually categorize 30-second epochs of Polysomnography (PSG) data into stages such as Wake (W), REM (R), and Non-REM (NR1-3). While deep learning models can automate this process, they typically demand massive amounts of expert-labeled EEG data to achieve high accuracy. Self-Supervised Learning (SSL) has emerged as a solution to data scarcity, yet previous methods often encounter a "saturation" problem where performance gains diminish as more labeled data becomes available. This paper addresses these challenges by proposing a Transformer-based architecture pre-trained with a novel temporal pretext task.
Methods: Masked Patch Position Prediction (MP3)
The authors move away from hybrid CNN-Attention models in favor of a pure Transformer architecture. This choice is strategic: because Transformers use consistent blocks for both local feature extraction and global temporal modeling, pre-training the entire model updates the full system simultaneously. This addresses the hypothesis that previous SSL failures were due to only pre-training the "feature encoder" (local signal shapes) rather than the "temporal encoder" (the sequence of events over time).
The core of their approach is the Masked Patch Position Prediction (MP3) pretext task. In this self-supervised phase, a 30-second EEG signal is divided into discrete "patches" or tokens. These patches are then shuffled, and a subset is masked. The model is tasked with predicting the original sequence of these shuffled and hidden patches. By solving this "jigsaw puzzle" for EEG, the model learns the underlying temporal structure and "language" of sleep signals before any human labels are introduced.
Experimental Setup
The study utilized the PhysioNet 2018 Challenge dataset, comprising PSG recordings from 993 subjects at Massachusetts General Hospital. The data was split into training (657 subjects), validation (219), and testing (117) sets. The researchers focused on the F3-M2 EEG channel, downsampled to 100 Hz, to classify the five standard sleep stages. The model architecture featured an encoder depth of 6 with 8 attention heads and a feedforward dimension of 2048.
Key Results and Performance
The pre-trained (PT) model consistently outperformed models trained from scratch across all data regimes. Notably, the PT model maintained a 3-5% improvement in balanced accuracy even as the amount of labeled data increased, effectively overcoming the saturation plateau seen in prior SSL research.
As shown in the results, a PT model using only 10% of the labeled data (approximately 65 subjects) achieved a balanced accuracy of 0.70, nearly matching the 0.71 accuracy of a "from scratch" model using 100% of the labeled data. This represents a significant reduction in the labeling burden, potentially saving researchers from the manual effort of labeling hundreds of additional subjects. Furthermore, the PT model showed marked improvements in difficult-to-distinguish classes like Wake and REM; for example, at the 10% data level, the REM F1-score improved from 0.58 to 0.69 with pre-training.
Conclusion
By pre-training the entire Transformer architecture using the MP3 task, the researchers demonstrated that temporal context is as vital as local signal morphology for sleep staging. This approach not only improves label efficiency but also scales effectively with additional unlabeled data—increasing pre-training data by 100x boosted balanced accuracy from 0.52 to 0.63 in the lowest-labeled-data setting. Future work may involve exploring hybrid architectures or testing the generalizability of this method on diverse hardware, such as consumer-grade wearables.
Summary updated