{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,2]],"date-time":"2026-06-02T02:01:19Z","timestamp":1780365679888,"version":"3.54.1"},"reference-count":52,"publisher":"MDPI AG","issue":"18","license":[{"start":{"date-parts":[[2023,9,15]],"date-time":"2023-09-15T00:00:00Z","timestamp":1694736000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Deanship of Scientific Research at King Saud University","award":["RG-1441-394"],"award-info":[{"award-number":["RG-1441-394"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Scoring polysomnography for obstructive sleep apnea diagnosis is a laborious, long, and costly process. Machine learning approaches, such as deep neural networks, can reduce scoring time and costs. However, most methods require prior filtering and preprocessing of the raw signal. Our work presents a novel method for diagnosing obstructive sleep apnea using a transformer neural network with learnable positional encoding, which outperforms existing state-of-the-art solutions. This approach has the potential to improve the diagnostic performance of oximetry for obstructive sleep apnea and reduce the time and costs associated with traditional polysomnography. Contrary to existing approaches, our approach performs annotations at one-second granularity. Allowing physicians to interpret the model\u2019s outcome. In addition, we tested different positional encoding designs as the first layer of the model, and the best results were achieved using a learnable positional encoding based on an autoencoder with structural novelty. In addition, we tried different temporal resolutions with various granularity levels from 1 to 360 s. All experiments were carried out on an independent test set from the public OSASUD dataset and showed that our approach outperforms current state-of-the-art solutions with a satisfactory AUC of 0.89, accuracy of 0.80, and F1-score of 0.79.<\/jats:p>","DOI":"10.3390\/s23187924","type":"journal-article","created":{"date-parts":[[2023,9,17]],"date-time":"2023-09-17T23:57:46Z","timestamp":1694995066000},"page":"7924","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":18,"title":["Adoption of Transformer Neural Network to Improve the Diagnostic Performance of Oximetry for Obstructive Sleep Apnea"],"prefix":"10.3390","volume":"23","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-8513-7521","authenticated-orcid":false,"given":"Malak Abdullah","family":"Almarshad","sequence":"first","affiliation":[{"name":"Computer Science Department, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia"},{"name":"Computer Science Department, College of Computer and Information Sciences, Al-Imam Mohammad Ibn Saud Islamic University, Riyadh 11432, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9406-6809","authenticated-orcid":false,"given":"Saad","family":"Al-Ahmadi","sequence":"additional","affiliation":[{"name":"Computer Science Department, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2670-6007","authenticated-orcid":false,"given":"Md Saiful","family":"Islam","sequence":"additional","affiliation":[{"name":"Computer Science Department, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1706-6167","authenticated-orcid":false,"given":"Ahmed S.","family":"BaHammam","sequence":"additional","affiliation":[{"name":"The University Sleep Disorders Center, Department of Medicine, College of Medicine, King Saud University, Riyadh 11324, Saudi Arabia"},{"name":"Strategic Technologies Program of the National Plan for Sciences and Technology and Innovation in the Kingdom of Saudi Arabia, Riyadh 11324, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0397-9843","authenticated-orcid":false,"given":"Adel","family":"Soudani","sequence":"additional","affiliation":[{"name":"Computer Science Department, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,9,15]]},"reference":[{"key":"ref_1","unstructured":"Himanshu Wickramasinghe (2023, February 23). Obstructive Sleep Apnea (OSA). Available online: https:\/\/emedicine.medscape.com\/article\/295807-overview."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"687","DOI":"10.1016\/S2213-2600(19)30198-5","article-title":"Estimation of the global prevalence and burden of obstructive sleep apnoea: A literature-based analysis","volume":"7","author":"Benjafield","year":"2019","journal-title":"Lancet Respir. Med."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"641","DOI":"10.5664\/jcsm.6566","article-title":"Sleep medicine in Saudi Arabia","volume":"13","author":"Almeneessier","year":"2017","journal-title":"J. Clin. Sleep Med."},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Gupta, R., Pandi-Perumal, S.R., BaHammam, A.S., and FRCP (2018). Clinical Atlas of Polysomnography, CRC Press.","DOI":"10.1201\/b22464"},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Almarshad, M.A., Islam, S., Al-Ahmadi, S., and BaHammam, A.S. (2022). Diagnostic Features and Potential Applications of PPG Signal in Healthcare: A Systematic Review. Healthcare, 10.","DOI":"10.3390\/healthcare10030547"},{"key":"ref_6","first-page":"1689","article-title":"The AASM Manual for the Scoring of Sleep and Associated Events","volume":"53","author":"Berry","year":"2013","journal-title":"Am. Acad. Sleep Med."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"43","DOI":"10.1016\/S1389-9457(01)00115-0","article-title":"Scoring variability between polysomnography technologists in different sleep laboratories","volume":"3","author":"Collop","year":"2002","journal-title":"Sleep Med."},{"key":"ref_8","unstructured":"Philips (2023, September 13). Sleepware G3 with integrated Somnolyzer Scoring. Available online: https:\/\/www.usa.philips.com\/healthcare\/product\/HC1082462\/sleepware-g3-sleep-diagnostic-software."},{"key":"ref_9","first-page":"443","article-title":"Polysomnography I: Procedure and Technology","volume":"334","author":"BaHammam","year":"2016","journal-title":"Synop. Sleep Med."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"1741","DOI":"10.5664\/jcsm.7386","article-title":"Validating the Watch-PAT for diagnosing obstructive sleep apnea in adolescents","volume":"14","author":"Choi","year":"2018","journal-title":"J. Clin. Sleep Med."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"1049","DOI":"10.1016\/j.medengphy.2011.11.009","article-title":"Feature selection from nocturnal oximetry using genetic algorithms to assist in obstructive sleep apnoea diagnosis","volume":"34","author":"Hornero","year":"2012","journal-title":"Med. Eng. Phys."},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"John, A., Nundy, K.K., Cardiff, B., and John, D. (2021, January 26\u201330). SomnNET: An SpO2 Based Deep Learning Network for Sleep Apnea Detection in Smartwatches. Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society, EMBS, Guadalajara, Mexico.","DOI":"10.1109\/EMBC46164.2021.9631037"},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"1643","DOI":"10.1093\/jamia\/ocy131","article-title":"Expert-level sleep scoring with deep neural networks","volume":"25","author":"SBiswal","year":"2018","journal-title":"J. Am. Med. Inform. Assoc."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1016\/j.cmpb.2018.04.005","article-title":"Deep learning for healthcare applications based on physiological signals: A review","volume":"Volume 161","author":"Faust","year":"2018","journal-title":"Computer Methods and Programs in Biomedicine"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Vicente-Samper, J.M., Tamantini, C., \u00c1vila-Navarro, E., De La Casa-Lillo, M., Zollo, L., Sabater-Navarro, J.M., and Cordella, F. (2023). An ML-Based Approach to Reconstruct Heart Rate from PPG in Presence of Motion Artifacts. Biosensors, 13.","DOI":"10.3390\/bios13070718"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"573","DOI":"10.5665\/sleep.2548","article-title":"Performance of an automated polysomnography scoring system versus computer-assisted manual scoring","volume":"36","author":"Malhotra","year":"2013","journal-title":"Sleep"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Thorey, V., Hernandez, A.B., Arnal, P.J., and During, E.H. (2019, January 23\u201327). AI vs Humans for the diagnosis of sleep apnea. Proceedings of the 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), IEEE, Berlin, Germany.","DOI":"10.1109\/EMBC.2019.8856877"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Aggarwal, C.C. (2018). Neural Networks and Deep Learning, Determination Press.","DOI":"10.1007\/978-3-319-94463-0"},{"key":"ref_19","unstructured":"Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press. Available online: http:\/\/www.deeplearningbook.org."},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Sharma, M., Kumar, K., Kumar, P., Tan, R.-S., and Acharya, U.R. (2022). Pulse oximetry SpO2 signal for auto-mated identification of sleep apnea: A review and future trends. Physiol. Meas., 43.","DOI":"10.1088\/1361-6579\/ac98f0"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"2065","DOI":"10.1007\/s11325-021-02302-6","article-title":"A model for obstructive sleep apnea detection using a multi-layer feed-forward neural network based on electrocardiogram, pulse oxygen saturation, and body mass index","volume":"25","author":"Li","year":"2021","journal-title":"Sleep Breath"},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"305","DOI":"10.1007\/s11517-012-0995-4","article-title":"Probabilistic neural network approach for the detection of SAHS from overnight pulse oximetry","volume":"51","author":"Morillo","year":"2013","journal-title":"Med. Biol. Eng. Comput."},{"key":"ref_23","first-page":"7","article-title":"A Neural Network System for Detection of Obstructive Sleep Apnea Through SpO2 Signal Features","volume":"3","author":"Almazaydeh","year":"2012","journal-title":"Int. J. Adv. Comput. Sci. Appl."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"246","DOI":"10.1016\/j.neucom.2022.06.031","article-title":"Multi-feature fusion: Graph neural network and CNN combining for hyperspectral image classification","volume":"501","author":"Ding","year":"2022","journal-title":"Neurocomputing"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"2906","DOI":"10.1109\/JBHI.2020.3048901","article-title":"A Convolutional Neural Network Architecture to Enhance Oximetry Ability to Diagnose Pediatric Obstructive Sleep Apnea","volume":"25","author":"Alvarez","year":"2021","journal-title":"IEEE J. Biomed. Health Inform."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Mostafa, S.S., Mendon\u00e7a, F., Morgado-Dias, F., and Ravelo-Garc\u00eda, A. (2017, January 20\u201323). SpO2 based Sleep Apnea Detection using Deep Learning. Proceedings of the INES 2017 \u2022 21st International Conference on Intelligent Engineering Systems, Larnaca, Cyprus.","DOI":"10.1109\/INES.2017.8118534"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Piorecky, M., Barto\u0148, M., Koudelka, V., Buskova, J., Koprivova, J., Brunovsky, M., and Piorecka, V. (2021). Apnea detection in polysomnographic recordings using machine learning techniques. Diagnostics, 11.","DOI":"10.3390\/diagnostics11122302"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"102133","DOI":"10.1016\/j.artmed.2021.102133","article-title":"AIOSA: An approach to the auto-matic identification of obstructive sleep apnea events based on deep learning","volume":"118","author":"Bernardini","year":"2021","journal-title":"Artif. Intell. Med."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Pathinarupothi, R.K., Rangan, E.S., Gopalakrishnan, E.A., Vinaykumar, R., and Soman, K.P. (2017, January 23\u201326). Single Sensor Techniques for Sleep Apnea Diagnosis using Deep Learning. Proceedings of the 2017 IEEE International Conference on Healthcare Informatics Single, Park City, UT, USA.","DOI":"10.1109\/ICHI.2017.37"},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"e215","DOI":"10.1161\/01.CIR.101.23.e215","article-title":"PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals","volume":"101","author":"Goldberger","year":"2000","journal-title":"Circulation"},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"1351","DOI":"10.1093\/jamia\/ocy064","article-title":"The National Sleep Research Resource: Towards a sleep data commons","volume":"25","author":"Zhang","year":"2018","journal-title":"J. Am. Med. Inform. Assoc."},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Cen, L., Yu, Z.L., Kluge, T., and Ser, W. (2018, January 18\u201321). Automatic System for Obstructive Sleep Apnea Events Detection Using Convolutional Neural Network. Proceedings of the 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Honolulu, HI, USA.","DOI":"10.1109\/EMBC.2018.8513363"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"129586","DOI":"10.1109\/ACCESS.2020.3009149","article-title":"Multi-Objective Hy-perparameter Optimization of Convolutional Neural Network for Obstructive Sleep Apnea Detection","volume":"8","author":"Mostafa","year":"2020","journal-title":"IEEE Access"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"177","DOI":"10.1038\/s41597-022-01272-y","article-title":"OSASUD: A dataset of stroke unit recordings for the detection of Obstructive Sleep Apnea Syndrome","volume":"9","author":"Bernardini","year":"2022","journal-title":"Sci. Data"},{"key":"ref_35","first-page":"5999","article-title":"Attention is all you need","volume":"30","author":"Vaswani","year":"2017","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_36","unstructured":"NVIDIA (2023, May 21). GeForce RTX 3080 Family. Available online: https:\/\/www.nvidia.com\/en-me\/geforce\/graphics-cards\/30-series\/rtx-3080-3080ti\/."},{"key":"ref_37","unstructured":"Team, G.B. (2023, May 21). TensorFlow 2.10. Available online: https:\/\/www.tensorflow.org\/."},{"key":"ref_38","unstructured":"Sklearn.preprocessing (2023, May 21). Preprocessing Data. Available online: https:\/\/scikit-learn.org\/stable\/modules\/preprocessing.html."},{"key":"ref_39","first-page":"111","article-title":"Data preprocessing for supervised leaning","volume":"1","author":"Kotsiantis","year":"2006","journal-title":"Int. J. Comput. Sci."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Wang, Y.A., and Chen, Y.N. (2020, January 16\u201320). What do position embeddings learn? An empirical study of pre-trained language model positional encoding. Proceedings of the EMNLP 2020\u20142020 Conference on Empirical Methods in Natural Language Processing, Online.","DOI":"10.18653\/v1\/2020.emnlp-main.555"},{"key":"ref_41","unstructured":"Wang, G., Lu, Y., Cui, L., Lv, T., Florencio, D., and Zhang, C. (2022, January 20\u201323). A Simple yet Effective Learnable Positional En-coding Method for Improving Document Transformer Model. Proceedings of the Findings of the Association for Computational Linguistics: AACL-IJCNLP 2022, Online. Available online: https:\/\/aclanthology.org\/2022.findings-aacl.42."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Wu, K., Peng, H., Chen, M., Fu, J., and Chao, H. (2021, January 10\u201317). Rethinking and Improving Relative Position Encoding for Vision Transformer. Proceedings of the IEEE International Conference on Computer Vision, Montreal, QC, Canada.","DOI":"10.1109\/ICCV48922.2021.00988"},{"key":"ref_43","unstructured":"Taylor, G.W., Fergus, R., Zeiler, M.D., and Krishnan, D. (2010, January 13\u201318). Deconvolutional Networks. Proceedings of the 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, San Francisco, CA, USA."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"119","DOI":"10.1016\/j.procs.2021.08.013","article-title":"A study on using deep autoencoders for imbalanced binary classification","volume":"192","author":"Tomescu","year":"2021","journal-title":"Procedia. Comput. Sci."},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"1454","DOI":"10.1007\/s10618-020-00701-z","article-title":"ROCKET: Exceptionally fast and accurate time series classification using random convolutional kernels","volume":"34","author":"Dempster","year":"2020","journal-title":"Data Min. Knowl. Discov."},{"key":"ref_46","unstructured":"Dumoulin, V., and Visin, F. (2016). A guide to convolution arithmetic for deep learning. arXiv, Available online: http:\/\/arxiv.org\/abs\/1603.07285."},{"key":"ref_47","unstructured":"Zhang, Y. (2023, September 13). A Better Autoencoder for Image: Convolutional Autoencoder. Available online: http:\/\/users.cecs.anu.edu.au\/Tom.Gedeon\/conf\/ABCs2018\/paper\/ABCs2018_paper_58.Pdf."},{"key":"ref_48","unstructured":"Kingma, D.P., and Ba, J.L. (2015, January 7\u20139). Adam: A method for stochastic optimization. Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015\u2014Conference Track Proceedings, San Diego, CA, USA."},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"1382","DOI":"10.18653\/v1\/2022.findings-emnlp.99","article-title":"Transformer Language Models without Positional En-codings Still Learn Positional Information","volume":"2022","author":"Haviv","year":"2022","journal-title":"Find. Assoc. Comput. Linguist. EMNLP"},{"key":"ref_50","doi-asserted-by":"crossref","first-page":"101095","DOI":"10.1016\/j.swevo.2022.101095","article-title":"A study of ant-based pheromone spaces for generation constructive hyper-heuristics","volume":"72","author":"Emilio","year":"2022","journal-title":"Swarm Evol. Comput."},{"key":"ref_51","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1016\/j.ins.2019.08.069","article-title":"An online-learning-based evolutionary many-objective algorithm","volume":"509","author":"Zhao","year":"2020","journal-title":"Inf. Sci."},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"390","DOI":"10.1016\/j.ins.2021.02.039","article-title":"An Adaptive Polyploid Memetic Algorithm for scheduling trucks at a cross-docking terminal","volume":"565","author":"Dulebenets","year":"2021","journal-title":"Inf. Sci."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/18\/7924\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T20:52:02Z","timestamp":1760129522000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/18\/7924"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,9,15]]},"references-count":52,"journal-issue":{"issue":"18","published-online":{"date-parts":[[2023,9]]}},"alternative-id":["s23187924"],"URL":"https:\/\/doi.org\/10.3390\/s23187924","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,9,15]]}}}