###### Abstract  
Current methods for sleep stage detection rely on sensors to collect physiological data. These methods are inaccurate and take up considerable medical resources. Thus, in this study, we propose a Taguchi-based multiscale convolutional compensatory fuzzy neural network (T-MCCFNN) model to automatically detect and classify sleep stages. In the proposed T-MCCFNN model, multi-scale convolution kernels extract features of the input electroencephalogram signal and a compensatory fuzzy neural network is used in place of a traditional fully connected network as a classifier to improve the convergence rate during learning and to reduce the number of model parameters required. Due to the complexity of general deep learning networks, trial and error methods are often used to determine their parameters. However, this method is very time-consuming. Therefore, this study uses the Taguchi method instead, where the optimal parameter combination is identified over a minimal number of experiments. We use the Sleep-EDF database to evaluate the proposed model. The results indicate that the proposed T-MCCFNN sleep stage classification accuracy is 85.3%, which is superior to methods proposed by other scholars. sleep stage classification; deep learning network; fuzzy neural network (FNN); Taguchi method; electroencephalography +
Footnote †: journal:  
Manual sleep stage classification by experts from PSG records is time-consuming, labor-intensive, and inconsistent, and thus, not a feasible solution. Therefore, automatic sleep stage classification is required. Many scholars have developed automatic sleep stage classification systems based on machine learning. Machine learning typically involves feature extraction and classification. [PERSON] et al. [10] extracted features from single-channel EEG signals and used the k nearest neighbor algorithm with the Mahalanobis distance for classification. The method performs well in addressing four types of sleep stage problems. [PERSON] et al. [11] extracted 13 features from EEG, EOG, and EMG readings and used fuzzy vector quantization and a genetic algorithm to improve the resolution of a hidden Markov model (HMM). [PERSON] et al. [12] used Hilbert-Huang transform to extract features from the input EEG signal, random forest for classification, Choi-Williams distribution, and continuous wavelet transform. [PERSON] et al. [13] used six EEG channels, two EOG channels, and maximal overlap discrete wavelet transformation for feature extraction. They also used a support vector machine to classify the selected features. Although machine learning methods can solve sleep stage classification problems, feature extraction is performed independently from classification, and thus, is reliant on experts. Deep learning technology, which has been widely used in the medical field for the diagnosis of health problems such as breast cancer [14], epilepsy [15], or arrhythmia [16], can solve several machine learning problems. Deep learning techniques eliminate the need for manual feature extraction. During model training, features are automatically generated according to signals. [PERSON] et al. [17] employed a dilated convolutional neural network and multi-headed attention mechanism for feature extraction. [PERSON] et al. [18] extracted features using time series-based Temporal Convolutional Neural (TCN). Other scholars have employed deep learning-based models for sleep stage detection as well. [PERSON] et al. [19] used a Fourier transform to convert the original one-dimensional EEG signal into the input data of a convolutional neural network (CNN) in the form of a two-dimensional image. [PERSON] et al. [20] developed a neural network architecture that combined a one-dimensional CNN and HMM. The neural network architecture performed well on Fpz-Cz and Pz-Oz EEG channels. [PERSON] and [PERSON] [21] used the Fpz-Cz channel's EEG and EOG signals as input for the CNN and a recurrent neural network hybrid model. They evaluated the performance of the model in the Sleep-EDF dataset [22].