Cross-Domain Gradient Discrepancy Minimization for Unsupervised Domain Adaptation

Zhekai Du, Jingjing Li, Hongzu Su, Lei Zhu, Ke Lu

Abstract

Unsupervised Domain Adaptation (UDA) aims to transfer knowledge from a labeled source domain to an unlabeled target domain. While bi-classifier adversarial learning is a popular strategy, it often fails because classifier agreement on target samples does not guarantee correct classification. This paper proposes Cross-Domain Gradient Discrepancy Minimization (CGDM). By aligning the optimization paths of source and target domains through gradient similarity, CGDM ensures that the model learns consistent semantic features across domains. Experimental results on major benchmarks like DomainNet and VisDA-2017 demonstrate that CGDM significantly outperforms existing state-of-the-art methods.

Introduction: The Challenge of Unsupervised Domain Adaptation

The core challenge in UDA is the distribution shift between a labeled "source" domain (e.g., synthetic images) and an unlabeled "target" domain (e.g., real-world photos). A common approach involves bi-classifier adversarial learning, where two classifiers ($F_1, F_2$) and a feature generator ($G$) are trained. The classifiers are encouraged to disagree on target samples outside the source distribution, while the generator attempts to minimize this discrepancy.

However, a critical flaw exists: agreement does not equal accuracy. As illustrated in Figure 1, even if both classifiers agree on a label for a target sample, they may both be incorrect if the target sample is mapped to the wrong semantic region. Previous methods focused primarily on output similarity, neglecting the underlying optimization dynamics required to ensure correct category mapping.

Conceptual illustration of the limitation in standard UDA: agreement between classifiers does not guarantee correct classification of ambiguous target samples.

Methodology: Cross-Domain Gradient Discrepancy Minimization (CGDM)

To address the limitations of output-based alignment, CGDM introduces a "gradient signal" into the adversarial framework. The method ensures that the learning "direction" for both domains is consistent.

1. Refined Pseudo-Labeling

Since target data is unlabeled, gradients cannot be computed directly. CGDM employs a weighted clustering-based self-supervised learning strategy to generate reliable pseudo-labels. By calculating feature centroids in the target domain, the model assigns more robust labels than raw predictions would provide.

2. Gradient Discrepancy Minimization (GDM)

The central innovation of CGDM is the Gradient Discrepancy loss ($L_{GD}$). The authors posit that for a model to generalize across domains, the gradient vectors produced by source and target samples should be similar. This similarity is measured using the cosine similarity between the expected gradients of the two domains.

3. Minimax Optimization Framework

The training process follows a three-step minimax procedure:

  • Step 1: Joint training of the generator and classifiers using supervised source loss and self-supervised target loss.
  • Step 2: The generator is frozen while classifiers are updated to maximize output discrepancy on target samples, identifying ambiguous regions.
  • Step 3: The generator is updated to minimize both the output discrepancy and the gradient discrepancy, forcing target features to align with the source optimization path.
The CGDM architecture, highlighting the integration of Gradient Discrepancy Loss and Self-supervised Loss alongside standard adversarial components.

Experimental Evaluation

The authors evaluated CGDM on three major UDA benchmarks: DomainNet, VisDA-2017, and ImageCLEF. CGDM consistently outperformed state-of-the-art methods:

  • On DomainNet, CGDM achieved an average accuracy of 27.2%, a significant improvement over CDAN (21.2%) and MCD (20.5%).
  • On VisDA-2017, the method reached 82.3% accuracy, surpassing the previous bi-classifier leader, SWD (76.4%), by nearly 6 percentage points.

Ablation studies confirmed that both the self-supervised pseudo-labeling and the gradient discrepancy loss are essential components, as removing either led to a notable performance decline.

Discussion and Insights

The success of CGDM highlights that gradients serve as powerful semantic cues. Aligning gradients ensures that the model learns the same semantic concepts from both domains, rather than just matching output distributions. Furthermore, the use of entropy weighting during target gradient calculation allows the model to prioritize confident samples, mitigating the risk of error propagation from noisy pseudo-labels.

While computationally more intensive than forward-pass metrics, CGDM provides a more principled way to ensure that the optimization dynamics of the target domain mirror those of the source, leading to a more robust joint hypothesis.

Conclusion

CGDM introduces a novel perspective to Unsupervised Domain Adaptation by focusing on optimization path alignment. By minimizing cross-domain gradient discrepancy, the method effectively bridges the gap between source and target domains, achieving superior performance on complex, large-scale benchmarks.

Summary updated

BibTeX
@inproceedings{du2021cross,
  author = {Zhekai Du and Jingjing Li and Hongzu Su and Lei Zhu and Ke Lu},
  title = {{Cross-Domain Gradient Discrepancy Minimization for Unsupervised Domain Adaptation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00393},
}
Figure