Temporal Relation based Attentive Prototype Network for Few-shot Action Recognition

Guangge Wang, Haihui Ye, Xiao Wang, Weirong Ye, Hanzi WangACML 2021

Abstract

Few-shot action recognition aims to identify novel action classes using only a few labeled examples. Existing methods often struggle with background noise, varying temporal scales, and the limitations of static class prototypes. This paper introduces the Temporal Relation based Attentive Prototype Network (TRAPN), which incorporates a motion-enhancement module, a multi-scale temporal relation learner, and a query-specific attentive prototype metric. TRAPN achieves state-of-the-art performance on Kinetics, UCF101, and HMDB51 benchmarks.

Introduction

While deep learning models excel at action recognition with abundant data, they often fail in "few-shot" scenarios where only one or a few examples are available. Humans can generalize from a single observation, but machines face three primary hurdles: overwhelming background noise, complex temporal structures at varying speeds, and the "averaging problem" where class prototypes are diluted by unrepresentative samples. TRAPN addresses these by focusing on motion as the primary signal and employing flexible, query-dependent relational reasoning.

Methodology

The TRAPN architecture is designed to address these challenges through three integrated components: Spatio-temporal Motion Enhancement (STME), a Temporal Relation (TR) module, and an Attentive Prototype Metric (APM).

The overall architecture of the TRAPN framework, showing the progression from input videos to final classification via embedding, temporal relation, and attentive prototype modules.

Spatio-temporal Motion Enhancement (STME)

To distinguish action from background, the STME module acts as a spotlight. It calculates content displacement between successive frames to identify where motion is occurring. By suppressing static background features and amplifying motion-related regions, the model ensures that the wallpaper or static environment does not confuse the classification of the action itself. This module utilizes a non-local architecture to capture long-range spatial dependencies and enhance the discriminative power of the frame-level features.

Temporal Relation (TR) Module

Actions occur at different temporal scales—some are instantaneous, while others are rhythmic and prolonged. The TR module samples frames at multiple scales (e.g., pairs, triplets, and n-tuples) to learn comprehensive temporal descriptors. As shown in the figure below, feature sequences are processed through relational functions ($g_\phi$) and aggregated to form a robust sample feature. This multi-scale approach allows the model to be "pace-invariant," capturing the essence of an action regardless of its speed.

The Temporal Relation (TR) module processes feature sequences into multi-scale descriptors (2-frame, 3-frame, n-frame) to form a robust sample feature.

Attentive Prototype Metric (APM)

Standard few-shot models typically use a simple mean of support samples to create a class prototype. TRAPN instead employs a dynamic, query-specific prototype. By weighting support videos based on their similarity to the query video, the model ensures that the most relevant examples drive the classification decision. This avoids the "average problem" where blurry or unrepresentative samples might otherwise degrade the prototype's quality relative to a specific query.

Experiments and Results

The researchers evaluated TRAPN on three major datasets: Kinetics-100, UCF101, and HMDB51, adapted for the few-shot setting.

Performance Benchmarks

TRAPN established new state-of-the-art (SOTA) results across all tested datasets:

  • Kinetics: 75.1% accuracy in the 1-shot setting, representing a significant 8.7% improvement over the strong "BaseNet" baseline.
  • UCF101: 86.6% accuracy (1-shot).
  • HMDB51: 61.3% accuracy (1-shot).

Notably, TRAPN achieved these results using only 8 frames per video, demonstrating superior efficiency compared to models requiring 16 or 20 frames to reach lower accuracy levels.

Conclusion

The TRAPN framework demonstrates that focusing on motion signals, multi-scale temporal relations, and flexible class prototypes significantly improves few-shot action recognition. By explicitly modeling how things move over time and prioritizing relevant training samples, TRAPN closes the gap between machine and human performance in recognizing novel actions. Future work may address the computational complexity of non-local architectures and explore more dense sampling strategies to capture micro-actions.

Summary updated

BibTeX
@inproceedings{wang2021temporal,
  author = {Guangge Wang and Haihui Ye and Xiao Wang and Weirong Ye and Hanzi Wang},
  title = {{Temporal Relation based Attentive Prototype Network for Few-shot Action Recognition}},
  booktitle = {ACML},
  year = {2021},
}
Figure