STAR-Transformer: A Spatio-temporal Cross Attention Transformer for Human Action Recognition

Dasom Ahn, Sangwon Kim, Hyunsu Hong, Byoung Chul Ko

TL;DR

The STAR-Transformer is a novel cross-modal architecture for human action recognition that efficiently fuses video frames and skeleton sequences. By introducing specialized "zigzag" and "binary" attention mechanisms, it achieves state-of-the-art performance while significantly reducing the computational overhead typically associated with spatio-temporal transformers.

What Problem Does This Paper Address?

Human action recognition is a cornerstone of computer vision, yet it faces a persistent trade-off. Video-based approaches capture rich visual context but are easily confused by complex backgrounds and varying camera angles. Skeleton-based approaches are robust to these environmental "noises" but lose subtle visual cues and rely heavily on the accuracy of pose extractors.

While combining both modalities (cross-modal learning) yields the best results, doing so effectively is difficult. Previous methods often require separate, clunky sub-models for each modality. Furthermore, applying standard Vision Transformers (ViTs) to 3D video data is computationally expensive; the self-attention mechanism scales at $O(T^2S^2)$ relative to time ($T$) and space ($S$), making it a resource hog for long sequences.

Methods

The authors propose the Spatio-TemporAl cRoss (STAR)-Transformer, which treats video and skeleton data as a unified set of tokens.

1. Tokenization and Aggregation

The model first extracts features using a shared ResNet-MC18 backbone:

  • Global Grid (GG) Tokens: Extracted from the final layer to represent broad visual features.
  • Joint Map (JM) Tokens: Created by combining local feature maps from middle layers with joint heatmaps derived from skeleton data.

Unlike standard ViTs that use a single [CLS] token, the STAR-Transformer uses a multi-class token aggregation strategy. It concatenates specific class tokens for global features and joint features, allowing the model to learn distinct characteristics from both modalities simultaneously.

Figure 3. Multi-class token aggregation. (a) single class token generation of pure ViT and (b) proposed multi-token aggregation based on cross-modal learning.

2. Specialized Attention Mechanisms

To solve the computational bottleneck, the authors introduce two new attention modules that "decouple" the temporal dimension:

  • Zigzag Spatio-temporal Attention (ZAttn): Divides tokens into two groups in a zigzag pattern across time. This allows the model to focus on fine-grained, detailed changes in action.
  • Binary Spatio-temporal Attention (BAttn): Splits tokens into "front" and "rear" groups, helping the model learn large-scale changes between the beginning and end of an action.

Both ZAttn and BAttn reduce computational complexity by 75% compared to standard Full Attention (FAttn). The final architecture uses an encoder (FAttn + ZAttn) and a decoder (FAttn + BAttn) to capture action dynamics at multiple temporal scales.

Figure 2. Overall architecture of the proposed action recognition model. (a) global grid token, (b) joint heat map, (c) joint map token, (d) STAR-transformer module, and (e) encoder and decoder structure of STAR transformer. An encoder and a decoder have the same structure.

Datasets

The model was evaluated on three major benchmarks:

  • Penn-Action: A dataset of 15 action classes (e.g., baseball swings, pushups) across 2,326 video sequences.
  • NTU-RGB+D 60: A large-scale dataset with 60 action classes and nearly 57,000 samples.
  • NTU-RGB+D 120: An extension of the above, containing 120 classes and over 114,000 samples.

Key Insights and Ideas

  • Multi-Token Superiority: The transition from a single [CLS] token to multi-class tokens provided a 1.4% accuracy boost. This suggests that for cross-modal tasks, "bottlenecking" all information into one token loses valuable modality-specific nuances.
  • Temporal Decoupling Works: You don't need to attend to every frame at once to understand an action. By splitting the temporal sequence (zigzag or binary), the model captures different "rhythms" of movement while drastically lowering the hardware requirements.
  • Balanced Attention: Qualitative analysis via attention rollouts showed that standard transformers often over-focus on the final frames of a video. The STAR-Transformer's decoupled attention ensures the model weighs the entire sequence—beginning, middle, and end—more evenly.

Key Results

The STAR-Transformer achieved impressive results, often outperforming models that utilized extensive pre-training:

  • Penn-Action: Reached 98.7% accuracy, setting a new state-of-the-art.
  • NTU-RGB+D 60: Achieved 92.0% (Cross-Subject) and 96.5% (Cross-View) accuracy.
  • NTU-RGB+D 120: Achieved 90.3% (Cross-Subject) and 92.7% (Cross-Setup) accuracy.

Notably, the model outperformed several skeleton-only transformer models (like KA-AGTN) by up to 4.7%, proving the value of the integrated RGB-skeleton approach.

Limitations and Future Work

While the model is highly effective, the authors note a few areas for improvement:

  • Pose Dependency: Some experiments relied on annotated (ground truth) poses. The authors plan to evolve this into a fully end-to-end model that performs its own pose estimation.
  • Overfitting: Performance peaked at three transformer layers; adding more led to overfitting, especially on smaller datasets.
  • Data Efficiency: Future work will focus on making the model more robust when training data is scarce.

Summary updated

Abstract

In action recognition, although the combination of spatio-temporal videos and skeleton features can improve the recognition performance, a separate model and balancing feature representation for cross-modal data are required. To solve these problems, we propose Spatio-TemporAl cRoss (STAR)-transformer, which can effectively represent two cross-modal features as a recognizable vector. First, from the input video and skeleton sequence, video frames are output as global grid tokens and skeletons are output as joint map tokens, respectively. These tokens are then aggregated into multi-class tokens and input into STAR-transformer. The STAR-transformer encoder layer consists of a full self-attention (FAttn) module and a proposed zigzag spatio-temporal attention (ZAttn) module. Similarly, the continuous decoder consists of a FAttn module and a proposed binary spatio-temporal attention (BAttn) module. STAR-transformer learns an efficient multi-feature representation of the spatio-temporal features by properly arranging pairings of the FAttn, ZAttn, and BAttn modules. Experimental results on the Penn-Action, NTU RGB+D 60, and 120 datasets show that the proposed method achieves a promising improvement in performance in comparison to previous state-of-the-art methods.
BibTeX
@inproceedings{ahn2023star,
  author = {Dasom Ahn and Sangwon Kim and Hyunsu Hong and Byoung Chul Ko},
  title = {{STAR-Transformer: A Spatio-temporal Cross Attention Transformer for Human Action Recognition}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  doi = {10.1109/wacv56688.2023.00333},
}
Figure