{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T17:58:45Z","timestamp":1790791125078,"version":"4.1.0"},"reference-count":51,"publisher":"Public Library of Science (PLoS)","issue":"9","license":[{"start":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T00:00:00Z","timestamp":1790726400000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["www.plosone.org"],"crossmark-restriction":false},"short-container-title":["PLoS One"],"abstract":"<jats:p>Automatic sleep staging is a critical task in healthcare due to the global prevalence of sleep disorders. This study focuses on single-channel electroencephalography (EEG), a practical and widely available signal for automatic sleep staging. Existing approaches face challenges such as class imbalance, limited receptive-field modeling, and insufficient interpretability. This work proposes TempoSleep, a context-aware framework for single-channel EEG sleep staging, with particular emphasis on improving detection of the N1 stage. Many prior models operate as black boxes with stacked layers, lacking clearly defined and interpretable feature extraction roles. TempoSleep combines compact multi-scale feature extraction with temporal modeling to capture both local and long-range dependencies. To address data imbalance, especially in the N1 stage, class-weighted loss functions and data augmentation are applied. EEG signals are segmented into sub-epoch chunks, and final predictions are obtained by averaging softmax probabilities across chunks, enhancing contextual representation and robustness. The proposed framework achieves an overall accuracy of 89.72% and a macro-average F1-score of 85.46%. Notably, it attains an F1-score of 61.7% for the challenging N1 stage, demonstrating a substantial improvement over previous methods on the SleepEDF datasets.These results indicate that the proposed approach effectively improves sleep staging performance while providing insights into its prediction behavior and supporting its potential application in automatic sleep staging.<\/jats:p>","DOI":"10.1371\/journal.pone.0358241","type":"journal-article","created":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T17:35:34Z","timestamp":1790789734000},"page":"e0358241","update-policy":"https:\/\/doi.org\/10.1371\/journal.pone.corrections_policy","source":"Crossref","is-referenced-by-count":0,"title":["A context-aware temporal modeling through unified multi-scale temporal encoding and hierarchical sequence learning for single-channel EEG sleep staging"],"prefix":"10.1371","volume":"21","author":[{"given":"Amir Ali","family":"Vakili","sequence":"first","affiliation":[{"name":"Shahid Beheshti University","place":["Tehran, Iran"],"department":["Faculty of Computer Science and Engineering"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0008-5969-7216","authenticated-orcid":true,"given":"Salar","family":"Jahanshiri","sequence":"additional","affiliation":[{"name":"Shahid Beheshti University","place":["Tehran, Iran"],"department":["Faculty of Computer Science and Engineering"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6613-7921","authenticated-orcid":true,"given":"Armin","family":"Salimi-Badr","sequence":"additional","affiliation":[{"name":"Shahid Beheshti University","place":["Tehran, Iran"],"department":["Faculty of Computer Science and Engineering"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"340","published-online":{"date-parts":[[2026,9,30]]},"reference":[{"issue":"3","key":"pone.0358241.ref001","doi-asserted-by":"crossref","first-page":"47","DOI":"10.3390\/mti2030047","article-title":"Deep learning and medical diagnosis: A review of literature","volume":"2","author":"M Bakator","year":"2018","journal-title":"MTI"},{"issue":"3","key":"pone.0358241.ref002","doi-asserted-by":"crossref","first-page":"541","DOI":"10.3390\/healthcare10030541","article-title":"Machine-learning-based disease diagnosis: A comprehensive review","volume":"10","author":"MM Ahsan","year":"2022","journal-title":"Healthcare (Basel)"},{"key":"pone.0358241.ref003","doi-asserted-by":"crossref","first-page":"98379","DOI":"10.1109\/ACCESS.2024.3428847","article-title":"An explainable deep learning-based method for schizophrenia diagnosis using generative data-augmentation","volume":"12","author":"M Saadatinia","year":"2024","journal-title":"IEEE Access"},{"key":"pone.0358241.ref004","doi-asserted-by":"crossref","unstructured":"Li R, Zhang W, Suk HI, Wang L, Li J, Shen D, et al. Deep learning based imaging data completion for improved brain disease diagnosis. International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer; 2014. p. 305\u201312.","DOI":"10.1007\/978-3-319-10443-0_39"},{"key":"pone.0358241.ref005","doi-asserted-by":"crossref","unstructured":"Liu S, Liu S, Cai W, Pujol S, Kikinis R, Feng D. Early diagnosis of Alzheimer\u2019s disease with deep learning. 2014 IEEE 11th International Symposium on Biomedical Imaging (ISBI). IEEE; 2014. p. 1015\u20138.","DOI":"10.1109\/ISBI.2014.6868045"},{"issue":"6","key":"pone.0358241.ref006","doi-asserted-by":"crossref","first-page":"727","DOI":"10.5665\/sleep.1846","article-title":"Sleep: A health imperative","volume":"35","author":"Boards of Directors of the American Academy of Sleep Medicine and the Sleep Research Society","year":"2012","journal-title":"Sleep"},{"key":"pone.0358241.ref007","doi-asserted-by":"crossref","first-page":"151","DOI":"10.2147\/NSS.S134864","article-title":"Short- and long-term health consequences of sleep disruption","volume":"9","author":"G Medic","year":"2017","journal-title":"Nat Sci Sleep"},{"issue":"2","key":"pone.0358241.ref008","doi-asserted-by":"crossref","first-page":"246","DOI":"10.1001\/archpsyc.1969.01740140118016","article-title":"A manual of standardized terminology, techniques and scoring system for sleep stages of human subjects","volume":"20","author":"EA Wolpert","year":"1969","journal-title":"Arch Gen Psychiatry"},{"issue":"12","key":"pone.0358241.ref009","doi-asserted-by":"crossref","DOI":"10.1002\/brb3.3306","article-title":"Subclinical epileptiform activity and sleep disturbances in Alzheimer\u2019s disease","volume":"13","author":"A Devulder","year":"2023","journal-title":"Brain Behav"},{"key":"pone.0358241.ref010","article-title":"EEG power spectral analysis of abnormal cortical activations during REM\/NREM sleep in obstructive sleep apnea","volume":"12","author":"S Liu","year":"2021","journal-title":"Front Neurol"},{"issue":"1","key":"pone.0358241.ref011","doi-asserted-by":"crossref","first-page":"74","DOI":"10.1111\/j.1365-2869.2008.00700.x","article-title":"Interrater reliability for sleep scoring according to the Rechtschaffen & Kales and the new AASM standard","volume":"18","author":"H Danker-Hopfe","year":"2009","journal-title":"J Sleep Res"},{"issue":"1","key":"pone.0358241.ref012","doi-asserted-by":"crossref","first-page":"81","DOI":"10.5664\/jcsm.2350","article-title":"The American Academy of Sleep Medicine inter-scorer reliability program: Sleep stage scoring","volume":"9","author":"RS Rosenberg","year":"2013","journal-title":"J Clin Sleep Med"},{"issue":"12","key":"pone.0358241.ref013","doi-asserted-by":"crossref","first-page":"7922","DOI":"10.1016\/j.eswa.2010.04.043","article-title":"Efficient sleep stage recognition system based on EEG signal using k-means clustering based feature weighting","volume":"37","author":"S G\u00fcne\u015f","year":"2010","journal-title":"Expert Syst Appl"},{"key":"pone.0358241.ref014","doi-asserted-by":"crossref","first-page":"94","DOI":"10.1016\/j.jneumeth.2015.01.022","article-title":"Learning machines and sleeping brains: Automatic sleep stage classification using decision-tree multi-class support vector machines","volume":"250","author":"T Lajnef","year":"2015","journal-title":"J Neurosci Methods"},{"issue":"6","key":"pone.0358241.ref015","article-title":"Multi-scale ResNet and BiGRU automatic sleep staging based on attention mechanism","volume":"17","author":"C Liu","year":"2022","journal-title":"PLoS One"},{"issue":"5","key":"pone.0358241.ref016","article-title":"AI-Driven sleep staging from actigraphy and heart rate","volume":"18","author":"T-A Song","year":"2023","journal-title":"PLoS One"},{"issue":"2","key":"pone.0358241.ref017","doi-asserted-by":"crossref","first-page":"661","DOI":"10.1109\/JBHI.2013.2276083","article-title":"An evaluation of cardiorespiratory and movement features with respect to sleep-stage classification","volume":"18","author":"T Willemen","year":"2014","journal-title":"IEEE J Biomed Health Inform"},{"issue":"4","key":"pone.0358241.ref018","doi-asserted-by":"crossref","first-page":"815","DOI":"10.1016\/j.clinph.2017.12.039","article-title":"A novel, fast and efficient single-sensor automatic sleep-stage classification based on complementary cross-frequency coupling estimates","volume":"129","author":"SI Dimitriadis","year":"2018","journal-title":"Clin Neurophysiol"},{"issue":"6","key":"pone.0358241.ref019","doi-asserted-by":"crossref","first-page":"1813","DOI":"10.1109\/JBHI.2014.2303991","article-title":"Analysis and classification of sleep stages based on difference visibility graphs from a single-channel EEG signal","volume":"18","author":"G Zhu","year":"2014","journal-title":"IEEE J Biomed Health Inform"},{"key":"pone.0358241.ref020","doi-asserted-by":"crossref","unstructured":"Wang Z, Zhang Z, Wang H. A multi-modal framework with contrastive learning and sequential encoding for enhanced sleep stage detection. Pattern Recognition and Computer Vision. vol. 15035 of Lecture Notes in Computer Science. Singapore: Springer; 2025. p. 3\u201317.","DOI":"10.1007\/978-981-97-8620-6_1"},{"key":"pone.0358241.ref021","first-page":"1","article-title":"Performance enhancement of P300 detection by multiscale-CNN","volume":"70","author":"H Wang","year":"2021","journal-title":"IEEE Trans Instrum Meas"},{"key":"pone.0358241.ref022","first-page":"1","article-title":"Linking attention-based multiscale CNN with dynamical GCN for driving fatigue detection","volume":"70","author":"H Wang","year":"2021","journal-title":"IEEE Trans Instrum Meas"},{"key":"pone.0358241.ref023","doi-asserted-by":"crossref","first-page":"107404","DOI":"10.1016\/j.bspc.2024.107404","article-title":"Subject-specific CNN model with parameter-based transfer learning for SSVEP detection","volume":"103","author":"Z Ji","year":"2025","journal-title":"Biomed Signal Process Control"},{"issue":"1","key":"pone.0358241.ref024","first-page":"1","article-title":"CBAM-DeepConvNet: Convolutional block attention module-deep convolutional neural network for asymmetric visual evoked potentials recognition","volume":"4","author":"Z Ji","year":"2025","journal-title":"Brain-Appar Commun: J Bacomics"},{"key":"pone.0358241.ref025","doi-asserted-by":"crossref","first-page":"809","DOI":"10.1109\/TNSRE.2021.3076234","article-title":"An attention-based deep learning approach for sleep stage classification with single-channel EEG","volume":"29","author":"E Eldele","year":"2021","journal-title":"IEEE Trans Neural Syst Rehabil Eng"},{"issue":"11","key":"pone.0358241.ref026","doi-asserted-by":"crossref","first-page":"1998","DOI":"10.1109\/TNSRE.2017.2721116","article-title":"DeepSleepNet: A model for automatic sleep stage scoring based on raw single-channel EEG","volume":"25","author":"A Supratak","year":"2017","journal-title":"IEEE Trans Neural Syst Rehabil Eng"},{"issue":"3","key":"pone.0358241.ref027","doi-asserted-by":"crossref","first-page":"400","DOI":"10.1109\/TNSRE.2019.2896659","article-title":"SeqSleepNet: End-to-end hierarchical recurrent neural network for sequence-to-sequence automatic sleep staging","volume":"27","author":"H Phan","year":"2019","journal-title":"IEEE Trans Neural Syst Rehabil Eng"},{"issue":"5","key":"pone.0358241.ref028","doi-asserted-by":"crossref","DOI":"10.1371\/journal.pone.0216456","article-title":"SleepEEGNet: Automated sleep stage scoring with sequence to sequence deep learning approach","volume":"14","author":"S Mousavi","year":"2019","journal-title":"PLoS One"},{"key":"pone.0358241.ref029","doi-asserted-by":"crossref","first-page":"106020","DOI":"10.1016\/j.bspc.2024.106020","article-title":"SleepEGAN: A GAN-enhanced ensemble deep learning model for imbalanced classification of sleep stages","volume":"92","author":"X Cheng","year":"2024","journal-title":"Biomed Signal Process Control"},{"issue":"9","key":"pone.0358241.ref030","doi-asserted-by":"crossref","first-page":"1185","DOI":"10.1109\/10.867928","article-title":"Analysis of a sleep-dependent neuronal feedback loop: The slow-wave microcontinuity of the EEG","volume":"47","author":"B Kemp","year":"2000","journal-title":"IEEE Trans Biomed Eng"},{"issue":"1","key":"pone.0358241.ref031","doi-asserted-by":"crossref","first-page":"108","DOI":"10.1162\/neco.1995.7.1.108","article-title":"Training with noise is equivalent to Tikhonov regularization","volume":"7","author":"CM Bishop","year":"1995","journal-title":"Neural Comput"},{"issue":"5","key":"pone.0358241.ref032","doi-asserted-by":"crossref","first-page":"1285","DOI":"10.1109\/TBME.2018.2872652","article-title":"Joint classification and prediction CNN framework for automatic sleep stage classification","volume":"66","author":"H Phan","year":"2019","journal-title":"IEEE Trans Biomed Eng"},{"key":"pone.0358241.ref033","unstructured":"Howard AG, Zhu M, Chen B, Kalenichenko D, Wang W, Weyand T, et al. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv:170404861 [Preprint]; 2017."},{"key":"pone.0358241.ref034","unstructured":"Hendrycks D. Gaussian error linear units (Gelus). arXiv:160608415 [Preprint]. 2016."},{"key":"pone.0358241.ref035","doi-asserted-by":"crossref","unstructured":"Hu J, Shen L, Sun G. Squeeze-and-excitation networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; 2018. p. 7132\u201341.","DOI":"10.1109\/CVPR.2018.00745"},{"key":"pone.0358241.ref036","unstructured":"Yu F, Koltun V. Multi-scale context aggregation by dilated convolutions. arXiv:151107122 [Preprint]. 2015."},{"key":"pone.0358241.ref037","unstructured":"Chung J, Ahn S, Bengio Y. Hierarchical multiscale recurrent neural networks. arXiv:160901704 [Preprint]. 2016."},{"key":"pone.0358241.ref038","article-title":"Attention-based models for speech recognition","volume":"28","author":"JK Chorowski","year":"2015","journal-title":"Adv Neural Inf Process Syst"},{"key":"pone.0358241.ref039","article-title":"U-time: A fully convolutional network for time series segmentation applied to sleep staging","volume":"32","author":"M Perslev","year":"2019","journal-title":"Adv Neural Inf Process Syst"},{"issue":"2","key":"pone.0358241.ref040","doi-asserted-by":"crossref","first-page":"92","DOI":"10.1007\/s10044-025-01475-0","article-title":"Temporal focal modulation networks for sleep stage scoring","volume":"28","author":"H Zan","year":"2025","journal-title":"Pattern Anal Applic"},{"key":"pone.0358241.ref041","doi-asserted-by":"crossref","first-page":"108405","DOI":"10.1016\/j.cmpb.2024.108405","article-title":"SleepGCN: A transition rule learning model based on Graph Convolutional Network for sleep staging","volume":"257","author":"X Wang","year":"2024","journal-title":"Comput Methods Programs Biomed"},{"issue":"9","key":"pone.0358241.ref042","first-page":"5903","article-title":"XSleepNet: Multi-view sequential model for automatic sleep staging","volume":"44","author":"H Phan","year":"2022","journal-title":"IEEE Trans Pattern Anal Mach Intell"},{"issue":"1","key":"pone.0358241.ref043","doi-asserted-by":"crossref","first-page":"5","DOI":"10.2337\/diaspect.29.1.5","article-title":"Physiology of sleep","volume":"29","author":"DW Carley","year":"2016","journal-title":"Diabetes Spectr"},{"issue":"3","key":"pone.0358241.ref044","doi-asserted-by":"crossref","first-page":"165","DOI":"10.1046\/j.1365-2869.2001.00252.x","article-title":"Age-related modifications of NREM sleep EEG: From childhood to middle age","volume":"10","author":"H Gaudreau","year":"2001","journal-title":"J Sleep Res"},{"issue":"4","key":"pone.0358241.ref045","doi-asserted-by":"crossref","DOI":"10.1093\/sleep\/zsz261","article-title":"Week-by-week changes in sleep EEG in healthy full-term newborns","volume":"43","author":"M Corsi-Cabrera","year":"2020","journal-title":"Sleep"},{"issue":"4","key":"pone.0358241.ref046","doi-asserted-by":"crossref","DOI":"10.1088\/1361-6579\/ac6049","article-title":"Automatic sleep staging of EEG signals: Recent development, challenges, and future directions","volume":"43","author":"H Phan","year":"2022","journal-title":"Physiol Meas"},{"issue":"5","key":"pone.0358241.ref047","doi-asserted-by":"crossref","DOI":"10.1111\/jsr.70061","article-title":"Automated sleep staging in epilepsy using deep learning on standard electroencephalogram and wearable data","volume":"34","author":"J Macea","year":"2025","journal-title":"J Sleep Res"},{"issue":"4","key":"pone.0358241.ref048","article-title":"Automatic sleep staging: Recent advances and perspectives","volume":"31","author":"H Phan","year":"2022","journal-title":"J Sleep Res"},{"issue":"11","key":"pone.0358241.ref049","first-page":"1055","article-title":"A comparison of manual and automated sleep staging","volume":"14","author":"RS Rosenberg","year":"2013","journal-title":"Sleep Med"},{"key":"pone.0358241.ref050","first-page":"101204","article-title":"Machine learning approaches for sleep staging: A systematic review","volume":"48","author":"L Fiorillo","year":"2019","journal-title":"Sleep Med Rev"},{"key":"pone.0358241.ref051","first-page":"78","article-title":"Quasi-supervised classification of sleep stages using single-channel EEG","volume":"251","author":"F Yaghouby","year":"2015","journal-title":"J Neurosci Methods"}],"container-title":["PLOS One"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pone.0358241","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T17:35:47Z","timestamp":1790789747000},"score":1,"resource":{"primary":{"URL":"https:\/\/dx.plos.org\/10.1371\/journal.pone.0358241"}},"subtitle":[],"editor":[{"given":"Fo","family":"Hu","sequence":"first","affiliation":[{"name":"Institute of Wenzhou, Zhejiang University","place":["CHINA"]}],"role":[{"vocabulary":"crossref","role":"editor"}]}],"short-title":[],"issued":{"date-parts":[[2026,9,30]]},"references-count":51,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2026,9,30]]}},"URL":"https:\/\/doi.org\/10.1371\/journal.pone.0358241","relation":{},"ISSN":["1932-6203"],"issn-type":[{"value":"1932-6203","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,9,30]]}}}