Abstract
Accurate medical image segmentation is critical for clinical diagnosis and treatment planning. While Convolutional Neural Networks (CNNs) have long been the standard for this task, their limited effective receptive fields (ERFs) often prevent them from capturing essential long-range dependencies. Vision Transformers (ViTs) address this by providing global context, but their quadratic computational complexity $O(N^2)$ poses significant challenges for resource-constrained clinical environments. This paper introduces U-RWKV, a novel lightweight framework that adapts the Recurrent Weighted Key-Value (RWKV) architecture to 2D visual data. By employing a multi-directional scanning strategy and stage-adaptive modules, U-RWKV achieves a massive global receptive field with linear computational complexity $O(N)$. Experimental results across five diverse datasets demonstrate that U-RWKV achieves state-of-the-art performance, outperforming significantly larger models while maintaining a minimal parameter footprint.
1. Introduction
In medical imaging, the ability to segment organs and lesions with high precision is paramount. For years, the U-Net architecture and its convolutional derivatives have dominated the field. However, CNNs are inherently limited by "tunnel vision"—they excel at identifying local textures but struggle to integrate the global context necessary to distinguish complex anatomical structures.
To overcome these limitations, researchers have integrated Transformer blocks into U-shaped architectures. While effective at capturing long-range dependencies, the self-attention mechanism's computational cost scales quadratically with image resolution. This makes high-resolution processing difficult on the low-power hardware typically found in clinical settings. U-RWKV proposes a solution by leveraging the RWKV architecture, which combines the parallelizable training of Transformers with the efficient inference of Recurrent Neural Networks (RNNs).
2. Methodology
U-RWKV adapts the traditionally sequential RWKV architecture for 2D spatial tasks through two primary architectural innovations: the Direction-Adaptive RWKV Module (DARM) and Stage-Adaptive Squeeze-and-Excitation (SASE).
2.1 Direction-Adaptive RWKV Module (DARM)
RWKV was originally designed for Natural Language Processing (NLP), where data is inherently one-dimensional. To process 2D images without losing spatial integrity, U-RWKV introduces the QuadScan strategy. This method scans the image feature maps in four distinct directions: Left→Right, Right→Left, Top→Bottom, and Bottom→Top. By aggregating features from these four paths, the DARM ensures the model captures contextual cues from every corner of the image, effectively eliminating the directional bias common in sequential models.
2.2 Stage-Adaptive Squeeze-and-Excitation (SASE)
Standard Squeeze-and-Excitation (SE) blocks apply a uniform operation across all network layers. In contrast, the SASE module adapts its behavior based on the network's depth. In the early, shallow stages of the encoder, SASE utilizes dilated structures to preserve high-resolution spatial details. As the network deepens, the module shifts to a more compact design, focusing on capturing complex semantic relationships and global dependencies efficiently.
3. Experimental Evaluation
The robustness of U-RWKV was evaluated across five diverse medical imaging benchmarks:
- BUSI: Breast ultrasound images for lesion detection.
- Kvasir & CVC-ClinicDB: Endoscopic polyp datasets for gastrointestinal screening.
- ISIC 2017 & 2018: Skin lesion datasets for dermatology.
- Synapse: A multi-organ CT segmentation dataset requiring the modeling of complex, multi-class anatomical relationships.
4. Key Results and Discussion
4.1 Global Receptive Field
A defining characteristic of U-RWKV is its expansive Effective Receptive Field (ERF). Analysis shows that U-RWKV achieves a "high-contribution area ratio" of 0.992, significantly higher than the 0.568 achieved by standard U-Net. This indicates that U-RWKV utilizes nearly the entire image context when making predictions for any given pixel, a trait typically reserved for heavy Transformer models.
4.2 Performance and Efficiency
Despite its lightweight nature, U-RWKV demonstrated superior performance across all benchmarks:
- Synapse Benchmark: U-RWKV achieved an average Dice score of 80.64, surpassing the popular TransUnet (77.54) while using a fraction of the parameters.
- Parameter Efficiency: The "small" variant, U-RWKV-s, contains only 0.46M parameters. This allows it to outperform models like TransUnet (93M parameters) that are nearly 200 times larger.
- Generalization: The model achieved the highest average Dice score (82.27) across all five tested datasets, proving its versatility across different imaging modalities (CT, Ultrasound, Endoscopy, and Dermoscopy).
5. Conclusion and Future Work
U-RWKV represents a significant step forward in lightweight medical image segmentation. By successfully adapting the RWKV architecture for 2D data via QuadScan and SASE, the authors have created a model that provides the global context of a Transformer with the efficiency of a CNN.
While the model is highly efficient in terms of memory and parameters, current implementations show a slight trade-off in inference latency compared to pure CNN-based lightweight models. Future research will focus on optimizing the implementation for faster real-time performance and extending the framework to 3D segmentation for volumetric data such as MRI and CT scans.
Summary updated