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

Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding

Pengchuan Zhang, Xiyang Dai, Jianwei Yang, Bin Xiao, Lu Yuan, Lei Zhang, Jianfeng Gao

Introduction

Vision Transformers (ViTs) have demonstrated remarkable performance in image classification. However, their application to dense prediction tasks like object detection and semantic segmentation is hindered by the quadratic computational complexity of the self-attention mechanism relative to the number of tokens. Processing high-resolution images requires a more efficient approach that can handle large feature maps without prohibitive memory and compute costs.

The High-Resolution Challenge

Standard ViTs typically use a fixed resolution throughout the network. When image resolution increases, the number of patches grows quadratically, leading to a quartic increase in computational cost for the attention mechanism relative to the image side length. This makes them impractical for tasks requiring fine-grained feature maps. Furthermore, standard ViTs lack the hierarchical structure found in biological vision and successful Convolutional Neural Networks (CNNs), which process fine details early and abstract concepts later.

Methodology: The Multi-Scale Vision Longformer

The Multi-Scale Vision Longformer (ViL) addresses these issues through two main architectural innovations: a hierarchical structure and an efficient 2D attention mechanism.

Hierarchical Architecture

ViL adopts a four-stage "pyramid" structure, similar to CNN backbones. As shown in Figure 1, the model progressively reduces the spatial resolution of feature maps while increasing the hidden dimension. This allows the network to capture fine-grained details in early stages and high-level semantic information in later stages, making it suitable for a variety of downstream vision tasks.

The Multi-Scale Vision Longformer (ViL) architecture and the Efficient-ViT (E-ViT) module.

Vision Longformer Attention

To maintain efficiency at high resolutions, ViL adapts the Longformer attention mechanism for 2D data. It combines local attention, where tokens attend only to neighbors within a local window, with a global memory mechanism. A small set of global tokens serve as information hubs, facilitating long-range dependencies without the $O(N^2)$ cost of full attention. Additionally, the model utilizes Relative Positional Bias (RPB) to enhance translation invariance, ensuring consistent object recognition regardless of spatial location.

Experimental Results

The ViL architecture was rigorously evaluated on ImageNet-1K for classification and COCO for object detection and instance segmentation.

ImageNet-1K Classification

ViL models consistently outperform standard ViTs and CNN counterparts across various scales. As detailed in Figure 2, ViL-Small achieves 82.4% Top-1 accuracy, surpassing DeiT-Small (79.9%) and PVT-Small (79.8%). The Base model reaches 83.7% accuracy with significantly fewer parameters (55.7M) than comparable ViT-Base models (86.6M).

Comparison of ViL models with state-of-the-art backbones on ImageNet-1K classification.

Dense Prediction Tasks

On the COCO dataset, ViL demonstrates superior performance for object detection and segmentation. Using a RetinaNet pipeline, ViL-Tiny achieves 40.8 AP, a significant improvement over a ResNet-18 backbone (31.8 AP) of similar size. For instance segmentation with Mask R-CNN, ViL-Small reaches 47.1 AP, outperforming the Swin-Transformer (Swin-Tiny, 46.0 AP) while maintaining higher parameter and FLOP efficiency.

Discussion and Conclusion

The Multi-Scale Vision Longformer successfully bridges the gap between the representational power of Transformers and the efficiency required for high-resolution vision tasks. By combining a hierarchical structure with a linear-complexity attention mechanism, ViL provides a versatile and efficient backbone for a wide range of computer vision applications. Future work may explore further optimizations of the global token mechanism and integration with other efficient attention variants to push the boundaries of high-resolution image encoding.

Summary updated

BibTeX
@inproceedings{zhang2021multi,
  author = {Pengchuan Zhang and Xiyang Dai and Jianwei Yang and Bin Xiao and Lu Yuan and Lei Zhang and Jianfeng Gao},
  title = {{Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00299},
}
Figure