[Paper Review] Demystifying Local Vision Transformer: Sparse Connectivity, Weight Sharing, and Dynamic Weight
This paper reinterprets Local Vision Transformer's local attention as a channel-wise locally-connected layer, analyzing it through sparse connectivity, weight sharing, and dynamic weight computation. It shows that models using depth-wise convolution and dynamic weight variants achieve performance on par with or slightly better than Swin Transformer across ImageNet, COCO, and ADE benchmarks, demonstrating that regularization and dynamic weights significantly boost network capacity.
Vision Transformer (ViT) attains state-of-the-art performance in visual recognition, and the variant, Local Vision Transformer, makes further improvements. The major component in Local Vision Transformer, local attention, performs the attention separately over small local windows. We rephrase local attention as a channel-wise locally-connected layer and analyze it from two network regularization manners, sparse connectivity and weight sharing, as well as weight computation. Sparse connectivity: there is no connection across channels, and each position is connected to the positions within a small local window. Weight sharing: the connection weights for one position are shared across channels or within each group of channels. Dynamic weight: the connection weights are dynamically predicted according to each image instance. We point out that local attention resembles depth-wise convolution and its dynamic version in sparse connectivity. The main difference lies in weight sharing - depth-wise convolution shares connection weights (kernel weights) across spatial positions. We empirically observe that the models based on depth-wise convolution and the dynamic variant with lower computation complexity perform on-par with or sometimes slightly better than Swin Transformer, an instance of Local Vision Transformer, for ImageNet classification, COCO object detection and ADE semantic segmentation. These observations suggest that Local Vision Transformer takes advantage of two regularization forms and dynamic weight to increase the network capacity.
Motivation & Objective
- To understand the inductive biases and regularization mechanisms underlying Local Vision Transformer's success.
- To analyze how sparse connectivity and weight sharing in local attention contribute to model capacity and generalization.
- To investigate the role of dynamic weight computation in improving performance without increasing computational complexity.
- To compare local attention with depth-wise convolution and evaluate their performance equivalence in vision tasks.
- To empirically validate that regularization and dynamic weights are key to the strong performance of Local Vision Transformers.
Proposed method
- Reformulate local attention as a channel-wise locally-connected layer to enable analysis through network regularization perspectives.
- Analyze local attention through the lens of sparse connectivity, where each position connects only to spatial neighbors within a local window and no cross-channel connections exist.
- Introduce weight sharing by sharing connection weights across channels or within channel groups, mimicking depth-wise convolution.
- Propose a dynamic weight mechanism where connection weights are predicted per image instance, enabling adaptive feature modeling.
- Implement models based on depth-wise convolution and dynamic weight variants as baselines for comparison with Swin Transformer.
- Evaluate models on ImageNet classification, COCO object detection, and ADE semantic segmentation to assess performance and efficiency.
Experimental results
Research questions
- RQ1How do sparse connectivity and weight sharing in local attention contribute to the representational capacity of Local Vision Transformers?
- RQ2To what extent does dynamic weight computation improve performance compared to fixed or shared weights in local attention?
- RQ3How do models based on depth-wise convolution and dynamic weight variants compare to Swin Transformer in terms of accuracy and efficiency?
- RQ4What is the relative contribution of regularization mechanisms (sparse connectivity and weight sharing) versus dynamic weights in achieving strong performance?
- RQ5Can a simpler architecture with similar inductive biases to local attention outperform or match Swin Transformer in vision benchmarks?
Key findings
- Models based on depth-wise convolution and dynamic weight variants achieve performance on par with Swin Transformer on ImageNet classification.
- The dynamic weight variant with lower computation complexity outperforms or matches Swin Transformer on COCO object detection and ADE semantic segmentation.
- Sparse connectivity and weight sharing in local attention are key regularization mechanisms that enhance model generalization and capacity.
- The dynamic weight mechanism enables adaptive attention weights per image instance, improving feature representation without increasing model complexity.
- Empirical results confirm that the combination of two regularization forms and dynamic weight computation is responsible for the strong performance of Local Vision Transformers.
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.