Focal and Global Spatial-Temporal Transformer for Skeleton-Based Action Recognition

Zhimin Gao, Peitao Wang, Pei Lv, Xiaoheng Jiang, Qidong Liu, Pichao Wang, Mingliang Xu, Wanqing Li

Abstract

Skeleton-based action recognition has traditionally been dominated by Graph Convolutional Networks (GCNs) due to their ability to model the physical structure of the human body. While Transformers offer powerful global modeling capabilities, their application to skeleton data is often hindered by spatial noise and a lack of temporal inductive bias. This paper presents the Focal and Global Spatial-Temporal Transformer (FG-STFormer), a novel architecture that dynamically focuses on informative "focal joints" and integrates local temporal convolutions into the self-attention mechanism. Experimental results on large-scale benchmarks demonstrate that FG-STFormer achieves state-of-the-art performance, outperforming both existing Transformer-based models and competitive GCN architectures.

Introduction

In skeleton-based action recognition, human movement is represented as a time-series of 3D joint coordinates. This modality is favored for its robustness to lighting changes and background clutter. Historically, Graph Convolutional Networks (GCNs) have been the preferred architecture because they explicitly model the skeletal graph. However, GCNs often struggle to capture long-range dependencies between joints that are not physically connected but are kinematically related during specific actions.

Transformers, which utilize self-attention to model global dependencies, present a promising alternative. Yet, vanilla Transformers face two primary challenges in this domain:

  1. Spatial Noise: Standard self-attention treats all joints equally. In many actions, only a subset of joints is relevant (e.g., the legs during walking). Attending to irrelevant joints introduces noise that can degrade performance.
  2. Temporal Local Blindness: Transformers lack the innate inductive bias required to understand local, short-term temporal structures. In action recognition, fine-grained local motions are often as critical as the global context.

To address these issues, the FG-STFormer introduces a dual-branch spatial-temporal approach designed to filter spatial noise and inject temporal inductive bias.

Methodology

The FG-STFormer architecture is composed of two primary components: the Focal and Global Spatial Transformer (FG-SFormer) and the Focal and Global Temporal Transformer (FG-TFormer).

FG-SFormer: Spatial Focus and Biomechanical Synergy

The FG-SFormer addresses spatial noise by moving away from all-to-all joint attention. In its deeper layers, the module employs a dual-branch strategy:

  • Focal Joint Selection: One branch dynamically scores joints based on their informativeness for the current frame. It selects the top $K$ "focal joints" and discards the rest, effectively pruning redundant information.
  • Joint-Part Cross-Attention: To maintain a global understanding of the body, the second branch groups joints into broader "body parts" (e.g., arms, legs, torso). A novel cross-attention mechanism allows the fine-grained focal joints to interact with these coarse body parts. This mimics biomechanical co-movements, where the movement of a specific joint is understood within the context of the larger body segment.

FG-TFormer: Enhancing Temporal Local Awareness

To overcome the lack of temporal inductive bias, the FG-TFormer integrates dilated temporal convolutions directly into the Multi-Head Self-Attention (MSA) mechanism. In a standard Transformer, the 'Value' ($V$) matrix is generated via a linear projection. In FG-TFormer, the authors replace this with a temporal convolution. This modification forces the feature representations to encode short-term local motion before they are fused with the global context provided by the attention map. This hybrid approach bridges the gap between the local feature extraction of CNNs and the global modeling of Transformers.

Experimental Results

The FG-STFormer was evaluated on three major benchmarks: NTU-RGB+D 60, NTU-RGB+D 120, and Northwestern-UCLA.

Performance on Large-Scale Benchmarks

The model demonstrated superior performance across all datasets, particularly outperforming previous Transformer-based SOTA models:

  • NTU-120: The model achieved 89.0% (Cross-Subject) and 90.6% (Cross-Setup), surpassing the previous best Transformer (DSTA) by 2.4% and 1.6%, respectively.
  • NW-UCLA: FG-STFormer reached 97.0% Top-1 accuracy, exceeding the performance of leading GCNs like CTR-GCN (96.5%).
  • NTU-60: The model reached 92.6% (Cross-Subject) and 96.7% (Cross-View).

Ablation Study: The Impact of Focal Joints

A key finding of the research was the "sweet spot" for spatial attention. In an ablation study using the 25-joint NTU dataset, the researchers found that selecting exactly 15 focal joints yielded the highest accuracy (89.5%). Interestingly, using all 25 joints caused the accuracy to drop to 89.1%. This confirms the hypothesis that forcing the model to attend to every joint, including stationary or irrelevant ones, introduces detrimental noise.

Discussion and Conclusion

The success of FG-STFormer highlights two critical insights for skeleton-based recognition. First, "less is more" in spatial attention; by filtering out redundant joints, the network can focus on the most discriminative movements. Second, the integration of convolutional biases into the Transformer architecture is essential for capturing the multi-scale temporal dynamics of human action.

While the model is highly effective, it does require careful tuning of the hyperparameter $K$ and involves computational complexity in long sequences, which the authors mitigated by reducing temporal resolution in deeper layers. Future research may focus on automating the selection of focal joints and extending this mechanism to multi-person interactions.

Summary updated

BibTeX
@inproceedings{gao2022focal,
  author = {Zhimin Gao and Peitao Wang and Pei Lv and Xiaoheng Jiang and Qidong Liu and Pichao Wang and Mingliang Xu and Wanqing Li},
  title = {{Focal and Global Spatial-Temporal Transformer for Skeleton-Based Action Recognition}},
  booktitle = {ACCV},
  year = {2022},
  url = {https://openreview.net/forum?id=0vPLvWdhKXo},
}
Figure