| Literature DB >> 35564593 |
Tingting Li1, Bofeng Zhang2,3, Hehe Lv1, Shengxiang Hu1, Zhikang Xu1, Yierxiati Tuergong3.
Abstract
Accurate sleep staging results can be used to measure sleep quality, providing a reliable basis for the prevention and diagnosis of sleep-related diseases. The key to sleep staging is the feature representation of EEG signals. Existing approaches rarely consider local features in feature extraction, and fail to distinguish the importance of critical and non-critical local features. We propose an innovative model for automatic sleep staging with single-channel EEG, named CAttSleepNet. We add an attention module to the convolutional neural network (CNN) that can learn the weights of local sequences of EEG signals by exploiting intra-epoch contextual information. Then, a two-layer bidirectional-Long Short-Term Memory (Bi-LSTM) is used to encode the global correlations of successive epochs. Therefore, the feature representations of EEG signals are enhanced by both local and global context correlation. Experimental results achieved on two real-world sleep datasets indicate that the CAttSleepNet model outperforms existing models. Moreover, ablation experiments demonstrate the validity of our proposed attention module.Entities:
Keywords: EEG; attention mechanism; bidirectional long short-term memory; convolutional neural network; sleep staging
Mesh:
Year: 2022 PMID: 35564593 PMCID: PMC9104971 DOI: 10.3390/ijerph19095199
Source DB: PubMed Journal: Int J Environ Res Public Health ISSN: 1660-4601 Impact factor: 3.390
Figure 1General architecture of CattSleepNet.
Figure 2The CNN and attention branches perform feature extraction on the 30-s EEG epoch. The red solid line indicates the input sequence length of attention branch. The black solid line indicates the input sequence length of CNN branch. The dotted line indicates where the two branches will slide forward next.
Figure 3Detailed structure of CAttSleepNet model.
Detailed parameters of CAttSleepNet model.
| Branch | Layer Type | Number of Filters | Kernel Size | Region Size | Stride | Output Shape |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
| (200, 1) |
|
| Conv1 | 64 | 1 × 5 | - | 3 | (67, 64) |
| Conv2 | 64 | 1 × 5 | - | 3 | (23, 64) | |
| Conv3 | 64 | 1 × 5 | - | 3 | (8, 64) | |
| Conv4 | 128 | 1 × 3 | - | 2 | (4, 128) | |
| Conv5 | 128 | 1 × 3 | - | 2 | (2, 128) | |
| Conv6 | 128 | 1 × 3 | - | 1 | (2, 128) | |
| Conv7 | 256 | 1 × 3 | - | 1 | (2, 256) | |
| Max-pooling | - | - | 1 × 2 | 1 | (1, 256) | |
|
| - | - | - | - | - | (400, 1) |
|
| Conv1 | 64 | 1 × 7 | - | 3 | (134, 64) |
| Conv2 | 64 | 1 × 7 | - | 3 | (45, 64) | |
| Conv3 | 64 | 1 × 7 | - | 3 | (15, 64) | |
| Max-pooling | - | - | 1 × 2 | 2 | (8, 64) | |
| Conv4 | 128 | 1 × 5 | - | 2 | (4, 128) | |
| Conv5 | 128 | 1 × 5 | - | 2 | (2, 128) | |
| Conv6 | 128 | 1 × 5 | - | 2 | (1, 128) | |
| Conv7 | 256 | 1 × 3 | - | 1 | (1, 256) | |
| Conv8 | 256 | 1 × 3 | - | 1 | (1, 256) | |
| Conv9 | 256 | 1 × 3 | - | 1 | (1, 256) |
Detailed distribution of sleep stages in sleep-edfx-2013 and sleep-edfx-2018 datasets.
| Stage | Sleep-Edfx-2013 | Sleep-Edfx-2018 | ||||
|---|---|---|---|---|---|---|
| Training Set | Test Set | Total | Training Set | Test Set | Total | |
| W | 7734 | 292 | 8026 | 55,697 | 10,023 | 65,720 |
| N1 | 2666 | 138 | 2804 | 19,207 | 2315 | 21,522 |
| N2 | 16,805 | 994 | 17,799 | 89,789 | 6343 | 96,132 |
| N3 | 5449 | 254 | 5703 | 11,879 | 1160 | 13,039 |
| REM | 7295 | 422 | 7717 | 23,452 | 2383 | 25,835 |
|
|
|
|
|
|
|
|
Figure 4The CAttSleepNet model’s confusion matrix and ROC curve are obtained from the Fpz-Cz channel of the sleep-edfx-2013 dataset. (a) Confusion matrix; (b) ROC curve.
Figure 5The CAttSleepNet model’s confusion matrix and ROC curve are obtained from the Pz-Oz channel of the sleep-edfx-2013 dataset. (a) Confusion matrix; (b) ROC curve.
Figure 6The CAttSleepNet model’s confusion matrix and ROC curve are obtained from the Fpz-Cz channel of the sleep-edfx-2018 dataset. (a) Confusion matrix; (b) ROC curve.
Figure 7The CAttSleepNet model’s confusion matrix and ROC curve are obtained from the Pz-Oz channel of the sleep-edfx-2018 dataset. (a) Confusion matrix; (b) ROC curve.
Evaluation indicators for the overall and each category are obtained from two datasets.
| Sleep-Edfx-2013 | Sleep-Edfx-2018 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EEG Fpz-Cz (%) | EEG Pz-Oz (%) | EEG Fpz-Cz (%) | EEG Pz-Oz (%) | |||||||||
| Pre | Rec | F1 | Pre | Rec | F1 | Pre | Rec | F1 | Pre | Rec | F1 | |
| W | 88.86 | 90.28 | 89.56 | 89.56 | 89.44 | 89.50 | 92.56 | 91.67 | 92.12 | 89.24 | 90.67 | 89.95 |
| N1 | 55.59 | 40.87 | 47.11 | 51.98 | 41.93 | 46.42 | 46.10 | 41.61 | 43.74 | 45.79 | 34.33 | 39.24 |
| N2 | 86.24 | 88.21 | 87.22 | 84.63 | 87.10 | 85.84 | 81.71 | 84.90 | 83.28 | 78.52 | 83.79 | 81.07 |
| N3 | 86.57 | 83.47 | 84.50 | 82.55 | 79.38 | 80.94 | 77.25 | 76.66 | 76.96 | 71.18 | 65.20 | 68.06 |
| REM | 80.05 | 84.30 | 82.12 | 79.45 | 82.09 | 80.75 | 76.51 | 76.89 | 76.70 | 71.01 | 73.16 | 72.07 |
| Overall Indicators |
|
|
|
|
|
|
|
|
|
|
|
|
| 84.14 | 78.09 | 78.20 | 82.58 | 75.97 | 76.69 | 80.81 | 73.51 | 74.56 | 78.01 | 69.45 | 70.08 | |
Note: Pre = precision, Rec = recall, F1 = F1-score.
Comparison among CAttSleepNet and other models.
| Approach | Overall Performance (%) | Per-Class F1-Score (%) | ||||||
|---|---|---|---|---|---|---|---|---|
| ACC | MF1 | K | W | N1 | N2 | N3 | REM | |
| Dataset: Sleep-Edfx-2013 EEG Channel: Fpz-Cz | ||||||||
| Tsinalis et al. [ | 74.8 | 69.8 | - | 65.4 | 43.7 | 80.6 | 84.9 | 74.5 |
| Tsinalis et al. [ | 78.9 | 73.7 | - | 71.6 | 47.0 | 84.6 | 84.0 | 81.4 |
| Supratak et al. [ | 82.0 | 76.9 | 0.76 | 84.7 | 46.6 | 85.9 | 84.8 | 82.4 |
| Phan et al. [ | 79.1 | 69.8 | 0.70 | 75.5 | 27.3 | 86.0 | 85.6 | 74.8 |
| Phan et al. [ | 79.8 | 72.0 | 0.72 | 77.0 | 33.3 | 86.8 | 86.3 | 76.4 |
| Phan et al. [ | 81.9 | 73.8 | 0.74 | - | - | - | - | - |
| Zhu et al. [ | 82.8 | 77.8 | - |
|
| 86.0 | 82.1 |
|
| Yang et al. [ | 82.13 | 73.5 | 0.75 | 87.8 | 23.0 | 86.2 |
| 81.8 |
|
|
|
|
| 89.6 |
|
| 85.0 | 82.1 |
|
| ||||||||
| Supratak et al. [ | 79.8 | 73.1 | 0.72 | 88.1 | 37 | 82.7 | 77.3 | 80.3 |
| Yang et al. [ | 80.54 | 68.7 | 0.72 | 85.3 | 17.5 | 85.0 | 78.2 | 75.8 |
|
|
|
|
|
|
|
|
|
|
|
| ||||||||
| Mousavi et al. [ | 80.03 | 73.55 | 0.73 | 91.72 |
| 82.49 | 73.45 | 76.06 |
|
|
|
|
|
| 43.74 |
|
|
|
|
| ||||||||
| Mousavi et al. [ | 77.56 | 70.00 |
| - | - | - | - | - |
|
|
|
|
| 89.95 | 39.24 | 81.07 | 68.06 | 72.07 |
Note: The highest performance metrics are highlighted in bold. Except for the K indicator, values of other indicators are all percentiles.
Ablation experiments on Fpz-CZ channel of the sleep-edfx-2013 dataset.
| CAttSleepNet (%) | CAttSleepNet without Attention (%) | |||||
|---|---|---|---|---|---|---|
| Pre | Rec | F1 | Pre | Rec | F1 | |
| W | 88.86 | 90.28 | 89.56 | 83.13 | 83.13 | 83.14 |
| N1 | 55.59 | 40.87 | 47.11 | 48.63 | 40.09 | 43.95 |
| N2 | 86.24 | 88.21 | 87.22 | 90.05 | 88.20 | 89.57 |
| N3 | 86.57 | 83.47 | 84.50 | 78.07 | 78.92 | 78.49 |
| REM | 80.05 | 84.30 | 82.12 | 75.58 | 87.64 | 81.87 |
| Overall Indicators |
|
|
|
|
|
|
| 84.14 | 78.09 | 78.20 | 81.95 | 74.50 | 75.26 | |
Note: Pre = precision, Rec = recall, F1 = F1-score.
Figure 8Visual comparison of the two models. (a) Comparison of overall indicators; (b) comparison of per-class F1-score.