NRGAMTE: Neurophysiological Residual Gated Attention Multimodal Transformer Encoder for Sleep Disorder Detection
Abstract
1. Introduction
1.1. Problem Statement
1.2. Objective
1.3. Contributions
- We developed a sleep disorder detection framework that combines EEG, EMG, and EOG signals to capture complex physiological information and address the limitations of the unimodal approaches;
- We employed a fixed 30-s windowing approach with both time- and frequency-domain features to effectively differentiate between various sleep disorders;
- We utilized separate 1D-CNNs for each modality to preserve signal-specific characteristics and learn robust high-level feature representations;
- We designed a multimodal transformer encoder that captures long-range temporal dependencies while retaining modality-specific features through learnable residual paths, achieving superior accuracy across multiple sleep disorder classes;
- We proposed the MRGCAF mechanism to perform cross-attention among modalities, filtering noisy and redundant interactions via a forget gate, while the learnable residual path preserves critical information during gating. This improves interpretability and detection performance.
2. Literature Review
2.1. Single-Modality-Based Algorithms
2.2. Multi-Modal Based Methods
2.3. Model Selection
3. Dataset
3.1. CAP Sleep Database
3.2. Sleep-EDF Expanded Dataset
4. Proposed Method
4.1. Pre-Processing Using Fixed-Length Windowing
4.2. Feature Extraction
4.2.1. Time-Domain Features
- Mean is the average amplitude of the signal in a 30-s window; it provides information about the signal’s activity level. Abnormal events like arousals or bruxism can shift the mean amplitude due to muscle activation or cortical excitation.
- Standard Deviation (SD) measures variability of the signal amplitude around its mean. High SD indicates abrupt fluctuations that are present during arousals or movement. Disorders such as sleep apnea can increase signal variance because of frequent interruptions.
- Skewness quantifies asymmetry of the signal distribution; skewed signals indicate nonuniform bursts. This helps distinguish stable sleep from disordered sleep.
- Kurtosis measures the presence of outliers in the signal. High kurtosis indicates sharp spikes or transients; transient events are relevant for identifying sleep stages and disorders like narcolepsy.
- Zero Crossing Rate (ZCR) counts the number of times the signal crosses the zero-amplitude line and reflects rapid changes in the time domain. Higher ZCR indicates higher frequency activity. EMG signals during movement disorders typically show high ZCR, whereas deep-sleep EEG shows lower ZCR due to slow-wave dominance.
4.2.2. Frequency-Domain Features
Fast Fourier Transform (FFT)
Features Extracted from FFT
- Spectral centroid is the center of mass of the power spectrum; higher centroid indicates greater high-frequency content which is typically wake or REM. Spectral centroid helps quantify shifts in dominant frequencies across sleep stages.
- Spectral Entropy measures disorder in the power spectrum; high spectral entropy is a more complex signal with multiple active frequencies (wake and REM tend to show higher entropy than deep sleep). This feature helps detect stage instability and arousals.
- Spectral Band Power measures energy within EEG bands such as delta, theta, alpha, and beta, and reflects brain functional states during sleep. Disorders such as apnea or insomnia can produce abnormal band-power distribution; this feature assists in detecting such abnormalities.
4.3. Modality Embedding Using 1D-CNN
4.4. Multimodal Fusion and Detection Using MRGCAF
4.4.1. Cross-Modality Attention
4.4.2. Cross-Modality Forget Gate
4.4.3. Fusion Layer
4.4.4. Learnable Residual Path for Preventing Information Loss
4.4.5. Model Training
Algorithm 1 Process of proposed NGRMTE model for reproducibility. |
Input—Raw physiological signals (EEG, EMG, EOG) Output—Detected sleep disorder class Pre-processing For each modality in (EEG, EMG, EOG) Segment signals into 30-s epochs Feature Extraction For each 30-s segment in each modality Extract time-domain features such as Mean, Standard deviation, Skewness, Kurtosis, and ZCR Extract frequency-domain features using FFT, such as Spectral centroid, Spectral entropy, and Spectral band power using Equations (1)–(6). Modality Embedding using 1D-CNN For each modality Input extracted features into modality-specific 1D-CNN using Equation (7) Obtain modality-specific embeddings (fixed dimension) Modality-wise Residual Gated Cross-Attention Fusion (MRGCAF) For each modality pair (EEG-EOG, EEG-EMG, EOG-EMG) Compute cross-attention between modality embeddings Apply the forget gate to filter redundant or noisy interactions using Equations (8) and (9) Add a learnable residual path to preserve essential signal features Fuse actual modality and filtered cross-modality features using Equation (10) Multi-Modal Transformer Stack fused features from all modality pairs Apply feed-forward networks Positional encoding Classification Flatten transformer output Pass through linear layers with a learnable residual path using Equation (11) Apply SoftMax activation for multi-class classification using Equation (12) Use focal loss to address class imbalance using Equation (13) Optimize using the Adam optimizer Return—Detected sleep disorder class for each epoch |
5. Results and Discussion
5.1. Performance Metrics
- Accuracy—the ratio of correctly predicted samples by the model, as given in Equation (15):
- Precision—the ratio of predicted positive instances that are truly positive, as in Equation (16):
- Recall—also called sensitivity, the ratio of actual positive instances correctly identified as positive, as in Equation (17):
- F1-score—the harmonic mean of precision and recall, which offers a comprehensive validation of the precision and recall ability of the method as in Equation (18):
- Specificity—the ratio of true negative instances correctly identified as negative, as in Equation (19):
5.2. Cross-Dataset Generalization Analysis
5.3. Cross-Subject Validation
5.4. Model Diagnostic Analysis
5.5. Comparative Analysis
5.5.1. Single-Modality-Based Comparison
5.5.2. Multi-Modality-Based Comparison
5.6. Discussion
5.7. Research Implication
- Enhanced detection accuracy in multimodal sleep analysis—by combining EEG, EMG, and EOG with modality-wise gated attention, the NRGAMTE model effectively enhances the accuracy and reliability of sleep disorder detection. This enhancement supports the development of more effective clinical decision-support systems.
- Efficient feature elimination via gated attention mechanism—the incorporation of cross-modality forget gates with learnable residual paths enables the model to filter irrelevant and noisy modality-specific features, and improves generalization across subjects.
- Transformer Viability—by adapting transformer architecture for multimodal signals, the model validates the scalability and applicability of attention-based models in complex time-series learning tasks involving temporal and cross-modal dependencies.
- Trade-off between performance and computational efficacy—the NRGAMTE achieves superior detection while minimizing the training and inference time, outperforming the existing baselines in both accuracy and runtime efficiency.
5.8. Limitations
6. Conclusions
Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- You, J.; Ma, Y.; Wang, Y. GTransU-CAP: Automatic labeling for cyclic alternating patterns in sleep EEG using gated transformer-based U-Net framework. Comput. Biol. Med. 2022, 147, 105804. [Google Scholar] [CrossRef]
- Sharma, M.; Patel, V.; Acharya, U.R. Automated identification of insomnia using optimal bi-orthogonal wavelet transform technique with single-channel EEG signals. Knowl.-Based Syst. 2021, 224, 107078. [Google Scholar] [CrossRef]
- Zhao, C.; Li, J.; Guo, Y. SleepContextNet: A temporal context network for automatic sleep staging based single-channel EEG. Comput. Methods Programs Biomed. 2022, 220, 106806. [Google Scholar] [CrossRef]
- Hartmann, S.; Baumert, M. Subject-level normalization to improve a-phase detection of cyclic alternating pattern in sleep EEG. In Proceedings of the 2023 45th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Sydney, Australia, 24–27 July 2023; pp. 1–4. [Google Scholar]
- Rahman, M.A.; Jahan, I.; Islam, M.; Jabid, T.; Ali, M.S.; Rashid, M.R.A.; Islam, M.M.; Ferdaus, M.H.; Rasel, M.M.K.; Jahan, M.R.; et al. Improving Sleep Disorder Diagnosis through Optimized Machine Learning Approaches. IEEE Access 2025, 13, 20989–21004. [Google Scholar] [CrossRef]
- Lin, X.X.; Lin, P.; Yeh, E.H.; Liu, G.R.; Lien, W.C.; Fang, Y. RAPIDEST: A framework for obstructive sleep apnea detection. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 31, 387–397. [Google Scholar] [CrossRef]
- Zubair, M.; Tripathy, R.K.; Alhartomi, M.; Alzahrani, S.; Ahamed, S.R. Detection of Sleep Apnea From ECG Signals Using Sliding Singular Spectrum Based Subpattern Principal Component Analysis. IEEE Trans. Artif. Intell. 2023, 5, 2897–2906. [Google Scholar] [CrossRef]
- Shen, Q.; Xin, J.; Liu, X.; Wang, Z.; Li, C.; Huang, Z.; Wang, Z. LGSleepNet: An automatic sleep staging model based on local and global representation learning. IEEE Trans. Instrum. Meas. 2023, 72, 2521814. [Google Scholar] [CrossRef]
- Wang, H.; Guo, H.; Zhang, K.; Gao, L.; Zheng, J. Automatic sleep staging method of EEG signal based on transfer learning and fusion network. Neurocomputing 2022, 488, 183–193. [Google Scholar] [CrossRef]
- Kazemi, A.; McKeown, M.J.; Mirian, M.S. Sleep staging using semi-unsupervised clustering of EEG: Application to REM sleep behavior disorder. Biomed. Signal Process. Control 2022, 75, 103539. [Google Scholar] [CrossRef]
- Sharma, M.; Tiwari, J.; Acharya, U.R. Automatic sleep-stage scoring in healthy and sleep disorder patients using optimal wavelet filter bank technique with EEG signals. Int. J. Environ. Res. Public Health 2021, 18, 3087. [Google Scholar] [CrossRef] [PubMed]
- Wang, H.; Lu, C.; Zhang, Q.; Hu, Z.; Yuan, X.; Zhang, P.; Liu, W. A novel sleep staging network based on multi-scale dual attention. Biomed. Signal Process. Control 2022, 74, 103486. [Google Scholar] [CrossRef]
- Cong, Z.; Zhao, M.; Gao, H.; Lou, M.; Zheng, G.; Wang, Z.; Wang, X.; Yan, C.; Ling, L.; Li, J.; et al. BiTS-SleepNet: An Attention-Based Two Stage Temporal-Spectral Fusion Model for Sleep Staging with Single-Channel EEG. IEEE J. Biomed. Health Inform. 2024, 29, 3366–3376. [Google Scholar] [CrossRef]
- Fang, Y.; Xia, Y.; Chen, P.; Zhang, J.; Zhang, Y. A dual-stream deep neural network integrated with adaptive boosting for sleep staging. Biomed. Signal Process. Control 2023, 79, 104150. [Google Scholar] [CrossRef]
- Idrobo-Ávila, E.; Bognár, G.; Krefting, D.; Penzel, T.; Kovács, P.; Spicher, N. Quantifying the suitability of biosignals acquired during surgery for multimodal analysis. IEEE Open J. Eng. Med. Biol. 2024, 5, 250–260. [Google Scholar] [CrossRef] [PubMed]
- Chen, Z.; Pan, X.; Xu, Z.; Li, K.; Lv, Y.; Zhang, Y.; Sun, H. A semi-supervised multi-scale arbitrary dilated convolution neural network for pediatric sleep staging. IEEE J. Biomed. Health Inform. 2023, 28, 1043–1053. [Google Scholar] [CrossRef]
- Tao, J.; Huang, J.; Miao, B.; Yang, L. A multimodal dataset for training deep learning models aimed at detecting and analyzing sleep apnea. Sci. Data 2025, 12, 1263. [Google Scholar] [CrossRef]
- Abdelfattah, M.; Zhou, L.; Sum-Ping, O.; Hekmat, A.; Galati, J.; Gupta, N.; Adaimi, G.; Marwaha, S.; Parekh, A.; Mignot, E.; et al. Automated detection of isolated REM sleep behavior disorder using computer vision. Ann. Neurol. 2025, 97, 860–872. [Google Scholar] [CrossRef]
- An, P.; Zhao, J.; Du, B.; Zhao, W.; Zhang, T.; Yuan, Z. Amplitude–time dual-view fused EEG temporal feature learning for automatic sleep staging. IEEE Trans. Neural Netw. Learn. Syst. 2022, 35, 6492–6506. [Google Scholar] [CrossRef] [PubMed]
- Lyu, J.; Shi, W.; Zhang, C.; Yeh, C.H. A novel sleep staging method based on EEG and ECG multimodal features combination. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 4073–4084. [Google Scholar] [CrossRef]
- Vergara-Sánchez, D.L.; Calvo, H.; Moreno-Armendáriz, M.A. Distributional Representation of Cyclic Alternating Patterns for A-Phase Classification in Sleep EEG. Appl. Sci. 2023, 13, 10299. [Google Scholar] [CrossRef]
- Sharma, M.; Lodhi, H.; Yadav, R.; Sampathila, N.; Swathi, K.S.; Acharya, U.R. Automated explainable detection of cyclic alternating pattern (CAP) phases and sub-phases using wavelet-based single-channel EEG signals. IEEE Access 2023, 11, 50946–50961. [Google Scholar] [CrossRef]
- Xiao, W.; Linghu, R.; Li, H.; Hou, F. Automatic sleep staging based on single-channel EEG signal using null space pursuit decomposition algorithm. Axioms 2022, 12, 30. [Google Scholar] [CrossRef]
- Urtnasan, E.; Joo, E.Y.; Lee, K.H. AI-enabled algorithm for automatic classification of sleep disorders based on single-lead electrocardiogram. Diagnostics 2021, 11, 2054. [Google Scholar] [CrossRef]
- Guillot, A.; Sauvet, F.; During, E.H.; Thorey, V. Dreem open datasets: Multi-scored sleep datasets to compare human and automated sleep staging. IEEE Trans. Neural Syst. Rehabil. Eng. 2020, 28, 1955–1965. [Google Scholar] [CrossRef]
- Kontras, K.; Chatzichristos, C.; Phan, H.; Suykens, J.; De Vos, M. Core-sleep: A multimodal fusion framework for time series robust to imperfect modalities. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 840–849. [Google Scholar] [CrossRef] [PubMed]
- Gong, Y.; Wang, F.; Lv, Y.; Liu, C.; Li, T. Automatic Sleep Staging Using BiRNN with Data Augmentation and Label Redirection. Electronics 2023, 12, 2394. [Google Scholar] [CrossRef]
- Tripathi, P.; Ansari, M.A.; Gandhi, T.K.; Mehrotra, R.; Heyat, M.B.B.; Akhtar, F.; Ukwuoma, C.C.; Muaad, A.Y.; Kadah, Y.M.; Al-Antari, M.A.; et al. Ensemble computational intelligent for insomnia sleep stage detection via the sleep ECG signal. IEEE Access 2022, 10, 108710–108721. [Google Scholar] [CrossRef]
- Jang, E.H.; Choi, K.W.; Kim, A.Y.; Yu, H.Y.; Jeon, H.J.; Byun, S. Automated detection of panic disorder based on multimodal physiological signals using machine learning. ETRI J. 2023, 45, 105–118. [Google Scholar] [CrossRef]
- Liu, G.; Wei, G.; Sun, S.; Mao, D.; Zhang, J.; Zhao, D.; Tian, X.; Wang, X.; Chen, N. Micro SleepNet: Efficient deep learning model for mobile terminal real-time sleep staging. Front. Neurosci. 2023, 17, 1218072. [Google Scholar] [CrossRef]
- Lee, M.; Kwak, H.G.; Kim, H.J.; Won, D.O.; Lee, S.W. SeriesSleepNet: An EEG time series model with partial data augmentation for automatic sleep stage scoring. Front. Physiol. 2023, 14, 1188678. [Google Scholar] [CrossRef]
- Jain, R.; Ramakrishnan, A.G. Modality-specific feature selection, data augmentation and temporal context for improved performance in sleep staging. IEEE J. Biomed. Health Inform. 2023, 28, 1031–1042. [Google Scholar] [CrossRef] [PubMed]
- Monowar, M.M.; Nobel, S.N.; Afroj, M.; Hamid, M.A.; Uddin, M.Z.; Kabir, M.M.; Mridha, M.F. Advanced sleep disorder detection using multi-layered ensemble learning and advanced data balancing techniques. Front. Artif. Intell. 2025, 7, 1506770. [Google Scholar]
- Duarte, C.D.; Meo, M.M.; Iaconis, F.R.; Wainselboim, A.; Gasaneo, G.; Delrieux, C. A Permutation Entropy Method for Sleep Disorder Screening. Brain Sci. 2025, 15, 691. [Google Scholar] [CrossRef] [PubMed]
- Zahid, A.N.; Jennum, P.; Mignot, E.; Sorensen, H.B. MSED: A multi-modal sleep event detection model for clinical sleep analysis. IEEE Trans. Biomed. Eng. 2023, 70, 2508–2518. [Google Scholar] [CrossRef] [PubMed]
- Loh, H.W.; Ooi, C.P.; Dhok, S.G.; Sharma, M.; Bhurane, A.A.; Acharya, U.R. Automated detection of cyclic alternating pattern and classification of sleep stages using deep neural network. Appl. Intell. 2022, 52, 2903–2917. [Google Scholar] [CrossRef]
- Sharma, M.; Lodhi, H.; Yadav, R.; Acharya, U.R. Sleep disorder identification using wavelet scattering on ECG signals. Int. J. Imaging Syst. Technol. 2024, 34, e22980. [Google Scholar] [CrossRef]
- Agarwal, M.; Singhal, A. Classification of cyclic alternating patterns of sleep using EEG signals. Sleep Med. 2024, 124, 282–288. [Google Scholar] [CrossRef]
- Halder, B.; Anjum, T.; Bhuiyan, M.I.H. An attention-based multi-resolution deep learning model for automatic A-phase detection of cyclic alternating pattern in sleep using single-channel EEG. Biomed. Signal Process. Control 2023, 83, 104730. [Google Scholar] [CrossRef]
- Wadichar, A.; Murarka, S.; Shah, D.; Bhurane, A.; Sharma, M.; Mir, H.S.; Acharya, U.R. A hierarchical approach for the diagnosis of sleep disorders using convolutional recurrent neural network. IEEE Access 2023, 11, 125244–125255. [Google Scholar] [CrossRef]
- Kumar, K.; Kumar, P.; Patel, R.K.; Sharma, M.; Bajaj, V.; Acharya, U.R. Time frequency distribution and deep neural network for automated identification of insomnia using single channel EEG-signals. IEEE Lat. Am. Trans. 2024, 22, 186–194. [Google Scholar] [CrossRef]
- Fei, K.; Wang, J.; Pan, L.; Wang, X.; Chen, B. A sleep staging model on wavelet-based adaptive spectrogram reconstruction and light weight CNN. Comput. Biol. Med. 2024, 173, 108300. [Google Scholar] [CrossRef] [PubMed]
- Wang, J.; Zhao, S.; Jiang, H.; Zhou, Y.; Yu, Z.; Li, T.; Li, S.; Pan, G. CareSleepNet: A hybrid deep learning network for automatic sleep staging. IEEE J. Biomed. Health Inform. 2024, 28, 7392–7405. [Google Scholar] [CrossRef]
- Cheng, Y.H.; Lech, M.; Wilkinson, R.H. Distributed neural network system for multimodal sleep stage detection. IEEE Access 2023, 11, 29048–29061. [Google Scholar] [CrossRef]
- Cheng, Y.H.; Lech, M.; Wilkinson, R.H. Simultaneous sleep stage and sleep disorder detection from multimodal sensors using deep learning. Sensors 2023, 23, 3468. [Google Scholar] [CrossRef] [PubMed]
- CAP Sleep Database. Available online: https://physionet.org/content/capslpdb/1.0.0/ (accessed on 1 July 2025).
- Sleep-EDF Expanded Dataset. Available online: https://www.physionet.org/content/sleep-edfx/1.0.0/ (accessed on 1 July 2025).
- Tervonen, J.; Pettersson, K.; Mäntyjärvi, J. Ultra-short window length and feature importance analysis for cognitive load detection from wearable sensors. Electronics 2021, 10, 613. [Google Scholar] [CrossRef]
- Zhang, M.; Yin, J.; Chen, W. Rolling bearing fault diagnosis based on time-frequency feature extraction and IBA-SVM. IEEE Access 2022, 10, 85641–85654. [Google Scholar] [CrossRef]
- Wang, Y.; He, J.; Wang, D.; Wang, Q.; Wan, B.; Luo, X. Multimodal transformer with adaptive modality weighting for multimodal sentiment analysis. Neurocomputing 2024, 572, 127181. [Google Scholar] [CrossRef]
Methods | Dataset | Modality | Accuracy (%) | Techniques Used | Performance Metrics |
---|---|---|---|---|---|
1D-CNN [36] | CAP Sleep | EEG | 90.46 | 1D-CNN | Accuracy, Precision, Recall, F1-score |
EbagT [37] | CAP Sleep | ECG | 98.00 | Ensemble Bag of Trees | Accuracy |
kNN [38] | CAP Sleep | EEG | 79.14 | K-Nearest Neighbors | Accuracy, Precision, Recall, F1-score |
1D-CNN-CAM [39] | CAP Sleep | EEG | 90.31 | CNN + Attention | Accuracy, F1-score, Specificity |
LSTM + CNN [40] | CAP Sleep | EEG | 91.45 | LSTM + CNN | Accuracy |
MWTCNNNet [41] | CAP Sleep | EEG | 98.90 | Morlet Wavelet + CNN | Accuracy, Recall, Specificity |
WASR-LCNN [42] | Sleep-EDF expanded | EEG | 87.60 | Wavelet + Light-weight CNN | Accuracy, F1-score |
CareSleepNet [43] | Sleep-EDF expanded | EEG + EOG | 85.10 | CNN + Transformer | Accuracy, F1-score |
MM-DMS-Distributed CNN + PT Shallow [44] | CAP Sleep | EEG + ECG + EMG | 95.43 | Shallow Neural Networks | Accuracy |
MML-DMS [45] | CAP Sleep | EEG + ECG + EMG | 99.09 | Multimodal Multilabel Neural Network | Accuracy |
Proposed NRGAMTE | CAP Sleep | EEG + EOG + EMG | 99.64 | 1D CNN + Multimodal Transformer + MRGCAF | Accuracy, Precision, Recall, F1-score, Specificity |
Proposed NRGAMTE | Sleep-EDF expanded | EEG + EOG + EMG | 94.51 | 1D CNN + Multimodal Transformer + MRGCAF | Accuracy, Precision, Recall, F1-score, Specificity |
Sleep Stages | Healthy | Sleep Disorder | Total | ||||
---|---|---|---|---|---|---|---|
Insomnia | Narcolepsy | PLM | RBD | NFLE | |||
Wake | 451 | 3804 | 1305 | 1363 | 4436 | 3282 | 14,641 |
S1 | 280 | 223 | 301 | 284 | 844 | 1165 | 3097 |
S2 | 2172 | 2456 | 1708 | 2845 | 7123 | 11,317 | 27,621 |
S3 | 573 | 670 | 476 | 988 | 2820 | 3111 | 8638 |
S4 | 1184 | 415 | 568 | 955 | 2331 | 4362 | 9815 |
REM | 1409 | 986 | 1258 | 1340 | 3364 | 5205 | 13,562 |
Total | 6069 | 8554 | 5616 | 7775 | 20,918 | 28,442 | 77,374 |
Symbol | Description | Dimension |
---|---|---|
Input signal epoch | ||
CNN extracted feature vectors | ||
Query, Key, Value matrices (transformer input) | ||
Attention weight matrix | ||
Gated multimodal fused feature | ||
Hidden representation after transformer | ||
Output prediction (sleep stage class) | , where |
Parameters | Value | Description |
---|---|---|
Epochs | 100 | Number of training cycles |
Batch size | 64 | Number of samples per training batch |
Learning rate | 0.001 | Initial step size for weight updates |
Optimizer | Adam | Adaptive moment estimation optimizer |
Loss function | Focal loss | Handles class imbalance |
Embedding size | 128 | Dimension of shared modality embedding |
1D-CNN kernel size | 3 | Receptive field of CNN for every modality |
1D-CNN stride | 1 | Shift size in convolution |
Transformer layers | 4 | Number of encoder blocks in multimodal transformer |
Number of attention heads | 8 | Number of cross-gated attention per transformer block |
Dropout rate | 0.2 | Regularization factor for preventing overfitting |
Forget gate activation | Sigmoid | Activation function used in the gating mechanism |
Segment window size | 30 s | Fixed window size |
Classes | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|
CAP Sleep Database | ||||
NFLE | 99.70 | 99.80 | 99.75 | 99.83 |
PLM | 98.80 | 98.91 | 98.85 | 98.94 |
RDB | 98.71 | 98.66 | 98.68 | 98.79 |
Insomnia | 99.04 | 98.77 | 98.90 | 99.02 |
Narcolepsy | 98.92 | 99.13 | 99.02 | 98.96 |
Healthy | 99.81 | 99.76 | 99.78 | 99.85 |
Sleep-EDF expanded dataset | ||||
Wake (W) | 95.81 | 95.36 | 95.58 | 96.03 |
N1 | 91.04 | 89.91 | 90.47 | 92.22 |
N2 | 94.28 | 95.13 | 94.70 | 93.89 |
N3 | 94.91 | 94.67 | 94.79 | 95.18 |
REM | 95.02 | 94.68 | 94.85 | 95.26 |
Modalities | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
EEG | 99.23 | 99.07 | 99.31 | 99.18 | 99.25 |
EOG | 98.35 | 98.02 | 99.08 | 98.54 | 99.02 |
EMG | 98.57 | 98.21 | 98.76 | 98.48 | 98.82 |
EEG + EOG | 97.64 | 97.32 | 97.71 | 97.51 | 97.75 |
EEG + EMG | 97.72 | 97.53 | 97.65 | 97.58 | 97.68 |
EOG + EMG | 98.05 | 97.89 | 97.66 | 97.77 | 97.74 |
EEG + EOG + EMG (NRGAMTE) | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Sleep-EDF Expanded | |||||
EEG | 93.76 | 93.41 | 94.62 | 94.01 | 95.05 |
EOG | 93.14 | 92.87 | 92.52 | 92.69 | 93.44 |
EMG | 93.42 | 93.16 | 93.88 | 93.51 | 93.65 |
EEG + EOG | 90.25 | 90.02 | 92.44 | 91.21 | 93.18 |
EEG + EMG | 90.41 | 90.25 | 92.17 | 91.19 | 92.67 |
EOG + EMG | 90.53 | 90.37 | 92.35 | 91.34 | 92.55 |
EEG + EOG + EMG (NRGAMTE) | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
Modalities | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
EEG with MRGCAF | 99.23 | 99.07 | 99.31 | 99.18 | 99.25 |
EEG without MRGCAF | 98.46 | 98.29 | 98.12 | 98.20 | 98.51 |
EOG with MRGCAF | 98.35 | 98.02 | 99.08 | 98.54 | 99.02 |
EOG without MRGCAF | 98.24 | 98.02 | 97.87 | 97.95 | 98.46 |
EMG with MRGCAF | 98.57 | 98.21 | 98.76 | 98.48 | 98.82 |
EMG without MRGCAF | 98.22 | 98.04 | 97.83 | 97.95 | 98.35 |
Sleep-EDF Expanded | |||||
EEG with MRGCAFL | 93.76 | 93.41 | 94.62 | 94.01 | 95.05 |
EEG without MRGCAFL | 93.41 | 93.15 | 92.89 | 92.98 | 93.55 |
EOG with MRGCAFL | 93.14 | 92.87 | 92.52 | 92.69 | 93.44 |
EOG without MRGCAFL | 92.87 | 92.65 | 92.47 | 92.54 | 93.16 |
EMG with MRGCAFL | 93.42 | 93.16 | 93.88 | 93.51 | 93.65 |
EMG without MRGCAFL | 93.67 | 93.42 | 93.22 | 93.36 | 93.97 |
Modalities | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
EEG + EOG with MRGCAFL | 97.64 | 97.32 | 97.71 | 97.51 | 97.75 |
EEG + EOG without MRGCAFL | 97.42 | 97.25 | 97.06 | 97.15 | 97.56 |
EEG + EMG with MRGCAFL | 97.72 | 97.53 | 97.65 | 97.58 | 97.68 |
EEG + EMG without MRGCAFL | 97.55 | 97.32 | 97.18 | 97.25 | 97.72 |
EOG + EMG with MRGCAFL | 98.05 | 97.89 | 97.66 | 97.77 | 97.74 |
EOG + EMG without MRGCAFL | 97.66 | 97.53 | 97.21 | 97.34 | 97.82 |
EEG + EOG + EMG with MRGCAFL | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
EEG + EOG + EMG without MRGCAFL | 99.42 | 99.28 | 98.92 | 99.07 | 99.55 |
Sleep-EDF Expanded | |||||
EEG + EOG with MRGCAFL | 90.25 | 90.02 | 92.44 | 91.21 | 93.18 |
EEG + EOG without MRGCAFL | 90.03 | 89.67 | 92.15 | 91.06 | 92.79 |
EEG + EMG with MRGCAFL | 90.41 | 90.25 | 92.17 | 91.19 | 92.67 |
EEG + EMG without MRGCAFL | 90.15 | 90.08 | 91.87 | 90.85 | 91.23 |
EOG + EMG with MRGCAFL | 90.53 | 90.37 | 92.35 | 91.34 | 92.55 |
EOG + EMG without MRGCAFL | 90.34 | 90.14 | 92.09 | 91.21 | 91.76 |
EEG + EOG + EMG with MRGCAFL | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
EEG + EOG + EMG without MRGCAFL | 94.24 | 94.18 | 94.64 | 94.43 | 94.35 |
Models | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
Without residual path | 98.84 | 98.51 | 98.66 | 98.58 | 98.73 |
Standard (fixed) residual path | 99.12 | 98.95 | 99.07 | 99.01 | 99.20 |
Proposed Learnable residual path | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Gating only (no residual path) | 98.84 | 98.51 | 98.66 | 98.58 | 98.73 |
Gating + standard residual path | 99.12 | 98.95 | 99.07 | 99.01 | 99.20 |
Proposed Gating + Learnable residual path | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Sleep-EDF expanded dataset | |||||
Without residual path | 93.78 | 93.41 | 94.15 | 93.77 | 94.06 |
Standard (fixed) residual path | 94.12 | 93.88 | 94.47 | 94.17 | 94.35 |
Proposed Learnable residual path | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
Gating only (no residual path) | 93.78 | 93.41 | 94.15 | 93.77 | 94.06 |
Gating + standard residual path | 94.12 | 93.88 | 94.47 | 94.17 | 94.35 |
Proposed Gating + Learnable residual path | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
Methods | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
1D-CNN without MRGCAF and Transformer | 98.84 | 98.50 | 98.61 | 98.55 | 98.70 |
1D-CNN + MRGCAF without transformer | 99.10 | 98.72 | 99.00 | 98.85 | 99.05 |
1D-CNN + transformer without MRGCAF | 99.32 | 99.00 | 99.20 | 99.10 | 99.25 |
Proposed NRGAMTE (1D-CNN + MRGCAF + Transformer) | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Sleep-EDF expanded dataset | |||||
1D-CNN without MRGCAF and Transformer | 93.78 | 93.40 | 94.00 | 93.69 | 94.05 |
1D-CNN + MRGCAF without transformer | 94.12 | 93.82 | 94.35 | 94.08 | 94.28 |
1D-CNN + transformer without MRGCAF | 94.03 | 93.75 | 94.25 | 93.95 | 94.20 |
Proposed NRGAMTE (1D-CNN + MRGCAF + Transformer) | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
Methods | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
RNN | 98.07 | 97.89 | 97.56 | 97.74 | 98.42 |
LSTM | 98.43 | 98.26 | 98.07 | 98.16 | 98.67 |
GRU | 98.76 | 98.54 | 98.32 | 98.43 | 98.92 |
ViT | 99.04 | 98.87 | 98.63 | 98.74 | 99.27 |
LGSleepNet | 99.10 | 98.95 | 98.77 | 98.85 | 99.15 |
BiTS-SleepNet | 99.23 | 99.02 | 98.82 | 98.91 | 99.34 |
MMT | 99.32 | 99.16 | 98.89 | 98.97 | 99.53 |
Proposed NRGAMTE | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Sleep-EDF expanded data | |||||
RNN | 92.76 | 92.65 | 93.41 | 93.77 | 93.57 |
LSTM | 93.09 | 92.87 | 93.68 | 93.42 | 93.86 |
GRU | 93.43 | 93.02 | 94.03 | 93.75 | 94.15 |
ViT | 93.76 | 93.46 | 94.43 | 93.79 | 94.47 |
LGSleepNet | 93.84 | 93.52 | 94.27 | 93.89 | 93.97 |
BiTS-SleepNet | 93.95 | 93.72 | 94.15 | 93.93 | 94.12 |
MMT | 94.03 | 93.85 | 94.76 | 93.98 | 94.63 |
Proposed NRGAMTE | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
K-Fold Values | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
K = 2 | 98.02 | 98.43 | 98.67 | 98.83 | 99.17 |
K = 3 | 98.21 | 98.78 | 99.07 | 99.03 | 99.33 |
K = 4 | 98.45 | 99.02 | 99.21 | 99.21 | 99.52 |
K = 5 | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
K = 6 | 98.37 | 98.83 | 98.79 | 98.76 | 98.79 |
K = 7 | 98.21 | 98.65 | 98.25 | 98.54 | 98.43 |
Sleep-EDF data | |||||
K = 2 | 94.04 | 93.84 | 94.37 | 94.28 | 94.26 |
K = 3 | 94.22 | 94.05 | 94.64 | 94.44 | 94.48 |
K = 4 | 94.36 | 94.18 | 94.86 | 94.51 | 94.87 |
K = 5 | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 |
K = 6 | 94.28 | 94.15 | 94.69 | 94.37 | 94.64 |
K = 7 | 94.17 | 94.02 | 94.38 | 94.02 | 94.37 |
Methods | p-Value (ANOVA Test) | Memory Usage (MB) | Training Time per Epoch (s) | Inference Time (s) |
---|---|---|---|---|
CAP Sleep database | ||||
RNN | 0.047 | 378 | 125 | 115 |
LSTM | 0.042 | 403 | 99 | 98 |
GRU | 0.033 | 436 | 92 | 91 |
ViT | 0.028 | 479 | 84 | 82 |
MMT | 0.017 | 521 | 79 | 73 |
Proposed NRGAMTE | 0.004 | 567 | 71 | 65 |
Sleep-EDF expanded data | ||||
RNN | 0.051 | 857 | 120 | 110 |
LSTM | 0.045 | 835 | 97 | 92 |
GRU | 0.032 | 812 | 92 | 89 |
ViT | 0.024 | 776 | 89 | 82 |
MMT | 0.011 | 732 | 83 | 77 |
Proposed NRGAMTE | 0.003 | 645 | 75 | 68 |
Training Dataset | Testing Dataset | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|---|
CAP Sleep database | Sleep-EDF expanded dataset | 91.88 | 91.56 | 92.71 | 92.13 | 92.94 |
Sleep-EDF expanded dataset | CAP Sleep database | 96.41 | 96.12 | 96.75 | 96.43 | 96.89 |
Metrics | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|
CAP Sleep database | |||||
Mean (%) | 97.83 | 97.62 | 97.88 | 97.74 | 98.12 |
Standard deviation | ±0.89 | ±0.94 | ±0.91 | ±0.97 | ±0.88 |
Sleep-EDF expanded dataset | |||||
Mean (%) | 92.43 | 91.88 | 92.57 | 92.21 | 93.02 |
Standard deviation | ±1.26 | ±1.32 | ±1.28 | ±1.30 | ±1.17 |
Models | Accuracy (%) | CI (±) | F1-Score (%) | CI (±) | p-Value |
---|---|---|---|---|---|
CAP Sleep database | |||||
ViT | 99.04 | 0.21 | 98.74 | 0.26 | 0.031 |
MMT | 99.32 | 0.19 | 98.97 | 0.22 | 0.025 |
Proposed NRGAMTE | 99.64 | 0.14 | 99.43 | 0.18 | 0.004 |
Sleep-EDF expanded dataset | |||||
ViT | 93.76 | 0.42 | 93.79 | 0.38 | 0.029 |
MMT | 94.03 | 0.35 | 93.98 | 0.34 | 0.022 |
Proposed NRGAMTE | 94.51 | 0.31 | 94.67 | 0.28 | 0.003 |
Fusion Methods | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Params (M) |
---|---|---|---|---|---|
CAP Sleep database | |||||
Early Fusion | 98.84 | 98.46 | 98.31 | 98.38 | 0.45 |
Late Fusion | 98.71 | 98.50 | 98.09 | 98.29 | 0.43 |
Tensor Fusion | 99.10 | 98.85 | 99.04 | 98.94 | 0.91 |
Proposed MRGCAF | 99.64 | 99.32 | 99.55 | 99.43 | 0.53 |
Sleep-EDF expanded dataset | |||||
Early Fusion | 92.83 | 92.41 | 92.35 | 92.38 | 0.45 |
Late Fusion | 92.57 | 92.10 | 91.91 | 92.00 | 0.43 |
Tensor Fusion | 93.47 | 93.05 | 93.28 | 93.16 | 0.91 |
Proposed MRGCAF | 94.51 | 94.32 | 95.03 | 94.67 | 0.53 |
Methods | Dataset | Modality | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|---|---|
1D-CNN [36] | CAP Sleep database | EEG | 90.46 | 79.22 | 95.73 | 86.70 | NA |
EbagT [37] | ECG | 98.0 | NA | NA | NA | NA | |
kNN [38] | EEG | 79.14 | 79.62 | 78.86 | 79.24 | NA | |
1D-CNN-CAM [39] | EEG | 90.31 | 70.67 | 62.58 | 65.73 | 95.30 | |
LSTM + CNN [40] | EEG | 91.45 | NA | NA | NA | NA | |
MWTCNNNet [41] | EEG | 98.9 | NA | 99.03 | NA | 99.27 | |
WASR-LCNN [42] | Sleep-EDF expanded | EEG | 87.6 | NA | NA | 82.1 | NA |
Proposed NRGAMTE | CAP Sleep database | EEG | 99.23 | 99.07 | 99.31 | 99.18 | 99.25 |
EOG | 98.35 | 98.02 | 99.08 | 98.54 | 99.02 | ||
EMG | 98.57 | 98.21 | 98.76 | 98.48 | 98.82 | ||
Sleep-EDF expanded | EEG | 93.76 | 93.41 | 94.62 | 94.01 | 95.05 | |
EOG | 93.14 | 92.87 | 92.52 | 92.69 | 93.44 | ||
EMG | 93.42 | 93.16 | 93.88 | 93.51 | 93.65 |
Methods | Dataset | Modality | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Specificity (%) |
---|---|---|---|---|---|---|---|
CareSleepNet [43] | Sleep-EDF expanded | EEG + EOG | 85.1 | NA | NA | 80.4 | NA |
MM-DMS-Distributed CNN + PT Shallow [44] | CAP Sleep database | EEG + ECG + EMG | 95.43 | NA | NA | NA | NA |
MML-DMS [45] | EEG + ECG + EMG | 99.09 | NA | NA | NA | NA | |
Proposed NRGAMTE | Sleep-EDF expanded | EEG + EOG | 90.25 | 90.02 | 92.44 | 91.21 | 93.18 |
EEG + EMG | 90.41 | 90.25 | 92.17 | 91.19 | 92.67 | ||
EOG + EMG | 90.53 | 90.37 | 92.35 | 91.34 | 92.55 | ||
EEG + EOG + EMG (NRGAMTE) | 94.51 | 94.32 | 95.03 | 94.67 | 94.95 | ||
CAP Sleep database | EEG + EOG | 97.64 | 97.32 | 97.71 | 97.51 | 97.75 | |
EEG + EMG | 97.72 | 97.53 | 97.65 | 97.58 | 97.68 | ||
EOG + EMG | 98.05 | 97.89 | 97.66 | 97.77 | 97.74 | ||
EEG + EOG + EMG (NRGAMTE) | 99.64 | 99.32 | 99.55 | 99.43 | 99.71 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Subramaniam, J.; Guruvaya, A.M.; Vijaykumar, A.; Gowda, P.C. NRGAMTE: Neurophysiological Residual Gated Attention Multimodal Transformer Encoder for Sleep Disorder Detection. Brain Sci. 2025, 15, 985. https://doi.org/10.3390/brainsci15090985
Subramaniam J, Guruvaya AM, Vijaykumar A, Gowda PC. NRGAMTE: Neurophysiological Residual Gated Attention Multimodal Transformer Encoder for Sleep Disorder Detection. Brain Sciences. 2025; 15(9):985. https://doi.org/10.3390/brainsci15090985
Chicago/Turabian StyleSubramaniam, Jayapoorani, Aruna Mogarala Guruvaya, Anupama Vijaykumar, and Puttamadappa Chaluve Gowda. 2025. "NRGAMTE: Neurophysiological Residual Gated Attention Multimodal Transformer Encoder for Sleep Disorder Detection" Brain Sciences 15, no. 9: 985. https://doi.org/10.3390/brainsci15090985
APA StyleSubramaniam, J., Guruvaya, A. M., Vijaykumar, A., & Gowda, P. C. (2025). NRGAMTE: Neurophysiological Residual Gated Attention Multimodal Transformer Encoder for Sleep Disorder Detection. Brain Sciences, 15(9), 985. https://doi.org/10.3390/brainsci15090985