Abstract
Human adaptability relies crucially on the ability to learn and merge knowledge both from supervised and unsupervised learning: the parents point out few important concepts, but then the children fill in the gaps on their own. This is particularly effective, because supervised learning can never be exhaustive and thus learning autonomously allows to discover invariances and regularities that help to generalize. In this paper we propose to apply a similar approach to the task of object recognition across domains: our model learns the semantic labels in a supervised fashion, and broadens its understanding of the data by learning from self-supervised signals how to solve a jigsaw puzzle on the same images. This secondary task helps the network to learn the concepts of spatial correlation while acting as a regularizer for the classification task. Multiple experiments on the PACS, VLCS, Office-Home and digits datasets confirm our intuition and show that this simple method outperforms previous domain generalization and adaptation solutions. An ablation study further illustrates the inner workings of our approach.
Introduction
Deep learning models are notoriously brittle when faced with "domain shift"—a change in the visual style or environment between training and testing. For example, a model trained to recognize dogs in high-resolution photos often fails when asked to recognize a line-drawing of a dog. This is the core challenge of Domain Generalization (DG): how do we train a model on a set of "source" domains so that it performs well on a completely "unseen" target domain? The goal is to distill "domain-invariant" features (the essence of an object) while ignoring "domain-specific" signatures like texture or color.
Methods: Jigsaw Puzzle-based Generalization (JiGen)
The authors introduce JiGen, which treats domain generalization as a multi-task learning problem. The model is trained simultaneously on two tasks:
- Primary Task: Standard supervised object classification (e.g., "Is this a car or a cat?").
- Secondary Task (Self-Supervised): Solving jigsaw puzzles. The model takes an image, decomposes it into a $3 \times 3$ grid of patches, shuffles them based on a known permutation, and then must predict which permutation was used.
By forcing the network to "recompose" the image, it learns about the spatial correlation of object parts. This acts as a powerful regularizer, preventing the model from overfitting to superficial textures and encouraging it to understand the underlying geometry of objects. This method can also be extended to Unsupervised Domain Adaptation (UDA) by practicing jigsaw puzzles on unlabeled target domain images.
Experimental Evaluation
The authors evaluated JiGen on several standard benchmarks for domain shift:
- PACS: 7 categories across Photo, Art Paintings, Cartoon, and Sketches.
- VLCS: Images from four photographic datasets (VOC, LabelMe, Caltech, Sun) with different collection biases.
- Office-Home: 65 categories across Art, Clipart, Product, and Real-World images.
- Digits: A combination of MNIST, MNIST-M, and SVHN.
Key Results and Insights
JiGen consistently outperformed or matched state-of-the-art methods across multiple benchmarks. On the PACS dataset using an AlexNet architecture, JiGen achieved an average accuracy of 73.38%, surpassing the previous best of 71.20%. It was particularly effective on the difficult "Sketch" domain. On VLCS, it reached 73.19% accuracy.
Key insights from the study include:
- Self-Supervision as a Bridge: Intrinsic signals within images (like spatial structure) are sufficient to bridge the gap between domains.
- Joint Training is Key: Training on the jigsaw task simultaneously with the main task is much more effective for generalization than pre-training.
- Spatial Regularization: Solving puzzles forces the network to learn that a "horse" is defined by the relative positions of its parts, regardless of rendering style.
Conclusion and Future Work
JiGen demonstrates that a simple self-supervised task can significantly improve a model's ability to generalize to unseen domains. While effective, the authors note that the $3 \times 3$ jigsaw task is a relatively simple proxy. Future work could explore more sophisticated self-supervised tasks for complex scenes and apply this "spatial reasoning" approach to other tasks like semantic segmentation or person re-identification.
Summary updated