Abstract
Detailed mobile sensing data from phones and fitness trackers offer an opportunity to quantify previously unmeasurable behavioral changes to improve individual health and accelerate responses to emerging diseases. Unlike in natural language processing and computer vision, deep learning has yet to broadly impact this domain, in which the majority of research and clinical applications still rely on manually defined features or even forgo predictive modeling altogether due to insufficient accuracy. This is due to unique challenges in the behavioral health domain, including very small datasets (~10 participants), which frequently contain missing data, consist of long time series with critical long-range dependencies (length < 10,000), and extreme class imbalances (>1,000:1). Here, we describe a neural architecture for multivariate time series classification designed to address these unique domain challenges. Our proposed behavioral representation learning approach combines novel tasks for self-supervised pretraining and transfer learning to address data scarcity, and captures long-range dependencies across long-history time series through transformer self-attention following convolutional neural network-based dimensionality reduction. We demonstrate performance improvements over baselines of up to 0.15 ROC AUC across five influenza-related prediction tasks, transfer learning-induced performance improvements including a 16% relative increase in PR AUC in small data scenarios, and the potential of transfer learning in novel disease scenarios through an exploratory case study of zero-shot COVID-19 prediction.
Introduction
While deep learning has revolutionized Natural Language Processing (NLP) and Computer Vision (CV), its application to mobile health sensing—using data from wearable devices like Fitbits—has been limited. Most clinical research continues to rely on "shallow" models like XGBoost and manually engineered features. This gap is driven by four primary domain challenges:
- Data Scarcity: Clinical studies often involve very few participants (N < 20).
- Missing Data: Wearables are not worn consistently; in the primary study dataset, 93% of days contained missing data.
- Long-Range Dependencies: Detecting symptoms requires analyzing minute-by-minute data over several days, resulting in sequences exceeding 10,000 steps.
- Extreme Class Imbalance: Healthy days far outnumber sick days, with ratios reaching 1:2,760.
Methods
To address these hurdles, we propose a hybrid CNN-Transformer architecture designed to handle long-range dependencies and data missingness.
The model uses a Convolutional Neural Network (CNN) Encoder to compress raw minute-level sensor data (steps, heart rate, sleep). These representations are then processed by Transformer Blocks, which use self-attention to identify behavioral patterns over a 7-day window. To handle missing data, the model includes binary "missingness flags" for each sensor stream, allowing it to learn if the absence of data (e.g., not wearing a watch due to illness) is itself predictive.
We evaluated three self-supervised pretraining tasks:
- Same User: Identifying if two data windows belong to the same individual.
- Autoencoder: Reconstructing the original input signal.
- Domain Inspired Features (DIF): Predicting high-level daily summaries (e.g., total sleep duration) from raw data.
Results
The proposed model was evaluated on the Homekit2020 Flu Study (5,196 participants) and an external COVID-19 dataset.
Performance and Insights
The CNN-Transformer architecture achieved an ROC AUC of 0.887 for flu positivity, a significant 0.15 improvement over traditional baselines. The DIF pretraining task was the most effective, suggesting that forcing a model to learn "human-understandable" concepts like sleep duration provides a better foundation for disease detection than generic reconstruction. Conversely, the "Same User" task actually degraded performance, likely because it encouraged the model to focus on stable individual traits rather than the transient behavioral shifts indicative of illness.
Transfer Learning and Zero-Shot Generalization
A key finding is the efficacy of transfer learning for small datasets. A model pretrained on a large unlabeled population and fine-tuned on just 10 participants significantly outperformed models trained from scratch, showing a 16% relative increase in PR AUC. Furthermore, the model demonstrated zero-shot generalization to COVID-19, achieving a 0.68 ROC AUC on an independent dataset without seeing any COVID-19 cases during training, whereas the XGBoost baseline performed near random (0.51 ROC AUC).
Discussion
While the model shows high ROC AUC, the absolute Precision-Recall (PR) AUC remains low (0.01 to 0.07) due to the extreme class imbalance. This suggests that while the model is effective at ranking risks, real-world deployment for medical surveillance will require careful calibration to manage false positives. However, these results demonstrate that self-supervised behavioral representations can bridge the data gap in mobile sensing, enabling robust disease prediction even in small-scale clinical settings.
Summary updated