Recent Trends of Artificial Intelligence and Machine Learning for Insomnia Research

Article information

Chronobiol Med. 2021;3(1):16-19
Publication date (electronic) : 2021 March 30
doi :
Division of Neurology and Sleep Disorder, Department of Pediatrics, Soonchunhayng University Cheonan Hospital, Cheonan, Korea
Corresponding author: Seung Soo Kim, MD, PhD, Division of Neurology and Sleep Disorder, Department of Pediatrics, Soonchunhayng University Cheonan Hospital, 31 Suncheonhyang 6-gil, Dongnam-gu, Cheonan 31151, Korea. Tel: 82-41-570-2160, Fax: 82-41-572-4996, E-mail:
Received 2021 March 7; Accepted 2021 March 10.


Recently, the research using artificial intelligence (AI) have been actively conducted in various fields. In the sleep medicine, the research using an AI such as machine learning and deep learning have begun to increase explosively to keep pace with this trend of the times. The field where the most research is being done is the automation of diagnosis of obstructive sleep apnea syndrome and scoring of polysomnography. Studies using AI on insomnia also have shown a remarkable increase in recent years. In this paper, we look at the recent trends of insomnia research using AI and provide a milestone to researchers.


Artificial intelligence (AI) refers to machines or algorithms that do what human intelligence can do and machine learning (ML) is a technology and technique that aims to implement functions such as human learning ability in a computer [1]. Mainly, a supervised learning is used in ML and it is a method that let the algorithm learns a pattern from big data and performs classification for the pre-labeled outcome variable [1]. Deep learning (DL), which is in the spotlight these days, is one of ML, a nonlinear regression technique for learning data and pattern recognition using artificial neural networks (ANNs) [2]. According to a report by the U.S. Patent and Trademark Office in 2020, AI patent applications doubled in 2018 (60000/year) compared to 2002 (30000/year) and the proportion in all patent applications is also showing an explosive increase from 9% to 16% [3]. This is a proof that the use of AI has begun to take root in our daily lives.

In the medical research field, using AI is showing an explosive increase [2]. It is actively introduced in various fields such as neurology, radiology, ophthalmology, anesthesia, intensive care medicine and oncology [4-8]. Research using AI is also increasing in sleep medicine and the American Academy of Sleep Medicine published a position statement in 2020 [9]. The leading field in sleep research using AI is the automated scoring of polysomnography (PSG) and the screening of obstructive sleep apnea syndrome (OSAS) [4,10]. PSG and continuous positive airway pressure data was used mainly and is expected to be used more in the future [4]. In the field of sleep medicine, insomnia is probably the next most studied disease after OSAS. Therefore, the author has conducted this study to examine the recent trends in the use of AI in the insomnia research, and to present a milestone to researchers planning future research.


In PubMed (, the author searched for papers satisfying the MeSH term including “Sleep Initiation and Maintenance Disorders” and “Artificial Intelligence” regardless of the publication year. In addition, related papers identified in the reference and hand searching were also included in the analysis.

The inclusion criterion was a paper using AI for the research of the diagnosis, treatment, and pathophysiology of insomnia.

Exclusion criteria are as follows: 1) even if insomnia patients were the subjects of the study, the aim of study was only an automated scoring of PSG, 2) AI methods were not used for research methods and interventions, 3) papers that did not go through peer-review, 4) meta-analysis, systematic review, and conference material.

This review was conducted partially using guidelines of the Preferred Reporting Items for Systematic Reviews and MetaAnalyses (PRISMA) [11].


Applying the search strategy in PubMed, 17 results were initially found. In addition, handsearching of relevant studies yield 9 studies. After checking duplicates, the title and abstract of 26 studies were screened and the full text of 21 studies were reviewed. Finally 17 studies satisfied the inclusion criteria (Figure 1).

Figure 1.

PRISMA 2009 flow diagram [11] of study review process and exclusion papers.

The most common subject and method was diagnosis and screening of insomnia using classification. The most used algorithm was support vector machine (SVM), followed by decision tree and advanced tree (XGBoost, random forest) and ANN.

In addition, the most common modality was PSG. Particularly, there were many studies using signals of the electroencephalography (EEG) channel, and recently there was one study using the electrocardiography (ECG) channel. Next, there were many studies using MRI, followed by studies using questionnaire and using wearable devices.

Table 1 shows the details of the included studies.

Summary of included studies


As a result of the analysis, it was found that Insomnia’s research using AI has exploded in the last three years. Most of the studies were studies to make a predictive model of insomnia using features extracted from the EEG signal of PSG in the extension of automated scoring of PSG [12-16]. Recently there was an interesting study for the prediction of insomnia using ECG signal, and it seems to be in sync with the sleep stage and sleep respiratory event prediction studies using ECG signal of PSG [17].

There were also unsupervised learning studies that reflected recent trends in ML and DL. There was a s phenotyping study using clustering of time series data extracted from wearable device, and a symptomatology study using natural language processing of electrical medical records (EMR) [18,19].

In addition, there was also research on intervention using smartphone application reflecting the recent COVID-19 confinement era [20].

There were still more studies derived from PSG and fMRI studies than insomnia’s unique research.

In terms of methodology, there are still more ML studies than DL studies, and many studies using relatively small dataset at individual hospitals or institutions due to the absence of a large database used in OSAS or PSG studies. Due to this tendency, there was no external clinical validation using external data unseen in training, and the internal validation study using cross-validation holds a majority stakes. There was no study even separating the training set from the test set. To overcome this, it is necessary to create a public big dataset that can be used for training and external validation.

ML does not aim to find a model that best describes a given data, but to find a model that gives more accurate predictions when given new explanatory data [1]. In other words, the goal is to find an optimal model that consider the trade-off between model variance and bias [21]. The variance of the model is the degree to which the model changes when the training data is changed, and the bias is the difference between the hypothesized model and the unknown true model. To do this, it is necessary to solve the problem of overfitting, and for this, recent ML and DL studies tend to separate the training dataset used for model training and the test dataset used for evaluation [21]. So it is worthwhile to use dataset unseen during training to evaluate the performance of the final model [1]. For hyperparameter tuning to select the best model, it is also recommended to use the validation dataset separated from a training and a test dataset [21].

In classification analysis, which is mainly aimed at making predictive models of insomnia, ML algorithms such as SVM and advanced trees show strengths over DL, which is a phenomenon often seen in studies in other fields. The DL algorithm has no choice but to use a sigmoid or a softmax function in the output layer, and that functions are similar with logistic regression [1]. Therefore, DL does not show strength in the classification task, but shows strength in the feature extraction from primary data such as EEG, ECG, MRI, and EMR [2]. Researchers should keep this in mind, and depending on the task, it is recommended to plan tests on varous algorithms besides DL.




The author has no potential conflicts of interest to disclose.


1. Cha Y. Practical artificial intelligence for physicians Paju: Koonja; 2017.
2. Hinton G. Deep learning—a technology with the potential to transform health care. JAMA 2018;320:1101–1102.
3. U.S. Patent and Trademark Office, ; Office of the Chief Economist. Inventing AI: tracing the diffusion of artificial intelligence with U.S. patents Alexandria, VA: U.S. Patent and Trademark Office; 2020.
4. Hashimoto DA, Witkowski E, Gao L, Meireles O, Rosman G. Artificial intelligence in anesthesiology: current techniques, clinical applications, and limitations. Anesthesiology 2020;132:379–394.
5. Salah HT, Muhsen IN, Salama ME, Owaidah T, Hashmi SK. Machine learning applications in the diagnosis of leukemia: current trends and future directions. Int J Lab Hematol 2019;41:717–725.
6. Sakai K, Yamada K. Machine learning studies on major brain diseases: 5-year trends of 2014-2018. Jpn J Radiol 2019;37:34–72.
7. Balyen L, Peto T. Promising artificial intelligence-machine learning-deep learning algorithms in ophthalmology. Asia Pac J Ophthalmol (Phila) 2019;8:264–272.
8. Choy G, Khalilzadeh O, Michalski M, Do S, Samir AE, Pianykh OS, et al. Current applications and future impact of machine learning in radiology. Radiology 2018;288:318–328.
9. Goldstein CA, Berry RB, Kent DT, Kristo DA, Seixas AA, Redline S, et al. Artificial intelligence in sleep medicine: an American Academy of Sleep Medicine position statement. J Clin Sleep Med 2020;16:605–607.
10. Mostafa SS, Mendonça F, Ravelo-García AG, Morgado-Dias F. A systematic review of detecting sleep apnea using deep learning. Sensors (Basel) 2019;19:4934.
11. Moher D, Liberati A, Tetzlaff J, Altman DG, ; PRISMA Group. Preferred reporting items for systematic reviews and meta-analyses: the PRISMA statement. J Clin Epidemiol 2009;62:1006–1012.
12. Mulaffer L, Shahin M, Glos M, Penzel T, Ahmed B. Comparing two insomnia detection models of clinical diagnosis techniques. Annu Int Conf IEEE Eng Med Biol Soc 2017;2017:3749–3752.
13. Shahin M, Ahmed B, Hamida ST, Mulaffer FL, Glos M, Penzel T. Deep learning and insomnia: assisting clinicians with their diagnosis. IEEE J Biomed Health Inform 2017;21:1546–1553.
14. Shahin M, Mulaffer L, Penzel T, Ahmed B. A two stage approach for the automatic detection of insomnia. Annu Int Conf IEEE Eng Med Biol Soc 2018;2018:466–469.
15. Jansen C, Penzel T, Hodel S, Breuer S, Spott M, Krefting D. Network physiology in insomnia patients: assessment of relevant changes in network topology with interpretable machine learning models. Chaos 2019;29:123129.
16. Andrillon T, Solelhac G, Bouchequet P, Romano F, Le Brun MP, Brigham M, et al. Revisiting the value of polysomnographic data in insomnia: more than meets the eye. Sleep Med 2020;66:184–200.
17. Sharma M, Dhiman HS, Acharya UR. Automatic identification of insomnia using optimal antisymmetric biorthogonal wavelet filter bank with ECG signals. Comput Biol Med 2021;131:104246.
18. Park S, Lee SW, Han S, Cha M. Clustering insomnia patterns by data from wearable devices: algorithm development and validation study. JMIR Mhealth Uhealth 2019;7e14473.
19. Hu F, Li L, Huang X, Yan X, Huang P. Symptom distribution regularity of insomnia: network and spectral clustering analysis. JMIR Med Inform 2020;8e16749.
20. Philip P, Dupuy L, Morin CM, de Sevin E, Bioulac S, Taillard J, et al. Smartphone-based virtual agents to help individuals with sleep concerns during COVID-19 confinement: feasibility study. J Med Internet Res 2020;22e24268.
21. Park SH, Kressel HY. Connecting technological innovation in artificial intelligence to real-world medical practice through rigorous clinical validation: what peer-reviewed medical journals could do. J Korean Med Sci 2018;33e152.
22. Penzel T, Glos M, Garcia C, Schoebel C, Fietze I. The SIESTA database and the SIESTA sleep analyzer. Annu Int Conf IEEE Eng Med Biol Soc 2011;2011:8323–8326.
23. Terzano MG, Parrino L, Sherieri A, Chervin R, Chokroverty S, Guilleminault C, et al. Atlas, rules, and recording techniques for the scoring of cyclic alternating pattern (CAP) in human sleep. Sleep Med 2001;2:537–553.
24. Spiegelhalder K, Regen W, Baglioni C, Klöppel S, Abdulkadir A, Hennig J, et al. Insomnia does not appear to be associated with substantial structural brain changes. Sleep 2013;36:731–737.
25. Doan S, Yang EW, Tilak SS, Li PW, Zisook DS, Torii M. Extracting health-related causality from twitter messages using natural language processing. BMC Med Inform Decis Mak 2019;19(Suppl 3):79.
26. Rodriguez-Morilla B, Estivill E, Estivill-Domènech C, Albares J, Segarra F, Correa A, et al. Application of machine learning methods to ambulatory circadian monitoring (ACM) for discriminating sleep and circadian disorders. Front Neurosci 2019;13:1318.
27. Li C, Mai Y, Dong M, Yin Y, Hua K, Fu S, et al. Multivariate pattern classification of primary insomnia using three types of functional connectivity features. Front Neurol 2019;10:1037.
28. Schwartz AR, Cohen-Zion M, Pham LV, Gal A, Sowho M, Sgambati FP, et al. Brief digital sleep questionnaire powered by machine learning prediction models identifies common sleep disorders. Sleep Med 2020;71:66–76.
29. Ma X, Wu D, Mai Y, Xu G, Tian J, Jiang G. Functional connectome fingerprint of sleep quality in insomnia patients: Individualized out-of-sample prediction using machine learning. Neuroimage Clin 2020;28:102439.
30. Ge F, Zhang D, Wu L, Mu H. Predicting psychological state among Chinese undergraduate students in the COVID-19 epidemic: a longitudinal study using a machine learning. Neuropsychiatr Dis Treat 2020;16:2111–2118.
31. Dai XJ, Liu BX, Ai S, Nie X, Xu Q, Hu J, et al. Altered inter-hemispheric communication of default-mode and visual networks underlie etiology of primary insomnia: altered inter-hemispheric communication underlie etiology of insomnia. Brain Imaging Behav 2020;14:1430–1444.

Article information Continued

Figure 1.

PRISMA 2009 flow diagram [11] of study review process and exclusion papers.

Table 1.

Summary of included studies

Study Task SVM Modality Main feature source Total data Validation data Best performance Dataset
Spiegelhalder et al. [24] Classification Algorithm MRI Brain volume cortical thickness 66 (28 insomnia) LOOCV Balanced accuracy 55.95% (p=0.16) Private
Mulaffer et al. [12] Classification SVM PSG Hypnogram, EEG 124 (54 insomnia) 5-fold CV Accuracy 81% Private
Shahin et al. [13] Classification ANN PSG EEG 83 (42 insomnia) 5-fold CV Accuracy 92% Private
Shahin et al. [14] Classification ANN (feature), LDA, CART, SVM PSG EEG 115 (54 insomnia) LOOCV F1 0.88, sensitivity 84%, specificity 91% Private
Doan et al. [25] NLP Rule-based Twitter Message 24 million messages Precision 88.1% Private
Jansen et al. [15] Classification ANN, DT, RF, GBM PSG EEG, EMG, EOG, nasal airflow, breathing effort, ECG 118 (59 insomnia) 5-fold CV Accuracy 93% Private (insomnia)
SIESTA database [22] (control)
Park et al. [18] Clustering ANN (feature), kMC, HC Wearable device Fitbit 42 insomnia NC/AS/SSE 6/0.47/21.55 (kMC), 6/0.45/24.40 (HC) Private
Rodriguez-Morilla et al. [26] Classification DT Wearable device Wrist temperature motor activity body position environmental light 261 (184 insomnia, 58 DSPD) 10-fold CV AUROC 0.90, F1 0.92, accuracy 88%, sensitivity 89%, specificity 71% Circadian Health Database
Li et al. [27] Classification SVM MRI Voxel-wise FCS, large-scale FC, ReHo 82 (38 insomnia) 5-fold CV AUROC 0.83, accuracy 81.5%, sensitivity of 84.9%, specificity of 79.1% Private
Schwartz et al. [28] Classification Elastic net Questionnaire DSQ 247 (60 insomnia) 5-fold CV 200 bootstrap AUROC 0.83, sensitivity 80.3%, specificity 69.4%, accuracy 72.9% (threshold 0.3) Private
Ma et al. [29] Regression RVR MRI Whole-Brain nodal rsFC, PSQI 73 insomnia LOOCV 10-fold CV r/MAE 0.65/2.18 (short-term/acute) 0.37/1.84 (chronic) Private
Philip et al. [20] Classification DT Smartphone ISI, sleep diary 47 insomnia (773 entered) SE -3.89% (p = 0.002), nocturnal awakening -0.42 (p<0.001) Private
Hu et al. [19] NLP, clustering ANN (feature), kMC EMR Words 807 insomnia Degree centrality 0.96 (difficulty falling a sleep) Private
Ge et al. [30] Classification XGBoost Questionnaire ISI-7, GAD-7, CSMHSS 2009 (332 insomnia) 5-fold CV AUROC 0.98, accuracy 96.2%, sensitivity 95.5%, specificity 100% Private
Dai et al. [31] Classification SVM MRI VMHC 96 (48 insomnia) AUROC 0.76, sensitivity 73%, sepcificity 71% Private
Andrillon et al. [16] Classification RF PSG Hypnogram, EEG 436 (347 insomnia) 3-fold CV Cohen’s kappa 0.87 (insomnia vs. control) Private
Sharma et al. [17] Classification KNN, SVM PSG ECG 13 (7 insomnia) 10-fold CV AUROC 0.99, F1 0.97, accuracy 98% (SVM) CAP sleep database [23]

ANN: artificial neural network, AS: average silhouettes, AUROC: area under receiver operating characteristic curve, CAP sleep database: Cyclic Alternating Pattern sleep database in Physionet, CART: classification and regression tree, Circadian Health Database: Circadian Health Database of the Chronobiology Laboratory at the University of Murcia (, CSMHSS: College Students Mental Health Screening Scale, DL: deep learning, DSPD: delayed sleep phase disorder, DSQ: Digital Sleep Questionnaire: DT: decision tree, ECG: electrocardiography, EEG: electroencephalography, EMG: electromyography, EMR: electronic medical record, EOG: electrooculargraphy, FCS: functional connectivity strength, Fold CV: fold cross validation, GAD-7: General Anxiety Disorder-7, GBM: Gradient Boosting Model, HC: hierachical clustering, ISI: Insomnia Severity Index, ISI-7: Insomnia Severity Index-7, kMC: k-means clustering, KNN: K-nearest neighbor, LDA: linear discrimination analysis, LOOCV: leave one out cross validation, MAE: mean absolute error, NC: number of clusters, NLP: natural language processing, PSG: polysomnography, PSQI: Pittsburgh Sleep Quality Index, r: Pearson’s correlation, ReHo: regional homogeneity, RF: random forest, rsFC: resting-state functional connectivity, RVR: relevance vector machine, SIESTA: database with sleep recording as part of a European Commission funded research project, SSE: sum of squared errors, SVM: support vector machine, VMHC: voxel-mirrored homotopic connectivity, XGBoost: eXtreme gradient boosting