In domain generalization (DG), the target domain is unknown when the model is being trained, and the trained model should successfully work on an arbitrary (and possibly unseen) target domain during inference. This is a difficult problem, and despite active studies in recent years, it remains a great challenge. In this paper, we take a simple yet effective approach to tackle this issue. We propose test-time style shifting, which shifts the style of the test sample (that has a large style gap with the source domains) to the nearest source domain that the model is already familiar with, before making the prediction. This strategy enables the model to handle any target domains with arbitrary style statistics, without additional model update at test-time. Additionally, we propose style balancing, which provides a great platform for maximizing the advantage of test-time style shifting by handling the DG-specific imbalance issues. The proposed ideas are easy to implement and successfully work in conjunction with various other DG schemes. Experimental results on different datasets show the effectiveness of our methods.
翻译:在领域泛化(Domain Generalization, DG)中,训练时目标域是未知的,而训练后的模型需在推理阶段成功适应任意(且可能未见过的)目标域。这一问题极具挑战性,尽管近年来研究活跃,但仍是重大难题。本文采用一种简单而有效的方法解决该问题。我们提出测试时风格迁移(Test-Time Style Shifting),即在预测前,将存在较大风格差异的测试样本风格迁移至模型已熟悉的最近源域。该策略使模型能够处理具有任意风格统计特性的目标域,且无需在测试时进行额外模型更新。此外,我们提出风格平衡(Style Balancing)机制,通过处理领域泛化特有的不平衡问题,为最大化测试时风格迁移的优势提供了良好基础。所提方法易于实现,并可有效兼容各类其他领域泛化方案。不同数据集上的实验结果验证了方法的有效性。