Abstract
Medical image segmentation faces challenges due to blurry boundaries and inherent ambiguity in clinical scans. While Diffusion Probabilistic Models (DPMs) offer a robust framework for modeling this uncertainty, their integration with modern Vision Transformers (ViTs) has historically been hindered by feature incompatibility and high variance in noisy environments. MedSegDiff-V2 addresses these issues by introducing a frequency-domain Spectrum-Space Transformer (SS-Former) and an uncertainty-aware Anchor Condition. This framework achieves state-of-the-art performance across 20 diverse medical imaging tasks, demonstrating superior accuracy and computational efficiency.
Introduction
Identifying organs or lesions in medical scans is a critical yet difficult task. Traditional deterministic models often struggle with the "fuzzy" boundaries typical of CT, MRI, and ultrasound images. DPMs have emerged as a promising alternative, using a stochastic denoising process to generate multiple plausible segmentation masks, thereby capturing boundary uncertainty.
However, most existing DPMs utilize standard UNet architectures. While Vision Transformers are superior at capturing global context, they are notoriously sensitive to the input variance present in diffusion noise. MedSegDiff-V2 is the first framework to successfully bridge these two paradigms, overcoming feature misalignment and prediction divergence.
Methodology
The core of MedSegDiff-V2 lies in its ability to stabilize Transformer attention and align semantic features with diffusion noise.
Anchor Condition and Uncertain Spatial Attention (U-SA)
To mitigate the instability of Transformers in noisy environments, the model employs an Anchor Condition. This provides a "rough draft" of the segmentation from a dedicated condition model, serving as a stable reference point. To account for potential inaccuracies in this draft, Uncertain Spatial Attention (U-SA) applies a learnable Gaussian kernel. This allows the model to dynamically "relax" its focus on the anchor, prioritizing refinement in areas where boundary uncertainty is highest.
Spectrum-Space Transformer (SS-Former)
The SS-Former addresses the incompatibility between raw image semantics and the corrupted features of the diffusion process. Instead of operating in spatial pixel space, SS-Former performs cross-attention in the frequency domain (Fourier space).
A key component is the Neural Band-pass Filter (NBP-Filter). This learnable filter adjusts its parameters based on the current diffusion timestep. Since the noise profile evolves throughout the denoising process, the NBP-Filter dynamically tunes itself to align the frequency components of the noise and semantic features, acting as a bridge between the two domains.
Experimental Results
The authors evaluated MedSegDiff-V2 across 20 segmentation tasks spanning five modalities: CT, MRI, Ultrasound, Fundus, and Dermoscopy.
Quantitative Performance
MedSegDiff-V2 consistently outperformed established baselines, including specialized CNNs (nnUNet) and other Transformer-based architectures (Swin-UNet, TransUNet). On the AMOS dataset, it achieved a mean Dice score of 0.901, surpassing the original MedSegDiff (0.889) and nnUNet (0.878).
As shown in the table above, the model demonstrated significant gains across diverse datasets, including a 3.9% improvement on Thyroid Nodules (TNMIX) and a 2.0% improvement on Optic Cups (REFUGE2) compared to its predecessor.
Efficiency and Convergence
Despite the inclusion of Transformers, MedSegDiff-V2 is more computationally efficient than previous iterations. The model reaches stability in only 10 sampling iterations, compared to the 25 required by MedSegDiff-V1. This faster convergence resulted in a reduction of Gflops from 1770 to 983, nearly halving the computational cost during inference.
Conclusion
MedSegDiff-V2 represents a significant advancement in medical image segmentation by successfully integrating Vision Transformers into a diffusion framework. By leveraging frequency-domain alignment and uncertainty-aware attention, the model provides a robust, accurate, and efficient solution for complex clinical imaging tasks. Future research may focus on further optimizing sampling techniques to reduce the reliance on ensemble methods.
Summary updated