[Paper Review] Skip-Attention: Improving Vision Transformers by Paying Less Attention
Skip-Attention (SkipAt) improves Vision Transformers by reusing self-attention computations from earlier layers to skip expensive attention calculations in deeper layers. By introducing a lightweight parametric function—inspired by depth-wise convolutions—it achieves higher throughput and improved accuracy over baseline ViTs across image classification, segmentation, denoising, and video tasks, with up to 40% speedup on ADE20K and 26% faster self-supervised pretraining.
This work aims to improve the efficiency of vision transformers (ViT). While ViTs use computationally expensive self-attention operations in every layer, we identify that these operations are highly correlated across layers -- a key redundancy that causes unnecessary computations. Based on this observation, we propose SkipAt, a method to reuse self-attention computation from preceding layers to approximate attention at one or more subsequent layers. To ensure that reusing self-attention blocks across layers does not degrade the performance, we introduce a simple parametric function, which outperforms the baseline transformer's performance while running computationally faster. We show the effectiveness of our method in image classification and self-supervised learning on ImageNet-1K, semantic segmentation on ADE20K, image denoising on SIDD, and video denoising on DAVIS. We achieve improved throughput at the same-or-higher accuracy levels in all these tasks.
Motivation & Objective
- Address the high computational cost of self-attention in Vision Transformers (ViTs), which scales quadratically with sequence length.
- Identify that multi-head self-attention (MSA) outputs across layers are highly correlated, especially for CLS tokens, indicating redundancy.
- Develop a plug-in module that replaces costly MSA computations in deeper layers by reusing representations from earlier layers.
- Design a lightweight parametric function that preserves performance while improving efficiency, enabling faster inference and training.
- Demonstrate generalization across diverse vision tasks, including image classification, semantic segmentation, image and video denoising, and self-supervised learning.
Proposed method
- Propose SkipAt, a plug-in module that replaces MSA blocks in deeper layers by reusing attention features from earlier layers (e.g., layers 3–8).
- Introduce a learnable parametric function Φ that transforms the reused features to adapt them to the target layer’s representation space.
- Use depth-wise convolution (DwC) with kernel size 5×5 and channel expansion ratio 2 as the default Φ function, balancing expressivity and efficiency.
- Apply the skip mechanism to both classification and dense prediction tasks, including image-level and pixel-level outputs.
- Train the model end-to-end with standard objectives, using the same data and training protocols as baseline ViTs.
- Enable the method to be applied to any ViT architecture, including small, base, and large variants, across diverse datasets and tasks.
![Figure 2 : Attention correlation . Mean of the attention heads from the CLS token of a pretrained ViT-T/16 at different layers from the validation set of ImageNet-1K. Numbers below each attention map indicates the cosine similarity of $A_{l}^{\texttt{[CLS]}}$ with $A_{l-1}^{\texttt{[CLS]}}$ .](https://ar5iv.labs.arxiv.org/html/2301.02240/assets/x2.png)
Experimental results
Research questions
- RQ1To what extent can self-attention computations in deeper ViT layers be approximated by reusing features from earlier layers without performance degradation?
- RQ2Can a simple parametric function effectively adapt reused attention features to improve performance over direct reuse or baseline ViT?
- RQ3How does SkipAt affect inference speed and FLOPs across different vision tasks, including dense prediction and video understanding?
- RQ4Does SkipAt maintain or improve performance in self-supervised pretraining, and can it reduce pretraining time without accuracy loss?
- RQ5What are the optimal configurations of the parametric function (kernel size, channel expansion) for balancing accuracy and throughput?
Key findings
- SkipAt achieves a 40% speedup in inference on the ADE20K semantic segmentation benchmark while improving top-1 accuracy by 0.6% over the baseline ViT-T/16.
- On ImageNet-1K, SkipAt achieves 67.7% top-1 accuracy with 6.9K images/sec throughput (6.9×10³ img/sec), outperforming the baseline ViT by 1.9% in accuracy and 19% in throughput.
- In video denoising on DAVIS, SkipAt matches the PSNR of SOTA methods (35.16) with 17% fewer FLOPs (77.1 GFLOPs vs. 93.2 for UniFormer).
- SkipAt reduces self-supervised pretraining time by 26% on ImageNet-1K with no drop in downstream accuracy, demonstrating efficiency gains in representation learning.
- The optimal SkipAt configuration uses a 5×5 depth-wise convolution with channel expansion ratio 2, achieving 67.7% top-1 accuracy and 6.9K img/sec throughput on ImageNet-1K.
- Ablations show that using an identity function for feature reuse drops accuracy by 4.7%, while SkipAt’s parametric function consistently outperforms all baselines in accuracy and efficiency.
![Figure 3 : CKA analysis of $A^{[\texttt{CLS}]}$ and $Z^{\text{MSA}}$ across different layers of pretrained ViT-T/16 on the validation set of Imagenet-1K. Vanilla ViT-T/16 has high correlation across both attention maps (layer 3 to 10) and $Z^{\text{MSA}}$ (layer 2 to 8)](https://ar5iv.labs.arxiv.org/html/2301.02240/assets/x3.png)
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.