Domain generalization (DG) is proposed to deal with the issue of domain shift, which occurs when statistical differences exist between source and target domains. However, most current methods do not account for a common realistic scenario where the source and target domains have different classes. To overcome this deficiency, open set domain generalization (OSDG) then emerges as a more practical setting to recognize unseen classes in unseen domains. An intuitive approach is to use multiple one-vs-all classifiers to define decision boundaries for each class and reject the outliers as unknown. However, the significant class imbalance between positive and negative samples often causes the boundaries biased towards positive ones, resulting in misclassification for known samples in the unseen target domain. In this paper, we propose a novel meta-learning-based framework called dualistic MEta-learning with joint DomaIn-Class matching (MEDIC), which considers gradient matching towards inter-domain and inter-class splits simultaneously to find a generalizable boundary balanced for all tasks. Experimental results demonstrate that MEDIC not only outperforms previous methods in open set scenarios, but also maintains competitive close set generalization ability at the same time. Our code is available at https://github.com/zzwdx/MEDIC.
翻译:领域泛化(DG)旨在处理源域与目标域因统计差异导致的领域偏移问题。然而,现有方法大多未考虑源域与目标域存在不同类别这一常见现实场景。为此,开放集领域泛化(OSDG)作为一种更符合实际需求的设置应运而生,用于识别未知领域中的未见类别。直观方法是使用多个"一对多"分类器为每个类别定义决策边界,并将异常值归为未知类。但正负样本间显著的类别不平衡常导致决策边界偏向正样本,从而在未知目标域中对已知样本造成误分类。本文提出一种基于元学习的新型框架——联合领域-类别匹配的双重元学习(MEDIC),该方法通过同时优化跨领域与跨类别的梯度匹配,为所有任务寻找通用且均衡的决策边界。实验结果表明,MEDIC不仅在开放集场景中优于现有方法,同时能保持具有竞争力的闭集泛化能力。代码已开源在 https://github.com/zzwdx/MEDIC。