Abstract
Weakly Supervised Semantic Segmentation (WSSS) aims to reduce the high cost of pixel-level annotation by training models on image-level labels. However, these models often suffer from spurious correlations, where background elements consistently co-occurring with objects—such as rails with trains—are incorrectly identified as part of the object. This paper introduces W-OoD, a framework that leverages "hard" Out-of-Distribution (OoD) data to provide negative signals, effectively decoupling objects from their typical backgrounds. By mining images that classifiers falsely identify as target classes and applying a clustering-based metric learning approach, W-OoD achieves state-of-the-art performance on the Pascal VOC 2012 benchmark.
Introduction
Semantic segmentation is a fundamental computer vision task that requires dense, pixel-wise labeling. While fully supervised methods have reached high levels of maturity, the requirement for exhaustive manual masks remains a significant bottleneck. Weakly Supervised Semantic Segmentation (WSSS) offers a more scalable alternative by utilizing cheaper supervision, such as image-level tags.
The primary challenge in WSSS is the "train-on-rail" curse: the tendency of models to learn spurious correlations between objects and their common environments. Because Class Activation Maps (CAMs)—the standard starting point for WSSS—rely on discriminative features, they often "bleed" into co-occurring background pixels. For instance, a model might consistently associate the texture of water with "boat" or tracks with "train." This paper presents W-OoD, a method designed to break these correlations by explicitly teaching the model what does not constitute the target object using hard negative samples.
The W-OoD Framework
The W-OoD approach consists of two primary phases: hard OoD data mining and clustering-based metric learning.
Mining "Hard" OoD Data
Unlike traditional methods that might use random background images, W-OoD focuses on "hard" negatives. These are images that do not contain the target object but are highly confusing to a pre-trained classifier. For example, a photo of empty railroad tracks might trigger a high confidence score for the "train" class from a standard classifier.
The authors mine these candidates from large-scale datasets like OpenImages. To ensure the quality of the negative signal, a human-in-the-loop process is employed to prune images that actually contain the target object (e.g., a distant train). This process results in a refined set of 5,190 images that represent the exact background features the model needs to ignore.
Clustering-based Metric Learning
To integrate this OoD data, the authors introduce a metric learning loss ($L_d$). The framework clusters features of in-distribution (ID) objects and OoD backgrounds in a shared embedding space. The model is trained to minimize the distance between an image's features and its corresponding class cluster while maximizing the distance from the "hard" OoD clusters. This contrastive approach forces the network to isolate the unique morphological features of the object (the train itself) from the features of its typical surroundings (the tracks).
Experimental Results
The W-OoD method was evaluated using the Pascal VOC 2012 dataset, with OpenImages serving as the source for OoD mining.
Performance and Efficiency
W-OoD achieved a mean Intersection over Union (mIoU) of 70.7% on the Pascal VOC 2012 validation set and 70.1% on the test set. These results represent a significant improvement over existing WSSS baselines. Notably, the method proved to be highly data-efficient: the inclusion of just 100 hard OoD images per class provided performance gains comparable to adding 10,000 standard in-distribution images.
Qualitative Improvements
Visual analysis of the generated segmentation masks reveals that W-OoD significantly improves precision. While baseline models often produce "bloated" masks that include surrounding sky, water, or ground, W-OoD produces much tighter boundaries that adhere strictly to the object's contours. The method is also "plug-and-play," consistently improving existing baselines like IRN or AdvCAM by 3-4% mIoU.
Discussion and Limitations
Despite its success, W-OoD involves a human-in-the-loop component to verify that mined OoD images are true negatives. While this is substantially less labor-intensive than pixel-level masking, it remains a manual step.
An interesting finding occurred with the "dining table" category, where W-OoD appeared to underperform. Investigation revealed that the model was actually too precise, correctly excluding plates and cutlery from the table mask. However, because the Pascal VOC ground truth often includes these items as part of the table, the model was technically penalized for its accuracy. This highlights the "noisy ground truth" problem in standard benchmarks when models begin to exceed the precision of the original annotations.
Conclusion
W-OoD demonstrates that "hardness" in data is a valuable resource. By strategically using images that the model is most likely to misclassify, researchers can effectively suppress spurious correlations in weakly supervised tasks. The framework offers a robust path forward for high-precision segmentation without the need for exhaustive manual labeling.
Summary updated