The article previously ran in the Q4 2022 issue of A2Zzz.
Most research on the use of artificial intelligence (AI) in the sleep field has focused on its use in the diagnosis of obstructive sleep apnea (OSA) and in polysomnography scoring. However, in recent years, the use of AI — in particular, conversational AI — for sleep coaching people with insomnia has been of great interest, and recent findings have been encouraging.
Insomnia is the inability to initiate sleep at the desired time or maintain sleep during a sleep period. It is often the result of another cause such as stress, medication effects, poor sleep hygiene (e.g., irregular sleep/wake times), mental disorders (e.g., depression, bipolar disorder), physical problems (e.g., neurological problems such as Alzheimer’s disease), physical discomfort (e.g., pain, pregnancy) and certain sleep disorders (e.g., non-24-hour sleep-wake rhythm disorder delayed/ advanced sleep phase syndrome). As a result of not being able to go to sleep at a desired time or being unable to maintain sleep, people with insomnia may struggle with daytime sleepiness and other consequences of insufficient sleep such as difficulty concentrating, depression or anxiety.
Cognitive behavioral therapy for insomnia (CBT-I) is often the most effective treatment for insomnia. It is usually delivered face-to-face by therapists trained in behavioral sleep medicine. CBT-I consists of stimulus control (i.e., avoiding stimulatory factors such as ingesting caffeine before bedtime), sleep restriction, sleep hygiene education (i.e., implementing behaviors that promote sleep), relaxation training and cognitive restructuring (i.e., reframing inaccurate thoughts about sleep and behaviors that contribute to insomnia). These sessions typically take place weekly in one-hour, face-to-face sessions over a period of six to eight weeks. Drawbacks of CBT-I treatment are its high cost and an insufficient number of trained CBT-I therapists available. To address these issues, scientists have worked to make the therapy more affordable and easily accessible by automating certain aspects of CBT-I treatment such as sleep coaching, which involves the use of various nonpharmacological techniques to improve sleep including sleep education and sleep hygiene, cognitive behavioral therapy and relaxation.1
In 2009, Ritterband et al.2 were the first team to develop an algorithm (i.e., a specialized program) that could provide users personalized recommendations for sleep restriction. The program presented information by means of text, graphics, animations, vignettes, quizzes and brief games. It sent users automated email reminders to complete the steps of a treatment, enter data in a sleep diary and implement strategies learned in a previous step of the treatment. All patients involved in the study were diagnosed with insomnia. One group of patients underwent the CBT-I treatment and a second group of patients did not (they later received the therapy). In the treated group, insomnia severity decreased substantially but it did not change in the control group. Wake after sleep onset decreased and sleep efficiency increased in the treatment group, compared to the control group. At six months, improvements were maintained in the treatment group. Ritterband proposed that the internet could be an effective and inexpensive tool to deliver CBT-I to people with insomnia.
Horsch et al.3 conducted a randomized controlled trial of a fully automated CBT-I mobile phone app called Sleepcare. Participants in their study had mild insomnia and were randomly assigned to immediately undergo CBT-I with the app for six to seven weeks (depending on compliance) or no treatment during this period (i.e., the control condition). Features of the app were a sleep diary, a relaxation exercise (which involved a progressive muscle relaxation exercise over a period of one to 16 minutes, the duration of which the participant chose), sleep restriction exercise and sleep hygiene and education (e.g., sleep hygiene and education information was presented as tips and facts in text format such as “Use your bedroom only for sleeping, not for working.”).
The treatment group had improved insomnia severity and sleep efficiency, which were maintained at the three-month follow-up. Based on this finding, Horst proposed that Sleepcare is applicable for insomnia treatment. However, the app was used by people with mild apnea. Therefore, whether the same results would occur for people with more severe apnea can not be concluded from their findings.
Automated CBT-I has also shown good results in teens. In 2017, Werner-Seidler and colleagues4 developed a smartphone app called the Sleep Ninja to deliver CBT-I to teens (12–16 years old). They had designed the program, based on input from teens, to include elements of game playing and have engaging aesthetics. In a later study, Werner-Seidler and colleagues5 demonstrated that, compared to teens with insomnia and depression who did not use the Sleep Ninja app, teens with insomnia and depression who used the app reported a greater reduction in insomnia symptoms at six weeks and at 14 weeks after initiating the program and they had a greater reduction in depression symptoms at six weeks. No adverse events were reported with the app.
However, a drawback of AI-based CBT-I programs has been that patients can answer questions delivered by the program about their sleep (e.g., sleep/wake times) or receive information by the program regarding sleep education or sleep hygiene, etc., but can’t report any specific concerns or difficulties in complying with the treatment as they could in a face-to-face session. To address this issue, Shim et al.6 in 2021 described their findings of a pilot study in which they used a conversational AI program7 that, based on free text responses by users, distinguished between causes of insomnia (e.g., caffeine consumption before bedtime), issues related to insomnia (e.g., trouble waking up) and impact of insomnia (e.g., effect on performance). They found that their program performed best in detecting causes of insomnia compared to its performance in detecting insomnia-related issues or the impact of sleep problems. Shim continues to work on improving the program and hopes to develop a more accurate conversational feature that will allow users to convey concerns about their sleep, as they would if they were in a face-to-face session, and improve the program’s analytical automated feature to aid decision-making.
Rick and colleagues8 designed a chatbot called SleepBot to improve sleep hygiene. A chatbot is a program that takes conversational (i.e., natural language) input and provides a conversational output in real time. Common examples of chatbot technology are online customer support live chats or virtual assistants such as Siri (Apple Corporation, Cupertino, California) and Alexa (Amazon, Inc., Seattle, Washington).
SleepBot asks users simple questions to elicit answers regarding problems that may be contributing to poor sleep and aid users in improving sleep hygiene. SleepBot uses a text messaging-based interaction that is similar to talking to a human. The question flow is responsive to each answer the user provides to the previous question, as shown in the example below.
SleepBot: Good morning! How did you sleep?
SleepBot: I'm glad that you got a good night's rest!
If users state that they slept well, SleepBot asks no questions about sleep disturbances. If users answer they woke up in the middle of the night, SleepBot asks questions about quantity and duration of the disturbance. The SleepBot program initially had problems understanding free text responses from users. Rick later improved the program by refining its conversation flow capability and the language used.
In 2020, the United States Food and Drug Administration (FDA) (Silver Spring, Maryland) approved the first prescription digital therapeutics tool, called Somryst, for treating chronic insomnia.9 Somryst (Pear Therapeutics, Inc., Boston, Massachusetts) delivers CBT-I via a mobile application. Somryst is designed to help treat chronic insomnia and depression in adults 22 years and older.
Somryst utilizes sleep restriction and sleep consolidation, stimulus control and personalized cognitive restructuring.10 For six to eight weeks, patients undergo a series of six self-guided and interactive treatment modules, which replace the traditional, weekly, face-to-face CBT-I sessions. Somryst also includes a daily sleep diary, which collects data regarding perceived insomnia severity, and screens for daytime impairment of mood. The sleep diary data are entered into an algorithm so sleep restriction therapy can be tailored uniquely for users throughout the prescription period. The program also provides personalized cognitive restructuring, based on the individual’s beliefs and attitudes about sleep. CBT-I technology improves, a greater number of patients who struggle with insomnia could be treated and patients who otherwise would have difficulty in accessing treatment could be treated.
- Holzinger B, Levec K, Munzinger MM, Mayer L, Klosch G. Managing daytime sleepiness with the help of sleepcoaching, a non-pharmacological treatment of non-restorative sleep. Sleep Breath. 2020; 24(1): 253-8.
- Ritterband LM, Thorndike FP, Gonder-Frederick LA, et al. Efficacy of an Internet-based behavioral intervention for adults with insomnia. Archives of General Psychiatry. 2009;66:692-8.
- Horsch CH, Lancee J, Griffioen-Both F, et al. Mobile phone-delivered cognitive behavioral therapy for insomnia: a randomized waitlist controlled trial. Journal of Medical Internet Research. 2017;19:e70.
- Werner-Seidler A, O'Dea B, Shand F, et al. A smartphone app for adolescents with sleep disturbance: Development of the Sleep Ninja. JMIR Mental Health. 2017;4:e28.
- Werner-Seidler A, Li SH, Spanos S, Johnston L, O'Dea B, Michelle T, Ribberband L, Newby JM, Mackinnon AJ, Christensen H. The effects of a sleep-focused smartphone application on insomnia and depressive symptoms: A randomised controlled trial and mediation analysis. Lancet. 2022. doi: http://dx.doi.org/10.2139/ssrn.4200346
- Shim H. Development of conversational AI for sleep coaching programme. Proceedings of the 16th Conference of the European Chapter of the Associationfor Computational Linguistics: Student Research Workshop. Stroudsburg, PA: Association for Computational Linguistics. 2021: 121–8.
- Shim H, Luca S, Lowet D, Vanrumste B. Data augmentation and semi-supervised learning for deep neural networks-based text classifier. Proceedings of the 35th Annual ACM Symposium on Applied Computing. Brno, Czech Republic: Association for Computing Machinery/Special Interest Group on Applied Computing (ACM/SIGAPP). 2020:1119-26.
- Rick SR, Goldberg AP, Weibel N. SleepBot - Encouraging sleep hygiene using an intelligent chatbot. 24th International Conference on Intelligent User Interfaces (IUI '19 Companion), March 17–20, 2019, Marina del Rey, CA, USA. New York, NY: Association for Computing Machinery: 107-8.
- US Food and Drug Administration (FDA). Approval letter for Somryst. 2020. https://www. accessdata.fda.gov/cdrh_docs/pdf19/K191716.pdf (accessed October 11, 2022).
- Morin CM. Profile of Somryst prescription digital therapeutic for chronic insomnia: Overview of safety and efficacy. Expert Review of Medical Devices. 2020;17:1239-48.