Introduction
Semantic segmentation typically requires pixel-level annotations, which are labor-intensive and expensive to produce. Weakly-Supervised Semantic Segmentation (WSSS) addresses this by training models using only image-level tags. The standard approach involves generating Class Activation Maps (CAMs) to serve as pseudo-labels. However, existing CAM methods suffer from a fundamental trade-off:
- CNN-based CAMs are often "greedy," focusing only on the most discriminative object parts (e.g., a dog's face) while ignoring the rest of the body, leading to high false negatives.
- ViT-based CAMs capture global dependencies but are frequently "distracted," allowing attention to spill into the background or unrelated objects, leading to high false positives.
Methodology
The proposed AD-CAM (Attention-based Class Activation Diffusion) bridges the gap between local CNN features and global Vision Transformer (ViT) attention using a dual-branch Conformer architecture. The framework consists of three primary components:
1. Co-Neighbor AM Refinement
To mitigate the "distracted" nature of ViT attention, the authors introduce a refinement process based on co-neighbor similarity. This module only trusts the attention between two pixels if they share a significant number of common neighbors in the attention space. Mathematically related to Jaccard similarity, this acts as a noise filter that prunes spurious long-range connections, keeping attention focused on semantically related regions.
2. Attention-based CAM Diffusion
Rather than simple multiplication, AD-CAM treats the refined attention matrix as a transition probability map. Initial "seed" activations from the CNN branch are "diffused" across the image through a probabilistic walk. This allows activation to flow naturally from discriminative parts to the entire object body, following the refined structural contours.
3. Stop-Gradient Training
During training, a stop-gradient operation is applied between the CNN and ViT branches. This prevents the two branches from collapsing into a single representation, ensuring they maintain complementary local and global information for the final diffusion step.
Key Results and Insights
AD-CAM sets a new state-of-the-art for WSSS pseudo-label generation on major benchmarks:
- PASCAL VOC 2012: AD-CAM achieved a seed mIoU (mean Intersection over Union) of 63.5%, significantly outperforming vanilla CNN (48.8%) and the previous ViT-based state-of-the-art, TS-CAM (54.7%). When used to train a DeepLabV2 model, it reached 69.4% mIoU on the test set.
- MS COCO 2014: The method proved robust on this more challenging dataset, maintaining high performance in complex scenes with 80 object classes.
- Efficiency: Despite the sophisticated diffusion process, AD-CAM is approximately 10x faster than other recent high-performing methods like GETAM, making it practical for large-scale applications.
Discussion and Limitations
The success of AD-CAM highlights that diffusion is superior to multiplication for coupling local and global features; diffusion allows information to spread softly along object contours rather than being strictly gated.
However, the method does have limitations. It relies on hyperparameter tuning for the number of neighbors ($k$) and diffusion steps ($T$), which may vary across datasets. Additionally, while AD-CAM produces high-quality initial seeds, it still benefits from traditional post-processing steps like IRNet to achieve perfect object boundaries. Future work may involve integrating newer foundation models like DINOv2 to further enhance the diffusion process.
Summary updated