Introduction
The field of computer vision has undergone a paradigm shift. For nearly a decade, Convolutional Neural Networks (CNNs) served as the foundational architecture for visual tasks. However, CNNs are inherently limited by their local receptive fields, requiring deep stacking to capture global context. The emergence of the Transformer architecture, originally a staple of Natural Language Processing (NLP), has introduced a "global-thinking" alternative. By utilizing self-attention mechanisms, Transformers allow for simultaneous interaction across all parts of an input, effectively addressing the long-range dependency problem in visual data.
Methodology and Attention Taxonomy
The transition from 1D sequences in NLP to 2D/3D visual data requires a nuanced approach to attention. This review categorizes visual attention into four functional domains, providing a framework for understanding how models prioritize information.
- Channel Attention (What): Determines which feature maps are most relevant.
- Spatial Attention (Where): Identifies critical regions within a single frame.
- Temporal Attention (When): Captures dynamics across video frames.
- Branch Attention (Which): Manages the flow of information across different network paths.
Beyond these functional domains, the core architecture relies on Multi-Head Attention (MHA), Feed-Forward Networks (FFN), and Position Encoding (PE). While early models like the Vision Transformer (ViT) utilized "pure" Transformer blocks, modern state-of-the-art models often adopt hierarchical structures (e.g., Swin Transformer) to manage the computational complexity of high-resolution imagery.
Task Taxonomy and Benchmarks
Transformers have been successfully adapted across a vast spectrum of visual tasks, from fundamental classification to complex video tracking. The paper aggregates results from industry-standard benchmarks including ImageNet-1K/21K, COCO 2017, and Kinetics-400/600.
Extensive comparison tables within the review demonstrate the dominance of Transformer-based models:
- Image Classification: Models like Swin-L have reached 87.3% top-1 accuracy on ImageNet-1K.
- Video Understanding: MViT-L achieves 87.9% accuracy on Kinetics-600, surpassing traditional 3D CNNs.
- Medical Imaging: Specialized architectures like nnFormer demonstrate high precision, achieving an 87.4% Dice Similarity Coefficient on the Synapse multi-organ dataset.
Key Insights: Inductive Bias and Data
A critical distinction between CNNs and Transformers lies in "inductive bias." CNNs assume local pixel correlation, which aids training on smaller datasets. Transformers possess less inherent bias, making them more flexible but also more "data-hungry." Consequently, Transformers typically require massive pre-training (e.g., ImageNet-21K or JFT-300M) to realize their full potential, at which point they often establish a higher performance ceiling than their convolutional counterparts.
Future Challenges
Despite their dominance, several critical issues remain for the next generation of research:
- Computational Efficiency: The $O(n^2)$ complexity of self-attention remains a bottleneck for high-resolution processing.
- Local Feature Extraction: Improving the capture of fine-grained details that CNNs handle naturally.
- Position Encoding: Developing more sophisticated methods for spatial awareness beyond current primitive encodings.
- Data Hunger: Reducing the reliance on massive datasets to make high-performance Transformers accessible to broader research communities.
- Vanishing Gradients: Addressing gradient flow issues in deeper models through better normalization techniques.
Summary updated