Generative models for wearables data

Arinbjörn Kolbeinsson, Luca Foschini

TL;DR

This paper introduces an autoregressive, multi-task Transformer designed to generate realistic synthetic wearable sensor data (resting heart rate, sleep duration, and daily step counts). By framing continuous biosignals as discrete categorical distributions, the model learns the complex joint dynamics of human activity over 21-day windows. When scaled to over two million person-days of training data, the generated synthetic time series closely match the distribution and trajectory properties of real-world wearable data.

What Problem Does This Paper Address?

Personal health data from consumer wearables is increasingly valuable for public health tracking and disease detection (such as flu or COVID-19 surveillance). However, acquiring high-quality longitudinal health data is hampered by steep collection costs, privacy regulations, and skewed demographic sampling that underrepresents rare health conditions.

Generating realistic synthetic time-series data offers a privacy-preserving workaround, but existing methods—such as Generative Adversarial Networks (GANs) or Mixture Autoregressive (MAR) models—often suffer from training instability or require manual pre-specification of statistical properties like seasonal trends. The authors investigate whether an autoregressive self-attention model can learn and synthesize multi-modal wearable trajectories directly from raw, real-world data distributions.

Methods

The authors frame wearable sequence generation as a multi-task, next-step prediction problem using a causally masked, decoder-only Transformer:

  • Tokenization via Binning: Rather than modeling continuous values with standard regression losses (which impose strict parametric assumptions like Gaussianity), the authors discretize each continuous metric into 100 uniform bins. The model outputs a 100-way softmax distribution per feature, adopting the categorical formulation popularized by WaveNet and PixelRNN.
  • Architecture: Input sequences of length 21 days across three channels are mapped to a 64-dimensional embedding with learned positional weights. The core network stacks three decoder blocks (hidden dimension 256, GeLU activations, dropout of 0.1, and four attention heads).
  • Multi-Task Objective & Regularization: Three separate linear heads output next-day predictions for resting heart rate, sleep duration, and step count. Training optimizes the sum of their cross-entropy losses weighted via Shake-Shake regularization—a stochastic affine combination ($\sum_{i=1}^3 \alpha_i L_i$) that prevents the shared representation from overfitting to any single task.
  • Autoregressive Synthesis: Generation begins with a 21-day prompt segment from a held-out evaluation set. Predictions are generated iteratively, appending the sampled values and sliding the window forward. Sampling uses temperature scaling ($T=2$ for steps and sleep; $T=1$ for heart rate).

Datasets

The model was trained and evaluated on data from the DiSCover (Digital Signals in Chronic Pain) Project (ClinicalTrials.gov: NCT03421223), a 1-year decentralized study using consumer Fitbit trackers.

  • Size and Coverage: The raw cohort includes 10,000 individuals over 365 days (~2.74 million person-days). Training splits utilized up to 2,029,230 days with >80% wear coverage.
  • Signals: Daily resting heart rate (bpm), total sleep (minutes), and total step count.
  • Demographics: Mean participant age was 37.3 years (SD = 10.5); 72.15% identified as female, and 80.5% identified as Non-Hispanic White.

Key Insights and Ideas

  • Categorical Discretization Beats Parametric Priors: Treating continuous sensor streams as discrete tokens allows the model to capture multimodal, skewed, or sharp distribution boundaries inherent to biological cycles without architectural hand-crafting.
  • Modality-Specific Data Scaling Laws: Training data volume impacts features differently. Predicting resting heart rate consistently improves across orders of magnitude (from ~10k to ~2M days), whereas behavioral metrics (steps and sleep) see most performance gains realized by ~200k days, plateauing thereafter.
  • Synthetic Convergence to Real-World Intra-Diversity: Rather than collapsing to trivial mean paths, the synthesized sequences achieve distance metrics that closely mirror the baseline variance observed between two real human subjects.

Key Results

  • Autoregressive Accuracy (MAE): Scaling training from 0.5% (~10k days) to 100% (~2M days) yielded substantial prediction gains on held-out test data:
  • Resting Heart Rate: Mean absolute error decreased from 31.9 BPM to 1.21 BPM.
  • Sleep Duration: MAE dropped from 135.9 minutes to 56.2 minutes.
  • Step Count: MAE decreased from 4,922 steps to 2,830 steps.
  • Sequence Similarity (Real vs. Synthetic):
  • Cosine Similarity: With 100% training data, generated sequences achieved a mean pairwise cosine similarity of 0.810 against real sequences, closely approaching the real-data intra-similarity target of 0.873 (up from 0.666 at 0.5% data).
  • Dynamic Time Warping (DTW): Mean pairwise DTW distance between synthetic and real sequences dropped to 29,028, approaching the target intra-distance of the real dataset (27,897).

Limitations and Future Work

  • Short Context Windows: Because each participant provided at most 365 days, input sequences were capped at 21 days to maximize training sample variety. This prevents the model from capturing multi-month seasonality or annual biological trends.
  • Demographic Bias: The underlying DiSCover dataset is heavily skewed toward young, female, and Non-Hispanic White participants, risking the propagation of bias in synthetic cohorts.
  • Downstream Utility Evaluation: While the study validates statistical similarity via DTW and cosine similarity, it does not evaluate "train-on-synthetic, test-on-real" performance for clinical predictive tasks (such as infection or chronic pain flare detection).

Summary updated

BibTeX
@inproceedings{kolbeinsson2023generative,
  author = {Arinbjörn Kolbeinsson and Luca Foschini},
  title = {{Generative models for wearables data}},
  booktitle = {DGM4H @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=AGQYCBdKA5},
}
Figure