Triplet loss, one of the deep metric learning (DML) methods, is to learn the embeddings where examples from the same class are closer than examples from different classes. Motivated by DML, we propose an effective BP-triplet Loss for unsupervised domain adaption (UDA) from the perspective of Bayesian learning and we name the model as BP-Triplet Net. In previous metric learning based methods for UDA, sample pairs across domains are treated equally, which is not appropriate due to the domain bias. In our work, considering the different importance of pair-wise samples for both feature learning and domain alignment, we deduce our BP-triplet loss for effective UDA from the perspective of Bayesian learning. Our BP-triplet loss adjusts the weights of pair-wise samples in intra-domain and inter-domain. Especially, it can self attend to the hard pairs (including hard positive pair and hard negative pair). Together with the commonly used adversarial loss for domain alignment, the quality of target pseudo labels is progressively improved. Our method achieved low joint error of the ideal source and target hypothesis. The expected target error can then be upper bounded following Ben-David’s theorem. Comprehensive evaluations on four benchmark datasets demonstrate the effectiveness of the proposed approach for UDA. Code is available at https://github.com/wangshanshanAHU/BP-Triplet-Net.
Read full abstract