Hierarchical Compositional Representations for Few-shot Action Recognition

Changzhen Li, Jie Zhang, Shuzhe Wu, Xin Jin, Shiguang Shan

TL;DR

Hierarchical Compositional Representations (HCR) is a novel framework for few-shot action recognition that tackles data scarcity by breaking complex video actions down into temporal sub-actions and fine-grained spatial parts. By leveraging the Earth Mover's Distance to match these components flexibly, HCR successfully transfers action knowledge from common base classes to rare novel classes, achieving state-of-the-art performance even on time-independent or non-sequential actions.

What Problem Does This Paper Address?

Deep learning has revolutionized video action recognition, but standard models are data-hungry, requiring massive amounts of manually annotated video frames. Few-Shot Action Recognition (FSAR) attempts to alleviate this by training models to recognize entirely new action classes from just a few examples.

The core bottleneck in FSAR is temporal modeling. Existing methods typically either pool video frames globally (which destroys crucial temporal ordering) or enforce strict frame-by-frame alignment. The latter approach fails heavily on "time-independent" actions. For example, if Person A eats an egg and then drinks milk, while Person B drinks milk and then eats an egg, both are performing the action "eating breakfast." However, strict alignment algorithms will penalize the sequence mismatch and treat them as completely different behaviors. The authors look to bridge this gap by capturing fine-grained, transferable patterns without being rigidly bound to an exact global sequence.

Methods

The proposed HCR framework introduces a two-level hierarchical decomposition coupled with an optimal transport metric to compare videos:

  1. Temporal Decomposition (Sub-actions): Instead of splitting videos into arbitrary, equal-length clips, HCR uses an unsupervised hierarchical clustering algorithm. This groups continuous, semantically similar frames into flexible "sub-actions" of varying lengths, ensuring that continuous semantics are preserved together.
  2. Spatial Decomposition (SAS-actions): Within each sub-action, a custom Parts Attention Module (PAM) decomposes the representation into Spatially Attentional Sub-actions (SAS-actions). These are split into explicit SAS-actions (constrained by human pose priors from OpenPose to focus on body parts like arms or legs) and implicit SAS-actions (which capture contextual cues like trees, roads, or curtains).
  3. Earth Mover's Distance (EMD) Matching: To compare a query video to a support video, HCR models the sub-actions as supply/demand nodes and applies EMD to find the optimal matching flow. This allows the model to ignore the global sequential order between different sub-actions while strictly preserving the temporal sequence within each individual sub-action.
Fig. 2: The pipeline. The whole video is first clustered into flexible sub-actions. Each sub-action extracts the corresponding spatio-temporal representations by Feature Encoder. In this process, we regard each channel’s output of the Parts Attention Module (PAM) as a SAS-action, and these SAS-actions are further divided into explicit SAS-actions and implicit SAS-actions. The former pays attention to pre-defined human body parts by parts prior constraint, while the latter pays attention to other action-relevant cues like context. Finally, the EMD distance is adopted to measure the distance of sub-action representation sequences between support and query videos.

Datasets

The authors evaluated HCR on three widely used action recognition benchmarks:

  • HMDB51: Contains around 7,000 video clips across 51 classes, with a strong emphasis on pose-related actions.
  • UCF101: Comprises over 13,000 clips across 101 classes, featuring realistic YouTube videos with camera motion and cluttered backgrounds.
  • Kinetics: A massive dataset (~240k videos). The authors adopted the standard Kinetics-CMN protocol split (64 base classes for training, 12 for validation, and 24 novel classes for testing).

Key Insights and Ideas

  • Compositionality Bridges the Category Gap: While a base action (like "diving") and a novel action (like "floor exercise") look entirely different globally, they share fine-grained components such as a "stretched salto" or basic arm/leg movements. Decomposing actions allows the model to transfer this atomic knowledge effectively.
  • Flexible Clustering Beats Uniform Clipping: Traditional uniform video clipping frequently cuts off continuous semantics. Unsupervised clustering ensures that similar frames stay together, maintaining semantic integrity within a sub-action.
  • Relaxed Alignment via EMD: By treating sub-actions as nodes in an optimal transport problem, EMD naturally handles variations in action execution order, resolving the pitfalls of strict dynamic time warping algorithms.
Fig. 1: Although there exist differences between base classes and novel classes, they can share basic patterns in common, e.g., sub-actions and SAS-actions.

Key Results

HCR achieved state-of-the-art (SOTA) results across all three benchmarks under standard 5-way 1-shot and 5-shot settings:

  • HMDB51: Achieved 62.5% (1-shot) using an ImageNet pre-trained ResNet-50 backbone, outperforming prior methods like TA2N and L2A. Upgrading the backbone to an R(2+1)D network pre-trained on the large-scale IG-65M dataset pushed 1-shot accuracy to 67.5%.
  • UCF101: Reached 82.4% (1-shot, ResNet-50) and 88.9% (1-shot, R(2+1)D).
  • Kinetics: Achieved 75.7% (1-shot) with the R(2+1)D backbone, outperforming the previous SOTA method, MTFAN (74.6%).

The performance leap was particularly pronounced on HMDB51, validating the benefit of incorporating explicit pose priors for pose-heavy action datasets.

Limitations and Future Work

  • Dependence on Pose Estimators: The explicit spatial attention relies heavily on the quality of the pose prior (OpenPose). In videos with distant views or severe occlusions (common in parts of UCF101), obtaining accurate keypoint information is challenging, which can limit the effectiveness of the explicit SAS-actions.
  • Sub-optimal 5-shot Scaling: The authors noted only a slight accuracy improvement in the 5-shot setting compared to the 1-shot setting. This occurred because the 5-shot evaluation directly utilized models trained in the 1-shot setting. Developing a dedicated multi-shot meta-training strategy remains an open direction for future improvement.

Summary updated

BibTeX
@article{li2024hierarchical,
  author = {Changzhen Li and Jie Zhang and Shuzhe Wu and Xin Jin and Shiguang Shan},
  title = {{Hierarchical Compositional Representations for Few-shot Action Recognition}},
  journal = {Comput. Vis. Image Underst.},
  year = {2024},
  doi = {10.1016/j.cviu.2023.103911},
}
Figure