Personalized HeartSteps: A Reinforcement Learning Algorithm for Optimizing Physical Activity

Peng Liao, Kristjan H. Greenewald, Predrag V. Klasnja, Susan A. Murphy

TL;DR

This paper introduces Personalized HeartSteps, a novel reinforcement learning (RL) algorithm designed to deliver personalized, just-in-time adaptive interventions (JITAIs) for physical activity. By continuously learning from user data, the algorithm optimizes when and how to suggest activity, aiming to improve long-term health outcomes while addressing challenges like user engagement and data noise in mobile health.

What Problem Does This Paper Address?

The increasing prevalence of mobile health technologies has spurred interest in "just-in-time adaptive interventions" (JITAIs). These interventions, delivered via mobile notifications, aim to nudge users towards healthier behaviors at opportune moments. However, designing effective JITAIs is challenging because:

  • Optimal timing and content are hard to pre-specify: Behavioral theories often fall short of precisely dictating when and what intervention is most effective.
  • Long-term effects are complex: Interventions might have immediate positive effects but could lead to habituation or burden over time, negatively impacting future engagement.
  • Data is noisy and environments are complex: Mobile health data (e.g., step counts) can be noisy due to sensor limitations and unobserved user context, requiring robust learning methods.
  • User engagement is crucial: Interventions must adapt quickly to avoid overwhelming or disengaging users, especially in long-term studies.
  • Interpretable and analyzable results are needed: For clinical trials, the algorithm's decisions must be understandable and allow for secondary analyses like causal inference.

This paper tackles these challenges by developing an RL algorithm that learns an optimal intervention policy online, adapting to individual user behavior and context.

Methods

The core of the paper is the Personalized HeartSteps RL algorithm, which aims to optimize the delivery of physical activity suggestions. Key methodological contributions include:

  • Reinforcement Learning Framework: The algorithm treats the problem as a sequential decision-making process where the "state" includes user context (location, activity, stress), the "action" is whether to send an activity suggestion, and the "reward" is based on immediate physical activity (log step count).
  • Addressing Long-Term Effects (C1): A "dosage" variable is introduced to capture the cumulative burden of past interventions. This dosage is used to form a "proxy future value," which approximates the long-term impact of current actions, mimicking a full RL approach but managing variance.
  • Fast Learning and Noise Accommodation (C2): A low-dimensional linear model is used for the treatment effect, and Thompson Sampling (TS) is employed. TS is a Bayesian approach that balances exploration and exploitation, allowing for the incorporation of prior knowledge to accelerate learning and reduce variance, especially in noisy environments.
  • Handling Model Mis-specification and Non-stationarity (C3): The algorithm uses action-centering in its reward modeling. This technique makes the algorithm robust to inaccuracies in modeling the baseline reward function, which can be non-stationary due to factors like habituation.
  • Enabling Secondary Analyses (C4): Actions are selected stochastically, with probabilities clipped away from 0 and 1. This ensures continued exploration and learning while also facilitating off-policy evaluation and causal inference after the study concludes.
  • Nightly Updates: The algorithm updates its understanding of the immediate treatment effect and the proxy for delayed effects on a nightly basis, incorporating new data to refine its policy for the next day.

Datasets

  • HeartSteps V1 Data: This dataset, collected from a 42-day study with 37 healthy adults, was crucial for:
  • Informing the design of the RL algorithm for HeartSteps V2 (e.g., selecting predictive features, understanding intervention efficacy).
  • Creating a simulation environment (generative model) for evaluating the proposed RL algorithm.
  • HeartSteps V2 Pilot Data: Preliminary data from the ongoing HeartSteps V2 clinical trial was used for initial assessment and to identify lessons learned.

Key Insights and Ideas

  • Dosage as a Proxy for Burden: Quantifying intervention burden through a "dosage" variable is a practical way to approximate long-term effects without needing a full, complex model of user behavior.
  • Thompson Sampling for Robustness: TS, combined with action-centering, provides a powerful mechanism to learn effectively in noisy, non-stationary mobile health environments while ensuring the ability to perform post-hoc analyses.
  • The Importance of Exploration: Clipping action probabilities is essential not only for exploration but also for enabling robust off-policy evaluation, a critical requirement for clinical trial data.
  • Personalization is Key: The algorithm learns a unique policy for each participant, acknowledging that individual responses to interventions can vary significantly.

Key Results

  • Simulation Study: The proposed algorithm outperformed the Thompson Sampling Bandit algorithm in simulations based on HeartSteps V1 data, achieving an average improvement in total reward of 29.753. This suggests the effectiveness of addressing challenges like long-term effects and model mis-specification.
  • HeartSteps V2 Pilot Data: Initial assessment of the pilot data showed that most participants experienced a positive increase in average step count after the first week of receiving personalized activity suggestions, with participants taking an average of 125 more steps in the 30-minute window following a decision time.
  • Lessons Learned: Analysis of pilot data highlighted the need for further refinement of the proxy for delayed effects, particularly for highly responsive users, and the potential for over-randomization when interventions are consistently effective.

Limitations and Future Work

  • Limitations:
    • The current "dosage" variable is a simplified proxy for treatment burden and engagement.
  • The algorithm's performance relies on the accuracy of the generative model built from HeartSteps V1 data.
  • Initial pilot data suggests that for highly responsive users, the algorithm might not reduce randomization probability quickly enough.
  • Future Work:
    • Develop more sophisticated measures of user burden and engagement to better approximate delayed effects.
  • Explore methods for pooling information across participants to speed up learning, especially for new users.
  • Investigate ways to reduce intervention frequency when the algorithm lacks strong evidence of effectiveness, to prevent disengagement.
  • Further refine the proxy for delayed effects to respond more rapidly to user behavior.
  • Conduct a full analysis of the HeartSteps V2 data once the study is completed.

Summary updated

BibTeX
@article{liao2020personalized,
  author = {Peng Liao and Kristjan H. Greenewald and Predrag V. Klasnja and Susan A. Murphy},
  title = {{Personalized HeartSteps: A Reinforcement Learning Algorithm for Optimizing Physical Activity}},
  journal = {Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.},
  year = {2020},
  doi = {10.1145/3381007},
}
Figure