Low-Resolution Self-Attention for Semantic Segmentation

Yu-Huan Wu, Shi-Chen Zhang, Yun Liu, Le Zhang, Xin Zhan, Daquan Zhou, Jiashi Feng, Ming-Ming Cheng, Liangli Zhen

Introduction

Semantic segmentation—the task of assigning a category label to every pixel in an image—is a cornerstone of computer vision, yet it remains computationally demanding. Traditionally, high-resolution feature maps were considered essential for pixel-level precision. However, the advent of Vision Transformers (ViTs) has introduced a significant bottleneck: the standard self-attention mechanism possesses quadratic complexity relative to the number of pixels. As input resolutions increase, the computational overhead grows exponentially, limiting the scalability of these models for high-resolution tasks like autonomous driving or medical imaging.

The LRFormer Architecture

To address this bottleneck, the authors introduce LRFormer, a model centered on a novel Low-Resolution Self-Attention (LRSA) mechanism. Unlike previous approaches that downsample keys and values by a fixed ratio or restrict attention to local windows, LRSA decouples computational complexity from the input resolution.

Comparison of self-attention mechanisms: (a) Vanilla, (b) Window-based, (c) Downsampling-based, and (d) the proposed LRSA which uses a fixed pooled size m.

The core innovations of LRSA include:

  1. Fixed-Size Downsampling: LRSA downsamples the Query, Key, and Value tensors to a fixed spatial size (typically $16 \times 16$). This ensures that the cost of global attention remains constant regardless of the input image size, shifting complexity from $O(N^2C)$ to $O(NC + C^2)$.
  2. Locality Capture via Convolutions: To mitigate the loss of fine-grained detail from extreme downsampling, the model integrates $3 \times 3$ Depth-Wise Convolutions (DWConv). These act as "spatial glue," preserving local textures and edges in the high-resolution space before global context is captured.
  3. Hybrid Design: The architecture utilizes a pyramid-structured encoder for multi-level feature extraction and a lightweight decoder that leverages LRSA to refine predictions.

Experimental Evaluation

LRFormer was evaluated on major benchmarks including ADE20K, COCO-Stuff, and Cityscapes. The results demonstrate that global context can be effectively captured at very low resolutions, while local details are handled by the convolutional components.

Performance on ADE20K: LRFormer+ (Ours) significantly outperforms state-of-the-art models like Mask2Former and Mask DINO in the accuracy-efficiency trade-off.

Key Results

  • Efficiency on ADE20K: LRFormer-S achieved 50.0% mIoU with only 40G FLOPs, outperforming SegFormer-B2 (46.5% mIoU at 62G FLOPs).
  • High-Resolution Scaling: On Cityscapes ($1024 \times 2048$), LRFormer-B reached 83.0% mIoU using 555G FLOPs, whereas HRFormer-B required 2240G FLOPs for a lower 81.9% mIoU.
  • Versatility: When used as a backbone for referring segmentation (LISA framework), LRFormer outperformed larger backbones like ViT-L and Swin-L.

Discussion and Future Work

The primary insight of this work is that "global context" (e.g., identifying a scene as a "kitchen") does not require high-resolution processing; high resolution is only critical for "local details" (e.g., chair boundaries). By hybridizing convolutions and low-resolution transformers, LRFormer achieves a superior balance of speed and accuracy.

While extreme downsampling (e.g., to $4 \times 4$) can blur semantic information for small objects, the fixed $16 \times 16$ pooling provides a robust baseline. Future research may extend LRSA to other dense prediction tasks such as object detection and depth estimation.

Summary updated

BibTeX
@article{wu2023low,
  author = {Yu-Huan Wu and Shi-Chen Zhang and Yun Liu and Le Zhang and Xin Zhan and Daquan Zhou and Jiashi Feng and Ming-Ming Cheng and Liangli Zhen},
  title = {{Low-Resolution Self-Attention for Semantic Segmentation}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=9GRkE8yQWm},
}
Figure