Attention-Based Temporal Weighted Convolutional Neural Network for Action Recognition

Jinliang Zang, Le Wang, Ziyi Liu, Qilin Zhang, Gang Hua, Nanning Zheng

Abstract

This paper introduces the Attention-based Temporal Weighted Convolutional Neural Network (ATW) to enhance human action recognition in videos. By implementing a learnable temporal weighting mechanism, the model identifies and prioritizes the most informative video segments, effectively addressing temporal redundancy and variable video lengths. The ATW framework achieves state-of-the-art results on the UCF-101 and HMDB-51 datasets, demonstrating the efficacy of "soft" attention in video understanding.

Introduction

While Convolutional Neural Networks (CNNs) have mastered static image classification, video adds a complex fourth dimension: time. Standard approaches often struggle with two main issues: temporal redundancy and variable video length. In many action sequences, only a fraction of the frames contain the discriminative information necessary for classification. Treating every frame as equally important introduces noise and computational inefficiency.

Previous solutions, such as the "two-stream" architecture, often relied on single randomly sampled frames or simple averaging across the entire video. This paper argues that not all snippets are created equal; a model requires a mechanism to identify and prioritize the most discriminative moments—the "peak" of the action—to truly understand the temporal dynamics.

Methodology

The authors propose the Attention-based Temporal Weighted CNN (ATW). The framework consists of three main components designed to capture diverse information and focus on relevant temporal segments:

  • Multi-Stream Input: To capture different types of information, the model uses three streams: Spatial (RGB) for object and scene appearance, Temporal (Optical Flow) for movement, and Warped Optical Flow to compensate for camera motion.
  • Snippet-Based Sampling: Instead of processing every frame, the video is divided into $N$ non-overlapping segments. One snippet is sampled from each segment to maintain long-range context.
  • The Attention Model: This is the core innovation. Instead of simple averaging, the model employs a Multi-Layer Perceptron (MLP) that learns to assign a specific weight ($w_i$) to each snippet based on its feature vector. This allows the network to automatically emphasize the most informative parts of the video.
The architecture of the Attention-based Temporal Weighted Network (ATW) showing the multi-stream input and the attention model.

Experimental Setup

The model was evaluated on two benchmark datasets: UCF-101, containing 13,320 clips across 101 categories, and HMDB-51, a more challenging dataset with 6,766 clips known for complex backgrounds and viewpoint variations.

Key insights from the training process include:

  • Benign Competition: By using a softmax function to normalize temporal weights, the authors create a competition between snippets. If one snippet is highly relevant, its weight increases, naturally suppressing irrelevant or noisy snippets.
  • Soft Attention: Unlike previous methods requiring manual pose labeling, ATW learns these weights automatically through standard backpropagation using only final action labels.
  • Optimal Segmentation: Experiments indicated that dividing a video into 4 to 6 segments provided the best balance between capturing context and avoiding over-complexity.

Results and Discussion

The ATW framework demonstrated significant performance gains over traditional consensus methods like max-pooling or simple averaging. On the UCF-101 dataset, the attention model achieved 94.6% accuracy, outperforming the standard two-stream baseline (91.6%) and the Temporal Segment Network (93.4%). On the more difficult HMDB-51 dataset, it reached 70.5% accuracy.

Comparison of different consensus functions across spatial and temporal streams, highlighting the superior performance of the attention model.

Visualizations of the attention weights confirmed that the model consistently assigned higher weights to the most "active" parts of the video, such as the moment a weightlifter completes a lift. This confirms that the learnable weights align with human intuition regarding action importance.

Conclusion

The Attention-based Temporal Weighted CNN provides a robust solution for video action recognition by intelligently filtering temporal redundancy. While the current study focuses on trimmed videos, future work will explore applying ATW to untrimmed, long-form footage and optimizing the computational cost of the multi-stream architecture.

Summary updated

BibTeX
@inproceedings{zang2018attention,
  author = {Jinliang Zang and Le Wang and Ziyi Liu and Qilin Zhang and Gang Hua and Nanning Zheng},
  title = {{Attention-Based Temporal Weighted Convolutional Neural Network for Action Recognition}},
  booktitle = {AIAI},
  year = {2018},
  doi = {10.1007/978-3-319-92007-8\_9},
}
Figure