Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging
The real-time sleep staging algorithm that can perform inference on mobile devices without burden is a prerequisite for closed-loop sleep modulation. However, current deep learning sleep staging models have poor real-time efficiency and redundant parameters. We propose a lightweight and high-perform...
Main Authors: | , , , , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Frontiers Media S.A.
2023-07-01
|
Series: | Frontiers in Neuroscience |
Subjects: | |
Online Access: | https://www.frontiersin.org/articles/10.3389/fnins.2023.1218072/full |
_version_ | 1797770603906727936 |
---|---|
author | Guisong Liu Guoliang Wei Shuqing Sun Dandan Mao Jiansong Zhang Dechun Zhao Xuelong Tian Xing Wang Nanxi Chen |
author_facet | Guisong Liu Guoliang Wei Shuqing Sun Dandan Mao Jiansong Zhang Dechun Zhao Xuelong Tian Xing Wang Nanxi Chen |
author_sort | Guisong Liu |
collection | DOAJ |
description | The real-time sleep staging algorithm that can perform inference on mobile devices without burden is a prerequisite for closed-loop sleep modulation. However, current deep learning sleep staging models have poor real-time efficiency and redundant parameters. We propose a lightweight and high-performance sleep staging model named Micro SleepNet, which takes a 30-s electroencephalography (EEG) epoch as input, without relying on contextual signals. The model features a one-dimensional group convolution with a kernel size of 1 × 3 and an Efficient Channel and Spatial Attention (ECSA) module for feature extraction and adaptive recalibration. Moreover, the model efficiently performs feature fusion using dilated convolution module and replaces the conventional fully connected layer with Global Average Pooling (GAP). These design choices significantly reduce the total number of model parameters to 48,226, with only approximately 48.95 Million Floating-point Operations per Second (MFLOPs) computation. The proposed model is conducted subject-independent cross-validation on three publicly available datasets, achieving an overall accuracy of up to 83.3%, and the Cohen Kappa is 0.77. Additionally, we introduce Class Activation Mapping (CAM) to visualize the model’s attention to EEG waveforms, which demonstrate the model’s ability to accurately capture feature waveforms of EEG at different sleep stages. This provides a strong interpretability foundation for practical applications. Furthermore, the Micro SleepNet model occupies approximately 100 KB of memory on the Android smartphone and takes only 2.8 ms to infer one EEG epoch, meeting the real-time requirements of sleep staging tasks on mobile devices. Consequently, our proposed model has the potential to serve as a foundation for accurate closed-loop sleep modulation. |
first_indexed | 2024-03-12T21:24:36Z |
format | Article |
id | doaj.art-57ed0fd78ea4448487d2ce9e598599a5 |
institution | Directory Open Access Journal |
issn | 1662-453X |
language | English |
last_indexed | 2024-03-12T21:24:36Z |
publishDate | 2023-07-01 |
publisher | Frontiers Media S.A. |
record_format | Article |
series | Frontiers in Neuroscience |
spelling | doaj.art-57ed0fd78ea4448487d2ce9e598599a52023-07-28T09:45:59ZengFrontiers Media S.A.Frontiers in Neuroscience1662-453X2023-07-011710.3389/fnins.2023.12180721218072Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep stagingGuisong Liu0Guoliang Wei1Shuqing Sun2Dandan Mao3Jiansong Zhang4Dechun Zhao5Xuelong Tian6Xing Wang7Nanxi Chen8Department of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaDepartment of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaDepartment of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaDepartment of Sleep and Psychology, Institute of Surgery Research, Daping Hospital, Third Military Medical University (Army Medical University), Chongqing, ChinaSchool of Medicine, Huaqiao University, Quanzhou, Fujian, ChinaCollege of Bioinformatics, Chongqing University of Posts and Telecommunications, Chongqing, ChinaDepartment of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaDepartment of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaDepartment of Biomedical Engineering, Bioengineering College, Chongqing University, Chongqing, ChinaThe real-time sleep staging algorithm that can perform inference on mobile devices without burden is a prerequisite for closed-loop sleep modulation. However, current deep learning sleep staging models have poor real-time efficiency and redundant parameters. We propose a lightweight and high-performance sleep staging model named Micro SleepNet, which takes a 30-s electroencephalography (EEG) epoch as input, without relying on contextual signals. The model features a one-dimensional group convolution with a kernel size of 1 × 3 and an Efficient Channel and Spatial Attention (ECSA) module for feature extraction and adaptive recalibration. Moreover, the model efficiently performs feature fusion using dilated convolution module and replaces the conventional fully connected layer with Global Average Pooling (GAP). These design choices significantly reduce the total number of model parameters to 48,226, with only approximately 48.95 Million Floating-point Operations per Second (MFLOPs) computation. The proposed model is conducted subject-independent cross-validation on three publicly available datasets, achieving an overall accuracy of up to 83.3%, and the Cohen Kappa is 0.77. Additionally, we introduce Class Activation Mapping (CAM) to visualize the model’s attention to EEG waveforms, which demonstrate the model’s ability to accurately capture feature waveforms of EEG at different sleep stages. This provides a strong interpretability foundation for practical applications. Furthermore, the Micro SleepNet model occupies approximately 100 KB of memory on the Android smartphone and takes only 2.8 ms to infer one EEG epoch, meeting the real-time requirements of sleep staging tasks on mobile devices. Consequently, our proposed model has the potential to serve as a foundation for accurate closed-loop sleep modulation.https://www.frontiersin.org/articles/10.3389/fnins.2023.1218072/fullsleep stagingreal-time efficiencylightweight designdeep learningmodel deployment |
spellingShingle | Guisong Liu Guoliang Wei Shuqing Sun Dandan Mao Jiansong Zhang Dechun Zhao Xuelong Tian Xing Wang Nanxi Chen Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging Frontiers in Neuroscience sleep staging real-time efficiency lightweight design deep learning model deployment |
title | Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging |
title_full | Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging |
title_fullStr | Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging |
title_full_unstemmed | Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging |
title_short | Micro SleepNet: efficient deep learning model for mobile terminal real-time sleep staging |
title_sort | micro sleepnet efficient deep learning model for mobile terminal real time sleep staging |
topic | sleep staging real-time efficiency lightweight design deep learning model deployment |
url | https://www.frontiersin.org/articles/10.3389/fnins.2023.1218072/full |
work_keys_str_mv | AT guisongliu microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT guoliangwei microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT shuqingsun microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT dandanmao microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT jiansongzhang microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT dechunzhao microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT xuelongtian microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT xingwang microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging AT nanxichen microsleepnetefficientdeeplearningmodelformobileterminalrealtimesleepstaging |