Contrastive Self-Supervised Learning for Skeleton Action Recognition

Xuehao Gao, Yang Yang, Shaoyi Du

Action recognition using skeleton data (3D coordinates of body joints) is highly effective because it naturally ignores distracting backgrounds and lighting conditions. However, most high-performing models require massive amounts of labeled data, which is laborious and expensive to produce.

Existing unsupervised methods typically rely on "encoder-decoder" architectures that attempt to reconstruct the input sequence frame-by-frame. This approach is computationally expensive and often fails to capture the high-level semantic "meaning" of an action. Furthermore, skeleton data suffers from high intra-class variance: a "walking" action looks drastically different to a computer if the camera is 2 meters away versus 10 meters away, or if it is viewed from the side versus the front.

This paper introduces a contrastive self-supervised learning framework that eliminates the need for expensive manual labels by learning features that are invariant to these viewpoint and distance changes.

Proposed Methodology

The authors propose a Contrastive Self-Supervised Learning framework inspired by recent successes in computer vision (such as SimCLR). The core workflow relies on generating augmented views of the same action and forcing the model to recognize their underlying similarity.

Contrastive Learning Framework
  1. Data Augmentation: For a single unlabeled skeleton sequence, the system creates two different "augmented" versions. These augmentations involve stochastic 3D rotations (simulating different camera viewpoints) and translations (simulating different camera distances).
  2. Base Encoder: Both augmented versions are fed into a shared base encoder. To make the 3D skeleton data compatible with standard CNNs, the sequences are transformed into image-like representations. The authors experimented with ResNet-18, ResNet-50, and ResNet-101.
  3. Contrastive Loss: The model uses a contrastive loss function (NT-Xent) to maximize the agreement between the two augmented versions of the same sequence in a latent space, while simultaneously pushing the representations of different sequences apart.
  4. Downstream Task: Once trained, the encoder is frozen. A simple linear classifier is then trained on top of it using a small amount of labeled data to evaluate how well the model learned the underlying action representations.

Key Insights

  • Semantic Invariance as a Signal: The core insight is that a robust action recognition model should be invariant to the camera's position. By forcing the model to match different viewpoints of the same action, it naturally learns to focus on the motion dynamics rather than the raw coordinate values.
  • Sequence-level vs. Frame-level: Applying transformations to the entire sequence (maintaining consistency across frames) proved superior to frame-wise transformations, which can destroy the temporal logic of the motion.
  • Simplicity Wins: Moving away from complex generative "reconstruction" tasks (which try to predict every joint's position) to a discriminative "agreement" task makes the training more efficient and focuses the model on discriminative features.

Datasets

The researchers evaluated their method on two large-scale benchmarks:

  • NTU-RGB+D 60: Contains ~56,000 sequences and 60 action classes.
  • NTU-RGB+D 120: An extension containing ~114,000 sequences and 120 classes.

(Note: The authors explicitly mention that 2D skeleton datasets like Kinetics-400 are inappropriate for this specific method because the approach relies heavily on 3D spatial rotations.)

Key Results

The proposed method outperformed previous state-of-the-art unsupervised methods on major benchmarks.

Comparison with State-of-the-Art Methods
  • NTU-60: The model achieved 52.3% accuracy on the Cross-Subject (X-Sub) evaluation, surpassing the previous leading unsupervised method, P&C FW (50.6%), and reaching 62.1% on Cross-View (X-View).
  • NTU-120: Achieved 43.5% (Cross-Subject) and 44.3% (Cross-Setup), showing a consistent ~1.6-1.8% improvement over previous work.
  • Model Scaling: Performance scaled significantly with model size. Switching the base encoder from ResNet-18 to ResNet-101 improved accuracy from 40.2% to 52.3%, suggesting the contrastive task is challenging enough to benefit from high-capacity networks.

Limitations and Future Work

While highly effective, the method has a few notable limitations:

  • 3D Dependency: The framework relies heavily on 3D skeleton data. Its effectiveness on 2D skeletons (where depth information is missing) is likely limited, as realistic 3D rotations cannot be accurately simulated.
  • Image-based Encoding: While using ResNet is convenient, it requires converting skeletons into images. Future work might explore using Graph Convolutional Networks (GCNs), which are more naturally suited to the "graph" structure of the human skeleton, as the base encoder.
  • Augmentation Diversity: The study focused primarily on viewpoint and distance. Adding other augmentations, such as temporal shearing or jittering, could further improve the robustness of the learned representations.

Summary updated

BibTeX
@inproceedings{gao2020contrastive,
  author = {Xuehao Gao and Yang Yang and Shaoyi Du},
  title = {{Contrastive Self-Supervised Learning for Skeleton Action Recognition}},
  booktitle = {Preregister @ NeurIPS},
  year = {2020},
  url = {https://openreview.net/forum?id=Tv77LAMG7kV},
}
Figure