[Paper Review] DirecFormer: A Directed Attention in Transformer Approach to Robust Action Recognition
DirecFormer proposes a novel Transformer-based framework with Directed Attention mechanisms to improve robustness in action recognition by explicitly modeling the correct temporal order of video frames. By incorporating directional attention in both spatial and temporal dimensions and using a self-supervised guided loss, it achieves state-of-the-art accuracy on Kinetics-400 (82.75% top-1) with significantly lower inference cost than prior methods.
Human action recognition has recently become one of the popular research topics in the computer vision community. Various 3D-CNN based methods have been presented to tackle both the spatial and temporal dimensions in the task of video action recognition with competitive results. However, these methods have suffered some fundamental limitations such as lack of robustness and generalization, e.g., how does the temporal ordering of video frames affect the recognition results? This work presents a novel end-to-end Transformer-based Directed Attention (DirecFormer) framework for robust action recognition. The method takes a simple but novel perspective of Transformer-based approach to understand the right order of sequence actions. Therefore, the contributions of this work are three-fold. Firstly, we introduce the problem of ordered temporal learning issues to the action recognition problem. Secondly, a new Directed Attention mechanism is introduced to understand and provide attentions to human actions in the right order. Thirdly, we introduce the conditional dependency in action sequence modeling that includes orders and classes. The proposed approach consistently achieves the state-of-the-art (SOTA) results compared with the recent action recognition methods, on three standard large-scale benchmarks, i.e. Jester, Kinetics-400 and Something-Something-V2.
Motivation & Objective
- Address the lack of robustness in existing action recognition models when faced with shuffled or incorrectly ordered video frames.
- Investigate whether models can correct the temporal order of frames to improve recognition accuracy.
- Develop a method that explicitly models the correct sequence of actions using directional attention in both spatial and temporal dimensions.
- Improve generalization by introducing conditional dependencies between action class and frame ordering.
- Achieve state-of-the-art performance with reduced computational cost compared to prior 3D-CNN and Transformer-based methods.
Proposed method
- Proposes a Directed Attention mechanism that learns not only the magnitude but also the direction of attention between frames and tokens in both spatial and temporal dimensions.
- Introduces a directed temporal attention module that models the sequence of actions with directional correlations, represented by green (positive) and red (negative) arrows in attention maps.
- Employs a self-supervised guided loss to enhance the model's ability to learn correct frame ordering by encouraging attention to flow in the right temporal direction.
- Uses a Hamiltonian path-finding algorithm to correct the order of shuffled frames during inference, validating the model's ability to reconstruct the correct sequence.
- Applies a conditional dependency modeling strategy that jointly learns action classes and their correct temporal ordering.
- Trains an end-to-end Transformer-based model using ImageNet-21K pretraining, with inference using only 3 spatial crops and a single temporal clip, reducing computational cost.
Experimental results
Research questions
- RQ1Can action recognition models maintain high accuracy when video frames are shuffled out of their original temporal order?
- RQ2To what extent can a model correct the temporal order of incorrectly ordered video frames to improve recognition performance?
- RQ3Does incorporating directional attention in both spatial and temporal dimensions improve robustness and accuracy in action recognition?
- RQ4How does the proposed directed attention mechanism compare to standard softmax or cosine attention in terms of modeling temporal sequence dependencies?
- RQ5Can a self-supervised guided loss effectively improve the model's ability to learn the correct order of actions in a video sequence?
Key findings
- DirecFormer achieves state-of-the-art top-1 accuracy of 82.75% on Kinetics-400, outperforming TimeSFormer-L by approximately 2%.
- The model maintains competitive performance with only 3 views (1 clip × 3 crops), significantly reducing inference cost compared to prior methods that use 30 views.
- The use of C-C (cosine-cosine) attention in both temporal and spatial dimensions yields the highest performance, demonstrating the effectiveness of directional attention.
- Ablation studies on Jester show that the proposed directed attention mechanism and guided loss significantly improve recognition accuracy over standard attention mechanisms.
- Qualitative results confirm that the model can successfully reconstruct the correct frame order in a shuffled video of a parkour action using Hamiltonian path detection on the attention map.
- Despite having similar model size and GFLOPs to TimeSFormer, DirecFormer achieves better accuracy across all three benchmarks: Kinetics-400, Jester, and Something-Something-V2.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.