Fast Physical Activity Suggestions: Efficient Hyperparameter Learning in Mobile Health

Marianne Menictas, Sabina Tomkins, Susan A. MurphyarXiv 2020

Introduction

Mobile health (mHealth) applications have the potential to revolutionize wellness by providing timely, personalized "nudges"—suggestions to engage in physical activity. However, the effectiveness of these interventions depends on real-time personalization, which presents a significant computational challenge. This paper introduces a streamlined Empirical Bayes (EB) algorithm that enables mHealth apps to deliver personalized suggestions efficiently, achieving a 99% reduction in computation time and a 56% improvement in accuracy compared to state-of-the-art methods.

The Personalization Bottleneck

Personalization in mHealth must account for two competing factors: User Heterogeneity (individual differences in responsiveness) and Time-Varying Dynamics (changes in motivation or treatment fatigue over time). Statistically, this is modeled using a linear mixed effects model with "crossed random effects."

While powerful, these models are computationally expensive. Standard approaches scale cubically—$O((m+t)^3)$—with the number of users ($m$) and time points ($t$). As a study grows, the computational burden becomes too heavy for the real-time, low-resource environments typical of mobile devices, often requiring specialized GPU hardware that may not be available.

Methodology: Streamlined Empirical Bayes

The core innovation of this work is a contextual bandit algorithm using Thompson Sampling (TS) powered by a Streamlined Empirical Bayes (sEB) update mechanism. Instead of relying on "naïve" matrix algebra, the researchers utilize the STLSLS (Streamlined Two-Level Sparse Least Squares) algorithm.

This approach recognizes that the matrices involved in crossed random effects models are inherently sparse and possess a specific block-diagonal structure. By exploiting this sparsity, the authors derived closed-form algebraic updates that reduce computational complexity to $O(m t^3)$. For studies with many users and moderate time scales, this effectively becomes linear with respect to the number of users.

Visualization of the sparse matrix structure in crossed random effects models for varying numbers of users (m) and time points (t).

Experimental Evaluation

The researchers evaluated the sEB method using simulated mHealth data designed to mimic real-world clinical trials like the HeartSteps study. The evaluation included:

  • Batch Speed Assessment: Simulations with up to 1,500,000 data points to test scaling against GPyTorch.
  • Online Simulation: A 10-week study involving 32 users joining in a staggered fashion, receiving up to 5 interventions per day.

Key Results

The proposed sEB method was compared against GPyTorch (a state-of-the-art Gaussian Process library) on both CPU and GPU hardware. The results highlight the power of domain-specific algorithmic optimization over general-purpose brute force:

  • Extreme Speedup: In the largest simulation (1.5 million points), sEB completed in approximately 322 seconds, while GPyTorch failed to produce results due to memory and computational limits. In smaller batches, sEB was up to 98.96% faster than GPyTorch-CPU.
  • Superior Accuracy: The sEB method demonstrated a 56% improvement in accuracy when estimating variance components compared to competing approaches.
  • Regret Minimization: In the 10-week mHealth simulation, the sEB-based bandit consistently achieved lower average weekly regret. This indicates that the algorithm learns the "optimal" suggestion strategy significantly faster than the baselines.
Comparison of average weekly regret between the Streamlined Empirical Bayes (sEB) method and GPyTorch baselines over a 10-week simulated trial.

Conclusion and Future Work

By leveraging the underlying sparsity of crossed random effects models, the streamlined EB algorithm provides a path for sophisticated, real-time personalization on standard hardware. While the current model assumes a linear reward function and remains cubic in time ($t$), its efficiency allows for more frequent hyperparameter updates, leading to better user outcomes. Future work may explore "sliding window" approaches to further optimize long-term scaling and extend this framework to other sparse matrix problems in recommendation systems and social science.

Summary updated

BibTeX
@misc{menictas2020fast,
  author = {Marianne Menictas and Sabina Tomkins and Susan A. Murphy},
  title = {{Fast Physical Activity Suggestions: Efficient Hyperparameter Learning in Mobile Health}},
  year = {2020},
  eprint = {2012.11646},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.11646},
}
Figure