Abstract
Human Activity Recognition (HAR) typically relies on sliding window segmentation, treating data windows as independent events and ignoring broader temporal context. This paper introduces DeepConvContext, a multi-scale architecture that models both intra-window movement patterns and inter-window activity sequences using a two-stage LSTM approach. Evaluated on six benchmark datasets, DeepConvContext achieves a 10% average improvement in F1-score over industry-standard models. Furthermore, the study demonstrates that LSTMs outperform Transformers for inertial sensor data, highlighting the effectiveness of sequential modeling in capturing human movement dynamics.
Introduction
The efficacy of modern Human Activity Recognition (HAR) systems—the technology powering activity tracking in wearables—is often limited by the "sliding window" paradigm. By classifying short segments of sensor data (e.g., 2 seconds) in isolation, these systems remain "context-blind." For instance, a model may fail to recognize that a "standing" window is statistically more likely to precede "walking" than "swimming." This lack of inter-window context leads to jittery predictions and poor performance on complex, multi-stage activities. DeepConvContext addresses this by capturing both local (intra-window) and global (inter-window) temporal patterns.
Methods
DeepConvContext employs a multi-scale framework inspired by Temporal Action Localization (TAL) techniques. The architecture formalizes an observation from previous models where sequential batch processing unintentionally provided context, turning it into a deliberate design feature. The framework consists of four primary stages:
- Intra-patch Feature Extraction: Four convolutional layers followed by an LSTM extract features from individual sensor data patches (windows).
- Dimensionality Reduction: A fully connected layer compresses these features into a compact 1D vector.
- Inter-patch Learning: A second LSTM processes the sequence of feature vectors, enabling the model to "remember" previous windows and understand the progression of activities.
- Bidirectional Processing: A variant using a bidirectional LSTM for the second stage was also evaluated to improve the detection of transition activities (e.g., sit-to-stand vs. stand-to-sit).
Results
The model was benchmarked against six diverse datasets: Wetlab, WEAR, SBHAR, RWHAR, Opportunity, and Hang-Time. DeepConvContext consistently outperformed the baseline DeepConvLSTM, showing an average F1-score improvement of 10%, with gains reaching up to 21% on specific tasks.
Key findings include:
- Superior Transition Detection: The model significantly improved performance on short, non-periodic activities like "sit-to-stand," which are traditionally difficult for HAR models.
- Prediction Coherence: By incorporating inter-window context, the model produces smoother results, avoiding the "rapid switching" bug where predictions flip-flop between activities.
- Computational Efficiency: Despite the added complexity, the model only increased GFLOPS by 3.5% and memory usage by 10%, maintaining viability for mobile deployment.
Discussion and Conclusion
A significant insight from this research is the continued superiority of LSTMs over Transformers for inertial sensor data. Ablation studies revealed that the localized, sequential bias of LSTMs is more effective than the global attention mechanism of Transformers for the temporal scales relevant to human movement.
While DeepConvContext offers substantial performance gains, it currently faces a latency limitation; the model requires a buffer of data before providing its most accurate predictions. Future work will focus on developing optimized FIFO (First-In, First-Out) data loaders to enable real-time, context-aware predictions without batch-processing delays. DeepConvContext represents a significant step toward more robust and contextually aware activity recognition systems.
Summary updated