While deep learning models have contributed to the advancement of sensor-based Human Activity Recognition (HAR), it usually requires large amounts of annotated sensor data to extract robust features. To alleviate the limitations of data annotation, contrastive learning has been applied to sensor-based HAR. One of the essential factors of contrastive learning is data augmentation, significantly impacting the performance of pre-training. However, current popular augmentation methods do not achieve competitive performance in contrastive learning for sensor-based HAR. Motivated by this issue, we propose a new sensor data augmentation method by resampling, which introduces variable domain information and simulates realistic activity data by varying the sampling frequency to maximize the coverage of the sampling space. The resampling augmentation method was evaluated in supervised learning and contrastive learning (SimCLRHAR and MoCoHAR). In the experiment, we use four datasets, UCI-HAR, MotionSense, USC-HAD, and MobiAct, using the mean F1-score as the evaluation metric for downstream tasks. The experiment results show that the resampling data augmentation outperforms all state-of-the-art augmentation methods in supervised learning and contrastive learning with a small amount of labeled data. The results also demonstrate that not all data augmentation methods have positive effects in contrastive learning frameworks.
26 January 2023 in IEEE Internet of Things Journal
Contrastive learning is an emerging and important self-supervised learning paradigm that has been successfully applied to sensor-based human activity recognition (HAR) because it can achieve competitive performance relative to supervised learning. Contrastive learning methods generally involve instance discrimination, which means that the instances are regarded as negatives of each other, and thus their representations are pulled away from each other during the training process. However, instance discrimination could cause overclustering, meaning that the representations of instances from the same class could be overly separated. To alleviate this overclustering phenomenon, we propose a new contrastive learning framework to select negatives by clustering in HAR, which is named ClusterCLHAR. First, ClusterCLHAR clusters the instance representations, and for each instance, only those from different clusters are regarded as negatives. Second, a new contrastive loss function is proposed to mask the same-cluster instances from the negative pairs. We evaluate ClusterCLHAR on three popular benchmark datasets, USC-HAD, MotionSense, and UCI-HAR, using the mean F1-score as an evaluation metric for downstream tasks. The experimental results show that ClusterCLHAR outperforms all the state-of-the-art methods applied to HAR in self-supervised learning and semi-supervised learning.
16 May 2023 in IEEE Transactions on Instrumentation and Measurement
Deep learning for sensor-based human activity recognition (HAR) has been a focus of research in recent years. Sensor data stream segmentation is a core element in HAR, which has currently been treated as an independent preprocessing task, usually with a fixed-size window. This has led to two critical problems, namely the multi-class window problem caused by possible multiple activities within a fixed-size window and the fluctuation of prediction results due to noisy data and over-segmentation. To address these research challenges, in this paper, we conceive a novel Multi-Task deep learning approach to segmenting and recognizing human activity simultaneously. Specifically, we propose a multi-scale window method based on feature sequence generation to overcome the multi-class window problem. We develop a novel boundary offset prediction algorithm to adjust a windows boundary to tackle the over-segmentation issue. In addition, We design a multi-task framework to streamline and optimize the activity recognition and segmentation tasks simultaneously. We conduct extensive experiments on eight benchmark datasets to evaluate the proposed framework and associated methods. Initial results show that our approach outperforms the performance of current state-of-the-art HAR methods.
Masked reconstruction serves as a crucial pretext task for self-supervised learning, enabling the model to improve its feature extraction capabilities by reconstructing the masked segments from abundant unlabeled data. In the field of human activity recognition, this pretext task has traditionally employed a masking strategy that focuses on the time dimension. However, this strategy fails to fully leverage the inherent characteristics of wearable sensor data and overlooks the inter-channel information coupling, thereby limiting its potential as an effective pretext task. To overcome these limitations, we propose a novel masking strategy called Channel Masking. This strategy involves masking the sensor data along the channel dimension, thereby encouraging the encoder to extract channel-specific features while performing the masked reconstruction task. Additionally, Channel Masking can be seamlessly integrated with masking strategies along the time dimension, motivating the self-supervised model to undertake the masked reconstruction task in both the time and channel dimensions. The integrated masking strategies are named Time-Channel Masking and Span-Channel Masking. Furthermore, we optimize the reconstruction loss function to incorporate the reconstruction loss in both the time and channel dimensions. We evaluate the proposed masking strategies on three public datasets, and the experimental results demonstrate that these strategies outperform prior approaches in both self-supervised and semi-supervised scenarios.