[Paper Review] Two-Stream Transformer Architecture for Long Video Understanding
This paper proposes STAN, a two-stream transformer architecture that combines spatial image features and temporal context features from pre-trained CNNs to enable efficient, data- and memory-efficient long video understanding. By leveraging convolutional inductive bias in a two-stream transformer setup, STAN classifies videos up to two minutes long on a single GPU and achieves SOTA performance on long-form video tasks.
Pure vision transformer architectures are highly effective for short video classification and action recognition tasks. However, due to the quadratic complexity of self attention and lack of inductive bias, transformers are resource intensive and suffer from data inefficiencies. Long form video understanding tasks amplify data and memory efficiency problems in transformers making current approaches unfeasible to implement on data or memory restricted domains. This paper introduces an efficient Spatio-Temporal Attention Network (STAN) which uses a two-stream transformer architecture to model dependencies between static image features and temporal contextual features. Our proposed approach can classify videos up to two minutes in length on a single GPU, is data efficient, and achieves SOTA performance on several long video understanding tasks.
Motivation & Objective
- Address the data and memory inefficiency of pure vision transformers in long video understanding (LVU) tasks.
- Overcome the quadratic complexity of self-attention and lack of inductive bias in standard transformers for long videos.
- Improve data efficiency by incorporating inductive bias from convolutional neural networks (CNNs) into transformer architectures.
- Enable end-to-end training and inference of long video classification models on resource-constrained hardware (e.g., single GPU).
- Achieve state-of-the-art performance on long-form video understanding benchmarks while maintaining computational feasibility.
Proposed method
- Use a two-stream architecture: one stream processes spatial image features from individual frames via a pre-trained 2D CNN, and the other processes temporal context features using a 1D temporal encoder.
- Extract fixed-size tokens from both streams: spatial tokens from image-level features and temporal tokens from sequential frame representations.
- Feed the combined spatial and temporal tokens into a shared transformer encoder with a learnable classification token to model long-range dependencies.
- Apply positional embeddings to maintain spatial and temporal order information in the transformer input.
- Train the entire network end-to-end with cross-entropy loss for video classification, using standard optimization and data augmentation.
- Use knowledge distillation and ablation studies to validate the effectiveness of the two-stream design and feature fusion strategy.
Experimental results
Research questions
- RQ1Can a two-stream transformer architecture with CNN-based feature extraction improve data and memory efficiency in long video understanding?
- RQ2How does incorporating inductive bias from CNNs affect the performance and sample efficiency of vision transformers on long video tasks?
- RQ3To what extent can a transformer-based model classify videos up to two minutes in length using only a single GPU?
- RQ4Does modeling spatial and temporal features separately before fusion lead to better performance than joint 3D tokenization in long video classification?
- RQ5How does the proposed method compare to SOTA approaches in terms of accuracy, data efficiency, and computational footprint on long video benchmarks?
Key findings
- STAN achieves SOTA performance on the MMX-Trailer-20 dataset, with a weighted F1 score of 0.65 and mAP of 0.64, outperforming all baselines including ResNet, I3D, and SqueezeNet.
- On the thriller genre, STAN improves accuracy by +58% compared to the next best method, demonstrating strong long-term temporal reasoning capabilities.
- The model achieves 0.7506 mAP on the full dataset with 6047 samples using STAN-Large, significantly outperforming the distilled model (0.6005 mAP) and ablation variants.
- With only 2000 training samples, STAN-Small achieves 0.6401 mAP, showing strong data efficiency and generalization under low-data regimes.
- Class activation maps confirm that the model learns meaningful spatial and temporal attention, focusing on relevant visual cues such as faces in family videos and expressive faces in horror clips.
- The ablation study shows that the temporal stream with backpropagation yields the highest mAP (0.6221), indicating that temporal modeling is critical for performance, while the spatial stream without backpropagation performs poorly (0.4024), highlighting the importance of joint optimization.
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.