[Paper Review] A Close Look at Spatial Modeling: From Attention to Convolution
This paper proposes FCViT, a fully convolutional vision transformer that abstracts a query-irrelevant global context from self-attention and fuses it dynamically into convolutional layers, achieving state-of-the-art performance with fewer parameters. FCViT-S12 attains 80.9% top-1 accuracy on ImageNet-1K, outperforming ResT-Lite by 3.7% and surpassing ConvNeXt with reduced parameters.
Vision Transformers have shown great promise recently for many vision tasks due to the insightful architecture design and attention mechanism. By revisiting the self-attention responses in Transformers, we empirically observe two interesting issues. First, Vision Transformers present a queryirrelevant behavior at deep layers, where the attention maps exhibit nearly consistent contexts in global scope, regardless of the query patch position (also head-irrelevant). Second, the attention maps are intrinsically sparse, few tokens dominate the attention weights; introducing the knowledge from ConvNets would largely smooth the attention and enhance the performance. Motivated by above observations, we generalize self-attention formulation to abstract a queryirrelevant global context directly and further integrate the global context into convolutions. The resulting model, a Fully Convolutional Vision Transformer (i.e., FCViT), purely consists of convolutional layers and firmly inherits the merits of both attention mechanism and convolutions, including dynamic property, weight sharing, and short- and long-range feature modeling, etc. Experimental results demonstrate the effectiveness of FCViT. With less than 14M parameters, our FCViT-S12 outperforms related work ResT-Lite by 3.7% top1 accuracy on ImageNet-1K. When scaling FCViT to larger models, we still perform better than previous state-of-the-art ConvNeXt with even fewer parameters. FCViT-based models also demonstrate promising transferability to downstream tasks, like object detection, instance segmentation, and semantic segmentation. Codes and models are made available at: https://github.com/ma-xu/FCViT.
Motivation & Objective
- To investigate the limitations of self-attention in Vision Transformers, particularly sparse and query-irrelevant attention maps in deep layers.
- To address the inefficiency and redundancy in attention mechanisms by extracting a global context that captures long-range dependencies.
- To integrate this global context into convolutional layers to enhance local feature modeling while preserving dynamic, attention-like behavior.
- To develop a pure convolutional architecture that inherits the strengths of both Transformers and ConvNets, including weight sharing, dynamic modeling, and long-range feature learning.
- To demonstrate superior performance and transferability on image classification, object detection, instance segmentation, and semantic segmentation.
Proposed method
- The authors abstract a global context from self-attention by relaxing the query-dependent formulation, resulting in a query-irrelevant, shared context across all tokens.
- This global context is dynamically fused into local convolutional operations via learnable gating mechanisms, enabling adaptive integration of long-range and local features.
- The method introduces multi-group token-global similarity to preserve diversity among channel groups, preventing collapse into uniform attention patterns.
- The architecture is fully convolutional, using depthwise separable convolutions and a global context injection module that replaces attention heads.
- The model is trained with standard ImageNet-1K classification pretraining, followed by fine-tuning on downstream tasks using standard detection and segmentation frameworks.
- A competitive information bottleneck is applied to enhance representational capacity by filtering redundant features during global context learning.
Experimental results
Research questions
- RQ1Why do self-attention maps in deep Vision Transformer layers exhibit query-irrelevant and sparse behavior, undermining the intended dynamic, query-specific attention?
- RQ2Can a global context derived from self-attention be effectively abstracted and reused to improve local convolutional feature learning?
- RQ3How can the dynamic, long-range modeling of attention be preserved while replacing attention heads with convolutional layers?
- RQ4Can a fully convolutional architecture achieve state-of-the-art performance on vision benchmarks while using fewer parameters than existing SOTA models?
- RQ5Does the proposed fusion of global context with local convolutions improve transferability to downstream tasks like object detection and semantic segmentation?
Key findings
- FCViT-S12 achieves 80.9% top-1 accuracy on ImageNet-1K with only 14M parameters, outperforming ResT-Lite by 3.7% accuracy.
- Even when scaled to larger sizes, FCViT-B24 achieves 45.5% mIoU on ADE20K semantic segmentation with 25.3M parameters, surpassing Twins-PCPVT-S by 1.2% mIoU using fewer parameters.
- On MS COCO 2017 object detection, FCViT-Tiny achieves 5.0 mAP^box and 4.0 mAP^mask higher than PoolFormer-S12, despite having fewer parameters.
- The global context abstraction effectively reduces attention sparsity and eliminates query-irrelevance, as confirmed by visualization and statistical analysis on ImageNet-1K.
- FCViT demonstrates strong transferability, achieving state-of-the-art performance on both instance segmentation and semantic segmentation tasks with consistent gains over prior methods.
- The multi-group similarity mechanism prevents attention head collapse and maintains diversity in feature representation, enhancing model capacity.
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.