[Paper Review] Hierarchical Self Attention Based Autoencoder for Open-Set Human Activity Recognition
This paper proposes a hierarchical self-attention autoencoder for open-set human activity recognition using wearable sensor data, modeling spatio-temporal dependencies through multi-level attention mechanisms. It achieves state-of-the-art performance on five benchmark datasets and enables robust detection of unseen activities via reconstruction loss, while attention maps provide interpretable feature selection for activity classification.
Wearable sensor based human activity recognition is a challenging problem due to difficulty in modeling spatial and temporal dependencies of sensor signals. Recognition models in closed-set assumption are forced to yield members of known activity classes as prediction. However, activity recognition models can encounter an unseen activity due to body-worn sensor malfunction or disability of the subject performing the activities. This problem can be addressed through modeling solution according to the assumption of open-set recognition. Hence, the proposed self attention based approach combines data hierarchically from different sensor placements across time to classify closed-set activities and it obtains notable performance improvement over state-of-the-art models on five publicly available datasets. The decoder in this autoencoder architecture incorporates self-attention based feature representations from encoder to detect unseen activity classes in open-set recognition setting. Furthermore, attention maps generated by the hierarchical model demonstrate explainable selection of features in activity recognition. We conduct extensive leave one subject out validation experiments that indicate significantly improved robustness to noise and subject specific variability in body-worn sensor signals. The source code is available at: github.com/saif-mahmud/hierarchical-attention-HAR
Motivation & Objective
- To address the limitations of closed-set HAR models that misclassify unseen activities due to sensor malfunctions or subject variability.
- To model hierarchical spatio-temporal dependencies in wearable sensor data for improved activity representation.
- To enable open-set recognition by detecting unknown activities through reconstruction loss in an autoencoder framework.
- To provide interpretable attention maps that highlight key sensor placements and temporal windows for activity classification.
Proposed method
- Uses a hierarchical encoder with two levels: sensor-level self-attention (SE) to aggregate signals from different body locations, and window-level self-attention (HWE) to fuse temporal windows within a session.
- Employs a symmetric autoencoder architecture where the decoder reconstructs input signals using attention-guided context from the encoder.
- Applies self-attention mechanisms to learn dynamic, context-aware feature representations that emphasize relevant sensors and time frames.
- Uses reconstruction loss as an anomaly score to detect unseen activity classes in open-set recognition, distinguishing known from unknown classes.
- Generates attention maps from both SE and HWE layers to visualize which sensors and time windows contribute most to predictions.
- Trains end-to-end using cross-entropy loss for classification and mean squared error for reconstruction, with shared parameters across encoder and decoder.
Experimental results
Research questions
- RQ1Can hierarchical self-attention modeling of sensor signals improve classification accuracy in human activity recognition compared to non-hierarchical or sequential models?
- RQ2Does the proposed autoencoder architecture effectively detect unseen activity classes in an open-set recognition setting using reconstruction error?
- RQ3How do attention maps from the hierarchical model reflect intuitive, explainable patterns of sensor and temporal importance in complex activities?
- RQ4To what extent does the model generalize across subjects and remain robust to subject-specific sensor variability?
- RQ5Can the model maintain high performance on short, complex, or low-duration activities where traditional models struggle?
Key findings
- The proposed model achieves a macro-F1 score of 0.94 on the PAMAP2 dataset in window-based classification, outperforming all baselines including transformers and hybrid networks.
- On the Opportunity dataset, the model achieves a macro-F1 of 0.91 for high-level complex activities, significantly outperforming CNN (0.71), LSTM (0.73), DeepConvLSTM (0.791), and AROMA (0.838).
- In leave-one-subject-out (LOSO) validation, the model consistently outperforms baselines across four datasets, demonstrating robustness to subject-specific sensor variability.
- The model achieves an accuracy of 0.85 and macro-F1 of 0.69 on PAMAP2 for open-set detection, with 4 novel classes, indicating strong capability in identifying unseen activities.
- Attention maps visually align with known mid-level actions and locomotion sequences, confirming that the model learns interpretable, causally relevant features for activity recognition.
- On the Daphnet dataset, the model achieves 0.42 accuracy and 0.39 macro-F1 for open-set detection, with lower performance attributed to transition activities blurring class boundaries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.