An introduction to artificial intelligence in sleep medicine
Why artificial intelligence (AI)?
The convergence of large datasets, greater computing power and algorithmic advances has opened the door for AI to be applied across a wide range of industries. In particular, it is the promise of machine learning (ML) which underpins this new potential. ML comprises a versatile range of techniques, from neural networks that can analyse imaging or text, to sophisticated predictive models, and is defined by an ability to ‘learn’ from the data it is shown. Rather than following rules (e.g., “if blood test X is elevated and blood test Y remains static, suggest Z”), a ML algorithm will identify the relevant patterns in the data for performing the task at hand. These techniques excel at identifying complex, non-linear relationships within large quantities of data and can update their performance as new data are collected. This enables the rapid and scalable development of tools that previously required laborious manual input or were simply not possible. In healthcare, examples where such approaches have matched clinician performance include in the screening of breast cancer (1), identifying colonic polyps (2) and recognising sight-threatening retinal disease (3). In sleep medicine, it has shown promise in supporting the diagnosis of OSA (4-6) and narcolepsy (7), personalising treatment (8) and enhancing pathophysiological understanding.
Utilising all data points through convolutional neural networks
As clinicians now move towards a phenotypic approach to understanding and offering treatment to patients with OSA (9), more factors can be considered prior to offering treatment; in addition to the large amounts of electrophysiological data recorded by polysomnography (PSG). Factors which may help determine treatment for sleep patients include the body mass index (BMI), pharyngeal critical closing pressure (Pcrit), upper airway dilator muscle recruitment (10), respiratory arousal threshold (11) and ventilatory feedback control (loop gain) (12), and the success of previous treatments as determined by factors such as the Apnoea Hypopnoea Index (AHI) and Epworth Sleepiness Score (ESS). AI algorithms operate best, by learning from large data sets with multiple data points, to determine optimal treatment options through constantly developing layered mathematical models. More data points help increase its accuracy.
Supporting upper airway analysis
The upper airway is a complex structure and partially determines treatment options. The pharynx is fully collapsible (13), and airway occlusion can occur in different degrees in different patients, with a proportional worsening with age (14,15). Upper airway anatomy can be assessed using endoscopy, magnetic resonance imaging and ultrasonography. Convolutional neural networks are a relatively novel ML technique which excel at analysing images. There is the potential to extract useful information from these imaging modalities, if appropriate datasets are developed. Computational fluid dynamic modelling is a method for analyses of airflow through the human upper airway via imaging. Computational analysis of airflow, in combination with geometries based on medical imaging such at CT or MRI, may provide insights into sleep pathology and diagnosis. Yeom et al. [2019] (16), were able to identify the severity of OSA (mild, moderate/severe) with a greater than 80% accuracy in 55 patients using this approach, in this proof of concept study which used only a limited number of upper airway landmarks (7) for their computational modelling.
ML conceptual studies to improve diagnostic pathways
Investigations for OSA, including PSG and home sleep apnoea testing (HSAT), are resource-intensive. AI may enable the development of non-intrusive tools that are less resource-intense, supporting diagnosis outside of the clinical sleep medicine setting in the future.
Groups have looked at analysing physiological signals such as oxygen saturation (SaO2), respiratory rate and single-lead ECGs with AI to support OSA screening. Papini et al. [2019] used ECG-based features, creating algorithms, to help detect OSA-related events, and found a good correlation to the AHI (0.72 correlation, estimation error 0.56±14.74 events/h), and could screen a large range of OSA severities [area under the ROC-curve (AUC) ≥0.86, Cohen’s kappa ≥0.53 and precision ≥70%] (4). Behar et al. trained a logistic regression classifier on SaO2 and demographic data to achieve an AUC of 0.94, as well as an AUC of 0.92 when using oximetry data alone, at times outperforming questionnaires such as the STOP-BANG screening questionnaire (5). Other groups have looked at multi-class detection of mild, moderate and severe OSA. By combining at-home oximetry and airflow recordings, Álvarez et al. achieved an intra-class correlation (ICC) coefficient of 0.93 between estimated and actual apnoea-hypopnea index (AHI) score (6). The increasing adoption of wearable technology offers exciting potential for new approaches to screening. For example, the Apple Watch® now offers ECG recording, and other portalable devices such as ARES® (Watermark Medical, Southern US) and ApneaLink® (ResMed, California) offer measurement of oximetry and airflow.
Stretch et al. used pre-HSAT questionnaires, demographic and health data to build a mixture of ML models to predict which patients would have non-diagnostic HSAT results. Their best performing model, using a random forest algorithm, achieved a sensitivity of 46% and a specificity of 95% (17). The most important variables for the model, perhaps predictably, were age, weight and BMI, but these were combined with scores on the Berlin Questionnaire, PHQ-9, STOPBANG and Insomnia Severity Index, amongst others.
At present, analysis of PSG recordings requires manual feature extraction, as signal must be identified amongst the noise. Analysing PSG waveforms using convolutional neural networks, which specialise at processing visual data, may enable the automatic extraction of features, that can help to overcome inter-scorer variability. The algorithm will continue to improve its accuracy as it ‘learns’ the more data that are channelled through.
Narcolepsy, another common sleep condition, is assessed using PSG and a Multi Sleep Latency Test (MSLT). In a multicentre study, Stephansen et al. developed a neural network capable of automating sleep stage scoring, enabling diagnosis of narcolepsy via PSG data alone (7), with the model outperforming individual expert scorers by achieving a 91% sensitivity and a 96% specificity (70 subjects, 6 scorers across 3 centres). By utilising the sleep trends that deep learning techniques are able to identify, it may be possible to significantly reduce the costs associated with diagnosis. These techniques can be applied to diagnosing OSA from automated PSG analysis in addition to predicting adherence to continuous positive airway pressure (CPAP) treatment.
Predicting non-adherence and non-responders to therapy
CPAP is the gold-standard treatment for patients with OSA (18), but non-adherence is as high as 50–60% (19-21), due to varying factors including nasal resistance, claustrophobia high mask pressures and mucosal dryness (19-21). Other factors predicting non-adherence include male sex, lower OSA severity, less snoring, lower AHI, lower BMI and use of hypnotic drugs (22), and even smoking status (20). AI may facilitate personalised treatment decisions, by predicting risk of non-adherence by factoring in data such as these, in addition to the aforementioned anatomical and physiological differences between patients. Rafael-Palou et al. [2018] showed that, in theory, it is possible to predict CPAP adherence against clinical features prior to CPAP achieving an F1-score of 75% (23). (The F1-score is a common metric for AI models, which essentially measures the balance of sensitivity and specificity – with 100% a perfect score and 0% the worst possible score.)
In mild-to-moderate cases of OSA, oral appliances are recommended (24). However, they are not as effective as CPAP in improving the objective markers of the AHI, and many patients may not derive satisfactory benefit (8). In a prospective study, Remmers et al. developed an AI-powered feedback-controlled mandibular positioner test (FCMP) for home-use (8). It was able to predict responders and non-responders with an 85% sensitivity and 93% specificity, and also identify the optimal level of mandibular protrusion for effective treatment in 86% of cases. These predictive accuracy are comparable to similar in-laboratory studies (8). Interestingly, the algorithm seemed to suggest optimal protrusion lengths without resorting to unnecessarily high protrusions, possibly contributing to future long-term tolerance and side effect reduction. Such a tool may empower patients with self-management, which may in turn improve treatment adherence.
Important considerations
Though we have touched on some early implementation of ML and AI in sleep medicine, careful consideration surrounding real-world implementation is needed to ensure it is done effectively. Ultimately, studies to date have been descriptive in nature, and using well-designed randomised-controlled trials will be important for providing evidence-based justification. Additional considerations include the logistical challenges of incorporating AI tools into workflows, as well as the need for staff training. These will require close collaboration between manufacturers and sleep disorder centres to ensure the benefits and reliability of AI.
More broadly, the risks of exacerbating health inequalities when using ML-enabled tools must be mitigated by ensuring the use of diverse datasets to ‘train’ the algorithm. This issue is compounded by the use of non-publicly available datasets. Algorithms, particularly in screening tools, must be able to generalise to a heterogenous population. In addition, any such tool should aim to support but not replace clinicians in the decision-making process, as they are ultimately responsible for patient care.
Security around healthcare data remains an important concern, particularly in the utilisation of ‘Big Data’ from consumer devices and Positive-Airway-Pressure treatment devices. To ensure patient privacy, data storage methods must adhere to strong security measures following appropriate consent for data collection.
Conclusions
A large proportion of the population continue to suffer from undiagnosed, yet treatable, sleep conditions. Current pathways involve manual processes that are time consuming and costly. AI has the potential to identify sleep patients on a mass-scale by enabling population-level screening using wearable devices, automate analysis of large volumes of data, to predict treatment adherence, provide more personalised treatment, improve diagnostic rates, accelerate day-to-day clinical operations, and deepen our understanding of complex sleep disorders. While AI may not replace human decision making it can augment clinicians to arrive at decisions more effectively.
Acknowledgments
Funding: None.
Footnote
Provenance and Peer Review: This article was commissioned and reviewed by the Guest Editors (Joerg Steier and Prof. Walter McNicholas) for the “Sleep Section” published in Journal of Thoracic Disease. The article has undergone external peer review.
Conflicts of Interest: All authors have completed the ICMJE uniform disclosure form (available at https://dx.doi.org/10.21037/jtd-21-1569). The series “Sleep Section” was commissioned by the editorial office without any funding or sponsorship. The authors have no conflicts of interest to declare.
Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.
Open Access Statement: This is an Open Access article distributed in accordance with the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0), which permits the non-commercial replication and distribution of the article with the strict proviso that no changes or edits are made and the original work is properly cited (including links to both the formal publication through the relevant DOI and the license). See: https://creativecommons.org/licenses/by-nc-nd/4.0/.
References
- McKinney SM, Sieniek M, Godbole V, et al. International evaluation of an AI system for breast cancer screening. Nature 2020;577:89-94. [Crossref] [PubMed]
- Wang P, Liu X, Berzin TM, et al. Effect of a deep-learning computer-aided detection system on adenoma detection during colonoscopy (CADe-DB trial): a double-blind randomised study. Lancet Gastroenterol Hepatol 2020;5:343-51. [Crossref] [PubMed]
- De Fauw J, Ledsam JR, Romera-Paredes B, et al. Clinically applicable deep learning for diagnosis and referral in retinal disease. Nat Med 2018;24:1342-50. [Crossref] [PubMed]
- Papini GB, Fonseca P, van Gilst MM, et al. Estimation of the apnea-hypopnea index in a heterogeneous sleep-disordered population using optimised cardiovascular features. Sci Rep 2019;9:17448. [Crossref] [PubMed]
- Behar JA, Palmius N, Li Q, et al. Feasibility of Single Channel Oximetry for Mass Screening of Obstructive Sleep Apnea. EClinicalMedicine 2019;11:81-8. [Crossref] [PubMed]
- Álvarez D, Cerezo-Hernández A, Crespo A, et al. A machine learning-based test for adult sleep apnoea screening at home using oximetry and airflow. Sci Rep 2020;10:5332. [Crossref] [PubMed]
- Stephansen JB, Olesen AN, Olsen M, et al. Neural network analysis of sleep stages enables efficient diagnosis of narcolepsy. Nat Commun 2018;9:5229. [Crossref] [PubMed]
- Remmers J, Charkhandeh S, Grosse J, et al. Remotely controlled mandibular protrusion during sleep predicts therapeutic success with oral appliances in patients with obstructive sleep apnea. Sleep 2013;36:1517-25. A. [Crossref] [PubMed]
- Eckert DJ. Phenotypic approaches to obstructive sleep apnoea - New pathways for targeted therapy. Sleep Med Rev 2018;37:45-59. [Crossref] [PubMed]
- Jordan AS, White DP. Pharyngeal motor control and the pathogenesis of obstructive sleep apnea. Respir Physiol Neurobiol 2008;160:1-7. [Crossref] [PubMed]
- Eckert DJ, Younes MK. Arousal from sleep: implications for obstructive sleep apnea pathogenesis and treatment. J Appl Physiol (1985) 2014;116:302-13. [Crossref] [PubMed]
- Hudgel DW, Gordon EA, Thanakitcharu S, et al. Instability of ventilatory control in patients with obstructive sleep apnea. Am J Respir Crit Care Med 1998;158:1142-9. [Crossref] [PubMed]
- Patil SP, Schneider H, Schwartz AR, et al. Adult obstructive sleep apnea: pathophysiology and diagnosis. Chest 2007;132:325-37. [Crossref] [PubMed]
- Eikermann M, Jordan AS, Chamberlin NL, et al. The influence of aging on pharyngeal collapsibility during sleep. Chest 2007;131:1702-9. [Crossref] [PubMed]
- Kirkness JP, Schwartz AR, Schneider H, et al. Contribution of male sex, age, and obesity to mechanical instability of the upper airway during sleep. J Appl Physiol (1985) 2008;104:1618-24. [Crossref] [PubMed]
- Yeom SH, Na JS, Jung HD, et al. Computational analysis of airflow dynamics for predicting collapsible sites in the upper airways: machine learning approach. J Appl Physiol (1985) 2019;127:959-73. [Crossref] [PubMed]
- Stretch R, Ryden A, Fung CH, et al. Predicting Nondiagnostic Home Sleep Apnea Tests Using Machine Learning. J Clin Sleep Med 2019;15:1599-608. [Crossref] [PubMed]
- (NICE) NIfHaCE. Continuous positive airway pressure for the treatment of obstructive sleep apnoea/hypopnoea syndrome. 2016; Available online: https://www.nice.org.uk/guidance/ta139/chapter/1-Guidance
- Peppard PE, Young T, Barnet JH, et al. Increased prevalence of sleep-disordered breathing in adults. Am J Epidemiol 2013;177:1006-14. [Crossref] [PubMed]
- McArdle N, Devereux G, Heidarnejad H, et al. Long-term use of CPAP therapy for sleep apnea/hypopnea syndrome. Am J Respir Crit Care Med 1999;159:1108-14. [Crossref] [PubMed]
- Weaver TE, Maislin G, Dinges DF, et al. Relationship between hours of CPAP use and achieving normal levels of sleepiness and daily functioning. Sleep 2007;30:711-9. [Crossref] [PubMed]
- Jacobsen AR, Eriksen F, Hansen RW, et al. Determinants for adherence to continuous positive airway pressure therapy in obstructive sleep apnea. PLoS One 2017;12:e0189614 [Crossref] [PubMed]
- Rafael-Palou X, Turino C, Steblin A, et al. Comparative analysis of predictive methods for early assessment of compliance with continuous positive airway pressure therapy. BMC Med Inform Decis Mak 2018;18:81. [Crossref] [PubMed]
- Pengo MF, Steier J. Emerging technology: electrical stimulation in obstructive sleep apnoea. J Thorac Dis 2015;7:1286-97. [PubMed]