Introduction
Human Activity Recognition (HAR) is a fundamental task in mobile and wearable computing, typically involving the classification of sensor data into discrete categories such as "Walking," "Sitting," or "Running." Traditionally, these labels are treated as a "flat" list, ignoring the inherent hierarchical structure of human movement. For instance, "Walking" and "Running" are both sub-categories of "Moving" activities.
Existing hierarchical models often employ a "top-down" approach with multiple classifiers. However, this introduces significant complexity, risks error propagation from higher to lower levels, and fails to capture "cross-branch" similarities—such as "Hand Waving" occurring during both "Sitting" and "Walking."
The H-HAR Framework
To address these challenges, the researchers proposed H-HAR, a framework that maintains a flat architecture while being "hierarchy-aware." The core innovation is a dual-graph label encoding strategy that models both explicit and implicit relationships between activities.
Methodology
The H-HAR architecture consists of several key components:
- Hierarchy-aware Label Encoder: Labels are represented as nodes in a graph. The model utilizes two graphs: a Predefined Graph based on known dataset hierarchies and a Self-Adaptive Graph that learns implicit relationships directly from the data.
- Activity Data Encoder: This component processes Multivariate Time Series (MTS) sensor data, reshaping it to align with the label graph structure.
- Joint Optimization: The model is trained using a combination of three loss functions:
- Cross-Entropy Loss: For standard classification accuracy.
- Alignment Loss: To ensure data and label embeddings are aligned in the representation space.
- Supervised Contrastive Loss: To group similar activities closely while separating distinct ones.
Experimental Evaluation
H-HAR was evaluated on two prominent HAR benchmarks: DaliAc (13 activities, 19 participants) and UCI HAPT (6 basic activities and 6 postural transitions).
Key Results
The framework demonstrated superior performance across both single-label and multi-label tasks:
- Accuracy: On the DaliAc dataset, H-HAR achieved 97.43% accuracy for single-label tasks, significantly outperforming standard Multi-layer Perceptrons (94.62%).
- Multi-label Robustness: H-HAR maintained high performance (97.23%) in complex multi-label scenarios where traditional models saw significant declines.
- Hierarchy Benefit: Incorporating hierarchical awareness improved baseline SVM performance on DaliAc by over 30%, highlighting the value of label relationship modeling.
Discussion and Insights
Ablation studies revealed that the Self-Adaptive Graph is often more effective than the predefined hierarchy alone, suggesting that data-driven discovery of activity relationships captures nuances missed by manual categorization. Furthermore, Supervised Contrastive Learning proved to be a critical component for achieving class-separable representations.
While H-HAR introduces some computational overhead during training (e.g., 39 seconds per epoch vs. 12 seconds for an MLP), its inference phase remains efficient as it primarily utilizes the Activity Data Encoder. Future work may explore deeper hierarchies and multi-modal data integration, such as combining sensors with video or audio.
Summary updated