Abstract
Deep neural networks have been widely used in medical image analysis and medical image segmentation is one of the most important tasks. U-shaped neural networks with encoder-decoder are prevailing and have succeeded greatly in various segmentation tasks. While CNNs treat an image as a grid of pixels in Euclidean space and Transformers recognize an image as a sequence of patches, graph-based representation is more generalized and can construct connections for each part of an image. In this paper, we propose a novel ViG-UNet, a graph neural network-based U-shaped architecture with the encoder, the decoder, the bottleneck, and skip connections. The downsampling and upsampling modules are also carefully designed. The experimental results on ISIC 2016, ISIC 2017 and Kvasir-SEG datasets demonstrate that our proposed architecture outperforms most existing classic and state-of-the-art U-shaped networks.
Introduction
Medical image segmentation—the precise delineation of anatomical structures or pathological regions—is a fundamental requirement for computer-aided diagnosis and surgical planning. For nearly a decade, the U-Net architecture, based on Convolutional Neural Networks (CNNs), has served as the industry standard. However, CNNs are inherently limited by their "sliding window" operation, which focuses on local pixel grids and struggles to capture long-range dependencies across an image.
To address this, researchers recently introduced Vision Transformers (ViTs), which treat images as sequences of patches. While Transformers capture global context more effectively than CNNs, they still rely on a rigid, sequential representation of image data. This paper introduces ViG-UNet, an architecture that moves beyond grids and sequences by representing images as graphs. By treating image patches as nodes in a graph, ViG-UNet can model complex, non-Euclidean spatial relationships, which is particularly advantageous for the irregular shapes and varying scales found in medical anomalies like skin lesions and polyps.
The ViG-UNet Architecture
ViG-UNet maintains the successful U-shaped symmetry of the original U-Net, consisting of an encoder, a bottleneck, and a decoder connected by skip connections. However, it replaces traditional convolutional or transformer layers with Vision Graph Neural Network (ViG) modules.
The Grapher Module
The core of the architecture is the Grapher module. The process begins by dividing an image into patches, each of which is treated as a node in a graph. To establish connections, the module employs a $K$-Nearest Neighbors ($K$-NN) algorithm, linking each node to its most similar neighbors. This allows the model to dynamically aggregate features from relevant regions across the entire image, regardless of their spatial distance.
Max-Relative Graph Convolution
To process these graph-based representations, the authors utilize Max-Relative Graph Convolution. This specific operation calculates the maximum difference between a central node and its neighbors. This approach enhances the model's ability to detect local contrast and sharp edges, which are critical for identifying the boundaries of lesions or tumors.
Mitigating Over-smoothing
A common challenge in deep Graph Neural Networks is "over-smoothing," where node features become increasingly similar as they pass through multiple layers, eventually losing discriminative power. ViG-UNet addresses this by integrating Feed-forward Networks (FFNs)—fully connected layers that transform features after graph processing—and maintaining a hybrid design that uses strided convolutions for downsampling and bilinear interpolation for upsampling.
Experimental Results
The performance of ViG-UNet was evaluated on three benchmark medical imaging datasets: ISIC 2016 and ISIC 2017 (skin lesion segmentation) and Kvasir-SEG (gastrointestinal polyp segmentation).
Quantitative Performance
ViG-UNet consistently outperformed both classic CNNs and modern Transformer-based models across all datasets using the Intersection over Union (IoU) and Dice coefficient metrics.
- ISIC 2017: ViG-UNet achieved a Dice score of 0.8292, outperforming Trans-UNet (0.8244) and the original U-Net (0.7708).
- Kvasir-SEG: The model reached a Dice score of 0.8188, significantly surpassing Swin-UNet (0.4974) and UNext (0.8122).
Qualitative Analysis
Visual inspections of the segmentation masks produced by ViG-UNet reveal cleaner boundaries and significantly fewer false positives compared to traditional models. The graph-based approach allows the model to better distinguish between the target lesion and healthy tissue, even in cases with low contrast or complex textures.
Discussion and Limitations
While ViG-UNet represents a significant step forward in segmentation accuracy, it faces challenges regarding computational efficiency. The current model is quite large, containing approximately 700 million (0.7G) parameters. In contrast, lightweight models like UNext achieve competitive results with only 1.5 million parameters. This high parameter count currently limits the deployment of ViG-UNet in real-time clinical settings or on hardware with restricted memory.
Furthermore, this study did not utilize pre-trained weights (e.g., from ImageNet). The authors anticipate that incorporating pre-training would further enhance the model's performance and convergence speed.
Conclusion
ViG-UNet demonstrates that graph-based representations offer a powerful alternative to the grid-based approach of CNNs and the sequence-based approach of Transformers in medical imaging. By successfully adapting Vision GNNs to a U-shaped segmentation framework, the authors have provided a more generalized method for capturing the irregular spatial dependencies inherent in medical data. Future research will focus on optimizing the graph construction process to reduce the model's computational footprint while maintaining its superior segmentation accuracy.
Summary updated