Abstract: Sensor-based Human Activity Recognition (HAR) is critical for health monitoring but is often hindered by subject-specific movement variations and complex multi-dimensional sensor correlations. This paper introduces DHARER (Distance-based HAR from Ensembled spatial-temporal Representations), a deep learning framework designed to improve cross-subject generalization. DHARER utilizes a dual-stream CNN to capture both spatial and temporal patterns and employs a prototypical network approach for distance-based classification. Experimental results on three benchmark datasets demonstrate that DHARER consistently outperforms existing state-of-the-art methods in leave-one-subject-out scenarios.
Introduction
Human Activity Recognition (HAR) using wearable sensors like accelerometers and gyroscopes is a foundational technology for personalized health and robotics. However, two primary challenges persist: the need to capture intricate temporal and spatial correlations within multi-dimensional sensory data, and the significant variance in movement patterns between different individuals ("subject variance"). Traditional models often overfit to the specific subjects in the training data, leading to performance degradation when deployed for new users.
The DHARER Framework
To address these issues, the researchers propose DHARER. The architecture is built upon two core innovations: the Dual-Stream Representation Module (DARM) and the Distance-Based Classification Module (DCAM).
Dual-Stream Representation Module (DARM)
DARM processes sensor segments through two parallel Convolutional Neural Network (CNN) streams. One stream (T-CNN) focuses on temporal correlations, identifying patterns in how signals evolve over time. The other (S-CNN) captures spatial correlations, modeling the relationships between different sensors (e.g., wrist vs. waist). The outputs of these streams are fused to create a comprehensive joint representation.
Distance-Based Classification Module (DCAM)
Unlike traditional models that use a Softmax layer for direct classification, DHARER adopts a similarity-based approach inspired by Prototypical Networks. The model learns a "prototype" vector for each activity class in an embedding space. Classification is performed by calculating the distance between a query segment's representation and these prototypes, assigning the label of the nearest neighbor. This approach is inherently more robust to the "noise" introduced by individual-specific movement styles.
Cross-Subject Training Strategy
To further enhance generalization, the authors employ a specific training loop where query samples and prototype-forming samples are drawn from different subjects. This forces the network to ignore subject-specific quirks and focus on the universal characteristics of each activity.
Experimental Evaluation
The model was rigorously tested on three large-scale datasets: MHEALTH (12 activities, 10 subjects), PAMAP2 (12 activities, 8 subjects), and UCIDSADS (19 activities, 8 subjects). A strict Leave-One-Subject-Out (LOSO) protocol was used to ensure the model's ability to generalize to unseen individuals.
Results and Discussion
DHARER achieved significant performance gains over state-of-the-art baselines such as DeepConvLSTM and AttConvLSTM. Specifically, it showed mean F-score improvements of 4.52% on MHEALTH, 4.78% on PAMAP2, and 3.17% on UCIDSADS. On the MHEALTH dataset, the model reached a peak F-score of 96.69%.
Ablation studies confirmed that the dual-stream approach is superior to using either spatial or temporal features in isolation. Furthermore, the distance-based metric proved more effective than traditional Softmax classification for cross-subject tasks.
Conclusion
DHARER represents a significant step forward in making HAR systems more adaptable to diverse users. While some activities with nearly identical sensory signatures (e.g., standing vs. standing in an elevator) remain challenging, the combination of spatial-temporal feature fusion and prototype similarity learning provides a robust foundation for future improvements in sensor-based activity recognition.
Summary updated