Adaptive Perception Transformer for Temporal Action Localization

Yizheng Ouyang, Tianjin Zhang, Weibo Gu, Hongfa Wang, Liming Wang, Xiaojie GuoarXiv 2022

Abstract

Temporal action localization aims to predict the boundary and category of each action instance in untrimmed long videos. Most previous methods based on anchors or proposals neglect the global-local context interaction in entire video sequences. Besides, their multi-stage designs cannot generate action boundaries and categories straightforwardly. To address the above issues, this paper proposes an end-to-end model, called Adaptive Perception transformer (AdaPerFormer). Specifically, AdaPerFormer explores a dual-branch attention mechanism. One branch takes care of the global perception attention, which can model entire video sequences and aggregate global relevant contexts. The other branch concentrates on the local convolutional shift to aggregate intra-frame and inter-frame information through a bidirectional shift operation. The end-to-end nature produces the boundaries and categories of video actions without extra steps. Extensive experiments together with ablation studies reveal the effectiveness of our design. Our method obtains competitive performance on the THUMOS14 and ActivityNet-1.3 datasets.

Introduction

Temporal Action Localization (TAL) is a critical task in video understanding, requiring models to identify the start and end times of actions within long, untrimmed video streams while correctly classifying the activity. This task is analogous to automated video editing, where the AI must pinpoint specific events—like a golf swing or a weightlifting lift—amidst minutes of irrelevant footage.

Traditional TAL approaches typically rely on anchor-based or proposal-based frameworks. Anchor-based methods use predefined time windows, while proposal-based methods generate candidate segments for subsequent classification. However, both often struggle with actions of varying durations and rely on rigid, hand-crafted thresholds. While Transformers have shown promise in this domain, standard self-attention mechanisms suffer from high computational complexity ($O(n^2)$) and can fail to capture the local temporal continuity essential for precise boundary detection.

AdaPerFormer Architecture

To overcome these limitations, the Adaptive Perception Transformer (AdaPerFormer) introduces an end-to-end framework that balances global context with local precision. The architecture consists of a feature extractor, a convolution projection layer, and a series of encoder and decoder blocks.

The overall architecture of AdaPerFormer, featuring the Temporal-Aware Attention (TAA) module within the encoder and decoder stages.

The core innovation lies in the Temporal-Aware Attention (TAA) module, which replaces standard self-attention with a dual-branch mechanism: Global Perception Attention (GPA) and Local Convolutional Shift (LCS).

Global Perception Attention (GPA)

GPA utilizes a window-based attention strategy to capture long-range dependencies across the entire video. Instead of a global dense comparison, it calculates attention within strategic windows, reducing complexity to $O(n \times 3w)$ (where $w$ is the window size). This allows the model to maintain a "big picture" view of the video sequence efficiently.

Local Convolutional Shift (LCS)

Complementing the global view, the LCS branch focuses on local temporal continuity. It employs a bidirectional shift operation across temporal and channel dimensions. This lightweight operation functions similarly to a 1D convolution, aggregating information from adjacent frames to refine ambiguous boundaries and ensure action segments are predicted as continuous units rather than fragmented parts.

The outputs of these two branches are adaptively fused using a learnable weighting parameter $\alpha$, allowing the model to dynamically prioritize global or local context as needed for different action types.

Experimental Results

The authors evaluated AdaPerFormer on two primary benchmarks: THUMOS14 and ActivityNet-1.3. THUMOS14 is characterized by many short action instances, testing high-precision localization, while ActivityNet-1.3 provides a large-scale challenge with diverse categories.

Qualitative comparison of AdaPerFormer (Ours) against Ground Truth (GT) and RTD-Net on the THUMOS14 dataset.

As shown in the qualitative results, AdaPerFormer demonstrates superior boundary alignment compared to previous state-of-the-art models like RTD-Net. In the "BaseballPitch" example, AdaPerFormer accurately captures the short duration of the pitch, whereas RTD-Net tends to over-extend the boundaries. In the "CleanAndJerk" example, AdaPerFormer successfully localizes a single long-duration action that RTD-Net incorrectly fragments into two separate instances.

Quantitative Performance

  • THUMOS14: AdaPerFormer achieved an average mAP of 59.3% (at tIoU thresholds 0.3:0.7), significantly outperforming RTD-Net (49.0%) and TadTR (56.7%).
  • ActivityNet-1.3: The model reached an average mAP of 35.1%, demonstrating its scalability to large, diverse datasets.
  • Ablation Studies: Experiments confirmed that both GPA and LCS are vital; removing either branch resulted in a measurable drop in localization accuracy, validating the dual-branch design.

Conclusion

AdaPerFormer presents a robust, end-to-end solution for Temporal Action Localization. By integrating global window-based attention with local convolutional shifts, it effectively bridges the gap between broad context and fine-grained boundary detection. While the model currently relies on pre-trained feature backbones like I3D, its success on major benchmarks suggests that dual-branch temporal attention is a powerful paradigm for video understanding. Future work may explore truly end-to-end training from raw pixels and the integration of self-supervised pre-training to reduce reliance on dense human annotations.

Summary updated

BibTeX
@misc{ouyang2022adaptive,
  author = {Yizheng Ouyang and Tianjin Zhang and Weibo Gu and Hongfa Wang and Liming Wang and Xiaojie Guo},
  title = {{Adaptive Perception Transformer for Temporal Action Localization}},
  year = {2022},
  eprint = {2208.11908},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.11908},
}
Figure