A Semi-Supervised CPC-Transformer Approach for Human Activity Recognition Under Label Scarcity
Human Activity Recognition (HAR) in smart-home environments plays a vital role in applications such as ambient assisted living, elderly care, and health monitoring. Unlike vision-based HAR, smart-home systems rely on ambient sensors such as motion sensors, that capture sparse, asynchronous, and noisy data, making accurate recognition more challenging. However, the limited availability of labeled sequences in real-world homes poses a critical obstacle to traditional supervised learning methods. To address this limitation, we introduce a semi-supervised approach that integrates Contrastive Predictive Coding (CPC) with a hybrid BiGRU-Transformer architecture. CPC is utilized as a self-supervised pretraining stage to learn informative temporal representations from unlabeled sequences, which are then used by the downstream classifier. These representations are subsequently processed in parallel by Bi-GRU and Transformer components to model short-term and long-term temporal dependencies, respectively, thereby enabling comprehensive temporal modeling for human activity recognition. Experimental evaluations on two real-world environmental sensor datasets, CASAS Aruba and CASAS Milan, demonstrate that the proposed model outperforms several baseline architectures in semi-supervised settings, achieving improvements of 5.31 percentage points ( $\approx 6.4$ % relative) on Aruba and 9.37 percentage points ( $\approx 14.8$ % relative) on Milan.