Robustified Domain Adaptation

Jiajin Zhang, Hanqing Chao, Pingkun YanarXiv 2020

TL;DR

Deep learning models adapted to new, unlabeled domains are surprisingly fragile, often losing their adversarial robustness during the transfer process. This paper introduces CURDA, a framework that uses robust source-domain "anchors" and contrastive learning to align target-domain samples, significantly boosting adversarial resilience (by over 60% in some cases) with minimal impact on standard accuracy.

What Problem Does This Paper Address?

Unsupervised Domain Adaptation (UDA) is a powerful tool for taking a model trained on a labeled "source" dataset (like synthetic images) and applying it to an unlabeled "target" dataset (like real-world photos). While UDA is great for bridging distribution shifts, it has a hidden weakness: adversarial vulnerability.

Even if a model is trained to be robust in the source domain, that robustness rarely transfers to the target domain. The authors point out that even slight remaining distribution deviations between domains act as a "backdoor" for adversarial attacks. Furthermore, standard methods to fix this—like label-free adversarial training on the target domain—often backfire, causing "classification confusion" where the model accidentally learns to map clean samples to the wrong classes while trying to defend against noise.

Methods

The authors propose the Class-consistent Unsupervised Robust Domain Adaptation (CURDA) framework, which operates in two main stages:

  1. Contrastive Robust Training (CORTrain): Instead of standard training, the source model is trained using a contrastive loss. This forces the model to learn a feature space where samples from the same class are tightly clustered (intra-class compactness) and different classes are far apart (inter-class sparsity). This "discriminative robust space" makes it much harder for an attacker to push a sample across a decision boundary.
  2. Source Anchored Adversarial (SAA) Contrastive Loss: This is the core innovation. During adaptation, the framework uses the robust feature representations from the source domain as fixed anchors. It then pulls both clean and adversarial target samples toward their corresponding source anchors.
Figure 2: The architecture of the proposed Class-consistent Unsupervised Robust Domain Adaptation (CURDA). The SR Model stands for a source-robust model. The UDA Model stands for a UDA model to be robustified.

By anchoring to the source, the model avoids the "blind leading the blind" problem of label-free training. To handle the lack of target labels, they use a high-confidence pseudo-labeling strategy that switches from the source model to the adapting UDA model as training stabilizes.

Datasets

The framework was evaluated on two widely used UDA benchmarks:

  • DIGITS: Cross-domain tasks between MNIST (handwritten digits), USPS, and MNIST-M (digits with colorful backgrounds).
  • Office-31: A more complex dataset featuring 31 object classes across three domains: Amazon (product images), Webcam (low-res office photos), and DSLR (high-res office photos).

Key Insights and Ideas

  • The Transferability Gap: Robustness is more sensitive to distribution shift than accuracy. A model can be 90% accurate on a new domain but 0% robust to attacks because the decision boundaries haven't aligned perfectly.
  • Source Anchors as a "North Star": Because target labels are missing, using fixed, robust source features as anchors prevents adversarial training from "dragging" clean samples into the wrong class clusters.
  • Contrastive Learning for Defense: The paper reinforces the idea that feature-space geometry matters. Tighter clusters aren't just good for classification; they provide a natural buffer against the small perturbations used in adversarial attacks.
Figure 1: Illustration of performance on clean and adver- sarial samples under different models. a. The robustness achieved by adversarial training (AT) on the source domain (SD) is hard to be transferred to the target domain(TD). b. Further incorporating label-free robust training on the tar- get domain will incur severe performance drop. c. CURDA efficiently aligns both target clean and adversarial samples with their corresponding classes.

Key Results

The quantitative improvements are substantial:

  • Robustness Gains: On the DIGITS benchmark, CURDA improved adversarial robustness by more than 60% compared to standard UDA models (ADDA and SRDC).
  • Clean Accuracy Preservation: Unlike standard adversarial training, which often significantly degrades performance on clean data, CURDA maintained competitive accuracy. For example, on MNIST→USPS, CURDA achieved 77.5% robustness while keeping clean accuracy at 86.8% (only a ~3% drop from the non-robust baseline).
  • Visual Evidence: t-SNE visualizations (Figure 4) clearly show that while baseline methods leave adversarial samples scattered or misclassified, CURDA successfully groups them into the correct class clusters alongside source samples.
Figure 4: Visualization by t-SNE on representations learnt by ADDA with different adversarial training strategies. The outputs of the second-to-last layer (activation layer) were used for this visualization.

Limitations and Future Work

  • Pseudo-label Dependency: The method relies on the quality of pseudo-labels. If the initial domain shift is too large for the source model to provide decent starting labels, the SAA-loss might struggle.
  • Hyperparameter Sensitivity: The performance is sensitive to the pseudo-label threshold ($P_{pseudo}$) and the margin size ($m$) in the contrastive loss, requiring careful tuning for different datasets.
  • Computational Cost: Generating adversarial samples during training increases the computational overhead compared to standard UDA.

The authors suggest that future work could explore more complex domain adaptation scenarios, such as multi-source adaptation or open-set adaptation, where the set of classes might not perfectly overlap.

Summary updated

BibTeX
@misc{zhang2020robustified,
  author = {Jiajin Zhang and Hanqing Chao and Pingkun Yan},
  title = {{Robustified Domain Adaptation}},
  year = {2020},
  eprint = {2011.09563},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.09563},
}
Figure