Domain Generalization with Domain-Specific Aggregation Modules

Antonio D'Innocente, Barbara Caputo

Introduction

In computer vision, models often struggle with covariate shift, where the distribution of data at test time differs significantly from the training distribution. While Domain Adaptation (DA) addresses this by leveraging unlabeled data from a known target domain, Domain Generalization (DG) presents a more rigorous challenge: the model must generalize to entirely unseen domains without any prior exposure. This paper introduces Domain-Specific Aggregation Modules (D-SAM), a novel architecture designed to bridge the gap between universal feature learning and domain-specific specialization.

The D-SAM Architecture

The proposed D-SAM framework moves away from the binary choice of learning a single joint representation versus training completely separate models for each domain. Instead, it employs a hybrid multi-branch approach.

The D-SAM architecture featuring a shared backbone and domain-specific branches.

The architecture consists of three primary components:

  1. Generic Backbone ($\Theta$): A standard pre-trained network (e.g., ResNet or AlexNet) that extracts fundamental visual features common across all domains.
  2. Domain-Specific Aggregation Modules ($\lambda$): For each source domain encountered during training, a dedicated module is attached. These modules use 1x1 convolutions to merge features from various depths of the backbone, a process known as iterative aggregation.
  3. Specialized Routing: During training, images are processed through the backbone and their corresponding domain-specific D-SAM. This ensures that each branch learns to capture the unique stylistic nuances of its respective domain.

At inference time, when presented with an image from an unknown target domain, the model aggregates the outputs of all trained D-SAMs to produce a final prediction.

Experimental Setup and Datasets

The effectiveness of D-SAM was evaluated on two benchmark datasets: PACS and Office-Home. PACS is particularly renowned for its difficulty, as it requires generalizing across four highly distinct visual styles: Photos, Art paintings, Cartoons, and Sketches.

Examples from the PACS dataset showing Art, Cartoon, Sketch, and Photo domains.

The authors utilized a "leave-one-domain-out" validation strategy. This involves training on three domains and testing on the fourth, effectively simulating the real-world scenario of encountering a completely novel environment.

Key Insights and Results

The D-SAM approach yielded several critical findings:

  • Robust Backbone Learning: By supporting multiple specialized branches, the shared backbone itself becomes more robust and learns more domain-agnostic features compared to standard "Deep All" training methods.
  • Multi-Depth Aggregation: Capturing features from multiple layers allows the model to simultaneously process low-level textures (crucial for sketches) and high-level semantic information (crucial for object recognition).
  • State-of-the-Art Performance: D-SAM achieved an average accuracy of 71.20% on PACS using an AlexNet backbone, surpassing previous benchmarks. Notably, it showed a significant improvement in the "Sketch" domain, reaching 64.66%—a nearly 4.5% increase over prior best results.

Conclusion and Future Directions

D-SAM provides a powerful framework for domain generalization by balancing generic feature extraction with domain-specific aggregation. While highly effective, the current implementation faces scalability challenges as the number of source domains increases. Future research may focus on more sophisticated hierarchical aggregation structures or dynamic weighting mechanisms to better align target images with the most relevant source domain modules during inference.

Summary updated

BibTeX
@inproceedings{dinnocente2018domain,
  author = {Antonio D'Innocente and Barbara Caputo},
  title = {{Domain Generalization with Domain-Specific Aggregation Modules}},
  booktitle = {GCPR},
  year = {2018},
  doi = {10.1007/978-3-030-12939-2\_14},
}
Figure