Automatic Identification of Insomnia Based on Single-Channel EEG Labelled With Sleep Stage Annotations

Monitoring single-channel EEG is a promising home-based approach for insomnia identification. Currently, many automatic sleep stage scoring approaches based on single-channel EEG have been developed, whereas few studies research on automatic insomnia identification based on single-channel EEG labelled with sleep stage annotations. In this paper, we propose a one-dimensional convolutional neural network (1D-CNN) model for automatic insomnia identification based on single-channel EEG labelled with sleep stage annotations, and further investigate the identification performance based on different sleep stages EEG epochs. Single-channel EEG on 9 insomnia patients and 9 healthy subjects was used in this study. We constructed 4 subdatasets from EEG epochs based on the sleep stage annotations: All sleep stage dataset (ALL-DS), REM sleep stage dataset (REM-DS), light sleep stage dataset (LSS-DS), and SWS sleep stage dataset (SWS-DS). Subsequently, 4 subdatasets were fed into our 1D-CNN. We conducted experiments under intra-patient and inter-patient paradigms, respectively. Our experiments demonstrated that our 1D-CNN leveraging 3 subdatasets composed of REM, LSS and SWS epochs, respectively, achieved higher average accuracies in comparison with baseline methods under both intra-patient and inter-patient paradigms. The experimental results also indicated that amongst all the sleep stages, 1D-CNN leveraging REM and SWS epochs exhibited the best insomnia identification average accuracies in intra-patient paradigm, which are 98.98% and 99.16% respectively, whereas no statistically significant difference was found in inter-patient paradigm. For automatic insomnia identification based on single-channel EEG labelled with sleep stage annotations, 1D-CNN model introduced in this paper could achieve superior performance than traditional methods.


I. INTRODUCTION
Sleep is a fundamental physiological activity, which plays a crucial role in physical and mental health for human body [1]. Insomnia is a sleep disorder that is prevalent in adults [2]. In the clinical practice, clinicians diagnose insomnia through sleep questionnaires, polysomnography (PSG) monitoring of the patients, and the diagnostic criteria for insomnia released by American Academy of Sleep Medicine (AASM) [3], [4]. However, the subjectivity of the sleep questionnaires and the first-night effect of the PSG recordings make the insomnia The associate editor coordinating the review of this manuscript and approving it for publication was Emre Koyuncu . diagnose a time-consuming, expensive and subjective process, which is unsuitable for home-usage [5], [6].
Home-based sleep monitoring, which is a hot research area, has many approaches: (1) smart mats based on piezoelectric and pressure sensors, (2) electrocardiogram (ECG) and pulse wave, (3) electroencephalogram (EEG) [7]. Various algorithms have been proposed to tackle the problem of automatic sleep disorder detection based on the above approaches. Hassan et al. [8] extracted statistical features in the tunable-Q factor wavelet domain and classified obstructive sleep apnea (OSA) by random under sampling boosting (RUSBoost) classifier based on single-lead ECG. Heyat et al. [9] leveraged the power spectral density (PSD) features and decision tree classifier for sleep bruxism VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ detection based on two channels of scalp EEG signal. Since EEG is the gold standard for understanding sleep, monitoring single-channel EEG signal is the most promising way to identify sleep disorder [7], [10], [11]. The method does not require a large number of sensors attached to subjects, which makes the recorded data reflect the sleep habit better. Current automatic insomnia identification methods based on single-channel EEG require experience-based handcraft features to train a traditional classifier. Aydin et al. [12] extracted the 10-dimensional singular spectrum features of the sleep EEG signal, and then fed the features into a single hidden layer artificial neural network (ANN) for insomnia identification. Hamida et al. [13] extracted spectral and Hjorth's parameters features, and applied principal component analysis (PCA) for dimension reduction. The first principal component was then classified according to the set threshold. Shahin et al. [14] extracted statistical, temporal and spectral features of EEG signals, and leveraged deep neural network (DNN) for automatic insomnia identification. Zhang et al. [15] proposed an insomnia identification method based on temporal, spectral, nonlinear features and random forest (RF) classifier. Therefore, till date, most of the existing work for automatic insomnia identification task was based on hand-crafted feature extraction and traditional machine learning algorithms.
Convolutional neural networks (CNN) do not need to define features manually, which can overcome the limitation of the handcrafted features that are limited by prior knowledge. This advantage makes CNN gain much attention in biomedical engineering field [16], [17]. Since most of the existing work for automatic insomnia identification task was based on hand-crafted features and traditional machine learning algorithms, an end-to-end one-dimensional CNN (1D-CNN) model based on single-channel EEG signal is investigated in this study.
Sleep is a cyclical process, which is composed of three main stages: rapid eye movement, light sleep and deep sleep [18]. According to the Rechtschaffen and Kales (R&K) rules [19], an overnight EEG sleep signal is divided into 30-second epochs, and each epoch is categorized as wake, rapid eye movement (REM) and non-rapid eye movement (NREM) stage, which is further divided into S1, S2, S3 and S4 stages. Table 1 summarizes the sleep stage scoring criteria and description. Many approaches for automatic sleep stage scoring based on single-channel EEG have been developed, which can achieve high identification performance. Hassan and Bhuiyan [20] extracted various statistical features in ensemble empirical mode decomposition (EEMD) and leveraged RUSBoost classifier for sleep stage classification. Jiang et al. [21] leveraged 151-dimensional time and frequency domain features, RF classifier and proposed hidden Markov model (HMM) based rule refinement to identify sleep stages. Supratak et al. [22] proposed a deep learning model DeepSleepNet for automatic sleep stage classification, which contains CNN part and bidirectional-long short-term memory (LSTM) part. Chen et al. [23] proposed a deep learning model SleepStageNet including multi-scale CNN, recurrent neural networks (RNN) and conditional random field (CRF) to identify sleep stages. Therefore, in this study, we investigate the automatic insomnia identification method leveraging EEG labelled with sleep stage annotations.
Several studies have investigated the insomnia identification performance based on different sleep stages of EEG [13], [14]. Hamida et al. [13] evaluated the performance of wake, S1, S2, SWS and REM stages, finding SWS epochs have the best insomnia identification performance. Shahin et al. [14] compared the performance of all stages, NREM, S2+S3, NREM+REM stages, finding NREM+REM epochs have the best performance, whereas they did not evaluate the performance only leveraging REM epochs. At present, it is still unclear which EEG sleep stages has the best insomnia identification performance [24].
In this paper, we propose a 1D-CNN model for automatic insomnia identification leveraging single-channel EEG labelled with sleep stage annotations, and further investigate the identification performance based on different sleep stages. This is the first implementation of CNN in automatic insomnia identification task to the best of the author's knowledge. The rest of this paper is organized as follows. Section II describes the dataset and baseline method. Section III presents our method including the general idea, data preprocessing and 1D-CNN model. Section IV presents the experiments and results. In Section V, we discuss the experimental results. Finally, Section VI concludes the paper.

II. MATERIAL AND BASELINE A. DATASET
Data utilized in this study were obtained from the CAP Sleep database, which is publicly available on the PhysioNet [25]. CAP Sleep database is registered at the Sleep Disorder Center of the Ospedale Maggiore of Parma, Italy [26]. The dataset comprises PSG recordings from 108 subjects including 16 healthy subjects, 9 insomnia patients and other sleep-disordered patients. Each subject is recorded at least 3 EEG channels, 2 EOG channels, EMG of the submentalis muscle, bilateral anterior tibial EMG, respiration signals and EKG. Additionally, each 30s epoch of the recordings is manually labelled into one of the six sleep stages (W, S1, S2, S3, S4, REM) by expert neurologists trained at the Sleep Center according to the R&K standard [19].
In our work, C4-A1 channel EEG was selected to perform automatic insomnia identification task. The reasons why we choose C4-A1 channel EEG for automatic insomnia identification are as follows: (1) Buysse et al. [27] investigated the EEG spectral analysis of primary insomnia patients in NREM sleep period based on C4-A1 channel and found that NREM period could moderate quantitative EEG difference between insomnia patients and healthy subjects.
(2) Researchers in the past [28] demonstrated that leveraging C4-A1 channel EEG for sleep stage classification could achieve better classification result. Since Healthy-6 to Healthy-9 subjects did not measure C4-A1 channel EEG, and the waveform of the Healthy-13 subject occurred peak clipping distortion, we selected the remaining 9 insomnia patients and 9 healthy subjects in CAP Sleep Database for our experiments. Table 2 shows the sleep duration, number of epochs and the sampling frequency of subjects.

B. BASELINE
According to the method in [12], the trajectory matrix X of EEG epoch was computed based on the phase-space reconstruction and got the covariance matrix C = 1 N X T X . Subsequently, the first 10 singular values (in descending order) of C were computed by singular value decomposition (SVD). Finally, the 10-dimensional singular spectrum features were fed into ANN for insomnia identification. The ANN consisted of one hidden layer, which had 10 neurons. All layers used the sigmoid activation function. In subsequent experiments, we selected the epochs of wake, REM, S1 and S2 sleep stages in C4-A1 channel EEG for implementing this method.
Previous studies demonstrated that relative power and Hjorth parameters of EEG signal are important features for insomnia identification [29]- [31]. According to the method in [13], EEG was filtered at 6 frequency bands: delta (0.5-4Hz), theta (4-8Hz), alpha (8-12Hz), sigma (12-16Hz), beta (16-30Hz) and gamma . A total of 22 features including power and Hjorth parameters were extracted. Subsequently, the dimensionality of features were decreased by PCA algorithm. Power features contain the relative power in each frequency band and their ratios. Hjorth parameters features include activity, mobility and complexity, which are defined as follows: where x is the EEG epoch. According to the method in literature [13], we leveraged the epochs of SWS sleep stages in C4-A1 channel EEG for implementing this method. Then we applied PCA for dimensionality reduction and leveraged the first principal component as the final one-dimensional feature. We searched the optimal differentiate threshold for the first principal component on training dataset. Then, the optimal differentiate threshold was used in test dataset for insomnia identification. However, we considered only leveraging the first principal component feature may cause loss of information. Since RF is an ensemble learning algorithm by constructing a group of decision trees [32], which has properties of adaptability and robustness, we also used RF classifier for the above 22-dimensional features. In this way, we could further evaluate the identification performance of the 22-dimensional features. In our experiment, we found that with the number of trees increasing, the result had the highest insomnia identification accuracy when the number of trees reached 1000. When the number of trees continued to increase, the identification performance did not increase significantly, while the computation speed decreased. Therefore, the number of trees was set to 1000 in our experiment.

III. METHOD
A. GENERAL IDEA Fig. 1 depicts the general idea of our study. Traditionally, a complete automatic insomnia identification model includes three basic sections: data preprocessing, feature extractor and classifier. Since 1D-CNN integrates the feature extractor and classifier into one single algorithm, the model in this study consists of two sections: data preprocessing and 1D-CNN model. In order to investigate the superiority of 1D-CNN model, it is necessary to make a comparison with the baseline methods in [12], [13] based on the same dataset and preprocessing method. In order to investigate the generalizability of our method, we conducted experiments under both intra-patient and inter-patient paradigms.
In order to further investigate which sleep stage has better insomnia identification performance, we constructed 4 subdatasets from EEG epochs according to their sleep stage annotations. According to the AASM standard [33], we merged the S3 and S4 into single slow wave sleep (SWS) stage. The S1 and S2 were merged into light sleep stage (LSS) [18]. The 4 subdatasets are ALL-DS, REM-DS, LSS-DS, SWS-DS, which are constructed from the all sleep stage, REM, S1+S2, S3+S4 epochs respectively. We compared the insomnia identification performance of our method leveraging the 4 subdatasets respectively.

B. DATA PREPROCESSING
The whole night single-channel EEG (C4-A1) was band filtered and resampled. The sleep stage annotations of epochs after the data preprocessing were unchanged.

1) BAND PASS FILTERING
Since EEG is low-frequency signal, whose frequency components are mainly concentrated in 0.5-50Hz frequency band, we designed an 80th-order band-pass FIR filter (0.5-50 Hz) based on Hamming window. The raw C4-A1 channel EEG was preprocessed by the filter for eliminating high frequency noise and direct current component.

2) RESAMPLING
As illustrated in Table 2, C4-A1 channel EEG recordings in CAP Sleep Database have different sampling frequency. Hence, all EEG recordings were resampled at 128 Hz.
The framework of our 1D-CNN is inspired by AlexNet [34]. We replaced the 2D convolutional kernel with 1D convolutional kernel and added batch normalization layer to our 1D-CNN, while the size of convolutional kernel remains unchanged. Fig. 2 depicts the schematic diagram of our 1D-CNN model, which consists of 5 convolution layers, 3 pooling layers and 3 fully connected layers.
Since the input of our 1D-CNN is the specified sleep stage 30s epoch, i.e. the 1×3840 one-dimensional time series, 1D convolutional kernel is used in our model. The 1D convolution operation process is defined as: where y l i is the i th pixel of the output feature on the l th layer. w l n and b l denote the weight vector and the bias parameter of the convolutional kernel on the l th layer, respectively. d denotes the size of the convolutional kernel. N denotes the length of input feature vector y l−1 i . f (·) denotes the activation function of convolution layer.
The first and second convolution layers use large kernels with size of 1 × 11 and 1 × 5, respectively, whereas the third to fifth convolution layers use small kernels with size of 1 × 3. After the first, second and the fifth convolution layers, we utilized the maxpooling layer with size of 1 × 3 to reduce the dimension of feature maps. Subsequently, the generated feature maps of the last maxpooling layer are flattened into a one-dimensional vector. This vector are fed into the fully connected layer for binary classification, and the final identification result is obtained. We chose ReLU (Rectified Linear Unit) as the activation function, which is defined as follows: A batch normalization layer follows the first convolution layer, which can normalize the feature activations, thus reducing the internal covariate shift. The batch normalization is defined as follows [35] where B represents the mini-batch including m samples, µ B and σ 2 B represent the mean and variance of B, respectively. is a constant for numerical stablility. γ and β are the scale and shift parameters computed in the training process, respectively, which can be seen in [35] for details. The parameters associated with our CNN are given in Table 3.

2) 1D-CNN TRAINING SETS CONSTRUCTION
Each 30s EEG segment of the recordings in the dataset is labelled into a sleep stage by expert [26]. The 30s EEG segment is defined as epoch. In order to investigate the effect of  sleep stages on insomnia identification, we constructed subdatasets according to the sleep stage of epochs. The process of subdatasets construction consists of two parts, selecting specified sleep stages and overlapping.
Firstly, we selected the sleep stage of the subdataset that needs to be constructed. Subsequently, if two consecutive epochs of the subject had the same sleep stage, we used a sliding window for overlapping. The overlapping time was set to 25s. Note that the sleep stage label of the new epoch after overlapping was unchanged. Conversely, if two consecutive epochs had different sleep stages, we did not conduct overlapping. Fig. 3 shows the schematic diagram of overlapping method in this study. With the above method, we constructed  Additionally, we constructed a BSL-DS (baseline dataset) for implementing baseline method in [12]. Fig. 4 shows the schematic diagram of constructing subdataset in this study. • Light sleep stage dataset (LSS-DS): including S1 and S2 epochs of the EEG recording.
It should be noted that since the epochs number for each sleep stage from each subject is different, the sizes of the 5 subdatasets constructed directly by the method mentioned above are different. However, the size of the dataset can greatly affect the performance of machine learning algorithm. Therefore, we employed the following strategies to adjust the number of subdatasets: (1) we regarded the minimum number among the 5 types of epochs of the target subject used to construct subdataset as the threshold. Each type of the epochs only kept the threshold number and the rest of the epochs were discarded. (2) if the minimum number was greater than 800, we set the threshold as 800. We implemented those two strategies for each subject and finally obtained the 5 subdatasets that had the same size as well as the same number of epochs from each subject. For further details see Discussion. Table 4 shows the number of epochs for the 5 subdatasets.

3) 1D-CNN TRAINING SETTING
The weight parameters in our 1D-CNN were initialized leveraging the kaiming initializer [36], which could improve the converging speed of model. In addition, the parameter optimization was performed with Adam optimizers with an initial learning rate of 0.0001 [37]. The network was trained for 80 epochs with a batch size of 256. The cross entropy loss function was used in this study, which is defined as: where N is the number of the training samples. y k and p k denote the true label and the predicted label of the sample, respectively.
In order to prevent overfitting problems, we utilized the dropout and L2 regularization method. Dropout is a technique that units of the layer are randomly disconnected with specified probability during training [38]. L2 regularization is a technique that adds a regularization term after loss function to reduce the network complexity. The cross entropy loss function with L2 regularization term is defined as: where E n is the basic cross entropy loss function. λ w 2 2 is the L2 regularization term. λ and w are the penalty factor and the network parameters, respectively. In this study, the penalty factor λ was set to 0.0001. Moreover, we used the dropout of 0.5 after the first and second layer of the fully connected layer. Table 5 shows the hyper-parameters of our 1D-CNN.

IV. EXPERIMENTS AND RESULTS
Data preprocessing and feature extraction sections were implemented in Matlab R2018a environment on Intel i7-9700 @3.00GHz with 8 GB RAM. Deep learning experiments were conducted in Python environment leveraging Pytorch framework on NVIDIA GeForce GTX 1080 Ti. In addition, we used SPSS Software System version 20.0 for paired two-sided t test. Values of p <0.05 were considered statistically significant.

A. PERFORMANCE METRICS
In this research, accuracy, precision, recall, F1 score and kappa coefficient (k) were used for evaluating the performance matrics, which are defined as follows: where TP, FP, TN , FN represent the true positive, false positive, true negative and false negative, respectively. p o and p e represent the actual agreement and the chance agreement, respectively.

B. EVALUATION PARADIGMS 1) INTRA-PATIENT PARADIGM
Under intra-patient paradigm, epochs from all subjects are mixed together. Then, they are split into training, validation and test set based on the specified ratio, i.e. epochs from the same patient are utilized for both training and testing [39].

2) INTER-PATIENT PARADIGM
Under inter-patient paradigm, subjects are firstly split into training and testing set. The epochs from the training set and testing set subjects are used for training and testing, respectively, i.e. epochs from different patients are utilized for training and testing. Generally, inter-patient paradigm can prevent the problem of the signal similarity from the same subject, which can guarantee the generalizability of the model [7].

C. INTRA-PATIENT EXPERIMENT 1) DATASET
In intra-patient experiment, epochs from all the 18 subjects were mixed together. There were 11752 epochs in total, where insomnia patients contained 5970 samples whereas healthy subjects contained 5782 samples. 10-fold cross validation was employed to evaluate the performance of our model, i.e. each fold, in turn, was used for testing whereas the remaining 9 folds were used for training. We performed the experiment with our 1D-CNN leveraging the 4 subdatasets: ALL-DS, REM-DS, LSS-DS and SWS-DS, and compared the identification performance with baseline method.  Table 6 shows the performance comparison between baseline methods and our 1D-CNN leveraging the 4 subdatasets. Fig. 7 depicts the accuracy and loss curve for our 1D-CNN leveraging REM-DS in training process. Fig. 5 and Table 6 show that, in intra-patient experiment, the average accuracies of our 1D-CNN leveraging REM-DS, LSS-DS and SWS-DS are 98.98%, 96.38%  Intra-patient experiment. Performance comparison between baseline methods and our 1D-CNN leveraging the 4 subdatasets across accuracy (Acc), precision, recall, F1-score and k. and 99.16%, respectively, which are higher than the that of 3 baseline methods.
In order to further examine any significant difference in the average accuracy of our 1D-CNN leveraging the 4 subdatasets, paired two-sided t test was conducted. Fig. 5 indicate that amongst the 4 subdatasets, the average accuracy of our 1D-CNN leveraging REM-DS is significantly higher than that of ALL-DS and LSS-DS (p <0.05), whereas where is no statistically significant difference between REM-DS and SWS-DS, i.e. our 1D-CNN leveraging REM and SWS epochs exhibit the best insomnia identification performance in intra-patient experiment.

D. INTER-PATIENT EXPERIMENT 1) DATASET
In inter-patient experiment, subjects were firstly split into training set and testing set. Based on the leave one subject out cross validation (LOSOCV) strategy, at each time, we randomly selected one insomnia patient and one healthy subject for testing, whereas the remaining subjects were all used for training. The experiments were repeated 10 times.
We performed the experiment with our 1D-CNN leveraging the 4 subdatasets: ALL-DS, REM-DS, LSS-DS and SWS-DS, and compared the performance with baseline method.
2) RESULT Fig. 6 depicts the identification performance metrics of our 1D-CNN leveraging the 4 subdatasets. Table 7 shows the performance comparison between baseline methods and our 1D-CNN leveraging the 4 subdatasets. Fig. 8 depicts the accuracy and loss curve for our 1D-CNN leveraging REM-DS in training process. Fig. 6 and Table 7 show that, in inter-patient experiment, the average accuracies of our 1D-CNN leveraging ALL-DS, REM-DS, LSS-DS and SWS-DS are 86.82%, 87.49%, 82.06%, 83.76%, respectively, which are higher than that of 3 baseline methods.
Similar to intra-patient experiment, paired two-sided t test was conducted to examine any significant difference in the average of our 1D-CNN leveraging the 4 subdatasets. However, in inter-patient experiment, the average accuracies TABLE 7. Inter-patient experiment. Performance comparison between baseline methods and our 1D-CNN leveraging the 4 subdatasets across accuracy (Acc), precision, recall, F1-score and k.  of our 1D-CNN leveraging those 4 subdatasets showed no statistically significant difference between them (p >0.05).

V. DISCUSSION
In this paper, we proposed a 1D-CNN model for automatic insomnia identification leveraging single-channel EEG signal labelled with sleep stage annotations. In order to further investigate which sleep stage has better insomnia identification performance, we constructed 4 subdatasets from EEG epochs according to their sleep stage annotations, and compared the performance of our 1D-CNN leveraging the 4 subdatasets respectively. Table 8 shows the comparison of identification performance for our method and other existing methods. As shows in Table 8, 1D-CNN model introduced in this paper could achieve superior performance than exsiting methods.
We employed two strategies when constructing subdatsets. Those two strategies guaranteed the 4 subdatasets have the same size and the same epoch number from each subject, which could avoid the effect of dataset size and difference between subjects on identification performance. In general, 1D-CNN might learn more features from the subjects who have more epochs when the epoch number from each subject varies greatly, thus leading to the performance degradation in inter-patient experiment. Therefore, we set a threshold for epoch number at 800 to prevent the great difference of the epoch number for each subject in subdataset.
Our experiments demonstrated that our 1D-CNN leveraging the 3 subdatasets composed of REM, LSS and SWS epochs, respectively, achieved higher average accuracies in comparison with baseline methods both in intra-patient and inter-patient experiments. We consider this is because 1D-CNN is an end-to-end leaning model, i.e. the feature extractor and classifier are integrated into one single algorithm. The end-to-end learning method can overcome the limitation of the handcrafted features that are limited by prior VOLUME 8, 2020 knowledge, thus improving the performance of insomnia identification.
The experimental results also indicated that amongst all the sleep stages, 1D-CNN leveraging REM and SWS epochs exhibited the best insomnia identification performance in intra-patient experiment, whereas no statistically significant difference was found in inter-patient experiment. Several researches in the past [40]- [42] demonstrated that the power of EEG during sleep between insomnia patients and healthy subjects had significant difference in NREM and REM stages. More specifically, the high frequency EEG activities (in the sigma and beta range) were increased in NREM and REM stage in insomnia group [24]. This might be a possible reason for REM-DS and SWS-DS have better insomnia identification performance in intra-patient experiment. Given the strong hereditary and individual variability, it is hard to discover statistical rules when leveraging small sample sizes dataset in inter-patient experiment. Therefore, larger sample size dataset is required for further investigation.
Moreover, the comparison of the two experiments demonstrated that the average identification accuracy of our 1D-CNN could achieve 99.16% in intra-patient experiment, whereas it could only reach 87.49% in inter-patient experiment with larger standard deviation. We consider the high accuracy in intra-patient experiment is caused by the similarity of epochs, i.e. epochs from the same patient are utilized both for training and testing. However, inter-patient experiment is more realistic evaluation paradigm which could guarantee the generalizability of the method. Therefore, we suggest future research on automatic insomnia identification based on deep learning should focus on the inter-patient experiment performance.
We want to also mention that the goal of the proposed model in this paper is to identify each 30s epoch in the whole night EEG recording correctly. If the automatic insomnia identification result is only based on one 30s epoch, it will be a waste of the practical measurement EEG data. Therefore, in the clinical practice, we suggest that each epoch of the whole night EEG recording is identified by the 1D-CNN, and then the final identification result is obtained by majority voting.
Our research also has some limitations. Firstly, the effect of the frequency band of EEG on automatic insomnia identification based on 1D-CNN has not been explored yet. Perlis et al. [42] explained the pathological mechanism of insomnia from a neurocognitive perspective, i.e. insomnia was associated with high frequency activity of EEG. In future work, we will focus on the effect of frequency band of EEG on automatic insomnia identification based on 1D-CNN. Secondly, the dataset utilized in this study was relatively small, and this is the reason why we implemented the inter-patient experiment based on LOSOCV strategy. Additionally, we tried the large-scale CNN structures such as VggNet and ResNet. However, we found that they had a good performance in intra-patient experiment, whereas they failed to produce acceptable results when it came to inter-patient experiment. We consider this is because the deep CNN structure result in overfitting over the relatively small dataset. Therefore, we reduced the scale of the network and found the 1D-CNN with 5 convolution layers could achieve superior performance. In future work, we plan to obtain larger sleep databases with sleep stage annotations. Under large sample dataset, we could select more subjects for testing, and further increase the scale of our 1D-CNN to maximize the ability of deep convolutional neural networks.

VI. CONCLUSION
In this paper, we proposed a 1D-CNN model for automatic insomnia identification based on single-channel EEG labelled with sleep stage annotations, and further investigated the identification performance based on different sleep stages. Our experiments demonstrated that our 1D-CNN leveraging the 3 subdatasets composed of REM, LSS and SWS epochs, respectively, achieved higher average accuracy in comparison with baseline methods under both intra-patient and inter-patient paradigms. The experimental results also indicated that amongst all the sleep stages, 1D-CNN leveraging REM and SWS epochs exhibited the best insomnia identification performance in intra-patient paradigm, whereas no statistically significant difference was found in inter-patient paradigm.
Overall, for automatic insomnia identification based on single-channel EEG labelled with sleep stages, 1D-CNN model introduced in this paper could achieve superior performance than traditional methods. Further experiment based on larger sleep databases under inter-patient paradigm is still required in future work.
BUFANG YANG received the B.S. degree in detection, guidance and control technology from Northwestern Polytechnical University, China, in 2019. He is currently pursuing the M.S. degree in electronics and communication engineering with Nanjing University, China. His current research interests include electroencephalogram signal processing, machine learning, deep learning, and automatic sleep stage scoring.
HONGXING LIU received the Ph.D. degree from Xi'an Jiaotong University, China, in 1997. He is currently a Professor of information electronics with the School of Electronic Science and Engineering, Nanjing University, China. He is also a master's tutor for signal and information processing. He is also a member of the Biomedical Electronics Branch, Chinese Institute of Electronics. He has focused on fetal electrocardiogram technology and achieved remarkable results. He has presided over three projects of the National Natural Science Foundation, one social development project of Jiangsu Science and Technology Support Program, and more than ten horizontal cooperation projects. He has published nearly 100 articles by the first author or correspondent author, including more than 20 papers by SCI. The first inventor applied for 33 invention patents, of which 17 were authorized. His research interests include intelligent information processing and biomedical electronics. VOLUME 8, 2020