Towards Shape Biased Unsupervised Representation Learning for Domain Generalization

Nader Asadi, Mehrdad Hosseinzadeh, Mahdi EftekhariarXiv 2019

Abstract

It is known that, without awareness of the process, our brain appears to focus on the general shape of objects rather than superficial statistics of context. On the other hand, learning autonomously allows discovering invariant regularities which help generalization. In this work, we propose a learning framework to improve the shape bias property of self-supervised methods. Our method learns semantic and shape biased representations by integrating domain diversification and jigsaw puzzles. The first module enables the model to create a dynamic environment across arbitrary domains and provides a domain exploration vs. exploitation trade-off, while the second module allows the model to explore this environment autonomously. This universal framework does not require prior knowledge of the domain of interest. Extensive experiments are conducted on several domain generalization datasets, namely, PACS, Office-Home, VLCS, and Digits. We show that our framework outperforms state-of-the-art domain generalization methods by a large margin.

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), exhibit remarkable performance when training and testing data come from the same distribution. However, they are notoriously fragile when subjected to domain shift—the discrepancy between training (source) and testing (target) environments. A primary driver of this fragility is "texture bias." While humans typically identify objects by their global shape and silhouette, CNNs often rely on local pixel statistics and superficial textures. Consequently, a model trained on photographs of cats may fail to recognize a sketch of a cat because the texture has changed, even though the fundamental shape remains the same.

The goal of Domain Generalization (DG) is to develop models capable of performing well on completely unseen target domains without additional fine-tuning. This paper proposes a novel framework that "unbiases" models from texture and encourages a human-like "shape bias" through a combination of self-supervised learning and dynamic domain diversification.

Proposed Methodology

The framework integrates two core components to force the model to prioritize global structure over local appearance.

1. Jigsaw Puzzle Pretext Task

The model is trained to solve jigsaw puzzles by reassembling shuffled image patches. This self-supervised task encourages the network to learn spatial relationships and object parts. However, standard jigsaw tasks can still be solved using local color continuity or texture matching at the edges of patches.

2. Domain Diversification Module

To prevent the model from "cheating" via texture matching, the authors introduce a Domain Diversification module. Using Adaptive Instance Normalization (AdaIN), the framework randomly shifts the "style" (texture and color) of each jigsaw tile to match an arbitrary domain from a diverse artistic dataset (e.g., the Behance Artistic Media dataset).

Figure 1: Overview of the proposed framework architecture, integrating domain diversification with a jigsaw puzzle pretext task.

By independently styling each tile, the model can no longer rely on texture or color consistency across patch boundaries. It is forced to identify the global "edges" and semantic shapes to solve the puzzle. An Exploration vs. Exploitation Controller manages this process using two hyperparameters: $\rho$ (the probability of domain shifting) and $\gamma$ (the magnitude of the shift), allowing the model to explore a vast space of synthetic domains during training.

Experimental Results

The framework was evaluated on several standard DG benchmarks, including PACS (Photo, Art, Cartoon, Sketch), Office-Home, and VLCS.

Performance on PACS

On the PACS dataset, which specifically tests the ability to generalize from photos to more abstract domains like sketches, the proposed method achieved state-of-the-art results. Using an AlexNet backbone, the method reached an average accuracy of 79.15%, significantly outperforming the previous leading method, JiGen (73.38%). Similar gains were observed with a ResNet-18 backbone, reaching 84.46%.

Figure 5: Comparison of the proposed method against state-of-the-art domain generalization techniques on the PACS dataset.

Office-Home and Qualitative Analysis

On the larger Office-Home dataset, the method achieved an average accuracy of 68.8%, representing a nearly 6% improvement over existing baselines. Qualitative analysis through attention maps further confirmed that the model focuses more on object silhouettes than background context or local textures compared to standard supervised models.

Conclusion and Future Work

This work demonstrates that integrating domain diversification with self-supervised jigsaw puzzles effectively shifts a model's bias from texture to shape, leading to superior domain generalization. While the current approach introduces some computational overhead due to the style transfer module, it provides a robust, autonomous way to learn domain-agnostic features. Future research may explore using meta-learning or reinforcement learning to automatically tune the exploration parameters to further optimize the training process.

Summary updated

Abstract

It is known that, without awareness of the process, our brain appears to focus on the general shape of objects rather than superficial statistics of context. On the other hand, learning autonomously allows discovering invariant regularities which help generalization. In this work, we propose a learning framework to improve the shape bias property of self-supervised methods. Our method learns semantic and shape biased representations by integrating domain diversification and jigsaw puzzles. The first module enables the model to create a dynamic environment across arbitrary domains and provides a domain exploration vs. exploitation trade-off, while the second module allows the model to explore this environment autonomously. This universal framework does not require prior knowledge of the domain of interest. Extensive experiments are conducted on several domain generalization datasets, namely, PACS, Office-Home, VLCS, and Digits. We show that our framework outperforms state-of-the-art domain generalization methods by a large margin.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
VLCSJiGenAvg. results (%)73.19%Domain Generalization · backbone=ResNet-18 · evaluation=multi-source
Source quote
L247: JiGen\cite{carlucci2019domain} │ 96.93 │ 60.90 │ 70.62 │ 64.30 │ 73.19
Office-HomeDWT-MECAvg. results (%)65.4%Domain Generalization · backbone=ResNet-50 · evaluation=single-source
Source quote
L207: DWT-MEC\cite{roy2019unsupervised} │ 54.7 │ 72.3 │ 77.2 │ 56.9 │ 68.5 │ 69.8 │ 54.8 │ 47.9 │ 78.1 │ 68.6 │ 54.9 │ 81.2 │ 65.4
BibTeX
@misc{asadi2019towards,
  author = {Nader Asadi and Mehrdad Hosseinzadeh and Mahdi Eftekhari},
  title = {{Towards Shape Biased Unsupervised Representation Learning for Domain Generalization}},
  year = {2019},
  eprint = {1909.08245},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.08245},
}
Figure