Negative Selection by Clustering for Contrastive Learning in Human Activity Recognition

Jinqiang Wang, Tao Zhu, Liming Chen, Huansheng Ning, Yaping Wan

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)
19 Downloads (Pure)


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.
Original languageEnglish
Pages (from-to)1-13
Number of pages13
JournalIEEE Internet of Things
Early online date26 Jan 2023
Publication statusPublished online - 26 Jan 2023

Bibliographical note

Publisher Copyright:


  • Human Activity Recognition
  • Sensor Data
  • Contrastive Learning
  • negative selection
  • Clustering
  • Task analyais
  • Supervising learning
  • Data models
  • Training
  • Self-supervised learning
  • Human activity recognition
  • Internet of Things
  • Task analysis
  • Supervised learning
  • Negative Selection


Dive into the research topics of 'Negative Selection by Clustering for Contrastive Learning in Human Activity Recognition'. Together they form a unique fingerprint.

Cite this