Skip to main content
QUICK REVIEW

[Paper Review] Contextrast: Contextual Contrastive Learning for Semantic Segmentation

Changki Sung, Wan-hee Kim|arXiv (Cornell University)|Apr 16, 2024
Multimodal Machine Learning ApplicationsComputer Science3 citations
TL;DR

Contextrast proposes a contrastive learning framework for semantic segmentation that enhances feature discrimination by fusing multi-scale local and global contexts through contextual contrastive learning (CCL) and improves boundary segmentation via boundary-aware negative (BANE) sampling. It achieves state-of-the-art performance on Cityscapes, CamVid, PASCAL-C, COCO-Stuff, and ADE20K without increasing inference complexity.

ABSTRACT

Despite great improvements in semantic segmentation, challenges persist because of the lack of local/global contexts and the relationship between them. In this paper, we propose Contextrast, a contrastive learning-based semantic segmentation method that allows to capture local/global contexts and comprehend their relationships. Our proposed method comprises two parts: a) contextual contrastive learning (CCL) and b) boundary-aware negative (BANE) sampling. Contextual contrastive learning obtains local/global context from multi-scale feature aggregation and inter/intra-relationship of features for better discrimination capabilities. Meanwhile, BANE sampling selects embedding features along the boundaries of incorrectly predicted regions to employ them as harder negative samples on our contrastive learning, resolving segmentation issues along the boundary region by exploiting fine-grained details. We demonstrate that our Contextrast substantially enhances the performance of semantic segmentation networks, outperforming state-of-the-art contrastive learning approaches on diverse public datasets, e.g. Cityscapes, CamVid, PASCAL-C, COCO-Stuff, and ADE20K, without an increase in computational cost during inference.

Motivation & Objective

  • To address the limitation of existing contrastive learning methods in capturing and relating local and global context in semantic segmentation.
  • To improve segmentation accuracy, especially along object boundaries, by leveraging harder negative samples from misclassified edge regions.
  • To maintain inference efficiency by avoiding additional network modules or parameters.
  • To enable better feature discrimination through representative anchor fusion across encoder layers.
  • To demonstrate consistent performance gains across diverse benchmarks without increasing computational cost.

Proposed method

  • Contextual contrastive learning (CCL) aggregates multi-scale features from encoder layers and uses higher-layer representative anchors to update lower-layer anchors, enabling each layer to capture both local and global context.
  • Representative anchors for each class are updated using global context from the last layer, ensuring consistent understanding of inter-scale relationships.
  • Boundary-aware negative (BANE) sampling selects embedding features from incorrectly predicted regions along object boundaries as negative samples, increasing gradient informativeness.
  • The method uses a weighted fusion of high-level and low-level anchors, with hyperparameters $ w_h $ and $ w_l $ summing to 1, to balance global and local context representation.
  • BANE sampling ratio $ K $ is tuned to optimize negative sample selection, with 50% ratio yielding the best performance on Cityscapes.
  • The framework is trained with contrastive loss using both CCL and BANE, with refinement modules detached at inference to preserve speed.

Experimental results

Research questions

  • RQ1Can multi-scale feature aggregation with anchor fusion improve the understanding of local and global context relationships in semantic segmentation?
  • RQ2Does sampling harder negative examples from boundary regions of misclassified areas lead to better feature discrimination and segmentation accuracy?
  • RQ3Can the proposed method achieve state-of-the-art performance without increasing inference-time computational cost?
  • RQ4How robust is the method to hyperparameter choices such as anchor fusion weights and sampling ratios?
  • RQ5To what extent does the integration of CCL and BANE improve mIoU across diverse benchmarks?

Key findings

  • Contextrast outperforms state-of-the-art contrastive learning methods on Cityscapes, CamVid, PASCAL-C, COCO-Stuff, and ADE20K with no increase in inference cost.
  • On Cityscapes using HRNet, the method achieves 82.20% mIoU, a +3.72% improvement over the baseline ContrastiveSeg.
  • On CamVid with OCRNet, the method achieves 84.33% mIoU, a +2.16% improvement over the baseline.
  • The ablation study shows that combining CCL and BANE yields the highest mIoU gain of +3.72% on Cityscapes, outperforming individual components.
  • The method is robust to hyperparameter tuning, with stable performance across different anchor fusion weights ($ w_h $) and optimal sampling ratio at 50%.
  • Visual analysis confirms that boundary features are harder negatives, with higher cosine similarity to incorrect prediction anchors, validating the BANE sampling strategy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.