Domain Alignment with Triplets

Weijian Deng, Liang Zheng, Jianbin JiaoarXiv 2018

Introduction

In modern computer vision, "dataset bias" remains a significant hurdle. A model trained on synthetic images (the source domain) often fails when deployed on real-world photos (the target domain). Unsupervised Domain Adaptation (UDA) seeks to mitigate this by learning a shared feature space where source and target distributions are indistinguishable to a classifier.

However, standard UDA methods frequently rely on global alignment, matching the overall statistical distributions of the two datasets. This approach has a critical flaw: it can lead to semantic misalignment. For instance, a "bird" cluster in the target domain might inadvertently map to an "airplane" cluster in the source domain. While the overall distributions may overlap perfectly, the classifier fails because the underlying categorical clusters are scrambled. This paper introduces Similarity Constrained Alignment (SCA) to address this by enforcing class-level relationships during the alignment process.

Methodology

SCA operates on two levels simultaneously to ensure both distribution matching and semantic consistency.

Dual-Level Alignment

  1. Global Alignment: The framework utilizes Joint Maximum Mean Discrepancy (JMMD) to reduce the overall statistical shift between the source and target distributions.
  2. Class-Level Alignment: This core novelty implements a similarity-preserving constraint using triplet loss. The objective is two-fold: to pull embeddings of the same class (across domains) closer together (Class Unification) and to push embeddings of different classes further apart (Class Separation).
The SCA architecture integrates global alignment with a similarity-constrained triplet loss to produce a semantically consistent aligned feature space.

Pseudo-Labeling Strategy

Because target data lacks ground-truth labels, SCA employs a robust pseudo-labeling strategy to facilitate triplet loss. To minimize the impact of noisy labels, the authors implement three key tactics:

  • High Confidence Threshold ($T=0.9$): Only target images with prediction confidence exceeding 90% are used for triplet sampling.
  • Progressive Selection: Pseudo-labels are updated iteratively as the model's feature representation improves.
  • Strategic Triplet Sampling: Mini-batches are carefully constructed to ensure a sufficient density of positive and negative pairs, maximizing the effectiveness of the triplet loss.

Experimental Evaluation

The authors evaluated SCA on two standard UDA benchmarks:

  • Office-31: 4,652 images across 31 categories from three domains: Amazon (product images), DSLR (high-res photos), and Webcam (low-res photos).
  • ImageCLEF-DA: 12 categories shared across three domains: Caltech-256, ImageNet ILSVRC 2012, and Pascal VOC 2012.

Results and Discussion

SCA achieved state-of-the-art performance, with an average accuracy of 87.6% on Office-31 and 87.9% on ImageCLEF-DA, outperforming established methods like CDAN and JAN. Ablation studies confirmed that adding the similarity constraint ($S$) to a baseline domain alignment ($D$) improved accuracy by 3.4%.

t-SNE visualizations demonstrate that while standard alignment (b) creates overlapping clusters, SCA (c) produces distinct, clean clusters where source and target points are tightly interleaved by class.

Key Insights

  • Collaborative Alignment: Global alignment brings the broad "clouds" of data into the same neighborhood, providing a foundation for the triplet loss to fine-tune local semantic boundaries.
  • Robustness via Constraints: By using pseudo-labels as relational constraints in the embedding space rather than direct training targets, the feature extractor becomes more resilient to minor labeling errors.
  • Intra-class Compactness: The triplet loss encourages the model to learn features that are not only domain-invariant but also highly discriminative, resulting in tight, well-separated clusters for each category.

Conclusion

Similarity Constrained Alignment (SCA) effectively bridges the gap between global distribution matching and local semantic consistency in UDA. While the method shows significant promise, future work may address its sensitivity to the confidence threshold ($T$) and the computational overhead introduced by triplet sampling. Expanding the framework to handle multi-target domain adaptation remains a compelling direction for further research.

Summary updated

BibTeX
@misc{deng2018domain,
  author = {Weijian Deng and Liang Zheng and Jianbin Jiao},
  title = {{Domain Alignment with Triplets}},
  year = {2018},
  eprint = {1812.00893},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.00893},
}
Figure