Doubly-online changepoint detection for monitoring health status during sports activities

Mattia Stival, Mauro Bernardi, Πέτρος Δελλαπόρτας

TL;DR

This paper introduces a "doubly-online" statistical framework that uses smartwatch data to monitor an athlete's health and performance in real-time. By combining Gaussian state space models with changepoint detection, the system can identify significant shifts in physical condition—such as injury, overtraining, or equipment failure—both across a sequence of workouts and during a single active session.

What Problem Does This Paper Address?

While smartwatches provide a wealth of biometric data (heart rate, speed, cadence), most existing analysis tools are retrospective, meaning they look at data after a workout is finished. Furthermore, monitoring health status is statistically challenging because the data is "noisy." A runner’s heart rate might spike because they are getting sick (a true changepoint), or simply because they are running uphill or the watch sensor slipped (noise).

The authors address the need for an automated system that can:

  1. Distinguish between normal variability and actual behavioral shifts.
  2. Operate "online," providing feedback while the activity is still happening.
  3. Account for complex dependencies, such as how heart rate relates to speed and how today’s performance relates to yesterday’s.

Methods

The core of the paper is a doubly-online framework that merges two statistical heavyweights: Gaussian State Space Models (SSM) and Changepoint Detection.

  • The "Doubly-Online" Structure:
    • Between-online: As soon as a workout ends, the model updates its parameters and determines if that entire workout represents a shift from previous ones.
  • Within-online: During a workout, the model calculates the real-time probability that the current activity is a changepoint based on the data streaming in second-by-second.
  • State Space Representation: The model treats heart rate and speed as observed variables driven by "latent" (hidden) states representing the athlete's actual physical condition and temporary disturbing factors (like street obstacles).
  • Online EM Algorithm: To keep the model efficient, the authors use an Expectation-Maximization (EM) algorithm that updates parameters incrementally rather than re-processing the entire history of workouts every time.
  • Sequential Monte Carlo (SMC): Because calculating exact probabilities for every possible changepoint becomes computationally impossible over time, the authors use SMC (a particle filtering method) to provide a high-accuracy approximation with constant computational cost.

Datasets

The researchers evaluated their model using two primary sources:

  1. Synthetic Data: 20 simulated scenarios with 1,000 activities each. This allowed them to test the algorithm's sensitivity (ability to find true changes) and specificity (ability to avoid false alarms) under controlled conditions.
  2. Real-World Athlete Data: A dataset of 85 consecutive warm-up runs (10 minutes each) from a well-trained athlete. The data was recorded at 1-second intervals using a Polar v800 smartwatch and a Polar H10 heart rate strap, focusing on heart rate (bpm) and speed (m/s).

Key Insights and Ideas

  • The Power of Benchmarking: The model uses the athlete's own history as a benchmark. By understanding "standard" behavior for a specific individual, the system becomes much more sensitive to deviations than a generic "one-size-fits-all" health alert.
  • Three Sources of Dependence: The model is unique because it simultaneously accounts for:
  • Sequential dependence: How fitness evolves from one day to the next.
  • Autocorrelation: How a measurement at second 10 of a run relates to second 11.
  • Contemporaneous dependence: The physiological link between speed and heart rate.
  • Sensitivity vs. Specificity Trade-off: In sports medicine, a "false negative" (missing an injury) is often more dangerous than a "false positive" (a false alarm). The authors demonstrate that their model can be tuned to prioritize sensitivity, ensuring that potential health issues are flagged early.

Key Results

  • Rapid Detection: In the real-world application, the model was able to identify a changepoint (Activity 21) within just 20 seconds of the athlete starting their warm-up. The system flagged a sub-optimal heart rate relative to the speed being maintained.
  • Identifying Device Malfunction: The model identified 34 changepoints in the 85-run dataset. Interestingly, 15 of these occurred in the final 43 activities, which the authors attributed to a mix of physical changes and systematic measurement errors from the device.
  • Simulation Performance: The algorithm maintained high specificity (near 1.0) across various thresholds. Sensitivity improved significantly as the duration of the activities increased, showing that more data per session leads to more reliable "within-online" detection.

Limitations and Future Work

  • Linearity Assumptions: The current model assumes linear and Gaussian relationships. However, human physiology is often non-linear. The authors suggest moving toward non-linear state space models in future iterations.
  • Environmental Covariates: Currently, the model doesn't "know" if it's raining or if the runner is on a steep hill. Integrating external data (weather, GPS elevation, sleep quality) as covariates would make the changepoint detection even more robust.
  • Computational Lag: While the SMC approach is efficient, choosing a large "look-ahead" window ($k^*$) to improve accuracy can slow down real-time feedback, presenting a hurdle for instant motivational coaching.

Summary updated

Abstract

We provide an online framework for analyzing data recorded by smart watches during running activities. In particular, we focus on identifying variations in the behavior of one or more measurements caused by changes in physical condition, such as physical discomfort, periods of prolonged de-training, or even the malfunction of measuring devices. Our framework considers data as a sequence of running activities represented by multivariate time series of physical and biometric data. We combine classical changepoint detection models with an unknown number of components with Gaussian state space models to detect distributional changes between a sequence of activities. The model considers multiple sources of dependence due to the sequential nature of subsequent activities, the autocorrelation structure within each activity, and the contemporaneous dependence between different variables. We provide an online expectation-maximization (EM) algorithm involving a sequential Monte Carlo (SMC) approximation of changepoint predicted probabilities. As a byproduct of our model assumptions, our proposed approach processes sequences of multivariate time series in a doubly-online framework. While classical changepoint models detect changes between subsequent activities, the state space framework, coupled with the online EM algorithm, provides the additional benefit of estimating the real-time probability that a current activity is a changepoint.
BibTeX
@article{stival2023doubly,
  author = {Mattia Stival and Mauro Bernardi and Πέτρος Δελλαπόρτας},
  title = {{Doubly-online changepoint detection for monitoring health status during sports activities}},
  journal = {The Annals of Applied Statistics},
  year = {2023},
  doi = {10.1214/22-aoas1724},
}

Loading related content...

Figure