Skip to main content
QUICK REVIEW

[Paper Review] Semantic Distribution-aware Contrastive Adaptation for Semantic Segmentation

Shuang Li, Binhui Xie|arXiv (Cornell University)|May 11, 2021
Domain Adaptation and Few-Shot LearningComputer Science81 references21 citations
TL;DR

This paper proposes Semantic Distribution-aware Contrastive Adaptation (SDCA), a novel domain adaptation method for semantic segmentation that uses category-level semantic distributions from the source domain to guide pixel-wise representation alignment via a contrastive loss. The method achieves state-of-the-art performance on multiple benchmarks by improving feature discriminability and robustness to domain shift, especially when combined with self-supervised learning.

ABSTRACT

Domain adaptive semantic segmentation refers to making predictions on a certain target domain with only annotations of a specific source domain. Current state-of-the-art works suggest that performing category alignment can alleviate domain shift reasonably. However, they are mainly based on image-to-image adversarial training and little consideration is given to semantic variations of an object among images, failing to capture a comprehensive picture of different categories. This motivates us to explore a holistic representative, the semantic distribution from each category in source domain, to mitigate the problem above. In this paper, we present semantic distribution-aware contrastive adaptation algorithm that enables pixel-wise representation alignment under the guidance of semantic distributions. Specifically, we first design a pixel-wise contrastive loss by considering the correspondences between semantic distributions and pixel-wise representations from both domains. Essentially, clusters of pixel representations from the same category should cluster together and those from different categories should spread out. Next, an upper bound on this formulation is derived by involving the learning of an infinite number of (dis)similar pairs, making it efficient. Finally, we verify that SDCA can further improve segmentation accuracy when integrated with the self-supervised learning. We evaluate SDCA on multiple benchmarks, achieving considerable improvements over existing algorithms.The code is publicly available at https://github.com/BIT-DA/SDCA

Motivation & Objective

  • To address domain shift in semantic segmentation by improving category-level feature alignment across source and target domains.
  • To mitigate unstable and biased alignment caused by image-level variations and limited mini-batch diversity in existing category-level adversarial methods.
  • To enhance feature discriminability by modeling the full distribution of each semantic category in the source domain, rather than relying on single centroids.
  • To develop an efficient, differentiable contrastive loss that implicitly aligns an infinite number of pixel-wise feature pairs using semantic distribution guidance.
  • To validate the effectiveness of SDCA in improving segmentation accuracy under domain shift, especially when combined with self-supervised pretraining.

Proposed method

  • Proposes a pixel-level contrastive loss that encourages features from the same semantic category to cluster together and from different categories to spread apart, guided by the semantic distribution of each category in the source domain.
  • Introduces an upper bound approximation of the contrastive loss to make it tractable and efficient, enabling joint learning of infinite (dis)similar pixel pairs without explicit sampling.
  • Uses the semantic distribution of each category (estimated from source data) as a holistic representative to guide feature alignment, capturing intra-category variations such as texture, color, and lighting.
  • Employs a dual-branch network with shared encoder for source and target features, where the contrastive loss is applied on pixel-wise features from both domains.
  • Integrates SDCA with self-supervised learning (SSL) to further boost performance, leveraging unlabeled target data for improved feature learning.
  • Applies t-SNE visualization and a new Pixel-wise Discrimination Distance (PDD) metric to quantitatively evaluate feature clustering and separability.

Experimental results

Research questions

  • RQ1Can modeling the full semantic distribution of each category in the source domain lead to more stable and accurate category-level alignment in domain adaptation for semantic segmentation?
  • RQ2Does using a contrastive loss guided by semantic distributions improve the discriminative power of learned pixel-wise features in the target domain?
  • RQ3How does SDCA compare to state-of-the-art methods in terms of mIoU and feature clustering quality under domain shift?
  • RQ4To what extent does combining SDCA with self-supervised learning enhance generalization and performance on target domains?
  • RQ5How sensitive is SDCA to hyperparameters such as the threshold δ and loss weighting coefficients?

Key findings

  • SDCA achieves state-of-the-art performance on multiple benchmarks, including GTAV → Cityscapes and SYNTHIA → Cityscapes, outperforming existing SOTA methods.
  • The t-SNE visualization shows that SDCA produces the clearest and most separated feature clusters across semantic categories compared to other methods.
  • The proposed Pixel-wise Discrimination Distance (PDD) metric confirms that SDCA achieves significantly higher intra-category compactness and inter-category separability than CLAN, FADA, SIM, and CAG-UDA.
  • Sensitivity analysis shows that SDCA maintains high performance across a wide range of hyperparameters, with mIoU peaking at intermediate values of δ and loss weights, indicating robustness.
  • When combined with self-supervised learning, SDCA further improves segmentation accuracy, demonstrating its compatibility and synergy with SSL pretraining.
  • The upper bound approximation of the contrastive loss enables efficient training without explicit sampling of negative pairs, making the method practical and scalable.

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.