[Paper Review] Head-Free Lightweight Semantic Segmentation with Linear Transformer
AFFormer is a head-free lightweight semantic segmentation architecture that uses a parallel heterogeneous design with prototype learning and an adaptive frequency filter, achieving state-of-the-art accuracy at ultra-low FLOPs on ADE20K and Cityscapes.
Existing semantic segmentation works have been mainly focused on designing effective decoders; however, the computational load introduced by the overall structure has long been ignored, which hinders their applications on resource-constrained hardwares. In this paper, we propose a head-free lightweight architecture specifically for semantic segmentation, named Adaptive Frequency Transformer. It adopts a parallel architecture to leverage prototype representations as specific learnable local descriptions which replaces the decoder and preserves the rich image semantics on high-resolution features. Although removing the decoder compresses most of the computation, the accuracy of the parallel structure is still limited by low computational resources. Therefore, we employ heterogeneous operators (CNN and Vision Transformer) for pixel embedding and prototype representations to further save computational costs. Moreover, it is very difficult to linearize the complexity of the vision Transformer from the perspective of spatial domain. Due to the fact that semantic segmentation is very sensitive to frequency information, we construct a lightweight prototype learning block with adaptive frequency filter of complexity $O(n)$ to replace standard self attention with $O(n^{2})$. Extensive experiments on widely adopted datasets demonstrate that our model achieves superior accuracy while retaining only 3M parameters. On the ADE20K dataset, our model achieves 41.8 mIoU and 4.6 GFLOPs, which is 4.4 mIoU higher than Segformer, with 45% less GFLOPs. On the Cityscapes dataset, our model achieves 78.7 mIoU and 34.4 GFLOPs, which is 2.5 mIoU higher than Segformer with 72.5% less GFLOPs. Code is available at https://github.com/dongbo811/AFFormer.
Motivation & Objective
- Motivate reducing computational cost in semantic segmentation by removing heavy decoder heads.
- Propose a parallel heterogeneous architecture to maintain high-resolution semantics without dense self-attention.
- Introduce prototype-based local descriptions and an adaptive frequency filter to replace standard self-attention.
- Show that a linear-complexity approach can outperform lightweight decoders on standard benchmarks.
Proposed method
- Introduce Adaptive Frequency Transformer (AFFormer) with a parallel architecture that replaces the decoder by prototype-based features and a pixel descriptor to restore high-resolution semantics.
- Use a Transformer-based prototype learning (PL) to update clustered prototype centers G′, and recover features F′ with a CNN-based pixel descriptor (PD) for high-resolution detail preservation.
- Replace standard self-attention with an adaptive frequency filter (AFF) comprising a frequency similarity kernel (FSK), dynamic low-pass filters (DLF), and dynamic high-pass filters (DHF) to achieve linear complexity w.r.t. input resolution.
- Share weights across frequency extraction/enhancement modules to reduce cost and incorporate depthwise conv into FFN to fuse features efficiently.
- Adopt a single convolutional classification layer (CLS) for single-scale features, enabling semantic segmentation to resemble image classification in simplicity.
Experimental results
Research questions
- RQ1Can semantic segmentation be achieved with a head-free, lightweight Transformer architecture that maintains high accuracy at ultra-low computational cost?
- RQ2How can prototype-based representations and adaptive frequency processing replace traditional decoders and self-attention in segmentation models?
- RQ3What is the impact of a parallel heterogeneous design (PD and PL) and adaptive frequency filtering on performance and efficiency across datasets (ADE20K, Cityscapes, COCO-stuff)?
Key findings
- AFFormer achieves 41.8 mIoU with 4.6 GFLOPs on ADE20K (512×512) using 3M parameters, outperforming SegFormer by 4.4 mIoU with 45% fewer GFLOPs.
- On Cityscapes, AFFormer attains 78.7 mIoU with 34.4 GFLOPs, beating SegFormer by 2.5 mIoU while using 72.5% fewer GFLOPs.
- AFFormer-tiny, AFFormer-small, and AFFormer-base variants offer favorable speed–accuracy trade-offs with substantially reduced parameter counts and FLOPs compared to SegFormer and other lightweight rivals.
- A parallel architecture that omits the decoder and combines PD (pixel descriptor) and PL (prototype learning) yields superior accuracy with lower computational cost than naive pyramid or ViT-only designs.
- A frequency-aware prototype learning module (AFF) with FSK, DLF, and DHF components contributes significantly to maintaining high segmentation quality across datasets, with ablations showing best performance when components are combined.
- AFFormer delivers notable FPS improvements on high-resolution Cityscapes (22 FPS vs 12 FPS for SegFormer) while achieving higher mIoU.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.