14 minute read

Artificial Intelligence Applications

Artificial Intelligence Applications in Sleep Medicine

By Robert Thomas, MD and Haoqi Sun, PhD

The measurement of sleep produces a large amount of data. Imagine – hours and hours of measurements from different parts of the sleeping brain and body. While complicated enough in health, there are so many changes at different ages, and of course, in sleep disorders. Some “rules” to help keep all this information under some order are required. Sleep medicine has largely used “rules-based” measurements from its inception – with specific criteria for different measurements such as brain wave and breathing. These rules are relatively rigid and – while convenient – tend to “lump” physiology, pathology, and indeed, individuals. Thus, two or more persons who are actually quite different may look similar. Though useful to convert large amounts of data into digestible bits, much of the information content is lost from this simplification.

Data in sleep medicine are intrinsically “big,” in terms of the large number of people suffering from sleep disorders, the multiple signal modalities collected during sleep through polysomnography (PSG), the possibility of nearly endless recordings from the same individual, and the rich information contained in PSGs. Therefore, sleep medicine is an important venue for data-driven approaches, especially artificial intelligence (AI), and AI has become an important technology in sleep medicine and vice versa. In the AI approach, various computational methods and “architectures,” or types of connections in computers, which talk to each other in interconnected layers of information transfer and manipulation are able to establish and extract obvious and non-obvious patterns in data.

It would seem that sleep data are made for AI! AI can be applied to improve sleep in various modes. Here we summarize the applications into three levels: (1) improving the efficiency of existing sleep scoring, sleep disorder diagnosis, and treatment management; (2) new metrics of health biomarkers and interventions which are difficult to be implemented in a rule-based approach; and (3) predicting future incidence of outcomes for identifying people with high risk in advance.

To be fair to the rule-based approach, the initial training of AI sleep analytics systems often uses rules as the foundation (a supervised or semi-supervised approach), but AI can also be entirely unsupervised. When the AI system is unsupervised, the system is allowed to “see what is going on with its own eyes” without constraints. Nothing prevents a mutually beneficial interaction – where AI outputs could change rules which in turn could change the parameters of the AI analysis, and repeat.

1) Improving Efficiency

The job of a sleep technologist who mostly scores sleep studies – a long tradition in sleep medicine – is surely at risk.

AI-assisted sleep scoring is becoming more commonly accepted. Instead of manually determining the sleep stages for more than 800 pages of sleep recording per night, sleep stages are automatically determined by an AI algorithm. The accuracy of AI-based sleep staging has reached the same level as the accuracy of human sleep scorers.

These algorithms also make the same types of errors humans do! After all, the training material is human.

In addition to the conventional sleep stages (hypnogram), the probability of being one of the five sleep stages can also be reported (hypnodensity graph) quantitatively reflecting the uncertainty in transitional stages. Transitions and fuzziness of rapid eye movement (REM) sleep or dream sleep, nonREM sleep, and wake states are common in disease states. Other important events including abnormal breathing, very brief (few seconds) awakenings from sleep movement of the legs, etc., are also automated. Automated sleep scoring improves the efficiency and reproducibility of a doctor’s diagnosis, such as sleep apnea (bad breathing during sleep), insomnia (taking too long to fall asleep, waking up too early, or waking up too many times), and narcolepsy (a condition causing extreme sleepiness in the daytime). Both single and multiple sources of information can be analyzed using AI, including data from wearable and non-touch devices, as these come into the medical mainstream.

2) New Metrics of Sleep

AI can be used to extract new information from sleep that cannot be explicitly expressed as rules. For example, sleep quality is a nonspecific term that could either mean the subjective feeling of refreshment when getting up, the objective percentage of deep sleep, or the association with cognition and unfavorable outcomes which is clinically more relevant. One example is sleep-based “brain age.” Many sleep patterns change with age; therefore, sleep patterns resemble sleep from a different age when the brain deviates from normal aging. In essence, if your sleep “looks” older than your calendar age, you are in trouble! AI is used to summarize the age-related changes in sleep into an age-like number. Older brain age has been associated with dementia and higher mortality.

Another example is predicting cardiovascular diseases (CVD). AI is used to estimate the likelihood of CVD using oxygen and heart rate fluctuations during sleep. When it comes to sleep apnea, analysis at the borderland of rules and AI is used to classify four “endotypes,” or mechanisms of disease, of obstructive sleep apnea (OSA) using PSG, which then enables personalized OSA treatment plans. In brief, bad breathing during sleep can be caused by more than one problem. For instance, breathing may be “wobbly” because its control is not precise, or one might wake up too easily from small changes in breathing. Using a rules-based approach may not differentiate these types of bad breathing during sleep, and thus, treatments are not aimed properly at the cause. Thus, not just opening the airway, but also targeting breathing control or even sleep itself can enable “precision and personalized” sleep apnea care.

3) Predicting the Future

The most common sleep disorder, obstructive sleep apnea, can be effectively treated by using a continuous positive airway pressure (CPAP) mask. However, only 50% of patients are still using theirs after 12 months. One important AI application is to predict who will, or will not, give up. Sleep also contains information about future risk of unfavorable outcomes such as death, abnormal brain development including autism, and dementia (like Alzheimer’s disease, with loss of memory), which can be extracted using AI. These methods are still in development. In fact, sleep can be considered a window into the health of numerous biological systems, including the brain, heart, and lungs. Sleep also is a general marker of health, in that sleep becomes light and fragmented when one is sick – cancer, infection, and so on. Sleep then can be used as a way to track overall health, not just as a state with its own disorders which need treatment.

Future of AI in Sleep Medicine

The important limitations, and hence important future work for AI in sleep medicine, include its inability to interpret the results for some AI methods (the machines never say “I do not know!”), the lack of confidence measures (“how correct is the machine?”), biases in accuracy (performing better in some instances than others, but in an unpredictable way) due to lack of heterogeneity in the dataset (the data used for training is not representative of the data the machine is asked to analyze), and lack of standard certifications for validating AI algorithms for clinical use (most researchers create their own methods and think their method is the best!). If nothing else, the prospect of financial savings will drive integration of AI into sleep medicine practice but blind acceptance without healthy skepticism is foolish.

Dr. Robert J. Thomas Robert J. Thomas, MD is a Professor of Medicine at Harvard Medical School, Division of Pulmonary, Critical Care & Sleep Medicine, Department of Medicine, Beth Israel Deaconess Medical Center.

He has been working in the field of sleep medicine and research for nearly 30 years.

Dr. Haoqi Sun Haoqi Sun, PhD is an Instructor of

Neurology at Harvard Medical School and Department of Neurology, Beth Israel Deaconess Medical Center. He comes with a background of Artificial Intelligence (AI) and has been working to bring AI into sleep research for 5 years.

References Bandyopadhyay, A. and Goldstein, C., 2022. Clinical applications of artificial intelligence in sleep medicine: a sleep clinician’s perspective. Sleep and Breathing, pp.1-17.

Stephansen, J.B., Olesen, A.N., Olsen, M., Ambati, A., Leary, E.B., Moore, H.E., Carrillo, O., Lin, L., Han, F., Yan, H. and Sun, Y.L., 2018. Neural network analysis of sleep stages enables efficient diagnosis of narcolepsy. Nature communications, 9(1), pp.1-15.

Sun, H., Paixao, L., Oliva, J.T., Goparaju, B., Carvalho, D.Z., van Leeuwen, K.G., Akeju, O., Thomas, R.J., Cash, S.S., Bianchi, M.T. and Westover, M.B., 2019. Brain age from the electroencephalogram of sleep. Neurobiology of aging, 74, pp.112-120.

Ye, E., Sun, H., Leone, M.J., Paixao, L., Thomas, R.J., Lam, A.D. and Westover, M.B., 2020. Association of sleep electroencephalography-based brain age index with dementia. JAMA network open, 3(9), pp.e2017357-e2017357.

Blanchard, M., Feuilloy, M., Gervès-Pinquié, C., Trzepizur, W., Meslier, N., Goupil, F., Pigeanne, T., Racineux, J.L., Balusson, F., Oger, E. and Gagnadoux, F., 2021. Cardiovascular risk and mortality prediction in patients suspected of sleep apnea: a model based on an artificial intelligence system. Physiological Measurement, 42(10), p.105010

Eguchi, K., Yabuuchi, T., Nambu, M., Takeyama, H., Azuma, S., Chin, K. and Kuroda, T., 2022. Investigation on factors related to poor CPAP adherence using machine learning: a pilot study. Scientific Reports, 12(1), pp.1-9.

Melissa C. Lipford, MD

Maya Ramagopal, MD

Robert J. Thomas, MD

Ask the Sleep Experts

As answered by our issue reviewers

Question: Can light therapy help me sleep better? How does it work?

Dr. Ramagopal:

Light therapy can help if you have a circadian rhythm disorder, insomnia, seasonal affective disorder, or depression. Exposure to bright light suppresses the production of melatonin, the hormone that induces sleep. It helps to realign the body clock with that of the sun, so you are alert during the day and tired towards the evening. There are different tools to deliver light therapy, including light therapy glasses and light boxes. A light box should have an intensity of about 10,000 lux to be effective. The light is full spectrum or only blue light. Ideally it should be placed 18-24 inches away; exposure for 15-30 minutes is sufficient. Lower intensity lights will need a longer exposure to be effective. Although light therapy is a safe treatment, there can be mild side effects like headache and irritability which will likely decrease with time.

Dr. Thomas:

Light therapy likely would not help an average sleeper under average common sense lighting conditions such as turning down the lights around 8:00pm, turning lights on around 6:00am, and keeping it dark while sleeping. Therapeutic light can be used for bothersome delay (morning light) or advance (evening light) of internal circadian rhythms.

Dr. Lipford:

Bright light therapy can be used to manage circadian rhythm sleep disorders. These are disorders in which people have a sleeping pattern that falls outside of what is considered the social norm. A sleep specialist will carefully work with the person to decide on the optimal timing and duration of light exposure depending on the symptoms. Light therapy can help shift a person’s “internal clock” and facilitate sleeping during a more acceptable timeframe. Light therapy can also be used for other sleep and mood disorders. It is important to work with your medical provider to ensure it is right for you and is delivered in the right way.

Is it okay to use an e-reader before bed?

Dr. Ramagopal:

Reading using an e-reader or a tablet before bed is a popular way to "wind down." E-readers use e-ink screens, which emit less blue light than tablets, but they still use blue light spectrum for back lighting. Newer versions of e-readers have better blue light filters but it is not completely absent. Exposure to blue light can prolong sleep onset, interrupt melatonin secretion, and disrupt the circadian rhythm. Some e-readers have night mode and dark mode features, which block blue light. This has a positive effect on the circadian rhythm and decreases eye strain.

Dr. Thomas:

With the light intensity at the lowest level, it is probably okay. A light meter phone app can be used to measure the lighting level; the light at the eye should be less than 10 lux. Reading cognitively engaging or disturbing material may be unwise.

Dr. Lipford:

The honest answer is maybe. For some, reading before bed is a relaxing activity which helps disengage the mind and leads to falling asleep more quickly. For others, reading is a stimulating activity and may make falling asleep more difficult. If you like to read in bed, consider choosing content that is interesting, but you can still put the book or device down when it is time to go to sleep. An exciting murder mystery may not be the best choice before bed!

E-readers and other electronic devices have the added stimulating effect of light, which can make it harder to fall asleep. Many of the newer devices have settings which reduce blue light and have adjustable backlighting which can help.

Exposure to blue light can prolong sleep onset, interrupt melatonin secretion, and disrupt the circadian rhythm.

How can I tell if I’m sleeping well?

Dr. Ramagopal:

The following are qualities of good sleep: the ability to fall asleep within 30 minutes of lying in bed, waking up not more than once during the night, and getting the age-appropriate amount of sleep. In adults, the recommended nightly amount of sleep is at least 7 hours. School-aged children should get at least 9-12 hours per 24 hours and teens 8-10 hours per 24 hours. Additionally, you should feel refreshed upon waking up and not be sleepy during the day. The need for a nap during the day could indicate that there is a problem with nighttime sleep.

Dr. Thomas:

Some clues that all is not well in the land of sleep include waking up very tired, being unable to stay awake in quiet daytime conditions, taking more than 15-20 minutes to fall asleep, waking up more than 2-3 brief times or for more than 30 minutes at night, waking up gasping for breath, having trouble waking up in the morning (multiple snooze button hits), having bedsheets that look like a war zone, or having a partner who is alarmed at your sleep behaviors or breathing patterns.

Dr. Lipford:

Most individuals need 7-9 hours of sleep nightly. If you are obtaining sufficient sleep on a regular schedule, you wake up feeling rested and refreshed, and you have good energy levels during the day, you are likely sleeping well.

My sleep tracking app says I’m not getting enough deep sleep. How do I improve it?

Dr. Ramagopal:

In addition to sleep hygiene recommendations, tips to improve deep sleep start with changes to the daytime routine. Moderate aerobic exercise, even for 30 minutes a day, can improve sleep quality. Exposure to sunlight helps reset the body’s circadian clock and promotes better sleep. Strenuous exercise within 1-2 hours of desired bedtime is not recommended because it can prolong the time to fall asleep. Eating a heavy meal too close to bedtime can also prolong sleep onset and sleep quality. Avoiding caffeine after 3pm is generally advised. The effect of alcohol on sleep depends on individual factors like age, gender, and body type; less than one glass of wine in women and less than two glasses of wine in men can decrease sleep quality.

Dr. Thomas:

The estimation of deep versus light sleep through consumer apps is not particularly reliable in people who need it the most: those with abnormal sleep. Trying to get to a "number" is not wise, outside of average sleep behaviors. For example, reducing your time in bed will likely increase "deep" sleep but that might cause you to be sleep-deprived. Apps are best for those who generally sleep well but put their sleep under stressors of various types; longitudinal tracking is probably the best use. Apps are useful in the sleep clinic, where the doctor knows what part of the output to use and how.

Have a question for the sleep experts?

Submit your questions by email to healthiersleep@worldsleepsociety.org. Questions are selected based on space and applicability.

Healthier Sleep Magazine 3270 19th Street NW, Suite 109 Rochester, MN 55901 USA

16th

About

World Sleep Day is an annual public awareness day that celebrates healthy sleep. World Sleep Society members around the world organize local and regional activities that promote the year’s theme and raise awareness of sleep health.

Global Event

Delegates in countries around the world participate in World Sleep Day each year. Since the first World Sleep Day in 2008 there have been 92 participating countries and 2,500+ activities organized.

Save the Date

The next World Sleep Day is Friday, March 17, 2023. Sign up for updates at worldsleepday.org to follow the latest developments regarding the annual theme and activities.

This article is from: