A Structured Learning Approach with Neural Conditional Random Fields for Sleep Staging

Karan Aggarwal, Swaraj Khadanga, Shafiq R. Joty, Louis Kazaglis, Jaideep Srivastava

TL;DR

This paper introduces a novel end-to-end deep learning framework that uses CPAP machine airflow data to automatically stage sleep. By combining convolutional neural networks (CNNs) for feature extraction, recurrent neural networks (RNNs) for temporal context, and conditional random fields (CRFs) to model sleep stage transitions, the model achieves improved accuracy and offers a practical solution for monitoring sleep apnea patients undergoing CPAP therapy.

What Problem Does This Paper Address?

Sleep is crucial for overall health, and sleep disorders like sleep apnea are on the rise. Continuous Positive Airway Pressure (CPAP) therapy is a common treatment for sleep apnea, but current methods lack a way to effectively monitor a patient's progress and sleep quality using the data generated by CPAP machines. Accurately determining sleep stages from the airflow signal provided by CPAP devices is key to developing such a monitoring system. Existing deep learning approaches for sleep staging often focus solely on extracting features from the input signal, neglecting the inherent temporal dynamics and transition structures between sleep stages, which can lead to suboptimal performance.

Methods

The authors propose a novel Neural CRF (CNN-RNN-CRF) architecture trained end-to-end. Here's a breakdown:

  • Convolutional Neural Network (CNN): A ResNet-inspired CNN is used to extract high-level, abstract features from the raw nasal airflow signal. This replaces the need for manual feature engineering.
  • Recurrent Neural Network (RNN): Gated Recurrent Units (GRUs) are employed to process the features extracted by the CNN, capturing the temporal context and dynamics of the airflow signal over time.
  • Conditional Random Field (CRF): This is the core innovation. A linear-chain CRF layer is added on top of the RNN. Unlike previous methods that predict sleep stages independently at each time step, the CRF explicitly models the temporal transition structure between sleep stages. This allows it to leverage the fact that certain sleep stage transitions are more probable than others, leading to more consistent and accurate predictions.
  • Cost-Sensitive Prior: To address the imbalanced distribution of sleep stages (where REM and Deep sleep are less frequent), a cost-sensitive prior is incorporated. This gives more weight to under-represented classes during training, improving their detection.
  • Regularization: L1 regularization is applied to the CRF parameters to promote sparsity.

Datasets

The study utilizes the nasal airflow pressure channel data from the Multi-Ethnic Study of Atherosclerosis (MESA) dataset. This dataset consists of PSG data from 400 randomly sampled sleep apnea patients. The flow signal is sampled at 32 Hz, and sleep stages are annotated in contiguous 30-second epochs. The dataset includes five original sleep stages (wake, REM, N1, N2, N3/4), which are then consolidated into four stages for this study: Wake, REM, Light (N1+N2), and Deep (N3/4).

Key Insights and Ideas

  • Modeling Sleep Stage Dynamics is Crucial: The paper strongly emphasizes that simply extracting good features isn't enough. The inherent sequential nature and transition probabilities between sleep stages are vital sources of information that previous methods overlooked. The CRF layer effectively captures this.
  • CPAP Flow Data is Sufficient for Sleep Staging: This work demonstrates for the first time that automated sleep staging can be achieved using only the nasal airflow signal from CPAP devices, eliminating the need for more complex polysomnography (PSG) equipment for monitoring.
  • Cost-Sensitive Learning for Imbalanced Data: The significant under-representation of REM and Deep sleep stages is a common challenge. The paper shows that a cost-sensitive prior is an effective strategy to improve the detection of these critical stages.
  • Practical Application for CPAP Monitoring: The proposed model has a direct and immediate application in helping healthcare providers monitor the effectiveness of CPAP therapy and patients' overall sleep health.

Key Results

  • The proposed Neural CRF model achieved a 10% improvement in accuracy over previous state-of-the-art methods (specifically, over the conditional adversarial model [10] in terms of Cohen's Kappa score).
  • The Neural CRF model achieved an accuracy of 72.3% and a Kappa score of 0.54.
  • The Regularized Cost-Sensitive Neural CRF model achieved the highest performance with an accuracy of 74.1% and a Kappa score of 0.57.
  • The models demonstrated good performance in estimating sleep efficiency, with a Mean Absolute Error (MAE) of 9.9% for the best performing model. This is crucial for monitoring therapy effectiveness.
  • The study also showed that the model can accurately estimate sleep efficiency, which is a key metric for assessing sleep quality.

Limitations and Future Work

  • Comparison with Healthy Populations: The authors acknowledge that direct comparison with studies on healthy populations might be misplaced, as sleep apnea patients exhibit different sleep dynamics.
  • Accuracy on REM and Deep Sleep: While the model shows improvement, it still faces challenges in accurately detecting REM and Deep sleep stages, as indicated by the confusion matrices and t-SNE plots.
  • Future Work: The authors suggest that their approach can be augmented to existing deep learning methods. They also anticipate that their study will motivate further research into the effects of CPAP therapy on sleep architecture and the potential for discovering new phenomena through flow signal analysis. The saliency maps also suggest potential for uncovering unknown physiological features relevant to sleep staging.

Summary updated

BibTeX
@inproceedings{aggarwal2018structured,
  author = {Karan Aggarwal and Swaraj Khadanga and Shafiq R. Joty and Louis Kazaglis and Jaideep Srivastava},
  title = {{A Structured Learning Approach with Neural Conditional Random Fields for Sleep Staging}},
  booktitle = {IEEE BigData},
  year = {2018},
  url = {https://openreview.net/forum?id=EeixUzSDw6e},
}
Figure