Exploiting Inter-pixel Correlations in Unsupervised Domain Adaptation for Semantic Segmentation

Inseop Chung, Jayeon Yoo, Nojun Kwak

TL;DR

This paper introduces a novel self-attention module to transfer inter-pixel correlations from a labeled source domain to an unlabeled target domain for semantic segmentation. By learning domain-invariant relationships between pixels, their method effectively complements noisy pseudo-labels generated during self-training, leading to significant performance improvements.

What Problem Does This Paper Address?

Semantic segmentation, the task of assigning a class label to every pixel in an image, is crucial for many real-world applications like autonomous driving. However, obtaining pixel-level annotations is extremely labor-intensive. Unsupervised Domain Adaptation (UDA) aims to bridge this gap by leveraging knowledge from a labeled source domain (e.g., synthetic data) to perform well on an unlabeled target domain (e.g., real-world images). A dominant UDA approach for semantic segmentation is "self-training," where a model generates "pseudo-labels" for the target domain and then retrains itself using these labels. The core challenge addressed here is that these pseudo-labels are often noisy and sparse, and critically, they fail to capture the inherent structural relationships between pixels (e.g., sky pixels are typically at the top, car pixels are on roads). The authors argue that these inter-pixel correlations are domain-invariant and can provide valuable supervision.

Methods

The paper proposes a Self-Attention Module (SAM) designed to capture and transfer inter-pixel correlations. The SAM takes the logit output (pre-softmax probabilities) of a segmentation network as input. It first transforms these logits and then computes an attention map by taking the outer product of the transformed logits with themselves. This attention map essentially quantifies the similarity between pixels. After applying ReLU and normalization, this map is used to create a new, "self-attended" logit output.

The training process involves two main phases:

  1. SAM Training: The SAM is trained only on the source domain using ground truth labels. This phase aims to teach the SAM about domain-invariant inter-pixel correlations. The segmentation network is also trained concurrently, but its weights are discarded later.
  2. Domain Adaptive Training: The pre-trained SAM (now frozen) is used to guide the training of a new segmentation network on both source and target domains. The segmentation network is trained using a combination of the standard self-training loss (using pseudo-labels for the target domain) and a novel "self-attention loss." This self-attention loss encourages the network's output logits to mimic the self-attended logits produced by the SAM, effectively transferring the learned inter-pixel correlation knowledge.

Datasets

The authors evaluate their method on two standard UDA benchmarks for semantic segmentation:

  • Source Domains: GTA5 [22] and SYNTHIA [23] (synthetic datasets).
  • Target Domain: Cityscapes [9] (real-world dataset).

They also mention using style-transferred images from [43] to further reduce the domain gap at the image level.

Key Insights and Ideas

  • Inter-pixel correlations are domain-invariant: The core hypothesis is that the relationships between pixels (e.g., sky above road) are consistent across different domains, making them a valuable source of supervision.
  • Self-attention for correlation transfer: The SAM provides a principled way to learn and transfer these inter-pixel relationships, acting as a form of structured supervision that complements noisy pseudo-labels.
  • Complementing self-training: The proposed method doesn't replace self-training but enhances it by addressing its inherent limitations (noisy and sparse labels) with structural information.
  • Simplicity and modularity: The SAM is a lightweight module that can be easily integrated with existing UDA frameworks, even achieving state-of-the-art results when combined with other methods like ProDA.

Key Results

  • Significant performance gains: The proposed method consistently outperforms baseline self-training approaches ("Pseudo-Only") on both GTA5→Cityscapes and SYNTHIA→Cityscapes benchmarks.
  • Improved performance on rare classes: The method shows particularly strong improvements on rare classes, which are often challenging for segmentation models.
  • State-of-the-art (SOTA) achievement: When combined with ProDA [38], the proposed method sets new SOTA scores on both UDA benchmarks.
  • Qualitative improvements: Visualizations show that the SAM helps the network attend more strongly to relevant pixels within the same class, leading to more accurate predictions compared to methods relying solely on pseudo-labels.

Limitations and Future Work

  • Domain-specific settings: The paper notes that different configurations of the self-attention loss (e.g., applying it to source and target vs. only target) perform better on different source-target domain pairs (GTA5 vs. SYNTHIA). The authors conjecture this is due to varying domain gaps.
  • Hyperparameter tuning: While the method is simple, it introduces a hyperparameter ($\lambda$) to balance the segmentation and self-attention losses, which needs empirical tuning.
  • Future work: The paper suggests that the SAM's ability to capture inter-pixel correlations could be further explored for other vision tasks beyond semantic segmentation. The discussion on why different settings work for different domains also points to avenues for deeper theoretical understanding.

Summary updated

BibTeX
@inproceedings{chung2023exploiting,
  author = {Inseop Chung and Jayeon Yoo and Nojun Kwak},
  title = {{Exploiting Inter-pixel Correlations in Unsupervised Domain Adaptation for Semantic Segmentation}},
  booktitle = {Workshops @ WACV},
  year = {2023},
  doi = {10.1109/wacvw58289.2023.00006},
}
Figure