TL;DR
SegRet combines a Retentive Network (RetNet) visual backbone with an ultra-lightweight, zero-initialized residual decoder for semantic segmentation. By substituting quadratic-complexity Transformer attention with linear-complexity bidirectional retention and replacing bulky decoders (like UPerNet) with simple residual projections, SegRet achieves state-of-the-art accuracy while using a fraction of standard parameter budgets.
What Problem Does This Paper Address?
Semantic segmentation—classifying every individual pixel in an image—is essential for autonomous driving and robotics. Modern state-of-the-art segmentation networks rely heavily on Vision Transformers (ViTs) and shifted-window Transformers (like Swin). However, these architectures present severe computational bottlenecks:
- Quadratic Complexity: Standard self-attention scales quadratically ($O(N^2)$) with token count / image resolution.
- Heavy Decoders: Prevailing frameworks rely on massive, parameter-heavy decoder heads (such as UPerNet or MaskFormer), which dominate the compute and memory footprints during inference.
While State Space Models (SSMs) and linear-attention variants have emerged as scalable alternatives, most prior work focused solely on image classification, leaving segmentation decoders bloated and inefficient.
Methods
SegRet uses an encoder–decoder design optimized for parameter and compute efficiency:
- Vision RetNet (RMT) Backbone: Instead of standard attention, SegRet adopts the visual adaptation of RetNet. It leverages a bidirectional retention mechanism (BiRetention) decomposed across horizontal and vertical image axes ($Attn_H$ and $Attn_W$). It modulates token interactions using spatial distance decay matrices ($D^H$ and $D^W$), achieving linear complexity while preserving long-range 2D context.
- Lightweight Zero-Initialized Residual Decoder: Rather than using complex multi-scale feature pyramids or transformer decoders:
- Multi-scale feature maps $f_i$ are linearly projected to a uniform channel dimension $C$: $F_i = \text{Linear}(f_i)$.
- A residual branch with a $1 \times 1$ convolution initialized entirely to zeros is added: $$F'_i = f_i + \text{Zero-initialized Conv}(F_i)$$
- Features are bilinearly upsampled to $1/4$ image resolution, concatenated along channels, and mapped via a final convolution to class logits.
- Model Scalability: The authors introduce four capacity variants: Tiny (14.01M total params; decoder has 0.814M params), Small (26.52M), Base (53.05M), and Large (95.81M).
Datasets
The authors evaluate SegRet across three widely recognized semantic segmentation benchmarks:
- ADE20K: 150 semantic categories across complex indoor/outdoor scenes.
- Cityscapes: High-resolution urban street scenes with 19 semantic classes.
- COCO-Stuff: 171 categories covering detailed object things and contextual background stuff.
No new datasets were introduced.
Key Insights and Ideas
- Retention transfers gracefully to dense prediction: Linear-complexity retention backbones (RMT) capture multi-scale spatial representations effectively without the computational explosion of traditional self-attention.
- Zero-initialization prevents optimization instability: By initializing the decoder's residual $1 \times 1$ convolution to zero, the network begins training by preserving raw backbone features before gradually blending the projected multi-scale representations. Adding this single residual connection with zero-init boosted ADE20K mIoU by 0.79% for only 0.25M additional parameters.
- Decoders don't need to be massive: When coupled with an expressive linear backbone, a sub-1M parameter decoder outperforms standard heavy decoders (UPerNet and FPN) by over 1.2% mIoU while running at a fraction of the parameter and FLOP count.
Key Results
- ADE20K:
- SegRet-Tiny achieves 48.76% (SS) and 49.39% (MS) mIoU with just 14.01M parameters. It matches Mask2Former (Swin-T, 47M params, 49.6% MS mIoU) using under one-third of the parameters, and beats Vision Mamba (Vim-Ti, 13M params, 40.2% mIoU) by 9.7% mIoU.
- SegRet-Base reaches 51.63% (SS) / 52.13% (MS) mIoU at 53.05M parameters, outperforming larger models like Swin-B + UPerNet (121M params, 51.6% MS mIoU).
- Cityscapes:
- SegRet-Tiny hits 81.75% (SS) and 82.17% (MS) mIoU, outperforming SegFormer-B1 (13.7M params, 80.0% MS mIoU).
- SegRet-Large achieves 83.36% (SS) and 83.91% (MS) mIoU.
- COCO-Stuff:
- SegRet-Tiny achieves 42.22% (SS) and 43.32% (MS) mIoU, clearly surpassing MaskFormer (R50, 38.9% MS mIoU) and SeMask (Swin-T, 38.88% MS mIoU).
Limitations and Future Work
The authors explicitly highlight the following limitations:
- Domain Specialization: SegRet underperforms on specialized segmentation domains such as medical image segmentation and remote sensing imagery, where extreme scale variations and fine-grained structures challenge its current representation.
- Future Directions:
- Exploring domain-adaptive modules to improve feature alignment across disparate distributions.
- Designing attention-guided upsampling mechanisms within the lightweight decoder to better segment small, fine-grained objects.
Summary updated