Abstract
Weakly Supervised Semantic Segmentation (WSSS) aims to learn pixel-level classification from image-level labels, reducing the need for expensive manual annotations. While Vision Transformers (ViTs) have improved global context capture over traditional CNNs, they often lack the local precision required for sharp object boundaries. This paper introduces DiG (Diffusion-Guided), a framework that leverages the rich spatial and semantic information within pretrained Denoising Diffusion Probabilistic Models (DDPM) to refine ViT-based segmentation. By integrating Locality Fusion Cross Attention (LFCA) and Patch Affinity Consistency (PAC), the method achieves new state-of-the-art performance on PASCAL VOC 2012 and MS-COCO 2014 benchmarks.
Introduction
Semantic segmentation usually requires dense, pixel-level annotations. WSSS seeks to train models using "weak" labels, such as image-level tags. The standard approach utilizes Class Activation Maps (CAMs) to identify object regions. However, CNN-based CAMs often highlight only the most discriminative parts (e.g., a dog's head), while ViT-based CAMs, despite capturing global context, suffer from blurry boundaries due to a lack of locality.
The authors identify that diffusion models, though primarily generative, possess internal features that capture high-level semantics with fine-grained local detail. The challenge lies in aligning these generative features with discriminative classification tasks without extensive fine-tuning.
Methodology
The DiG framework bridges the gap between diffusion models and ViTs through two primary components:
Locality Fusion Cross Attention (LFCA)
The LFCA module acts as a bridge between the discriminative ViT and the generative DDPM. It uses "query" tokens from the ViT—which are already aligned to specific classes—and "key/value" tokens from a frozen DDPM encoder. Through cross-attention, it fuses the global semantic knowledge of the ViT with the high-resolution local details of the diffusion model. This process generates Diffusion-CAMs, which exhibit significantly sharper and more accurate object boundaries compared to standard ViT-CAMs.
Patch Affinity Consistency (PAC)
To enhance the ViT's understanding of local patch relationships, the authors utilize the diffusion model as a "smart" data augmentor. As shown in the pipeline below, an image is slightly noised and then denoised using the DDPM. This denoised image remains semantically identical to the original but differs at the pixel level. The model is trained to ensure that "patch affinity" (the relationship between neighboring patches) remains consistent across these variations, enforcing structural robustness.
Key Results and Insights
The proposed DiG method established new state-of-the-art (SOTA) records across major benchmarks:
- PASCAL VOC 2012: Achieved 73.9% mIoU on the validation set, outperforming previous ViT-based methods like MCTformer (71.9%).
- MS-COCO 2014: Achieved 45.5% mIoU, a significant improvement over the previous best of 42.8% (LPCAM).
Qualitative analysis reveals that DiG produces much cleaner segmentations, particularly in complex scenarios involving thin structures (e.g., animal legs) or overlapping objects where previous methods typically struggled. A key insight is the "sweet spot" of noise: the authors found that a minimal noise time step ($t=60$) provides the best semantically consistent augmentation for the PAC module, whereas higher noise levels ($t=300$) begin to distort object structures.
Conclusion
By treating generative models as discriminative tools, the DiG framework demonstrates that diffusion features can effectively guide ViTs to produce high-quality semantic masks from weak supervision. While the use of a large U-Net encoder introduces some computational overhead, the resulting gains in boundary precision and overall mIoU set a new bar for the field. Future work may extend this diffusion-guidance to other weakly supervised tasks such as object detection or instance segmentation.
Summary updated