Sleep stage classification based on multi-level feature learning and recurrent neural networks via wearable device

Xin Zhang, Weixuan Kou, Eric I-Chao Chang, He Gao, Yubo Fan, Yan Xu

TL;DR

Researchers have developed a new way to track sleep stages using only a wearable device (like a fitness band) by combining multi-level feature learning with Bidirectional Long Short-Term Memory (BLSTM) networks. By treating heart rate and movement data as a "vocabulary" of sleep patterns, the system achieves significantly better accuracy than traditional hand-engineered methods, moving us closer to clinical-grade sleep monitoring at home.

What Problem Does This Paper Address?

The "gold standard" for sleep analysis is Polysomnography (PSG), which requires patients to sleep in a lab hooked up to dozens of wires measuring brain waves (EEG), eye movement (EOG), and muscle activity (EMG). It’s expensive, uncomfortable, and often results in "first-night effect" where the patient doesn't sleep naturally.

While consumer wearables (wristbands) are much more convenient, they usually rely on heart rate variability (HRV) and movement (actigraphy). The challenge is that these signals are "noisy" and less informative than brain waves. Most existing algorithms for wearables rely on "hand-engineered" features—specific mathematical shortcuts designed by experts—which often fail to capture the complex, sequential nature of sleep or generalize across different people.

Methods

The authors propose a two-phase framework:

  1. Multi-level Feature Learning: Instead of just looking at raw heart rate, they extract low-level features (using Discrete Cosine Transforms and Cepstral analysis) and then feed them into a mid-level feature extractor. They use a "Bag-of-Words" (BoW) approach: they cluster signal patterns into a "dictionary" of sleep compositions. This allows the model to recognize structural patterns in the data without needing a human to define them.
  2. BLSTM Classification: Sleep is inherently sequential—you don't just jump randomly between stages. The researchers used a Bidirectional Long Short-Term Memory (BLSTM) network. Unlike standard neural networks, BLSTMs can "remember" information from both the past and the future (the epochs before and after the current one) to help classify the current sleep stage.

Datasets

The study involved 40 healthy subjects (30 male, 10 female) aged 19–64.

  • The Hardware: Data was collected using a Microsoft Band 1 (heart rate and triaxial actigraphy) synchronized with a professional PSG system for ground truth labels.
  • The Scenarios: To test real-world robustness, they split the data into a Resting group (normal sleep) and a Comprehensive group (where subjects performed vigorous exercise 1-2 hours before bed). This is crucial because exercise significantly alters heart rate patterns, often confusing simpler sleep trackers.

Key Insights and Ideas

  • Sleep as a Language: The most innovative part is the "Bag-of-Words" application to physiological signals. By treating specific heart rate/movement patterns as "words," the model can identify the "grammar" of a sleep stage.
  • Context Matters: The jump from standard RNNs to Bidirectional LSTMs was a major win. Because sleep stages (like the transition from N2 to REM) have distinct "lead-in" and "wind-down" patterns, looking at the data in both directions provides a much clearer picture than looking at a single 30-second window in isolation.
  • Robustness to Exercise: Many heart-rate-based trackers fail if your baseline is elevated by evening exercise. This model maintained its performance in the "Comprehensive" group, suggesting that the multi-level features are capturing the structure of the signal rather than just the absolute heart rate.

Key Results

The model was evaluated on a 5-stage classification (Wake, N1, N2, N3, and REM):

  • Performance: The proposed algorithm achieved a weighted F1 score of 58.2% for the resting group and 58.5% for the comprehensive group.
  • Superiority: It consistently outperformed traditional baselines (like Random Forest models using hand-engineered HRV features) which hovered around 43-46% F1 scores.
  • Architecture Wins: The researchers found that BLSTMs significantly outperformed standard LSTMs and Multi-Layer Perceptrons (MLP), proving that the temporal "memory" of the network is vital for sleep staging.

Limitations and Future Work

  • Healthy Cohort: The study was limited to healthy individuals. Sleep signals change drastically in patients with apnea, insomnia, or narcolepsy. The authors note that the model needs to be tested on clinical populations.
  • The "N1" Challenge: Like almost all sleep staging algorithms (including human experts), the model struggled with the N1 stage (light sleep), which is notoriously difficult to distinguish from wakefulness or N2 using only heart rate and movement.
  • Dataset Size: While 40 subjects is decent for a pilot, deep learning models typically thrive on thousands of examples. Future work would benefit from larger, more diverse datasets to further refine the "dictionary" of sleep patterns.

Summary updated

BibTeX
@article{zhang2018sleep,
  author = {Xin Zhang and Weixuan Kou and Eric I-Chao Chang and He Gao and Yubo Fan and Yan Xu},
  title = {{Sleep stage classification based on multi-level feature learning and recurrent neural networks via wearable device}},
  journal = {Computers in Biology and Medicine},
  year = {2018},
  doi = {10.1016/j.compbiomed.2018.10.010},
}
Figure