Abstract
Human Activity Recognition (HAR) models often fail when deployed on new devices or users due to the high cost and difficulty of collecting labeled sensor data. This study demonstrates that aggregating multiple small, public datasets into a single "mega-corpus" for pre-training creates robust models that generalize significantly better to unseen domains. By employing a Leave-One-Dataset-Out (LODO) methodology, we show that pre-trained models require as little as 1% of target-specific labeled data to outperform models trained from scratch on 100% of the data.
Introduction
Supervised learning has significantly advanced Human Activity Recognition (HAR) on mobile and wearable devices. However, these models suffer from extreme "data hunger," typically requiring massive amounts of labeled data from the specific target environment to maintain accuracy. Labeling sensor data is expensive, intrusive, and time-consuming, leading to a persistent labeled data scarcity problem. Unlike Computer Vision, where ImageNet provides a foundation for transfer learning, HAR has lacked a unified pre-training corpus because most public datasets are small, recorded in controlled scenarios, or limited to specific device types.
Methodology
To address this scarcity, we proposed a strategy to aggregate six diverse, publicly available HAR datasets (HHAR, MobiAct, MotionSense, RealWorld, UCI HAR, and PAMAP2), creating a unified corpus of ~151 hours of data covering 147 subjects and 12 device types.
Dataset Harmonization and Partitioning
To ensure compatibility across datasets, all sensor data was downsampled to 50 Hz and subjected to sensor-wise z-normalization. We focused on the 'waist' position to minimize extreme domain shifts while maintaining a realistic use case.
As shown in the figure above, we utilized a Leave-One-Dataset-Out (LODO) methodology. We pre-trained models on $N-1$ datasets and treated the sixth, entirely unseen dataset as the target domain. We compared three fine-tuning scenarios on the target domain:
- $R_d$: Training from scratch (random initialization).
- $P_F$: Using a frozen pre-trained feature extractor (training only the classification head).
- $P_U$: Fine-tuning the entire pre-trained model (unfrozen).
Key Results and Discussion
We evaluated four state-of-the-art architectures: ISPL Inception, DeepConvLSTM, and two transformer-based models, HART and MobileHART.
The Impact of Pre-training
Pre-training proved most beneficial for high-capacity transformer models. For the MobileHART architecture, pre-training led to a 37% improvement in F1 score compared to random initialization when only 1% of fine-tuning data was available.
As illustrated in the bar chart, the "Unfrozen" ($P_U$) strategy consistently outperformed random initialization across most architectures. Interestingly, the "Frozen" ($P_F$) strategy performed nearly as well as $P_U$ for models like ISPL Inception, suggesting that the features learned during multi-dataset pre-training are highly robust and capture fundamental patterns of human motion regardless of the device. Conversely, smaller models like DeepConvLSTM showed a performance drop with pre-training, likely due to overfitting on the source data and a lack of capacity to generalize across the high heterogeneity of the combined datasets.
Conclusion
Aggregating public datasets for pre-training offers a powerful solution to the labeled data scarcity problem in HAR. Our results suggest that this approach can reduce the amount of labeled data needed for new deployments by orders of magnitude. Future work will explore extending this to varying on-body placements and utilizing Self-Supervised Learning (SSL) to leverage the vast amounts of unlabeled sensor data available in the wild.
Summary updated