نشریه علمی مهندسی پزشکی زیستی

Automatic sleep stage classification using a hybrid structure based on Frequency Multi-Head Attention mechanism and Convolutional Neural Network

Document Type : Full Research Paper

Authors

Department of Electrical and Computer Engineering, Babol Noshirvani University of Technology, Babol, Iran

Abstract
Approximately one-third of human life is spent in sleep, and sleep disorders can significantly affect quality of life and cognitive performance; therefore, accurate sleep stage detection is of particular importance. In this study, a lightweight parallel hybrid model is proposed for automatic sleep stage classification using EEG signals. In this model, features obtained by applying the multi-head attention mechanism (MHA) to the spectral content of EEG signals were combined with features extracted from one-dimensional convolutional layers (1D-CNN). Combining the spectral features improved by MHA with temporal features extracted from CNN resulted in a significant increase in classification accuracy. The proposed model achieved an overall accuracy of 81% in sleep stage classification on the Sleep_Edf_20 dataset, indicating its competitive performance over heavier architectures. To demonstrate the superiority of the proposed model, the one-dimensional convolutional neural network was combined with the multi-head attention mechanism in three different structures. The results showed that the proposed structure with a smaller number of parameters has greater accuracy in classifying sleep stages. In addition, to deal with the problem of data imbalance between different classes of sleep stages, a weighting method was used in the cost function, which provided a significant improvement in identifying undersampled stages, especially stage1 of sleep.

Keywords

Subjects


Volume 19, Issue 2
Summer 2025
Pages 101-110

  • Receive Date 29 August 2025
  • Revise Date 22 November 2025
  • Accept Date 16 December 2025