U-RWKV: Lightweight Medical Image Segmentation with Direction-Adaptive RWKV

Hongbo Ye, Fenghe Tang, Peiang Zhao, Zhen Huang, Dexin Zhao, Minghao Bian, Shaohua Kevin Zhou

TL;DR

This paper introduces U-RWKV, a novel lightweight framework for medical image segmentation that addresses the limitations of existing models in capturing long-range dependencies. By integrating the efficient RWKV architecture with novel Direction-Adaptive (DARM) and Stage-Adaptive (SASE) modules, U-RWKV achieves state-of-the-art performance with significantly improved computational efficiency, making advanced medical imaging more accessible.

What Problem Does This Paper Address?

Accurate medical image segmentation is crucial for diagnosis and treatment planning. However, many current deep learning models, particularly Convolutional Neural Networks (CNNs) like U-Net, struggle to capture global context due to their limited "Effective Receptive Fields" (ERFs). This means they primarily focus on local features and miss important long-range spatial relationships within an image. This limitation is especially problematic in resource-constrained environments where high-performance computing might not be readily available. The paper aims to bridge this gap by developing a lightweight yet powerful segmentation model that can effectively capture global context without demanding excessive computational resources.

Methods

The core of U-RWKV is the Recurrent Weighted Key-Value (RWKV) architecture, known for its efficient O(N) computational cost in modeling long-range dependencies. The authors introduce two key innovations:

  • Direction-Adaptive RWKV Module (DARM): This module tackles the challenge of applying sequence-based RWKV to 2D image data. It uses:
  • Dual-RWKV: Processes image features as two 1D sequences (forward and reverse) to capture context from both directions, mitigating directional bias.
  • QuadScan: A novel scanning strategy that traverses the image in four directions (left-to-right, right-to-left, top-to-bottom, bottom-to-top). This allows each image patch to gather contextual information from multiple orientations, leading to a more comprehensive global ERF.
  • Stage-Adaptive Squeeze-and-Excitation Module (SASE): This module dynamically adjusts its architecture based on the stage of feature extraction within the U-shaped network.
  • In early stages (high resolution, low channel count), it uses structures that preserve fine details.
  • In deeper stages (lower resolution, high channel count), it shifts to more compact designs to efficiently capture high-level semantic relationships. This stage-adaptive approach balances detail preservation with semantic understanding.

The overall architecture follows a U-Net-like encoder-decoder structure, where DARM and SASE are strategically integrated to enhance feature representation at different levels.

Datasets

The paper evaluates U-RWKV on several diverse medical imaging datasets:

  • BUSI: Breast ultrasound images.
  • Kvasir & ClinicDB: Polyp segmentation from colonoscopy images.
  • ISIC 2017 & 2018: Skin lesion segmentation.
  • Synapse: Multi-organ segmentation (used for detailed comparison).

The authors also mention using a 70/30 split for training and validation on most datasets, with the Synapse dataset being used exclusively for specific comparisons.

Key Insights and Ideas

  • RWKV for Vision is Viable: The paper demonstrates that RWKV, primarily known for sequence modeling, can be effectively adapted for 2D medical image segmentation, offering a path to efficient long-range dependency modeling.
  • Directionality Matters in 2D: Simply applying 1D sequence models to 2D data can introduce directional bias. The Dual-RWKV and QuadScan mechanisms in DARM are crucial for overcoming this by explicitly considering multiple spatial orientations.
  • Adaptive Feature Extraction is Key: The SASE module's ability to dynamically change its structure based on the network stage is a clever way to balance the need for fine-grained details in early layers and semantic understanding in deeper layers, leading to more robust feature extraction.
  • Lightweight Models Can Be Powerful: U-RWKV-s, a smaller variant, achieves competitive results with significantly fewer parameters, highlighting the potential for deploying advanced segmentation models on less powerful hardware.

Key Results

  • State-of-the-Art Performance: U-RWKV achieved the highest average Dice score of 82.27 across multiple datasets, outperforming several established methods.
  • Computational Efficiency: The model demonstrates high computational efficiency, with the lightweight U-RWKV-s variant achieving a Dice score of 80.06 with only 0.46 million parameters.
  • Improved Effective Receptive Field (ERF): U-RWKV shows a significantly larger ERF (0.992 high-contribution area ratio at 0.99 threshold) compared to U-Net (0.568), indicating its superior ability to capture global context.
  • Robustness and Adaptability: Qualitative results show U-RWKV reliably handling diverse challenges like heterogeneous textures, mucosal folds, and low-contrast boundaries, attributed to the synergistic effect of DARM and SASE.

Limitations and Future Work

  • Inference Speed: The authors acknowledge that U-RWKV's inference speed is slightly slower than some CNN-based models like UNeXt.
  • Future Work: The authors plan to focus on optimizing inference speed, particularly for high-resolution medical images, and extending the framework to 3D segmentation.

Summary updated

BibTeX
@inproceedings{ye2025u,
  author = {Hongbo Ye and Fenghe Tang and Peiang Zhao and Zhen Huang and Dexin Zhao and Minghao Bian and Shaohua Kevin Zhou},
  title = {{U-RWKV: Lightweight Medical Image Segmentation with Direction-Adaptive RWKV}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  url = {https://openreview.net/forum?id=ijXvjuvHK6},
}
Figure