Semi-Supervised Semantic Segmentation via Marginal Contextual Information

Moshe Kimhi, Shai Kimhi, Evgenii Zheltonozhskii, Or Litany, Chaim Baskin · Submission to ICLR 2024 · Rejected

TL;DR

S4MC (Semi-Supervised Semantic Segmentation via Marginal Contextual Information) improves pseudo-labeling by considering the spatial context of neighboring pixels rather than treating them in isolation. By calculating the "event-union probability"—the likelihood that at least one pixel in a neighborhood belongs to a class—the method increases the volume of high-quality training data, leading to state-of-the-art performance and faster convergence.

The Challenge of Pseudo-Labeling

In semantic segmentation, labeling every pixel in an image is incredibly expensive. Semi-supervised learning (SSL) addresses this by training on a small set of labeled images and a large set of unlabeled ones. A common strategy is pseudo-labeling: the model predicts labels for unlabeled data and treats those predictions as "ground truth" for further training.

The primary challenge is confirmation bias. If the model is wrong but confident, it reinforces its own errors. To prevent this, researchers typically apply a strict confidence threshold—only the most "sure" pixels receive pseudo-labels. However, this creates a dilemma: a high threshold ensures quality but discards massive amounts of useful data, while a low threshold provides more data but poisons the training process with errors.

Introducing S4MC: Contextual Confidence Refinement

The authors introduce S4MC, which moves away from the standard practice of evaluating pixel confidence in isolation.

S4MC Architecture and Pseudo Label Refinement

The method relies on several key components:

  1. Marginal Contextual Information: Drawing on the fact that labels in segmentation maps are spatially correlated (e.g., a "cat" pixel is usually surrounded by other "cat" pixels), S4MC groups neighboring pixels.
  2. Event-Union Probability: Instead of just looking at the probability of a single pixel, the method calculates the probability that at least one pixel in a small neighborhood (e.g., $3 \times 3$) belongs to a specific class.
  3. Confidence Refinement: Using a weighted union event relaxation, if a pixel’s neighbors show support for a class, the confidence for that class is "boosted." This allows pixels that were previously just below the threshold to pass the filter without sacrificing accuracy.
  4. Dynamic Partition Adjustment (DPA): Rather than a fixed threshold, S4MC uses a quantile-based threshold that gradually decreases during training, allowing the model to incorporate more difficult examples as it matures.
  5. Teacher-Student Framework: The system uses a standard architecture where a "Teacher" model (an exponential moving average of the student) generates the pseudo-labels that the "Student" model learns from.
Effect of confidence refinement on a pixel initially below the threshold

Key Insights and Performance Gains

S4MC was evaluated on three major benchmarks: PASCAL VOC 12, Cityscapes, and MS COCO. It consistently outperformed existing state-of-the-art methods like UniMatch and FixMatch.

  • Context as a Filter: Spatial context acts as a natural error-correction mechanism. An isolated high-confidence prediction is more likely to be an error than a prediction supported by its neighbors.
  • Lowering the Bar Safely: By using the event-union probability, S4MC can "relax" the filtering criteria. This results in a higher fraction of data used for training while actually improving the accuracy of those pseudo-labels.
  • Efficiency is Free: The refinement happens at the probability level and involves simple tensor operations, adding negligible computational overhead (only about a 0.2% increase in runtime).
  • Faster Convergence: Because the model accesses more high-quality supervision signals early on, it reaches peak performance much faster—achieving the same mIoU as previous state-of-the-art methods in just 10 epochs instead of 80.
  • State-of-the-Art Results: S4MC achieved a +1.29 mIoU improvement on PASCAL VOC 12 (with 366 annotated images), a +1.01 mIoU increase on Cityscapes (186 annotations), and gained +1.5 mIoU on MS COCO (463 annotations).

Limitations and Future Work

While highly effective, the authors identify a few areas for future improvement. Interestingly, while S4MC improves overall mean Intersection over Union (mIoU), it slightly reduces Boundary IoU. Because the method "smooths" predictions based on neighbors, it can be less precise at the exact edges of objects.

Additionally, the method currently uses a fixed-shape $N \times N$ neighborhood; using segmented regions (superpixels) to define neighborhoods might better respect the actual structure of objects in the image. Finally, its reliance on spatial coherency means it is tailor-made for dense prediction and might not translate directly to tasks like image classification where spatial context is structured differently.

Summary updated

BibTeX
@misc{kimhi2023semi,
  author = {Moshe Kimhi and Shai Kimhi and Evgenii Zheltonozhskii and Or Litany and Chaim Baskin},
  title = {{Semi-Supervised Semantic Segmentation via Marginal Contextual Information}},
  year = {2023},
  eprint = {2308.13900},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.13900},
}
Figure