Abstract
This paper proposes a novel neural network-based model for learning user-independent features in the context of human activity recognition (HAR) using wearable sensors. User-independence is critical for enhancing generalization to new users and ensuring privacy protection in real-world deployments. However, designing such features is challenging, as it is often unclear which representations are truly user-independent, and poor design can degrade activity recognition performance. We introduce User-Adversarial Neural Networks (UANN) to automatically learn these features. By incorporating an adversarial user classifier alongside a standard activity classifier, the model learns representations that distinguish activities while obstructing user identification. Our empirical validation on three benchmark tasks demonstrates that UANN improves feature independence compared to standard deep convolutional neural networks (CNNs), both qualitatively and quantitatively.
Introduction
Human Activity Recognition (HAR) using wearable sensors like accelerometers and gyroscopes is a cornerstone of modern healthcare and elderly monitoring. While deep learning has significantly advanced the state-of-the-art in HAR, models often inadvertently learn "user-dependent" features—unique movement signatures specific to individuals. This leads to two primary issues: poor generalization to unseen users and significant privacy risks, as sensor data can be used to re-identify individuals even when anonymized.
The authors address this by forcing the network to learn features that are user-independent yet remain highly descriptive of the underlying activity. This approach aims to find an optimal balance between utility (activity recognition) and privacy (user anonymity).
Methodology
The proposed User-Adversarial Neural Network (UANN) architecture consists of three primary components:
- Feature Extractor ($f_f$): A shared set of layers that transforms raw sensor data into a latent representation.
- Activity Classifier ($f_y$): Predicts the specific action being performed (e.g., walking, sitting).
- Adversarial User Classifier ($f_u$): Attempts to identify the specific user associated with the data.
The training process is framed as a min-max optimization problem. The feature extractor is trained to minimize activity recognition loss while simultaneously maximizing the loss of the user classifier. This is achieved by reversing the gradients from the user classifier (denoted by $-\lambda \nabla L_u$ in Figure 1). To ensure stability, a $\lambda$-annealing schedule is employed, gradually increasing the adversarial penalty as the network stabilizes.
Experimental Evaluation
The model was evaluated using Leave-One-Subject-Out (LOSO) cross-validation on two major datasets:
- Opportunity Activity Recognition: Features 4 users performing daily activities recorded by 72 sensors.
- USC-HAD (University of Southern California Human Activity Dataset): Includes 14 subjects performing 12 basic activities.
Standard CNNs were used as a baseline. In the USC-HAD dataset, the baseline CNN could identify users with nearly 99% accuracy, highlighting the severity of the privacy risk in traditional models.
Results and Discussion
The experimental results demonstrate that UANN successfully decouples user identity from activity features.
Key Findings:
- Enhanced Privacy: As shown in Figure 4, UANN configurations significantly reduce user identification accuracy (User acc) compared to the CNN baseline, often bringing it down toward random chance levels.
- Improved Generalization: On the Opportunity dataset, UANN improved activity recognition F-scores for new users (0.566 vs. 0.557 for gestures), suggesting that "forgetting" user-specific traits helps the model focus on universal movement mechanics.
- Privacy-Utility Trade-off: There is an inherent tension between removing user-specific data and maintaining activity accuracy. While UANN finds a robust middle ground, some datasets (like USC-HAD) showed slight dips in activity accuracy, indicating that user "style" can sometimes be deeply intertwined with the activity itself.
Conclusion and Future Work
User-Adversarial Neural Networks provide a powerful framework for learning representations that are both generalizable and privacy-preserving. By explicitly penalizing user-dependent features, UANN mitigates the risk of re-identification in wearable sensor data. Future research will focus on scaling these adversarial methods to larger populations using concepts like $k$-anonymity and addressing potential ensemble attacks where an adversary averages predictions over multiple data windows.
Summary updated