Best sources forward: domain generalization through source-specific nets

Massimiliano Mancini, Samuel Rota Bulò, Barbara Caputo, Elisa Ricci · DOI

Introduction

In computer vision, the ability of a model to perform reliably across different environments is a critical challenge. While a model might achieve high accuracy on professional photography, its performance often degrades significantly when applied to sketches, cartoons, or images captured in low-light conditions. This phenomenon, known as domain shift, is typically addressed through Domain Adaptation (DA) when target data is available. However, in many real-world scenarios—such as autonomous driving—the target environment is unknown during training. This necessitates Domain Generalization (DG), where a model must generalize to completely unseen domains.

Traditional DG approaches often attempt to learn "domain-invariant" features by stripping away style-specific information to isolate the core object features. This paper argues that such methods may discard valuable information. Instead, the authors propose a paradigm shift: embracing domain differences by training source-specific "experts" and dynamically fusing their predictions based on the characteristics of the input image.

Methodology: Source-Specific Networks

The proposed architecture moves away from a single monolithic classifier. Instead, it utilizes a deep neural network with two primary components designed to leverage domain-specific knowledge.

1. Source-Specific Classifiers

The network architecture consists of a shared feature extractor followed by $N$ parallel classification "heads," where $N$ corresponds to the number of source domains in the training set (e.g., one head for photos, one for sketches). While the early layers share weights to learn general visual features, the final layers are specialized for each domain.

2. Domain Prediction Branch (The Router)

A parallel branch acts as a "manager" or router. For any given input image, this branch calculates a set of weights ($w$) that represent the likelihood of the image belonging to each of the $N$ source domains. This allows the model to quantify how much a new, unseen image resembles the environments it encountered during training.

Fusion and the Agnostic Safety Net

At inference time, the final prediction is generated by a weighted sum of the outputs from all source-specific experts. For instance, if an input image is identified as being 80% similar to the "Photo" domain and 20% similar to the "Art" domain, the Photo expert's prediction is prioritized accordingly.

To ensure robustness, the authors introduce a parameter $\alpha$ to create an "agnostic" safety net. This parameter allows the model to blend the weighted expert prediction with a simple average of all classifiers. This prevents the model from over-specializing, providing a stable baseline when the target image does not closely align with any single source domain.

Experimental Evaluation

The model was evaluated on two prominent DG benchmarks:

  • Rotated-MNIST: A dataset of handwritten digits rotated at specific intervals (0°, 15°, 30°, 45°, 60°, and 75°).
  • PACS: A challenging benchmark featuring four distinct domains: Photo, Art painting, Cartoon, and Sketch.

Results and Key Insights

The proposed method demonstrated superior performance over existing state-of-the-art (SOTA) techniques.

Rotated-MNIST Performance

The model achieved a mean accuracy of 92.0%, significantly outperforming the previous SOTA of 89.1%. A key observation was the "Interpolation Effect": when tested on the 45° rotation (an unseen domain), the model excelled by fusing the knowledge of the 30° and 60° experts. In this specific case, it outperformed the best baseline by over 12%, proving that the router can effectively interpolate between known domains.

PACS Performance

On the PACS benchmark, the model reached 70.3% mean accuracy, surpassing other deep learning methods like D-SNE and CIDDG. Sensitivity analysis revealed that while source-specific specialization ($\alpha=0$) is often optimal, a small amount of domain-agnostic influence ($\alpha=0.25$) improved robustness in highly erratic domains like "Cartoon."

Conclusion and Future Work

This research demonstrates that domain-specific features are a benefit rather than a hindrance to generalization. By specializing rather than seeking invariance, the model can effectively navigate unseen environments through intelligent fusion.

Future work may address the scalability of the architecture, as the memory footprint grows with the number of source domains. Additionally, the authors suggest that more complex router architectures and methods for discovering "latent" domains—where domain labels are not explicitly provided—could further enhance the framework's utility in diverse real-world applications.

Summary updated

BibTeX
@inproceedings{mancini2018best,
  author = {Massimiliano Mancini and Samuel Rota Bulò and Barbara Caputo and Elisa Ricci},
  title = {{Best sources forward: domain generalization through source-specific nets}},
  booktitle = {ICIP},
  year = {2018},
  doi = {10.1109/icip.2018.8451318},
}
Figure