[Paper Review] Unsupervised domain adaptation via coarse-to-fine feature alignment method using contrastive learning
This paper proposes CFContra, a novel unsupervised domain adaptation method for semantic segmentation that uses contrastive learning to achieve coarse-to-fine feature alignment across source and target domains. By jointly optimizing contrastive loss with entropy minimization and employing an efficient memory bank strategy, the method improves mIOU by 3.5 points over MinEnt on GTA5-to-Cityscapes, achieving state-of-the-art performance with improved training stability and memory efficiency.
Previous feature alignment methods in Unsupervised domain adaptation(UDA) mostly only align global features without considering the mismatch between class-wise features. In this work, we propose a new coarse-to-fine feature alignment method using contrastive learning called CFContra. It draws class-wise features closer than coarse feature alignment or class-wise feature alignment only, therefore improves the model's performance to a great extent. We build it upon one of the most effective methods of UDA called entropy minimization to further improve performance. In particular, to prevent excessive memory occupation when applying contrastive loss in semantic segmentation, we devise a new way to build and update the memory bank. In this way, we make the algorithm more efficient and viable with limited memory. Extensive experiments show the effectiveness of our method and model trained on the GTA5 to Cityscapes dataset has boost mIOU by 3.5 compared to the MinEnt algorithm. Our code will be publicly available.
Motivation & Objective
- To address the limitation of existing unsupervised domain adaptation methods that only align global feature distributions without considering class-wise feature mismatches.
- To develop a robust, non-adversarial method for aligning class-wise features across domains using contrastive learning.
- To improve training efficiency and memory usage in contrastive learning for semantic segmentation by introducing a dynamic memory bank update strategy.
- To enhance model generalization by combining contrastive loss with entropy minimization to push decision boundaries away from feature clusters.
Proposed method
- The method applies adaptive instance normalization (AdaIN) for lightweight style transfer from source to target domain, enabling initial feature alignment.
- Pseudo-labels are assigned to target features based on proximity to class centers in the source domain, assuming inter-domain class-wise feature similarity.
- A memory bank is constructed for each class in both domains, updated using batch-wise average features to reduce computational cost and memory footprint.
- Contrastive loss is optimized using a temperature-scaled InfoNCE loss, with hard negative mining deferred to later training stages to improve stability.
- The model jointly optimizes cross-entropy loss (on source), entropy loss (on target), and contrastive loss (on both domains) for end-to-end training.
- A novel head module (MOCO) is used to decouple representation learning from classification, significantly improving performance over linear or simple projection heads.
Experimental results
Research questions
- RQ1Can contrastive learning effectively align class-wise features across source and target domains in unsupervised semantic segmentation without adversarial training?
- RQ2How does coarse-to-fine feature alignment via contrastive learning improve mIOU compared to global feature alignment or entropy minimization alone?
- RQ3What is the impact of memory bank design and update strategy on training efficiency and performance in contrastive learning for dense prediction tasks?
- RQ4How sensitive is the method to hyperparameters like temperature, momentum, and contrastive loss weighting?
- RQ5Does decoupling representation learning from classification via a specialized head module improve generalization in domain adaptation?
Key findings
- The proposed CFContra method achieves a 3.5-point mIOU improvement over the MinEnt baseline on the GTA5-to-Cityscapes benchmark, reaching 45.8 mIOU.
- The ablation study shows that combining contrastive loss with entropy minimization reduces both cross-entropy and entropy losses, indicating better feature clustering and decision boundary separation.
- The pseudo-label accuracy increases by 15% when using MOCO-based contrastive learning, demonstrating improved feature center assignment.
- The method is robust to hyperparameter variations: temperature (τ) and contrastive loss weight (λ_contra) have strong effects, while momentum (α) and threshold (t) show minimal impact.
- Using MOCO as the head module yields the highest mIOU (45.4), outperforming linear and other contrastive heads, confirming the benefit of representation decoupling.
- The memory bank update strategy—using batch-wise class averages instead of all features—reduces computation and memory usage while maintaining performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.