Abstract
This paper addresses the problem of Human Activity Recognition (HAR) using data from wearable inertial sensors. An important challenge in HAR is the model's generalization capabilities to new unseen individuals due to inter-subject variability, i.e., the same activity is performed differently by different individuals. To address this problem, we propose a novel deep adversarial framework that integrates the concept of inter-subject variability in the adversarial task, thereby encouraging subject-invariant feature representations and enhancing the classification performance in the HAR problem. Our approach outperforms previous methods in three well-established HAR datasets using a leave-one-subject-out (LOSO) cross-validation. Further results indicate that our proposed adversarial task effectively reduces inter-subject variability among different users in the feature space, and it outperforms adversarial tasks from previous works when integrated into our framework.
Introduction
Human Activity Recognition (HAR) using wearable inertial sensors—such as those found in smartwatches and fitness trackers—is a cornerstone of modern healthcare monitoring and human-robot interaction. However, a significant hurdle persists: inter-subject variability. Because physical attributes like height, weight, and age vary, as do personal habits, a "walking" signal from one individual can look markedly different from another's.
When machine learning models are trained on a specific group and then deployed on a new user, performance often degrades because the model has inadvertently learned subject-specific cues rather than the core characteristics of the activity itself. This paper introduces a novel adversarial learning framework designed to bridge this generalization gap by learning "subject-invariant" features.
Methodology
The proposed architecture utilizes four primary components: a Feature Extractor (F), a Reconstructor (R), an Activity Classifier (C), and a Discriminator (D). The core innovation lies in the adversarial task. Unlike traditional methods that attempt to identify specific users (which scales poorly), this framework frames the discriminator's task as a binary classification: determining whether a pair of feature vectors represents the same person or different people performing the same activity.
As shown in Figure 1, the training process is executed in three distinct stages:
- Reconstruction: The extractor and reconstructor are pre-trained to ensure that latent features accurately represent the input data.
- Supervised Learning: The activity classifier and discriminator are trained on labeled data to establish baseline performance.
- Adversarial Learning: An iterative process where the Feature Extractor attempts to "fool" the discriminator by hiding subject-specific cues, while the Discriminator attempts to identify them. This competition forces the extractor to produce features where the activity appears identical regardless of the subject.
Experimental Setup
The framework was rigorously evaluated on three gold-standard HAR datasets:
- PAMAP2: 12 activities from 9 subjects using 3 Inertial Measurement Units (IMUs).
- MHEALTH: 12 activities from 10 participants using sensors on the chest, wrist, and ankle.
- REALDISP: A large-scale dataset featuring 33 activities from 17 participants using 9 sensors.
To ensure realistic generalization testing, the authors employed a Leave-One-Subject-Out (LOSO) cross-validation protocol. In this setup, the model is always evaluated on data from an individual it never encountered during the training phase.
Results and Discussion
The proposed method consistently outperformed five state-of-the-art models, including MC-CNN and METIER, across all tested datasets. Notably, the framework achieved 87.03% accuracy on PAMAP2 (a ~7% improvement over the next best method) and a staggering 97.10% accuracy on the complex REALDISP dataset.
Beyond raw accuracy, Figure 2 demonstrates that the proposed model exhibits significantly lower variance in performance across different users compared to baselines. This indicates a more robust system that generalizes reliably across a diverse population. To validate the mechanism of improvement, the researchers measured the Wasserstein distance between user features. They found that the adversarial step significantly reduced the mathematical distance between different users' signals for the same activity, confirming successful feature alignment.
Conclusion
By specifically comparing subjects within the context of the same activity, this adversarial framework effectively isolates and removes subject-specific "noise" while preserving critical activity-related data. While improvements on the MHEALTH dataset were more modest, the overall results across PAMAP2 and REALDISP suggest a powerful new approach for cross-user generalization. Future work will focus on real-time implementation on edge devices and exploring "open-set" scenarios where users perform activities not present in the original training data.
Summary updated