NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ScalableViT: Rethinking the Context-Oriented Generalization of Vision Transformer

Rui Yang, Hailong Ma, Jie Wu, Yansong Tang, Xuefeng Xiao, Min Zheng, Xiu Li

Introduction

Vision Transformers (ViTs) have significantly advanced computer vision by enabling global receptive fields. However, they often suffer from "rigidity"—fixed computational dimensions that limit generalization across diverse contexts. While models like the Swin Transformer mitigate computational costs using Window-based Self-Attention (WSA), they introduce "discontinuous" feature maps because local windows operate in isolation. ScalableViT addresses these challenges by introducing two novel attention mechanisms: Scalable Self-Attention (SSA) and Interactive Window-based Self-Attention (IWSA).

The ScalableViT Architecture

ScalableViT utilizes a hierarchical four-stage architecture, similar to traditional convolutional neural networks like ResNet. Each stage consists of alternating IW-MSA (Interactive Window-based Multi-head Self-Attention) and S-MSA (Scalable Multi-head Self-Attention) blocks. This design allows the model to capture features at multiple scales while maintaining computational efficiency.

The hierarchical architecture of ScalableViT, featuring four stages and the internal structure of IW-MSA and S-MSA blocks.

Scalable Self-Attention (SSA)

SSA introduces elasticity into the transformer block by unbinding the Query, Key, and Value matrices from the input dimensions. It employs two scaling factors:

  • Spatial Scaling ($r_n$): Aggregates redundant tokens with similar semantic information, reducing the number of tokens processed and slashing unnecessary multiplications.
  • Channel Scaling ($r_c$): Expands the channel dimension to capture more detailed "graphic" representations.

This flexibility allows the model to focus on critical features (spatial aggregation) while maintaining a rich descriptive capacity (channel expansion), making the internal representation truly "elastic."

Interactive Window-based Self-Attention (IWSA)

To overcome the isolation of standard window-based attention, IWSA incorporates a Local Interactive Module (LIM). The LIM acts as a "matchmaker" between adjacent windows by re-merging independent value tokens and using depth-wise convolution to aggregate spatial information across window boundaries. This enables global-like perception within a computationally efficient local framework, ensuring that windows "talk" to each other within a single layer.

Context-Oriented Generalization

A key advantage of ScalableViT is its ability to produce holistic representations of objects. Unlike standard WSA, which often captures fragmented, "choppy" views due to window isolation, ScalableViT's mechanisms ensure that feature maps are smooth and continuous.

Visualization comparing feature maps from WSA and ScalableViT (SSA). ScalableViT produces more complete and object-oriented activations.

By allowing adjacent local windows to share information and scaling internal representations dynamically, ScalableViT achieves a "matchmaker" effect that restores global dependency. As shown in the visualizations, the model produces much more complete activations on objects like birds or dogs compared to the fragmented outputs of previous models.

Performance and Results

ScalableViT demonstrates a superior accuracy-to-cost trade-off across multiple benchmarks:

  • ImageNet-1K Classification: ScalableViT-S achieves 83.1% Top-1 accuracy, outperforming Swin-T (81.3%) and Twins-SVT-S (81.7%) with comparable FLOPs.
  • Object Detection (COCO): Using the RetinaNet framework, ScalableViT-S reaches 45.2 AP, a significant improvement over Swin-T's 41.5 AP.
  • Semantic Segmentation (ADE20K): ScalableViT-S achieves 48.5 mIoU (UperNet), surpassing Swin-T's 44.5 mIoU by a wide margin.
  • Efficiency: In practical throughput tests on a 3090 GPU, ScalableViT-S processed 832.9 images per second, showing a better speed-accuracy trade-off than Swin-S (589.2 images/sec).

Conclusion

ScalableViT rethinks the design of Vision Transformers by prioritizing elasticity and inter-window interaction. By breaking the rigid constraints of vanilla attention and the isolation of windowed attention, it provides a scalable and generalized framework for computer vision. While scaling factors require careful tuning for larger models, the results across classification, detection, and segmentation tasks establish ScalableViT as a powerful and efficient new backbone for visual recognition.

Summary updated

BibTeX
@inproceedings{yang2022scalablevit,
  author = {Rui Yang and Hailong Ma and Jie Wu and Yansong Tang and Xuefeng Xiao and Min Zheng and Xiu Li},
  title = {{ScalableViT: Rethinking the Context-Oriented Generalization of Vision Transformer}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20053-3\_28},
}
Figure