Skip to content
AI.info

Research

Affinity Contrastive Learning for Skeleton-based Human Activity Understanding

Affinity Contrastive Learning for Skeleton-based Human Activity Understanding Overview Research area: Computer Vision — skeleton-based human activity understanding, spanning action recognition, gait r

arXiv
2601.16694
Published
2026-01-23
Authors
Hongda Liu, Yunfan Liu, Min Ren, Lin Sui, Yunlong Wang, Zhenan Sun

AI summary

Affinity Contrastive Learning for Skeleton-based Human Activity Understanding

Overview

Research area: Computer Vision — skeleton-based human activity understanding, spanning action recognition, gait recognition, and skeleton-based person re-identification.

Technical level: Advanced. The paper assumes familiarity with Graph Convolutional Networks (GCNs), contrastive learning, InfoNCE-style objectives, and supervised metric learning.

Scope: This paper introduces ACLNet, a contrastive learning framework that groups semantically confusable activity classes into "Motion Families" and applies margin-based constraints on hard samples, achieving state-of-the-art accuracy across six skeleton benchmarks.

What This Paper Is About

Skeleton-based recognition systems struggle to separate activities that look physically similar in joint trajectories — such as reading versus writing, or waving versus making an OK sign — because skeleton data lacks objects and fine body-shape detail. Existing contrastive learning methods treat all classes as equally unrelated and all positive samples as equally reliable, ignoring both the structural commonalities between similar activities and the noise introduced by atypical examples within a class. This paper builds a contrastive framework that explicitly models which activity classes are semantically entangled and how strongly each hard sample should be pushed apart.

Key Contributions

  1. ACLNet, an affinity contrastive learning network for skeleton-based human activity understanding that operates at both the inter-class and intra-class levels to build a more discriminative feature space.

  2. Inter-class Affinity Contrastive Learning with a new affinity similarity metric that combines direct pairwise confusion statistics with indirect contextual overlap, used to cluster activities into higher-level "Motion Family" superclasses that receive globally targeted refinement.

  3. A family-aware dynamic temperature schedule that adaptively scales the penalty strength according to superclass size, plus an EMA-based class representation that stabilizes cluster centers across batches.

  4. An intra-class marginal contrastive strategy that controls the minimal margin between hard positives and their closest negatives, derived from an InfoNCE formulation with a LogSumExp smooth approximation.

Main Findings

  • Consistent state-of-the-art across six benchmarks. ACLNet reaches 93.6% (X-Sub) / 97.7% (X-View) on NTU RGB+D 60, 90.7% / 92.3% on NTU RGB+D 120, 52.1% Top-1 / 75.9% Top-5 on Kinetics-Skeleton, 97.3% / 98.7% on PKU-MMD, and 96.0% on FineGYM — beating prior methods such as HD-GCN, BlockGCN, DS-GCN, and VA-AR on every dataset.

  • Gains transfer to biometric tasks. On CASIA-B gait recognition, ACLNet achieves 88.5% average Rank-1 across NM/BG/CL conditions (vs. 85.2% for CycleGait). On CASIA-B person re-identification it reaches 82.8% Rank-1 in the N-N setting, improving on TranSG's 78.5%.

  • Each component contributes measurably. Ablation on NTU-60 X-Sub shows the baseline at 90.3%; adding inter-class loss gives 90.9%, adding the temperature schedule on top gives 91.1%, adding intra-class loss alone gives 90.8%, and the full model reaches 91.4% (+1.1 points) with only a modest parameter increase from 3.56M to 3.86M.

  • Contextual similarity matters beyond pairwise similarity. Incorporating indirect relationships raises accuracy from 90.5% (pairwise only) to 90.9%, confirming that overlapping neighbor sets carry real supervisory signal.

  • Notably stronger under occlusion. Under the NTU-60 X-Sub occlusion protocol, ACLNet scores 87.1% (left arm), 83.3% (right arm), 79.6% (two hands), 88.5% (two legs), and 80.5% (trunk) — substantially outperforming all compared methods, several of which collapse (CTR-GCN drops below 40% in several cases).

  • Motion Families are semantically meaningful. Qualitative examples for anchors "reading" and "wear jacket" show the learned superclasses highlight hand- and arm-related joints, matching the intuitive structural commonality between those actions.

Methodology in Plain English

The approach starts with a standard GCN backbone (FR-Head) that extracts a feature vector for each skeleton sequence, plus a projection into a 256-dimensional contrastive embedding space. Three training signals are combined: the usual cross-entropy classification loss, an inter-class contrastive loss, and an intra-class contrastive loss.

To figure out which activities are confusable, the authors track a confusion matrix — counting how often samples of class i get predicted as class j. For each class, they keep the top K = 10 most confused neighbors, forming a binary "who is similar to whom" table. They then define affinity similarity as the sum of two terms: half of the direct pairwise indicator, plus a term measuring how many similar classes two activities have in common (their neighborhood overlap). If two activities share many of the same confusable partners, they are considered indirectly related even if they rarely confuse each other directly.

Classes whose affinity exceeds a threshold are grouped into a Motion Family — a superclass of mutually confusing activities. Each class maintains an EMA-updated center vector (momentum 0.9) representing its typical embedding. The inter-class loss then asks a sample to be closer to its own class center than to centers of other classes in its Motion Family, using a temperature that depends on how large that family is: 0.1 for small families (sharpening fine-grained distinctions), 0.5 for medium, 1.0 for large families (widening the cluster margin).

The intra-class loss addresses the fact that some samples of the same class are genuinely atypical. The authors derive a margin constraint ε from an InfoNCE-style objective, effectively requiring every positive sample to be at least ε more similar to the anchor than any negative. Beginning affinity computation only at epoch 30 avoids building families from unreliable early predictions. Training runs for 150 epochs with SGD (momentum 0.9, weight decay 5e-4, cosine-scheduled learning rate starting at 0.1, batch size 64), with both contrastive losses weighted at 0.1.

Why This Matters

Impact on research. The paper reframes a subtle but important issue in supervised contrastive learning: not all negatives are equally hard, not all positives are equally trustworthy, and the structure of class relationships is itself informative supervision. The Motion Family idea is a lightweight, self-taught alternative to hand-designed class hierarchies and is conceptually portable to many domains beyond skeleton data.

Real-world applications.

  • Sports and fitness coaching: FineGYM results show the method can distinguish subtle sub-actions within gymnastics routines, useful for automated form analysis and scoring support.
  • Clinical rehabilitation monitoring: Tracking how patients perform prescribed exercises, where similar movements (raising an arm vs. reaching) must be separated and cameras may be partly occluded.
  • Surveillance and security: Robustness under occlusion and cross-view settings makes it viable where objects or other people block the camera.
  • Behavioral biometrics: Gait recognition and person re-identification results directly support identification at a distance, where faces are unavailable.

Industry relevance. Skeleton pipelines are far cheaper than video-based models and are privacy-preserving since they discard appearance. A modest parameter increase (3.56M to 3.86M) for consistent accuracy gains is an attractive trade for edge and embedded deployment. However, the authors note that computational complexity scales with batch size and the number of classes, which matters for deployments with very large label spaces.

Future Directions

  • Scaling to large label spaces. Complexity grows with the number of classes, so an open question is how Motion Family construction behaves on datasets with thousands of classes or long-tail distributions.

  • Applying affinity modeling to self-supervised and unsupervised regimes. The paper focuses on fully supervised training; extending affinity relationships to unlabeled skeleton data is a natural next step.

  • Multimodal extension. Combining skeleton affinities with RGB, depth, or IMU signals could help in cases where skeleton data alone is fundamentally ambiguous, such as reading versus writing.

  • Online and streaming adaptation. The Motion Family depends on accumulated confusion statistics from the training set; how to update families incrementally as new activities appear, or under domain shift, remains open.

Target Audience

This paper is most valuable to researchers and graduate students working on skeleton-based action recognition, contrastive representation learning, or behavioral biometrics, particularly those building on GCN backbones and seeking to improve fine-grained discrimination. Practitioners deploying pose-based recognition systems in occlusion-heavy or privacy-sensitive environments will also find the robustness results and lightweight parameter overhead directly relevant. Readers without a background in metric learning or graph networks will need to consult the cited foundational work (ST-GCN, InfoNCE, FR-Head) first.

Authors’ abstract

In skeleton-based human activity understanding, existing methods often adopt the contrastive learning paradigm to construct a discriminative feature space. However, many of these approaches fail to exploit the structural inter-class similarities and overlook the impact of anomalous positive samples. In this study, we introduce ACLNet, an Affinity Contrastive Learning Network that explores the intricate clustering relationships among human activity classes to improve feature discrimination. Specifically, we propose an affinity metric to refine similarity measurements, thereby forming activity superclasses that provide more informative contrastive signals. A dynamic temperature schedule is also introduced to adaptively adjust the penalty strength for various superclasses. In addition, we employ a margin-based contrastive strategy to improve the separation of hard positive and negative samples within classes. Extensive experiments on NTU RGB+D 60, NTU RGB+D 120, Kinetics-Skeleton, PKU-MMD, FineGYM, and CASIA-B demonstrate the superiority of our method in skeleton-based action recognition, gait recognition, and person re-identification. The source code is available at https://github.com/firework8/ACLNet.

Read the original paper