An unsupervised transfer learning algorithm for sleep monitoring

Xichen She, Yaya Zhai, Ricardo Henao, Christopher W. Woods, Geoffrey S. Ginsburg, Peter X.‐k. Song, Alfred O. HeroarXiv 2019 · DOI

Abstract

Objective: To develop multisensor-wearable-device sleep monitoring algorithms that are robust to health disruptions affecting sleep patterns. Methods: We develop an unsupervised transfer learning algorithm based on a multivariate hidden Markov model and Fisher's linear discriminant analysis, adaptively adjusting to sleep pattern shift by training on dynamics of sleep/wake states. The proposed algorithm operates, without requiring a priori information about true sleep/wake states, by establishing an initial training set with hidden Markov model and leveraging a taper window mechanism to learn the sleep pattern in an incremental fashion. Our domain-adaptation algorithm is applied to a dataset collected in a human viral challenge study to identify sleep/wake periods of both uninfected and infected participants. Results: The algorithm successfully detects sleep/wake sessions in subjects whose sleep patterns are disrupted by respiratory infection (H3N2 flu virus). Pre-symptomatic features based on the detected periods are found to be strongly predictive of both infection status (AUC = 0.844) and infection onset time (AUC = 0.885), indicating the effectiveness and usefulness of the algorithm. Conclusion: Our method can effectively detect sleep/wake states in the presence of sleep pattern shift. Significance: Utilizing integrated multisensor signal processing and adaptive training schemes, our algorithm is able to capture key sleep patterns in ambulatory monitoring, leading to better automated sleep assessment and prediction.

Introduction

Traditional sleep monitoring, such as Polysomnography (PSG), is often impractical for long-term use due to its high cost and the need for specialized environments. While wearable devices offer a more accessible alternative, they frequently struggle with "data covariate shift"—changes in physiological signals caused by external factors like illness. Most existing automated sleep-tracking algorithms assume a stationary sleep pattern, leading to failure when a user's health status changes.

This paper introduces an unsupervised transfer learning framework that monitors sleep using multi-sensor wearables, even when patterns are disrupted by illness. By combining a multivariate Hidden Markov Model (HMM) for initial baselining with an adaptive Fisher’s Linear Discriminant Analysis (LDA), the algorithm successfully detects sleep/wake states without requiring manual labels.

Methods

The researchers developed a multi-stage pipeline to process data from wrist-worn devices:

  1. Pre-processing & Anomaly Filtering: Raw data is segmented into epochs, and "abnormal" readings (e.g., device removal) are filtered using k-means clustering and adaptive thresholding.
  2. Initial Baselining (HMM): To operate without labels, the algorithm uses a multivariate HMM on the initial "clean" data period to establish a training set of sleep/wake states based on heart rate and acceleration.
  3. Sequential Transfer Learning (Adaptive LDA): This core component handles "concept drift" (changing patterns due to illness) using a taper window mechanism.
  4. The Separability Index (SI): In the absence of ground truth, the algorithm uses the SI as a proxy for accuracy. It evaluates multiple window sizes and selects the one that maximizes the "separability" between predicted sleep and wake clusters, allowing the model to transfer learning from healthy to infected states incrementally.
Algorithm for Sequential Transfer Learning using Adaptive LDA and the Separability Index.

Datasets and Validation

The algorithm was validated using data from a Human Viral Challenge (HVC) study involving 20 participants inoculated with the H3N2 flu virus. Participants wore Empatica E4 wristbands, which collected 3-axis acceleration, heart rate, skin temperature, and electrodermal activity over 11 days. This dataset provides a rigorous test for the algorithm's ability to adapt as subjects transition from healthy to symptomatic states.

Results and Discussion

The algorithm demonstrated high effectiveness in detecting sleep/wake sessions despite disruptions caused by respiratory infection. Key findings include:

  • Infection Prediction: Features extracted from detected sleep sessions (e.g., heart rate variability and total duration) were highly predictive of health status. The model achieved an AUC of 0.844 for infection status and an AUC of 0.885 for predicting infection onset time.
  • Early Detection: On "Day 0" (the first 24 hours after exposure), infected individuals slept an average of 2.041 hours longer than healthy controls, highlighting sleep as a significant pre-symptomatic marker.
  • Robustness to Data Shift: By treating illness as a machine learning "data shift" problem, the adaptive window allowed the model to evolve alongside the patient’s symptoms, maintaining performance where static models would fail.

Conclusion

This research demonstrates that sleep features are highly predictive of health status before major symptoms appear, largely because sleep is less affected by external behavioral noise than daytime data. While the study is limited by a small sample size and the lack of PSG ground truth for direct comparison, the results suggest that integrating this algorithm into consumer wearables could move sleep tracking from a fitness metric to a powerful diagnostic tool for early illness detection.

Summary updated

BibTeX
@misc{she2019unsupervised,
  author = {Xichen She and Yaya Zhai and Ricardo Henao and Christopher W. Woods and Geoffrey S. Ginsburg and Peter X.‐K. Song and Alfred O. Hero},
  title = {{An unsupervised transfer learning algorithm for sleep monitoring}},
  year = {2019},
  eprint = {1904.03720},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.03720},
}
Figure