Skip to main content
QUICK REVIEW

[Paper Review] Lawin Transformer: Improving Semantic Segmentation Transformer with Multi-Scale Representations via Large Window Attention

Haotian Yan, Chuang Zhang|arXiv (Cornell University)|Jan 5, 2022
Advanced Neural Network ApplicationsComputer Science48 citations
TL;DR

Lawin Transformer introduces large window attention and LawinASPP decoder to inject multi-scale representations into semantic segmentation ViTs, achieving state-of-the-art results with improved efficiency on Cityscapes, ADE20K, and COCO-Stuff.

ABSTRACT

Multi-scale representations are crucial for semantic segmentation. The community has witnessed the flourish of semantic segmentation convolutional neural networks (CNN) exploiting multi-scale contextual information. Motivated by that the vision transformer (ViT) is powerful in image classification, some semantic segmentation ViTs are recently proposed, most of them attaining impressive results but at a cost of computational economy. In this paper, we succeed in introducing multi-scale representations into semantic segmentation ViT via window attention mechanism and further improves the performance and efficiency. To this end, we introduce large window attention which allows the local window to query a larger area of context window at only a little computation overhead. By regulating the ratio of the context area to the query area, we enable the $ extit{large window attention}$ to capture the contextual information at multiple scales. Moreover, the framework of spatial pyramid pooling is adopted to collaborate with $ extit{the large window attention}$, which presents a novel decoder named $ extbf{la}$rge $ extbf{win}$dow attention spatial pyramid pooling (LawinASPP) for semantic segmentation ViT. Our resulting ViT, Lawin Transformer, is composed of an efficient hierachical vision transformer (HVT) as encoder and a LawinASPP as decoder. The empirical results demonstrate that Lawin Transformer offers an improved efficiency compared to the existing method. Lawin Transformer further sets new state-of-the-art performance on Cityscapes (84.4% mIoU), ADE20K (56.2% mIoU) and COCO-Stuff datasets. The code will be released at https://github.com/yan-hao-tian/lawin

Motivation & Objective

  • Motivate the integration of multi-scale contextual information into semantic segmentation ViTs to improve accuracy and efficiency.
  • Develop a large window attention mechanism to expand context querying with controlled computational overhead.
  • Design LawinASPP to fuse multi-scale contextual cues with a lightweight decoder.
  • Evaluate Lawin Transformer on standard semantic segmentation benchmarks and compare against state-of-the-art ViT-based and CNN-based methods.

Proposed method

  • Introduce large window attention where a query patch attends to a context patch scaled by ratio R, with pooling to maintain complexity.
  • Use multi-head attention with the number of heads set to R^2 to recover dependencies after pooling.
  • Apply position-mixing MLP per head to strengthen spatial representations within the context patch, inspired by MLP-Mixer.
  • Replace the standard decoder with LawinASPP, a Spatial Pyramid Pooling variant that combines branches with large window attentions at R=(2,4,8) and an image pooling branch.
  • Integrate LawinASPP with a hierarchical vision transformer encoder (MiT or Swin) and fuse multi-level features with low-level early features for final prediction.

Experimental results

Research questions

  • RQ1Can large window attention capture multi-scale contextual information efficiently in semantic segmentation ViTs?
  • RQ2Does LawinASPP improve multi-scale representation and final segmentation performance over existing decoders?
  • RQ3What is the impact of pooling ratio R, head count, and position- vs channel-mixing in large window attention on accuracy and efficiency?
  • RQ4How does Lawin Transformer perform against state-of-the-art ViT-based and CNN-based methods on Cityscapes, ADE20K, and COCO-Stuff?

Key findings

  • Lawin Transformer achieves improved mIoU with lower or comparable FLOPs across variants vs SegFormer and Swin-UperNet.
  • Lawin-B4 and Lawin-B5 variants show gains in mIoU while reducing computation relative to some baselines on ADE20K and Cityscapes.
  • LawinASPP outperforms ASPP, PPM, and SEP-ASPP in mIoU while maintaining competitive FLOPs on ADE20K.
  • Position-mixing MLP provides the most benefit among tested mixing strategies for large window attention, outperforming channel-mixing approaches.
  • The framework yields state-of-the-art results on Cityscapes (84.4% mIoU with Swin-L encoder), ADE20K (53.0% mIoU with MiT-B5; 84.4% mIoU with Swin-L), and COCO-Stuff (47.5% mIoU with MiT-B5).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.