Introduction
Weakly Supervised Semantic Segmentation (WSSS) aims to train pixel-level labeling models using only image-level annotations, significantly reducing the cost of data preparation. Historically, the field has relied on Class Activation Maps (CAMs) generated from Convolutional Neural Networks (CNNs). However, CAMs are notoriously "greedy," focusing on the most discriminative object parts rather than full shapes, necessitating complex multi-stage refinement processes.
This paper introduces ViT-PCM (Vision Transformer Patch-Class Mapping), a framework that leverages the spatial properties of Vision Transformers (ViTs) and Global Max Pooling (GMP) to generate high-quality pseudo-masks in a single, efficient end-to-end training process. By ditching the traditional CAM bottleneck, the model achieves state-of-the-art results with a simpler architecture.
The ViT-PCM Framework
The ViT-PCM architecture is designed to maintain spatial consistency and capture full object extents without the need for external refinement loops. Unlike CNNs, which have a fixed inductive bias, ViTs learn spatial relations from scratch, allowing them to better preserve scene layouts and object boundaries.
As illustrated in the figure above, the model consists of three primary components:
- Patch Encoder (ViT): Processes input patches to generate high-level features.
- HV-BiLSTM Patch Conditioning: Horizontal and Vertical Bidirectional LSTMs are employed to ensure that neighboring patches share information, promoting spatial smoothness and consistency across the segmentation map.
- Patch Classifier: A simple MLP that maps conditioned features to class predictions.
To further enhance robustness, the model utilizes Equivariant Regularization via a two-branch training strategy. One branch processes the original image, while the second processes a transformed version (e.g., scaled or translated). By enforcing consistency between these branches, the model learns more robust representations of object shapes.
Theoretical Advantages of Max Pooling
A core innovation of ViT-PCM is the use of Global Max Pooling (GMP) instead of the standard Global Average Pooling (GAP). The authors provide a mathematical derivation showing that GMP acts as an "explicit search" mechanism. During backpropagation, the gradient forces the network to identify the single most representative patch for a class, effectively separating the feature space into distinct sub-spaces for different objects. This "linear search" property is crucial for generating clean, shape-accurate segmentation seeds without the "greedy" bias of traditional CAMs.
Experimental Evaluation
The model was evaluated on the Pascal VOC 2012 and MS COCO 2014 benchmarks, which are industry standards for WSSS.
Key Results:
- Pseudo-Mask Quality: On Pascal VOC 2012, ViT-PCM achieved a 67.7% mIoU for baseline pseudo-masks, outperforming the previous best (AFA) by nearly 4%.
- Segmentation Performance: When these pseudo-masks were used to train a standard DeepLab segmentation model, it reached 70.3% mIoU on the Pascal VOC validation set.
- Efficiency: ViT-PCM achieves these results with the smallest parameter footprint among its peers (approx. 89.4M parameters), proving that architectural innovation can outperform resource-intensive multi-stage pipelines.
Conclusion
ViT-PCM demonstrates that by moving away from the CAM bottleneck and embracing the unique strengths of Vision Transformers and Max Pooling, WSSS can become both more accurate and more efficient. By reconciling class identification with shape preservation in a single stage, this work paves the way for simpler, more scalable weakly supervised learning systems.
Summary updated