With the development of telemedicine and edge computing, edge artificial intelligence (AI) will become a new development trend for smart medicine. On the other hand, nearly one-third of children suffer from sleep disorders. However, all existing sleep staging methods are for adults. Therefore, we adapted edge AI to develop a lightweight automatic sleep staging method for children using single-channel EEG. The trained sleep staging model will be deployed to edge smart devices so that the sleep staging can be implemented on edge devices which will greatly save network resources and improving the performance and privacy of sleep staging application. Then the results and hypnogram will be uploaded to the cloud server for further analysis by the physicians to get sleep disease diagnosis reports and treatment opinions. We utilized 1D convolutional neural networks (1D-CNN) and long short term memory (LSTM) to build our sleep staging model, named CSleepNet. We tested the model on our childrens sleep (CS) dataset and sleep-EDFX dataset. For the CS dataset, we experimented with F4-M1 channel EEG using four different loss functions, and the logcosh performed best with overall accuracy of 83.06% and F1-score of 76.50%. We used Fpz-Cz and Pz-Oz channel EEG to train our model in Sleep-EDFX dataset, and achieved an accuracy of 86.41% without manual feature extraction. The experimental results show that our method has great potential. It not only plays an important role in sleep-related research, but also can be widely used in the classification of other time sequences physiological signals.
The AASM manual was first published in 2007 . In the AASM rules, all sleep recordings are divided into 5 stages. They include Wake (W), Rapid Eye Movement (REM) and Non-Rapid Eye Movement (NREM) , where the NREM includes N1 (transition stage), N2 (light sleep) and N3 (deep sleep). Age may be the most critical factor in differentiating the sleep pattern between children and adults, due to the EEG variation reflected by PSG mornitoring . The AASM rules also include sleep stage scoring methods for children.
Technicians need to spend a lot of time and efforts to monitor the changes of different physiological signals in the PSG for sleep stage scoring. In addition, the quality of sleep stage scoring depends on the experience and fatigue of technicians, and the agreement between the technicians is usually less than 90% . In addition, the existing automatic sleep stage classification methods are for adults by default. Therefore, it is necessary to develop an automatic sleep staging method for children.
To perform automatic sleep staging on a cloud server, it is necessary to upload the collected sleep recordings of the whole night(usually hundreds of MB or even more than 1GB size) to the cloud, which takes a long time to respond, puts a lot of pressure on network bandwidth and may leak user privacy. Edge AI trains and deploys deep learning models at the edge of the network closer to users and data sources, thereby improving the performance and privacy of AI applications . Therefore, we develop a lightweight automatic sleep staging method for children using single-channel EEG based on edge AI. The sleep staging performed on edge devices, and the results and hypnogram will be uploaded to the cloud server for physicians to further analyze. Users will get analysis reports and some useful suggestions.
We design our automatic sleep staging model for children that utilizes 1D-CNN and LSTM. The 1D-CNN can be trained to learn and extract features from raw single-channel EEG, while the LSTM can be trained to learn temporal information such as sleep stages transition rules.
We develop a lightweight automatic sleep staging method for children based on edge intelligence. The sleep staging process is carried out on the intelligence terminals, thereby improving the performance and privacy of sleep staging application.
The remaining parts of this paper are organized as follows: First, we review the related works of edge intelligence and automatic sleep staging in Section 2. Then, the automatic sleep staging method for children based on edge AI is proposed in Section 3. Section 4 describes datasets, data processing, the experiments and analysis results. Finally, Section 5 presents the conclusion and future work.
In addition, the existing research results aim at adult sleep stage scoring, and there is a lack of research on automatic sleep staging for children. However, children and adults have different EEG characteristics so that these methods are not necessarily suitable for children. Therefore, it is necessary to develop a sleep staging method is more suitable for children . At the same time, PSG and sleep EEG signal of children are few, and childrens sleep monitoring is difficult. In the process of sleep monitoring, children are more sensitive to the monitoring equipment, and children will feel discomfort due to the monitoring equipment, so noises such as artifacts appear and the equipment may even fall. Therefore, the study of sleep stage classification for children in terms of edge AI environment is worthy of long-term research and exploration.
Sleep staging on the cloud server requires a lot of network resources and a long response time, and there is a risk of disclosing user privacy. Therefore, we develop a lightweight automatic sleep staging method for children using single-channel EEG based on edge AI. The schematic diagram is shown in Figure 3. The trained model is deployed to the intelligent terminals. Therefore, the collected EEG recordings are recorded on the intelligent terminals for automatic sleep staging. Then, the results of sleep staging and hypnogram will be uploaded to the cloud server for further analysis by the physicians. Finally, the sleep disease diagnosis reports and treatment opinions are transmitted to the intelligent terminals.
The raw single-channel EEG recordings is a continuous time sequence of about 10 hours. After the first step of data processing performed, the EEG recordings of each subject can be divided into 900 to 1300 30 s epochs according to the length of sleep. So that, the raw single-channel EEG was processed into a dataset that can be used for model training and prediction. When collecting the clinical sleep EEG recordings of children, the noises generated by various reasons will affect the quality of the original signal. Normalization operation can effectively reduce the impact of these noises.
Our experimental models were implemented using Keras in the Tensorflow framework under the Python environment. Our experiments were conducted by a desktop PC equipped with Intel Intel i7-8700K CPU, 64 GB RAM and a NVIDIA GeForce GTX 1080Ti GPU.
It is easy to see in Figure 7 that in all models trained with different loss functions, the results of stage N1 are very poor. A large number of stage N1 are mistakenly classified as stage W, N2 and REM. Stage N1 is a transitional stage in sleep, and the EEG features of stage N1 are not obvious. It is also difficult for well-trained technicians to classify stage N1 accurately [4, 28]. Similarly, for the REM stage, staging errors are mainly mistakenly regarded as N1 stage. Some the of stage W epochs are mistakenly classified as the stage N1 and N2, a small amount of stage N2 epochs considered stage N1 and N3, and a few stage N3 epochs are regarded as stage N2. There is an interesting phenomenon here: most of the incorrectly divided sleep stages correspond to adjacent stages of the correct sleep stage. The sleep stages are contiguous in the sleep cycle, therefore each sleep stage may contain patterns similar to the adjacent stage. In addition, this phenomenon may also be caused by mislabeling of adjacent sleep stages by technicians. For all loss functions, the accuracy of stage N3 and REM is satisfactory, and stage W is acceptable. The stage N2 accounts for a large proportion of the sleep recordings (see Figure 4(a)), therefore the accuracy of the stage N2 has a greater impact on the overall accuracy. Therefore, How to improve the sleep staging accuracy of the stage N1 and N2 is the focus of our further work.
Based on edge AI, we combined 1D-CNN and LSTM to propose lightweight automatic sleep staging for children using single-channel EEG. The experimental results show that a single-channel EEG and the CSleepNet can be used to sleep staging without any feature extraction stage, and its performance is satisfactory. This has an advantage that the model can be trained to learn the features that are most suited to the sleep staging for children. Different loss functions have their own advantages in different stages of sleep staging. Training the CSleepNet model requires a lot of time and hardware equipment with sufficient performance, but once the model training is completed, the prediction is relatively cheap, and can be carried out on personal computers, mobile phone and portable wearable devices.
Offer excludes MacBook Pro M2 14inch & 16inch, Mac Mini M2, all Samsung S23, S23+ & S23 Ultra variants, Google Pixel 7 models, iPad (10th Gen 2022), iPad Pro (2022), iPhone 14 models, Apple Watch Series 8, SE2 & Ultra, PlayStation 5 & Xbox Series X consoles, egg2, digital downloads, insurance products, delivery & installation services. It cannot be used in conjunction with other offers. 153554b96e