Abstract
Semantic segmentation using plain Vision Transformers (ViTs) often faces challenges regarding computational efficiency and catastrophic forgetting in continual learning scenarios. SegViT v2 addresses these issues through two key innovations: a lightweight Attention-to-Mask (ATM) decoder and a Shrunk++ encoder. The ATM decoder leverages cross-attention maps as segmentation masks, significantly reducing decoder overhead. The Shrunk++ encoder employs edge-aware pruning to focus computation on critical object boundaries. Furthermore, the decoupled nature of the ATM module enables a "forget-free" continual learning strategy. Experimental results on benchmarks like ADE20K demonstrate that SegViT v2 achieves state-of-the-art performance (58.0% mIoU) while reducing GFLOPs by up to 50%.
Introduction
Traditional semantic segmentation has favored hierarchical architectures like ConvNets or Swin Transformers, which provide multi-scale features suitable for boundary refinement. In contrast, "plain" ViTs maintain a constant resolution, making standard decoders like UPerNet computationally expensive and inefficient. Moreover, existing models suffer from catastrophic forgetting when tasked with learning new classes sequentially. SegViT v2 aims to optimize plain ViTs for both efficiency and adaptability.
Methodology
Attention-to-Mask (ATM) Decoder
The ATM decoder simplifies the segmentation process by treating the cross-attention map between learnable class tokens and spatial feature maps as the segmentation mask itself. By applying a sigmoid operation to these maps, the model generates high-quality masks with minimal computational cost—approximately 5% of the GFLOPs required by traditional convolutional decoders.
Shrunk++ Encoder
To manage the high cost of processing full-resolution token grids, the Shrunk++ encoder introduces a pruning strategy. It utilizes Edge-aware Query-based Down-sampling (EQD) to preserve tokens near object boundaries while down-sampling redundant interior regions. Query-based Up-sampling (QU) is subsequently used to restore resolution for dense prediction, maintaining accuracy while slashing computational overhead.
Forget-Free Continual Learning
The ATM decoder decouples class identity from spatial features. This allows the model to learn new categories by freezing the backbone and adding new ATM modules for new classes. This "growth" strategy ensures zero interference with previously learned knowledge, effectively eliminating catastrophic forgetting.
Experimental Results
The model was evaluated on ADE20K, COCO-Stuff-10K, and PASCAL-Context. SegViT v2 achieves superior performance-efficiency trade-offs compared to previous methods.
As shown in the figure above, SegViT-BEiT v2 Large reaches 58.0% mIoU on ADE20K. The Shrunk++ variant reduces computational costs by 50% (from 637.9 to 308.8 GFLOPs) while maintaining a high mIoU of 55.7%. In continual learning tasks, SegViT-CL showed a negligible performance drop of only 0.3% on base classes, significantly outperforming existing methods that typically see drops of 5-15%.
Conclusion
SegViT v2 demonstrates that plain Vision Transformers can be highly efficient and adaptable for semantic segmentation. By leveraging the inherent spatial grouping in attention maps and focusing computation on object boundaries, the model achieves state-of-the-art results with reduced complexity. Future work may explore dynamic token pruning and applications in video segmentation.
Summary updated