Automatic Sleep Stage Scoring with Single-Channel EEG Using Convolutional Neural Networks

Orestis Tsinalis, Paul M. Matthews, Yike Guo, Stefanos ZafeiriouarXiv 2016

Abstract

We used convolutional neural networks (CNNs) for automatic sleep stage scoring based on single-channel electroencephalography (EEG) to learn task-specific filters for classification without using prior domain knowledge. We used an openly available dataset from 20 healthy young adults for evaluation and applied 20-fold cross-validation. We used class-balanced random sampling within the stochastic gradient descent (SGD) optimization of the CNN to avoid skewed performance in favor of the most represented sleep stages. We achieved high mean F1-score (81%, range 79-83%), mean accuracy across individual sleep stages (82%, range 80-84%) and overall accuracy (74%, range 71-76%) over all subjects. By analyzing and visualizing the filters that our CNN learns, we found that rules learned by the filters correspond to sleep scoring criteria in the American Academy of Sleep Medicine (AASM) manual that human experts follow. Our method's performance is balanced across classes and our results are comparable to state-of-the-art methods with hand-engineered features. We show that, without using prior domain knowledge, a CNN can automatically learn to distinguish among different normal sleep stages.

Introduction

Sleep stage scoring is a fundamental diagnostic tool in sleep medicine, essential for identifying disorders and monitoring neurological health. Traditionally, this process involves a Polysomnogram (PSG) recording multiple physiological signals, followed by a labor-intensive manual classification of 30-second "epochs" by human experts into five stages: Wake (W), N1, N2, N3 (Deep Sleep), and REM.

This manual approach is expensive, time-consuming, and prone to inter-scorer variability. While automated solutions have been proposed, they typically rely on "hand-engineered" features—mathematical descriptors designed by experts based on prior domain knowledge. This study investigates whether a Convolutional Neural Network (CNN) can perform end-to-end learning, discovering discriminative features directly from raw, single-channel EEG signals without human-designed descriptors.

Methodology

The researchers developed a specialized CNN architecture designed to process one-dimensional biosignals while maintaining temporal context.

Architecture

The model utilizes a hybrid 1D/2D structure. It begins with a 1D convolutional layer to extract local features from the raw signal. A "stacking layer" then reshapes these features into a 2D format, enabling subsequent 2D convolutional layers to capture complex relationships across different filtered versions of the signal. To mimic the decision-making process of human experts, the model processes a 150-second window (the target epoch plus two preceding and two succeeding epochs) rather than an isolated 30-second segment.

The CNN architecture includes 1D convolutional layers, a stacking layer, and 2D convolutional layers to process EEG signals.

Class Balancing and Interpretability

Sleep data is naturally imbalanced; for instance, subjects spend significantly more time in N2 than in N1. To prevent the model from biasing toward majority classes, the authors employed class-balanced random sampling during training. Furthermore, the study focused on the interpretability of the learned filters to ensure they align with clinical standards, such as the American Academy of Sleep Medicine (AASM) manual.

Dataset

The study utilized the PhysioNet Sleep-EDF dataset, featuring recordings from 20 healthy young adults. Analysis was restricted to a single EEG channel (Fpz-Cz). Following modern AASM guidelines, stages N3 and N4 were merged into a single N3 stage.

Results and Discussion

The CNN achieved an overall accuracy of 74% and a mean F1-score of 81%. Performance varied by stage, with N3 (Deep Sleep) being the most accurately classified (91%) and N1 (Light Sleep) being the most challenging (60%), consistent with the difficulties human experts face in distinguishing N1 from Wake or REM.

Clinical Alignment

Visualization of the learned filters revealed that the CNN independently discovered established clinical markers. The network developed filters tuned to 1–1.5 Hz (delta waves characteristic of deep sleep) and 13–14.5 Hz (sleep spindles characteristic of N2). Interestingly, the model learned to ignore the 10.5–12 Hz band where alpha waves and spindles overlap, suggesting it prioritized frequencies with higher discriminative power.

Robustness and Temporal Consistency

The model's performance remained stable regardless of individual variations in sleep efficiency or the frequency of stage transitions. The inclusion of temporal context allowed the system to better navigate ambiguous transitions between stages.

Comparison of ground truth hypnogram (top) and the CNN-estimated hypnogram (bottom) for a single subject.

Conclusion

This research demonstrates that a CNN can effectively automate sleep staging using only a single channel of raw EEG data, matching the performance of systems using complex hand-engineered features. By eliminating the need for manual feature design, this approach simplifies the development of automated scoring systems.

However, the reliance on a single EEG channel limits the model's ability to perfectly distinguish between N1 and REM, which typically requires EOG and EMG data. Future work should focus on validating this architecture on larger, more diverse datasets, including patients with clinical sleep disorders like apnea or insomnia, to ensure its generalizability across broader populations.

Summary updated

BibTeX
@misc{tsinalis2016automatic,
  author = {Orestis Tsinalis and Paul M. Matthews and Yike Guo and Stefanos Zafeiriou},
  title = {{Automatic Sleep Stage Scoring with Single-Channel EEG Using Convolutional Neural Networks}},
  year = {2016},
  eprint = {1610.01683},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1610.01683},
}
Figure