Process Optimization and Deployment for Sensor-Based Human Activity Recognition Based on Deep Learning

Hanyu Liu, Ying Yu, Hang Xiao, Siyao Li, Xuze Li, Jiarui Li, Haotian TangarXiv 2025 · DOI

Introduction

Sensor-based Human Activity Recognition (HAR), utilizing accelerometers and gyroscopes in wearable devices, offers a privacy-preserving and energy-efficient alternative to computer vision-based tracking. Despite its potential, practical deployment faces significant challenges: the high cost of labeling sensor data, the inherent class imbalance in real-world activity (e.g., rare "falls" vs. frequent "sitting"), and the strict hardware constraints of edge devices.

To address these issues, researchers have introduced MSTI-AD, an end-to-end framework designed to optimize the entire HAR pipeline from data generation to real-time edge deployment.

Methodology: The MSTI-AD Framework

The MSTI-AD framework is built upon three core pillars: data synthesis, a novel network architecture, and an adaptive training strategy.

Overview of the MSTI-AD framework

1. Data Synthesis via SF-DM

To overcome data scarcity, the framework employs a Statistical Feature-guided Diffusion Model (SF-DM). Unlike Generative Adversarial Networks (GANs), this unsupervised model generates realistic synthetic sensor data by iteratively denoising random signals. The process is guided by the statistical properties—such as mean, variance, and skewness—of real-world movement data, ensuring the synthetic samples are physically plausible.

2. The MSTI Network Architecture

The Multi-branch Spatiotemporal Interaction (MSTI) network is the computational heart of the system. It utilizes a "split-attention" strategy, where features are organized into multiple groups (Cardinality) and further subdivided (Radix). This structure allows the model to capture diverse movement patterns simultaneously.

Detailed MSTI network architecture

A key innovation is the integration of dedicated Spatial and Temporal Attention Modules. The researchers discovered that while individual attention mechanisms provided marginal gains, their interaction was crucial. By focusing on the intersection of where (spatial) and when (temporal) movements occur, the model significantly improves its recognition accuracy.

3. Adaptive Composite Loss (AD)

Handling class imbalance is achieved through an Adaptive Composite Loss function. It combines Cross-Entropy, Focal Loss, and Label Smoothing. Rather than using static weights, the system employs a feedback control-inspired algorithm that dynamically adjusts loss weights based on training performance. This "self-tuning" approach prevents the model from overfitting to common classes or getting stuck in local optima.

Experimental Results

The MSTI-AD framework was rigorously evaluated on three benchmark datasets: WISDM, PAMAP2, and OPPORTUNITY.

  • State-of-the-Art Accuracy: The model achieved a peak accuracy of 98.84% on the WISDM dataset, outperforming established architectures like CNN-GRU and ResNeSt. On the more complex PAMAP2 dataset, it maintained a significant lead over other contemporary methods.
  • Efficiency and Latency: Designed for the edge, the model is remarkably lean. On the WISDM dataset, it requires only 718.50 KB of memory. When deployed on a Raspberry Pi 5, the inference latency remained under 25ms for the OPPORTUNITY dataset, meeting the requirements for real-time wearable applications.

Conclusion

MSTI-AD demonstrates that high-accuracy deep learning for HAR is compatible with the constraints of edge computing. By combining diffusion-based data augmentation with a sophisticated spatiotemporal interaction network and adaptive loss tuning, the framework provides a robust solution for real-world activity recognition. Future work will focus on further reducing feature redundancy and testing on even more constrained microcontrollers to broaden the reach of this technology.

Summary updated

BibTeX
@misc{liu2025process,
  author = {Hanyu Liu and Ying Yu and Hang Xiao and Siyao Li and Xuze Li and Jiarui Li and Haotian Tang},
  title = {{Process Optimization and Deployment for Sensor-Based Human Activity Recognition Based on Deep Learning}},
  year = {2025},
  eprint = {2504.03687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.03687},
}
Figure