Domain Generalization (DG) is essentially a sub-branch of out-of-distribution generalization, which trains models from multiple source domains and generalizes to unseen target domains. Recently, some domain generalization algorithms have emerged, but most of them were designed with non-transferable complex architecture. Additionally, contrastive learning has become a promising solution for simplicity and efficiency in DG. However, existing contrastive learning neglected domain shifts that caused severe model confusions. In this paper, we propose a Dual-Contrastive Learning (DCL) module on feature and prototype contrast. Moreover, we design a novel Causal Fusion Attention (CFA) module to fuse diverse views of a single image to attain prototype. Furthermore, we introduce a Similarity-based Hard-pair Mining (SHM) strategy to leverage information on diversity shift. Extensive experiments show that our method outperforms state-of-the-art algorithms on three DG datasets. The proposed algorithm can also serve as a plug-and-play module without usage of domain labels.
翻译:领域泛化本质上是分布外泛化的一个子分支,它通过多个源领域训练模型,并泛化到未见过的目标领域。近年来,涌现出一些领域泛化算法,但大多数算法采用不可迁移的复杂架构。同时,对比学习因其简洁高效已成为领域泛化中具有前景的解决方案。然而,现有对比学习忽略了导致模型严重混淆的领域偏移问题。本文提出一种面向特征和原型对比的双对比学习模块。此外,我们设计了新型因果融合注意力模块,通过融合单张图像的多视角信息来获取原型。进一步,我们引入基于相似性的困难对挖掘策略以利用多样性偏移中的信息。大量实验表明,该方法在三个领域泛化数据集上优于现有最优算法。所提算法还可作为即插即用模块,无需使用领域标签。