Crafting Distribution Shifts for Validation and Training in Single Source Domain Generalization

Single-source domain generalization attempts to learn a model on a sourcedomain and deploy it to unseen target domains. Limiting access only to sourcedomain data imposes two key challenges - how to train a model that cangeneralize and how to verify that it does. The standard practice of validationon the training distribution does not accurately reflect the model'sgeneralization ability, while validation on the test distribution is amalpractice to avoid. In this work, we construct an independent validation setby transforming source domain images with a comprehensive list ofaugmentations, covering a broad spectrum of potential distribution shifts intarget domains. We demonstrate a high correlation between validation and testperformance for multiple methods and across various datasets. The proposedvalidation achieves a relative accuracy improvement over the standardvalidation equal to 15.4% or 1.6% when used for method selection or learningrate tuning, respectively. Furthermore, we introduce a novel family of methodsthat increase the shape bias through enhanced edge maps. To benefit from theaugmentations during training and preserve the independence of the validationset, a k-fold validation process is designed to separate the augmentation typesused in training and validation. The method that achieves the best performanceon the augmented validation is selected from the proposed family. It achievesstate-of-the-art performance on various standard benchmarks. Code at:https://github.com/NikosEfth/crafting-shifts