Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Oct 10;45(10):zsac143.
doi: 10.1093/sleep/zsac143.

The Sleep Well Baby project: an automated real-time sleep-wake state prediction algorithm in preterm infants

Affiliations

The Sleep Well Baby project: an automated real-time sleep-wake state prediction algorithm in preterm infants

Thom Sentner et al. Sleep. .

Abstract

Study objectives: Sleep is an important driver of early brain development. However, sleep is often disturbed in preterm infants admitted to the neonatal intensive care unit (NICU). We aimed to develop an automated algorithm based on routinely measured vital parameters to classify sleep-wake states of preterm infants in real-time at the bedside.

Methods: In this study, sleep-wake state observations were obtained in 1-minute epochs using a behavioral scale developed in-house while vital signs were recorded simultaneously. Three types of vital parameter data, namely, heart rate, respiratory rate, and oxygen saturation, were collected at a low-frequency sampling rate of 0.4 Hz. A supervised machine learning workflow was used to train a classifier to predict sleep-wake states. Independent training (n = 37) and validation datasets were validation n = 9) datasets were used. Finally, a setup was designed for real-time implementation at the bedside.

Results: The macro-averaged area-under-the-receiver-operator-characteristic (AUROC) of the automated sleep staging algorithm ranged between 0.69 and 0.82 for the training data, and 0.61 and 0.78 for the validation data. The algorithm provided the most accurate prediction for wake states (AUROC = 0.80). These findings were well validated on an independent sample (AUROC = 0.77).

Conclusions: With this study, to the best of our knowledge, a reliable, nonobtrusive, and real-time sleep staging algorithm was developed for the first time for preterm infants. Deploying this algorithm in the NICU environment may assist and adapt bedside clinical work based on infants' sleep-wake states, potentially promoting the early brain development and well-being of preterm infants.

Keywords: automated sleep staging; machine learning; neonatal intensive care; preterm; sleep.

PubMed Disclaimer

Figures

Figure 1.
Figure 1.
Schematic representation of the machine-learning model development. The nested cross-validation procedure was applied to select the random-forest classifier over other models and identify its optimal hyperparameters. The regular cross-validation procedure was applied to approximate out-of-sample performance using the training dataset, which was later validated using the validation dataset.
Figure 2.
Figure 2.
AUROCs calculated for the random forest classifier using (A) the regular cross-validation procedure on the training dataset and (B) the validation dataset. Performance mean and 95% Confidence Intervals (solid lines and filled areas, respectively) were calculated using 250-fold bootstrapping. Left, macroaveraged over all sleep–wake states; right, for the individual sleep–wake states.
Figure 3.
Figure 3.
Top panels: model calibration per sleep–wake state (W = Wake, AS = Active Sleep, QS = Quiet Sleep), with data points split over 20 quantiles (bins) per sleep–wake state, for (A) training dataset and (B) validation dataset. The horizontal axis indicates the mean value of all predicted probability in each bin and the vertical axis indicates the proportion of positive class samples in each bin. Bottom panels: predicted time spent in a sleep–wake state (horizontal axis) versus the observed time in the sleep–wake state (vertical axis). Dots represent individual patients and are colored by sleep–wake state (Green/W = Wake, Orange/AS = Active Sleep, Red/QS = Quiet Sleep). Predicted time corresponds to summation of all model probability predictions. Panel (C) shows results for the training dataset. Panel (D) shows the results for the validation dataset.
Figure 4.
Figure 4.
SHAP values of top-10 features of Active sleep (top left), Quiet sleep (top right) and Wake (bottom left). Naming convention is _____. Dots represent individual data points. Feature values are indicated on a red-blue scale, with red representing a high value for that specific feature. Given the feature and its value for a specific data point, the impact on the model output (SHAP-value) is depicted on the x-axis.
Figure 5.
Figure 5.
Bedside implementation architecture. Every minute, the BedBase application extracts real-time patient information and sends a POST request to the SWB API. Other than age, no identifiable data leaves the NICU. Before each prediction the SWB application assures that the data is valid (e.g. no more than 50% missing values per parameter in each time window, range of allowed values per parameter, etc.) and checks that the patient age falls within the range the algorithm was designed for (28–34 weeks postmenstrual age). If all criteria are met a sleep-state prediction is made and the result returned. Aggregated performance metrics are logged, e.g. ratio of wake predictions per day, such that an ICT and data scientists can monitor performance without compromising patient privacy. Data and code version control is implemented to ensure the SWB API always uses the correct model version from the model repository.

References

    1. Chawanpaiboon S, et al. . Global, regional, and national estimates of levels of preterm birth in 2014: a systematic review and modelling analysis. Lancet Glob Health 2019;7(1):e37–e46. doi:10.1016/S2214-109X(18)30451-0. - DOI - PMC - PubMed
    1. Volpe JJ. Dysmaturation of premature brain: importance, cellular mechanisms, and potential interventions. Pediatr Neurol. 2019;95:42–66. doi:10.1016/j.pediatrneurol.2019.02.016. - DOI - PubMed
    1. Boardman JP, et al. . Invited Review: Factors associated with atypical brain development in preterm infants: insights from magnetic resonance imaging. Neuropathol Appl Neurobiol. 2020;46(5):413–421. doi:10.1111/nan.12589. - DOI - PMC - PubMed
    1. Knoop MS, et al. . Current ideas about the roles of rapid eye movement and non-rapid eye movement sleep in brain development. Acta Paediatr. 2021;110(1):36–44. doi:10.1111/apa.15485. - DOI - PMC - PubMed
    1. Cao M, et al. . Early development of functional network segregation revealed by connectomic analysis of the preterm human brain. Cereb Cortex. 2017;27(3):1949–1963. doi:10.1093/cercor/bhw038. - DOI - PMC - PubMed

Publication types