SegRet: An Efficient Design for Semantic Segmentation with Retentive Network

Zhiyuan Li, Yi Chang, Yuan Wu · DOI

Abstract

With the rapid evolution of autonomous driving technology and intelligent transportation systems, semantic segmentation has become increasingly critical. Precise interpretation and analysis of real-world environments are indispensable for these advanced applications. However, traditional semantic segmentation approaches frequently face challenges in balancing model performance with computational efficiency, especially regarding the volume of model parameters. To address these constraints, we propose SegRet, a novel model employing the Retentive Network (RetNet) architecture coupled with a lightweight residual decoder that integrates zero-initialization. SegRet offers three distinctive advantages: (1) Lightweight Residual Decoder: by embedding a zero-initialization layer within the residual network structure, the decoder remains computationally streamlined without sacrificing essential information propagation; (2) Robust Feature Extraction: adopting RetNet as its backbone enables SegRet to effectively capture hierarchical image features, thereby enriching the representation quality of extracted features; (3) Parameter Efficiency: SegRet attains state-of-the-art (SOTA) segmentation performance while markedly decreasing the number of parameters, ensuring high accuracy without imposing additional computational burdens. Comprehensive empirical evaluations on prominent benchmarks, such as ADE20K, Citycapes, and COCO-Stuff, highlight the effectiveness and superiority of our method.

Introduction

Semantic segmentation—the task of assigning a category label to every pixel in an image—serves as the "eyes" for autonomous driving and robotic systems. While Transformers have become the standard due to their ability to capture global context via self-attention, they suffer from high computational costs that scale poorly with image resolution. Furthermore, the decoders typically paired with these backbones (e.g., UperNet) are often massive, hindering deployment on edge devices. SegRet addresses this performance-efficiency trade-off by introducing a Retentive Network (RetNet) backbone and a streamlined decoder.

Methods

The SegRet architecture introduces two primary innovations to enhance efficiency without compromising accuracy.

Vision RetNet Backbone

Instead of standard self-attention, SegRet utilizes a Retentive Network (RetNet). Originally developed for large language models, RetNet employs a "retention" mechanism that allows for parallel training like Transformers while maintaining the inference efficiency of Recurrent Neural Networks (RNNs). The authors adapted this for 2D spatial data using bidirectional modeling to capture complex hierarchical image features.

Lightweight Residual Decoder with Zero-Initialization

Traditional decoders are often heavy and complex. SegRet employs a minimalist design that unifies multi-scale features through simple linear mapping. A key component is the zero-initialized $1 \times 1$ convolution placed within a residual path. This "zero-init" strategy ensures that at the onset of training, original features are preserved, allowing the model to learn optimal feature fusion without significant parameter overhead.

The SegRet architecture featuring the RMT Block, MASA (Multi-Axis Segmented Attention), and the lightweight Decoder with a Zero Initialized Layer.

Key Results and Evaluation

SegRet was evaluated on ADE20K, Cityscapes, and COCO-Stuff. Across all variants (Tiny to Large), it consistently outperformed existing models in parameter efficiency.

Comparison of mIoU vs. Parameters on the ADE20K dataset, showing SegRet's superior efficiency compared to models like Swin, Mask2Former, and SegFormer.
  • Efficiency: SegRet-Tiny (14.01M parameters) achieves 49.39 mIoU on ADE20K, matching the performance of Mask2Former-Swin-T while using less than one-third of the parameters.
  • Accuracy: SegRet-Large reaches a peak mIoU of 52.23 on ADE20K and 83.91 on Cityscapes (multi-scale inference).
  • Computational Ratio: On Cityscapes, SegRet-Tiny achieves 82.17 mIoU with only 72.28 GFLOPs, significantly outperforming models like SeMask and SegFormer in accuracy-to-computation ratio.

Conclusion

SegRet demonstrates that Retentive Networks are a viable and highly efficient alternative to Transformers for semantic segmentation. By combining an efficient backbone with a lightweight, zero-initialized decoder, SegRet achieves state-of-the-art results with a fraction of the parameters. Future work will focus on domain-adaptive modules to improve performance in specialized fields like medical imaging and remote sensing.

Summary updated

BibTeX
@misc{li2025segret,
  author = {Zhiyuan Li and Yi Chang and Yuan Wu},
  title = {{SegRet: An Efficient Design for Semantic Segmentation with Retentive Network}},
  year = {2025},
  eprint = {2502.14014},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.14014},
}
Figure