ECG-Based Automated Detection of Sleep Apnea Using Deep Neural Networks and Hidden Markov Models | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Article ECG-Based Automated Detection of Sleep Apnea Using Deep Neural Networks and Hidden Markov Models Sara Qnatyan, Hojat Ghimatgar, Ahmad Keshavarz This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8280775/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 12 You are reading this latest preprint version Abstract Sleep disorders constitute a substantial global health burden, with more than eighty distinct conditions currently recognized. Among these, obstructive sleep apnea (OSA) represents the most prevalent sleep-related respiratory disorder, characterized by recurrent episodes of complete or partial upper airway obstruction during sleep. Although often asymptomatic, OSA exerts profound detrimental effects on cardiovascular, neurological, and pulmonary systems, thereby necessitating timely and accurate diagnosis. Conventional diagnostic approaches rely on polysomnography (PSG), which, despite its high diagnostic accuracy, remains costly, time-intensive, and dependent on specialized equipment and expert clinical supervision. These limitations in accessibility and operational complexity have prompted the development of more practical alternatives. Electrocardiogram (ECG)-based approaches have consequently attracted considerable attention owing to their capacity for continuous cardiac monitoring and sensitivity to subtle physiological alterations associated with sleep-disordered breathing. However, the inherent nonstationarity of ECG signals and substantial inter-subject variability continue to constrain model generalizability, thereby underscoring the critical need for robust and computationally efficient deep learning architectures. In this study, we propose a deep learning framework that integrates multiple surface-level ECG-derived features—including R-R intervals (RRI), ECG-derived respiration (EDR), and respiratory amplitude (RAMP)—extracted from the PhysioNet Apnea-ECG database. A record-wise data partitioning strategy was implemented to rigorously prevent data leakage across training, validation, and test sets. A hidden Markov model (HMM) was further incorporated as a post-processing module to refine apnea episode detection. Across five repeated hold-out validation experiments with varying training and validation partitions, the CNN-Transformer-LSTM architecture achieved an accuracy of 89.16 ± 0.94%, sensitivity of 81.42 ± 3.27%, and specificity of 94.00 ± 1.16%. Five-fold cross-validation yielded enhanced performance with accuracy of 90.62 ± 1.54%, sensitivity of 84.15 ± 3.80%, and specificity of 94.44 ± 2.22%. Integration of the HMM module further improved classification performance by approximately 5.00–6.00%, demonstrating the efficacy of the proposed framework for reliable and efficient OSA screening in both clinical and home-based monitoring applications. Health sciences/Cardiology Biological sciences/Computational biology and bioinformatics Health sciences/Diseases Physical sciences/Engineering Health sciences/Health care Health sciences/Medical research Obstructive Sleep Apnea ECG-Derived Respiration Hybrid Deep Neural Networks CNN-Transformer-LSTM Hidden Markov Model Physiological Signal Processing Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Review Version 1 posted Editorial decision: Revision requested 29 Apr, 2026 Reviews received at journal 04 Feb, 2026 Reviewers agreed at journal 01 Feb, 2026 Reviewers agreed at journal 01 Feb, 2026 Reviews received at journal 21 Jan, 2026 Reviewers agreed at journal 07 Jan, 2026 Reviewers agreed at journal 18 Dec, 2025 Reviewers invited by journal 17 Dec, 2025 Editor assigned by journal 17 Dec, 2025 Editor invited by journal 09 Dec, 2025 Submission checks completed at journal 08 Dec, 2025 First submitted to journal 08 Dec, 2025 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8280775","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":562469607,"identity":"ea042773-ae3a-4531-b03c-f919a30f5319","order_by":0,"name":"Sara Qnatyan","email":"","orcid":"","institution":"Persian Gulf university","correspondingAuthor":false,"prefix":"","firstName":"Sara","middleName":"","lastName":"Qnatyan","suffix":""},{"id":562469608,"identity":"eb909a1c-d5f3-4d14-a108-b776bdae5bad","order_by":1,"name":"Hojat Ghimatgar","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA5klEQVRIiWNgGAWjYDACCcYGCIMdSjMwE6UlAcjgOUC0FhAB0iKRQKS75KObWzf8/FErbz7z7eHXPAx28gzsvA/wajG8c7DtZk/CccM5t/PSrHkYkg0bmNkN8GuZkdh2gyfhGOMM6RwzYx4G5gQGZjb8DgNpufkn4Zj9DMkzIC31hLXISyS23eZJqEmcIcFj/JiH4TBhLQYgLTJpB5Jn8OSlMc4xOG7YRtCWGenPbr6xqbOdwX728Ic3FdXy/PzHCNhyAEwdBmIeNgkGYFgRsANoSwOYqgNpYf5ASPUoGAWjYBSMTAAA9OlAiidgrVgAAAAASUVORK5CYII=","orcid":"","institution":"Persian Gulf university","correspondingAuthor":true,"prefix":"","firstName":"Hojat","middleName":"","lastName":"Ghimatgar","suffix":""},{"id":562469609,"identity":"16d3d651-812d-4721-85c0-6d5b75edb8f3","order_by":2,"name":"Ahmad Keshavarz","email":"","orcid":"","institution":"Persian Gulf university","correspondingAuthor":false,"prefix":"","firstName":"Ahmad","middleName":"","lastName":"Keshavarz","suffix":""}],"badges":[],"createdAt":"2025-12-04 15:08:41","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8280775/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8280775/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":99308799,"identity":"f9273104-2140-479d-a2ca-e1df6564045b","added_by":"auto","created_at":"2025-12-31 16:09:14","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2422628,"visible":true,"origin":"","legend":"","description":"","filename":"Revisedmanuscript.docx","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/2e941195b36dc8bfb9a9ae82.docx"},{"id":98872706,"identity":"2e845139-cf5e-480c-9931-7edb5c06cabe","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"json","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":6669,"visible":true,"origin":"","legend":"","description":"","filename":"fa0ffd80c478417bbd385a14ba4a116c.json","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/1cf9a8eab75e0e3a742cf222.json"},{"id":98872707,"identity":"1af0bc1d-5739-4c12-9b2e-cb201a4f6978","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"xml","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":193877,"visible":true,"origin":"","legend":"","description":"","filename":"fa0ffd80c478417bbd385a14ba4a116c1enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/36f9d8f378eb639c59ab5b9c.xml"},{"id":98872715,"identity":"829728ad-764a-4c47-acb8-d89e1a7c352d","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"jpeg","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":558703,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/9949767070587f6099846226.jpeg"},{"id":98872708,"identity":"cbcd01d7-f10b-4499-bb22-2714246956e8","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":194506,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage10.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/b0a4256c18cd4442be1ae927.png"},{"id":98872716,"identity":"863ed075-73af-4d1a-9832-87ef538881ab","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"jpeg","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":562245,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage11.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/e95de9d813370106a943afe2.jpeg"},{"id":99308999,"identity":"a9f7ee99-286b-4bce-b49a-396e2ee5e997","added_by":"auto","created_at":"2025-12-31 16:09:38","extension":"jpeg","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":306937,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage12.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/16353a6c4e5d205042490f7e.jpeg"},{"id":99309305,"identity":"72690dea-a2c1-468c-818f-1fb8d1b3b6e1","added_by":"auto","created_at":"2025-12-31 16:10:04","extension":"png","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":76431,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage13.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/aae524a87f4563eed04a46b1.png"},{"id":98872712,"identity":"1699eec9-7776-4c4f-bb36-0e40f10e1192","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"jpeg","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":666402,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage14.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/0cf6fd92eaf45a1e97797d3a.jpeg"},{"id":98872714,"identity":"9ade0bf6-c55a-42e8-b8d0-11a37ead5fbf","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"jpeg","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":204738,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage15.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/c6d075a3ad9551c99b23e697.jpeg"},{"id":98872717,"identity":"4ba9fc96-a338-4813-99c3-cfeb30119d37","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":192162,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/0b6505a0d64af3928139d11d.png"},{"id":99309354,"identity":"d1c5cf40-38df-418f-a875-11feb363eb8d","added_by":"auto","created_at":"2025-12-31 16:10:14","extension":"jpeg","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":246275,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/f4eee2d50b76a25b3a4ae987.jpeg"},{"id":99309393,"identity":"4d280e30-60e0-4cab-89d4-db451aa68bbe","added_by":"auto","created_at":"2025-12-31 16:10:19","extension":"png","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":43944,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/58245376e53e75c73bac0ec3.png"},{"id":98872740,"identity":"de88689e-7a53-4cbc-840f-44048a8a6ce7","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"jpeg","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":173129,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage5.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/3ca4910650ae344f7d485113.jpeg"},{"id":99308848,"identity":"eb6474db-7c1c-4c60-8283-74a2e77c81a4","added_by":"auto","created_at":"2025-12-31 16:09:21","extension":"png","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":54492,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/8ffae83934c97b952ac0e160.png"},{"id":99309036,"identity":"c69fc1a8-2320-47b1-82d9-85c1f0492619","added_by":"auto","created_at":"2025-12-31 16:09:41","extension":"png","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":23177,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage7.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/158420c56d575f55943e0551.png"},{"id":98872731,"identity":"6cf9b3b3-2fe7-4979-a23f-a1bddd13894f","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":56601,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage8.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/fc378533b8b9ec3df49bbafd.png"},{"id":98872720,"identity":"4e6d2da9-8e60-402b-bd02-ae7ae86e2364","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":18,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":50207,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage9.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/d2620f6d452ea0992d75852a.png"},{"id":99309001,"identity":"7ce6397f-2b54-4753-9d8b-01e11bb4cc1f","added_by":"auto","created_at":"2025-12-31 16:09:38","extension":"rar","order_by":19,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1701325,"visible":true,"origin":"","legend":"","description":"","filename":"newversionfigures.rar","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/fbd7f0f7b25566c202bfae6b.rar"},{"id":99309378,"identity":"8b67f5a3-4c5b-4097-a00b-0c3d22cf4ad7","added_by":"auto","created_at":"2025-12-31 16:10:17","extension":"png","order_by":20,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":96072,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/71fa49b0741c39d96244f4b5.png"},{"id":99308995,"identity":"c0ffbd42-c609-4a34-82a7-0f3cfc0bef44","added_by":"auto","created_at":"2025-12-31 16:09:37","extension":"png","order_by":21,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":47981,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage10.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/c74a8f74d8fece957b64f9f8.png"},{"id":98872737,"identity":"e8f57e55-94e7-4dfa-acbd-b0b9d543e73a","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":22,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":158841,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage11.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/ff7004af8150b14a27247ced.png"},{"id":98872723,"identity":"370a04d6-615b-43e1-a7cb-b7c88e67a872","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":23,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":51873,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage12.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/6cfc5b9919ec9e3eac452bb2.png"},{"id":99308981,"identity":"2e052589-056a-45cf-ac48-b2eeb7798d8a","added_by":"auto","created_at":"2025-12-31 16:09:36","extension":"png","order_by":24,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":29093,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage13.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/4b94b79ec9f27813bbdab6f8.png"},{"id":98872738,"identity":"6503bd66-b93e-46e5-b22a-e7ba7c4aa119","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":25,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":110943,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage14.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/2ad1f658573f85c2f0039e2c.png"},{"id":99308963,"identity":"8cd303ad-af73-4911-ade2-6867b0cf0954","added_by":"auto","created_at":"2025-12-31 16:09:35","extension":"png","order_by":26,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":41874,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage15.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/d9fc377155e8856484692013.png"},{"id":98872721,"identity":"6b379ae0-f853-4922-ab4a-ef47b49c5a2f","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":27,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":56374,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/943d42c5531619c839a67bf8.png"},{"id":98872725,"identity":"6a7fd9f7-5140-403f-8288-f83d26c7383e","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":28,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":46373,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/4abebd9912abbfe500f0be69.png"},{"id":98872726,"identity":"f9f2c405-19bb-4577-bb0d-233536356a54","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":29,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":15526,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/e9798e305c4d8e9c9317c9fe.png"},{"id":98872734,"identity":"ca8e19dc-5baf-4513-b570-71f7997ba544","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":30,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":30549,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/c00469c51b8f3e2f40431463.png"},{"id":98872727,"identity":"eedf539f-ac95-459a-82e2-353c99f4e857","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":31,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":17704,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/a2452ffccd4179a72de17714.png"},{"id":98872735,"identity":"70abc78b-2136-40ed-b2c8-0c7a7b5054db","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":32,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":7775,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage7.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/fd1a3fd3cd5a81b674fba0cf.png"},{"id":98872730,"identity":"849f56d2-826c-4a73-91d2-9549acc2e8b0","added_by":"auto","created_at":"2025-12-23 12:17:35","extension":"png","order_by":33,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":13251,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage8.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/d6e8eb95cd5d9c6d24acab17.png"},{"id":98872736,"identity":"dcc427c1-a1cc-4d7a-a111-4844fa6a72a0","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"png","order_by":34,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":11031,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage9.png","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/28071dfeb4227724979743c2.png"},{"id":99309181,"identity":"3d18080c-b6ef-486d-b64f-76a22214990e","added_by":"auto","created_at":"2025-12-31 16:09:50","extension":"xml","order_by":35,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":193245,"visible":true,"origin":"","legend":"","description":"","filename":"fa0ffd80c478417bbd385a14ba4a116c1structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/21bc93b6bf430dc7c45e9912.xml"},{"id":98872732,"identity":"d90220bb-83e2-409a-83b7-352fc951c56f","added_by":"auto","created_at":"2025-12-23 12:17:36","extension":"html","order_by":36,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":210634,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1/4e56e440cbaa4f3873df3206.html"},{"id":99322676,"identity":"d2ee3fc7-933b-4487-b85d-cef73728fb43","added_by":"auto","created_at":"2025-12-31 16:43:55","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1497517,"visible":true,"origin":"","legend":"","description":"","filename":"Revisedmanuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8280775/v1_covered_3347c339-3370-47fe-85c1-31fcbcf0e0d2.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"ECG-Based Automated Detection of Sleep Apnea Using Deep Neural Networks and Hidden Markov Models","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"Obstructive Sleep Apnea, ECG-Derived Respiration, Hybrid Deep Neural Networks, CNN-Transformer-LSTM, Hidden Markov Model, Physiological Signal Processing","lastPublishedDoi":"10.21203/rs.3.rs-8280775/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8280775/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eSleep disorders constitute a substantial global health burden, with more than eighty distinct conditions currently recognized. Among these, obstructive sleep apnea (OSA) represents the most prevalent sleep-related respiratory disorder, characterized by recurrent episodes of complete or partial upper airway obstruction during sleep. Although often asymptomatic, OSA exerts profound detrimental effects on cardiovascular, neurological, and pulmonary systems, thereby necessitating timely and accurate diagnosis. Conventional diagnostic approaches rely on polysomnography (PSG), which, despite its high diagnostic accuracy, remains costly, time-intensive, and dependent on specialized equipment and expert clinical supervision. These limitations in accessibility and operational complexity have prompted the development of more practical alternatives. Electrocardiogram (ECG)-based approaches have consequently attracted considerable attention owing to their capacity for continuous cardiac monitoring and sensitivity to subtle physiological alterations associated with sleep-disordered breathing. However, the inherent nonstationarity of ECG signals and substantial inter-subject variability continue to constrain model generalizability, thereby underscoring the critical need for robust and computationally efficient deep learning architectures. In this study, we propose a deep learning framework that integrates multiple surface-level ECG-derived features—including R-R intervals (RRI), ECG-derived respiration (EDR), and respiratory amplitude (RAMP)—extracted from the PhysioNet Apnea-ECG database. A record-wise data partitioning strategy was implemented to rigorously prevent data leakage across training, validation, and test sets. A hidden Markov model (HMM) was further incorporated as a post-processing module to refine apnea episode detection. Across five repeated hold-out validation experiments with varying training and validation partitions, the CNN-Transformer-LSTM architecture achieved an accuracy of 89.16 ± 0.94%, sensitivity of 81.42 ± 3.27%, and specificity of 94.00 ± 1.16%. Five-fold cross-validation yielded enhanced performance with accuracy of 90.62 ± 1.54%, sensitivity of 84.15 ± 3.80%, and specificity of 94.44 ± 2.22%. Integration of the HMM module further improved classification performance by approximately 5.00–6.00%, demonstrating the efficacy of the proposed framework for reliable and efficient OSA screening in both clinical and home-based monitoring applications.\u003c/p\u003e","manuscriptTitle":"ECG-Based Automated Detection of Sleep Apnea Using Deep Neural Networks and Hidden Markov Models","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-12-23 12:17:28","doi":"10.21203/rs.3.rs-8280775/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-04-29T04:38:01+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-02-04T16:56:13+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"147125779228027167530835335796661629698","date":"2026-02-02T01:56:47+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"100338693243696259331157801911040363799","date":"2026-02-01T19:35:12+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-01-21T09:40:08+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"104088523549734938945127663987227101126","date":"2026-01-07T13:18:59+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"135440797781230078441143643200960799363","date":"2025-12-18T14:43:49+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-12-18T04:29:36+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-12-18T04:28:18+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2025-12-09T20:21:55+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-12-08T09:41:03+00:00","index":"","fulltext":""},{"type":"submitted","content":"Scientific Reports","date":"2025-12-08T09:27:19+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"04676805-1dec-42ee-88d7-ed4d7814c590","owner":[],"postedDate":"December 23rd, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":59898950,"name":"Health sciences/Cardiology"},{"id":59898951,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":59898952,"name":"Health sciences/Diseases"},{"id":59898953,"name":"Physical sciences/Engineering"},{"id":59898954,"name":"Health sciences/Health care"},{"id":59898955,"name":"Health sciences/Medical research"}],"tags":[],"updatedAt":"2026-05-19T14:39:14+00:00","versionOfRecord":[],"versionCreatedAt":"2025-12-23 12:17:28","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8280775","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8280775","identity":"rs-8280775","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.