Search for a command to run...
For the diagnosis of sleep disorders and analysis of sleep habits, the precise identification of sleep stages is crucial. Although manual scoring methods are common, the work process can be laborious, and it inherently involves variability. To get over these limitations, this research introduces AdvancedSleepClassifier, a hybrid deep learning system that is capable of classifying sleep stages from a single channel of electroencephalogram (EEG). The introduced model seeks to exploit temporal and spectral aspects of EEG information by the use of dilated Convolutional Neural Network (CNN) integration, squeeze-and-excitation blocks, bidirectional long short-term memory (LSTM) layers, and multi-head self-attention. The approach guarantees the system complies with the traditional EEG analysis techniques and, at the same time, facilitates the automated processes and results. The evaluation was done by drawing on the Institute for Systems and Robotics University of Coimbra (ISRUC-Sleep) and Sleep European Data Format (SleepEDF) data that are freely available. EEG recordings were segmented into segments of 30 s each, which were then filtered, normalised, and the power spectral density (PSD) was computed within five frequency bands. By doing spectral-temporal feature extraction simultaneously, the architecture enables the use of both raw EEG data and PSD features. The team applied weighted cross-entropy loss and data augmentation to address the equilibrium of the class counting problem. The model was iterated 10-fold cross-validation without subject bias and tested for two-class, three-class, four-class, and five-class tasks, using accuracy, F1-score and Area Under the ROC Curve (AUC-ROC) metrics. The AdvancedSleepClassifier was capable of delivering precise and trustworthy classification results on different levels of class detail. The maximum accuracy was derived at 97.2% for binary classification (Wake vs. Sleep), 91.3% for three-class (Wake, NREM, REM), 89.4% for four-class and 85.07% for five-class classification on SleepEDF. It obtained significantly high F1 scores in clinically significant stages, particularly Wake. The classifier gave an F1 score of 0.94 for Wake and 0.87 for N3; with the support of robust class separation, the ROC-AUC scores exceeded 0.98 in most situations. The use of Grad-CAM (Gradient-weighted Class Activation Mapping) and t-Distributed Stochastic Neighbour Embedding N(t-SNE) provided additional support for the physiological relevance of the features that were found by the model. The model shows great promise for the provision of interpretable, useful solutions to the automatic sleep staging task utilizing only EEG data from a single channel. It has good generalization on different datasets having different class structures, while maintaining clinical significance along with high reliability. Future work may involve extending the model to multimodal signals and optimizing it for real-time deployment in portable health-monitoring devices.