Manuscript Offprint

arXiv:2610.13281

QCLR: A Plug-in Robustification Module via Quantization for Contrastive Learning in Self-Supervised Skeleton-Based Human Action Recognition

Nanzhu Chen, Feixiang He, Yunfeng Diao, Duygu Sarikaya, He Wang

Nanzhu Chen 1^{1} ID^{ID}, Feixiang He 2^{2} ID^{ID}, Yunfeng Diao 3^{3} ID^{ID}, Duygu Sarikaya 1^{1} ID^{ID}, and He Wang 4^{4} ID^{ID}

1^{1} University of Leeds, Leeds, United Kingdom {scnch,d.sarikaya}@leeds.ac.uk

2^{2} Central South University, Changsha, China

feixiang.he@csu.edu.cn

3^{3} Hefei University of Technology, Hefei, China

diaoyunfeng@hfut.edu.cn

4^{4} University College London, London, United Kingdom

he_wang@ucl.ac.uk

Abstract. Skeleton-based human action recognition has gained increasing attention due to the stability of skeleton data across diverse environments and advances in motion capture technologies. Following the success of supervised learning approaches, self-supervised learning approaches, particularly contrastive learning ones, have achieved impressive performance. However, they remain vulnerable to adversarial attacks. In this work, we propose a plug-in robustification module via quantization for contrastive learning in self-supervised skeleton-based human action recognition (QCLR), which enhances the robustness of representations against adversarial attacks while preserving their representational capability. Specifically, we employ a dual-level quantization scheme across the encoding pipeline, which breaks the gradient propagation and absorbs small adversarial perturbations within the quantization bins. To mitigate the impact of inevitable quantization error, we further design an attention-guided multi-faceted quantization strategy to maintain the representation quality. Experiments on several benchmark datasets demonstrate that integrating QCLR into a progressive lineage of mainstream contrastive learning models substantially improves robustness against both gradient-based white-box and gradient-free black-box adversarial attacks, while preserving highly competitive classification accuracy.

Keywords: Human Action Recognition · Self-Supervised Learning · Adversarial Robustness

1 Introduction

In recent years, human action recognition has become an active topic of research in computer vision due to its wide range of applications [13,23,34][13, 23, 34].

N. Chen et al.

Skeleton-based human action recognition, in particular, has gained considerable attention due to the stability of skeleton data in different environments and the advances in motion capture technologies that enhance fidelity [3, 21, 22, 28, 29, 35, 37]. Many existing methods are supervised and rely on labeled data to achieve high performance. However, data labeling for large-scale datasets is extremely time-consuming and labor-intensive, motivating researchers to design self-supervised methods to reduce dependency on labeled data.

Reconstruction and contrastive learning are two primary pretext tasks in self-supervised skeleton-based human action recognition. Reconstruction methods learn features by predicting or reconstructing input data [16,30,39], whereas contrastive learning methods learn features by pulling positive sample pairs together and pushing negative sample pairs apart in the latent space [26]. Recently, a few contrastive learning models such as SkeletonCLR [17], AimCLR [11], and ActCLR [18] have achieved high classification accuracy across various datasets. However, their adversarial robustness has not been thoroughly investigated.

In real-world scenarios where privacy or data transfer cost is a concern, edge devices usually extract skeleton data locally and only transfer the skeleton data to the cloud for human action recognition. In such distributed systems, the skeleton data is exposed and vulnerable during transfer. In this work, we show that the aforementioned mainstream self-supervised models lack robustness against adversarial attacks, where subtle, targeted perturbations to input data can significantly degrade their performance.

In general, defenses against adversarial attacks can be broadly categorized into data augmentation defenses [5, 24], model robustification defenses [4], and hybrid defenses [36, 38]. Data augmentation defenses enhance robustness by introducing perturbations during the training process (e.g., adversarial training and randomized smoothing), while model robustification defenses aim to design specific model architectures so that the model is naturally robust. Overall, data augmentation defenses achieve higher robustness, but rely on supervised learning or tailored contrastive learning frameworks [10, 15]. In contrast, model robustification defenses have no such dependencies, but are generally more vulnerable to attacks. To the best of our knowledge, there is no specifically designed defense for self-supervised skeleton-based human action recognition.

Due to the research gap identified above, currently, the only potential solution is to adopt either general defenses such as TRADES [38] or supervised defenses designed for skeleton-based human action recognition, such as BEAT [32]. However, applying these defenses to mainstream contrastive learning models, which represent the dominant pretext task in self-supervised skeleton-based human action recognition, yields limited robustness improvements. These observations highlight a critical need for a new defense tailored for these contrastive learning models. Ideally, such a solution should be a plug-in module that can be integrated into existing models without altering their primary training objectives.

To this end, we propose a plug-in robustification module via quantization for contrastive learning in self-supervised skeleton-based human action recognition (QCLR). Unlike most defenses that rely on data augmentation, QCLR falls into the less explored category of model robustification defenses, deriving robustness from its architectural design. To effectively defend against both gradient-based white-box and gradient-free black-box attacks, we introduce a dual-level quantization scheme across the encoding pipeline. By mapping continuous input and features into discrete spaces, this design creates a comprehensive defensive barrier: it absorbs adversarial perturbations within the quantization bins, while simultaneously breaking the gradient propagation. However, applying vector quantization inevitably introduces quantization error [31]. As will be demonstrated in our experiments, applying naive vector quantization to mainstream contrastive learning models will severely degrade the representation quality, leading to a substantial decrease in the classification accuracy of the models.

To overcome this challenge, we propose a multi-faceted quantization strategy guided by an attention mechanism. Specifically, after conjecturing that the main source of quantization error is the limited codebook size, we introduce multifaceted quantization (i.e., quantizing the continuous features of multiple facets, namely the spatial, temporal, and spatio-temporal facets). This quantization strategy essentially combines codewords from multiple codebooks to approximate the continuous feature vectors, thereby markedly enhancing the representational capability of discrete representations while maintaining computational tractability, despite the vast number of such combinations of codewords. Furthermore, we constrain the quantization processes by incorporating an attention mechanism. In the presence of multiple codebooks, each capturing one facet of the data, the quantization processes are underdetermined (i.e., different combinations of codewords can equally approximate the same continuous feature vector) and cause optimization difficulties. Therefore, the attention mechanism designates one facet as the anchor for the other facets. These quantization processes not only mitigate the impact of adversarial perturbations by mapping similar continuous feature vectors to the same codewords, but also break the gradient propagation, jointly enhancing robustness against adversarial attacks. While vector quantization inevitably introduces quantization error, with element-wise quantization retaining fine-grained details and the attention mechanism dynamically modulating the features of the anchor facet, we ensure the model preserves high performance. As a result, QCLR maintains highly competitive classification accuracy, while achieving a considerable improvement in adversarial robustness, demonstrating clear advantages over existing defenses.

We evaluate QCLR on several benchmark datasets across SkeletonCLR, AimCLR, and ActCLR. Compared to existing defenses, QCLR substantially improves model robustness against both gradient-based white-box and gradient-free black-box adversarial attacks, while maintaining classification accuracy comparable to that of the corresponding original models.

In summary, our contributions are as follows:

  1. We propose QCLR, a plug-in robustification module employing a dual-level quantization scheme, and demonstrate its integration into a progressive lineage of mainstream contrastive learning models (i.e., SkeletonCLR, AimCLR, and ActCLR).

N. Chen et al.

  1. We design an attention-guided multi-faceted quantization strategy that not only breaks the gradient propagation and discretizes the feature spaces to enhance adversarial robustness, but also effectively mitigates the impact of the inevitable quantization error introduced by vector quantization.

  2. We comprehensively evaluate QCLR on several benchmark datasets, demonstrating that it outperforms existing defenses in defending against both gradient-based white-box and gradient-free black-box attacks, while preserving highly competitive classification accuracy.

References (39)

  • Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples
  • Estimating or propagating gradients through stochastic neurons for conditional computation (opens arXiv in a new tab)
  • Channel-wise topology refinement graph convolution for skeleton-based action recognition
  • Parseval networks: Improving robustness to adversarial examples
  • Certified adversarial robustness via randomized smoothing
  • Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
  • Basar: Black-box attack on skeletal action recognition
  • Skeleton based action recognition with convolutional neural network
  • Exploring the trade-off between accuracy and observational latency in action recognition
  • When does contrastive learning preserve adversarial robustness from pretraining to finetuning? Advances in neural information processing systems 34, 21480–21492
  • Contrastive learning from extremely augmented skeleton sequences for self-supervised action recognition
  • Momentum contrast for unsupervised visual representation learning
  • Jointly learning heterogeneous features for rgb-d activity recognition
  • 3d convolutional neural networks for human action recognition
  • Adversarial self-supervised contrastive learning
  • Unsupervised feature learning of human actions as trajectories in pose embedding manifold
  • 3d human action representation learning via cross-view consistency pursuit
  • Actionlet-dependent contrastive learning for unsupervised skeleton-based action recognition
  • A benchmark dataset and comparison study for multi-modal human action analytics
  • Ntu rgb+ d 120: A large-scale benchmark for 3d human activity understanding
  • Spatio-temporal lstm with trust gates for 3d human action recognition
  • Disentangling and unifying graph convolutions for skeleton-based action recognition
  • Group sparsity and geometry constrained dictionary learning for action recognition from depth maps
  • Towards Deep Learning Models Resistant to Adversarial Attacks
  • Efficient content-based retrieval of motion capture data
  • Augmented skeleton based contrastive action learning with momentum lstm for unsupervised action recognition
  • Ntu rgb+ d: A large scale dataset for 3d human activity analysis
  • Two-stream adaptive graph convolutional networks for skeleton-based action recognition
  • Interpretable 3d human action analysis with temporal convolutional networks
  • Predict & cluster: Unsupervised skeleton based action recognition
  • Neural discrete representation learning
  • Defending black-box skeleton-based human activity classifiers
  • Understanding the robustness of skeleton-based action recognition under adversarial attack
  • Dense trajectories and motion boundary descriptors for action recognition
  • Modeling temporal dynamics and spatial configurations of actions using two-stream recurrent neural networks
  • Feature denoising for improving adversarial robustness
  • Spatial temporal graph convolutional networks for skeleton-based action recognition
  • Theoretically principled trade-off between robustness and accuracy
  • Unsupervised representation learning with long-term dynamics for skeleton based action recognition