DisCovHAR: Contrastive Attention for Human Activity Recognition Under Distribution Shifts
- 14 March 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Internet of Things Journal
- Vol. 12 (12) , 21973-21983
Abstract
Advances in Internet-of-Things (IoT) wearable sensors and Edge-Artificial Intelligence (Edge-AI) have enabled practical realizations of Machine Learning (ML)-enabled mobile sensing applications like Human Activity Recognition (HAR). The effective deployment of these data-driven models necessitates learning robust representations capable of handling prevalent Distribution Shifts (DS), including new users, device positions, rotations, and more. In that respect, Contrastive Learning (CL) has shown promise in learning transformation-invariant features, outperforming traditional HAR methods. However, recent findings reveal that the contrastive loss induces shrinkage and expansion of the feature space which may limit the generalization capacity of the model. To address this, we propose DisCovHAR, a contrastive attention method to selectively apply the contrastive loss to a subset of the feature space through the transformer encoder attention mechanism. Extensive experiments on three HAR datasets (DSADS, PAMAP2, USCHAD) demonstrate its superiority over state-of-the-art methods. Specifically, our approach yields up to 4.47% and 7.82% average accuracy improvements in subject-wise and position-wise generalization settings. Furthermore, DisCov-HAR demonstrates up to 5.07% increased robustness compared to prior methods under multivariate distribution shift scenarios.Keywords
Funding Information
- National Science Foundation (CCF-2140154)
This publication has 29 references indexed in Scilit:
- TASKED: Transformer-based Adversarial learning for human activity recognition using wearable sensors via Self-KnowledgE DistillationKnowledge-Based Systems, 2022
- Pose-based Contrastive Learning for Domain Agnostic Activity Representations2022
- The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization2021
- Contrastive Self-supervised Learning for Sensor-based Human Activity Recognition2021
- Semi-Supervised Contrastive Learning for Human Activity Recognition2021
- From development to deployment: dataset shift, causality, and shift-stable models in health AIBiostatistics, 2019
- Deep learning for time series classification: a reviewData Mining and Knowledge Discovery, 2019
- Recognizing Daily and Sports Activities in Two Open Source Machine Learning Environments Using Body-Worn Sensor UnitsThe Computer Journal, 2013
- Introducing a New Benchmarked Dataset for Activity Monitoring2012
- On similarity queries for time-series data: Constraint specification and implementation1995