Hallucinating Agnostic Images to Generalize Across Domains

Fabio Maria Carlucci, Paolo Russo, Tatiana Tommasi, Barbara Caputo · DOI

Abstract

The ability to generalize across visual domains is crucial for the robustness of artificial recognition systems. Although many training sources may be available in real contexts, the access to even unlabeled target samples cannot be taken for granted, which makes standard unsupervised domain adaptation methods inapplicable in the wild. In this work we investigate how to exploit multiple sources by hallucinating a deep visual domain composed of images, possibly unrealistic, able to maintain categorical knowledge while discarding specific source styles. The produced agnostic images are the result of a deep architecture that applies pixel adaptation on the original source data guided by two adversarial domain classifier branches at image and feature level. Our approach is conceived to learn only from source data, but it seamlessly extends to the use of unlabeled target samples. Remarkable results for both multi-source domain adaptation and domain generalization support the power of hallucinating agnostic images in this framework.

Introduction

Machine learning models are notoriously brittle when they encounter a "domain shift." For instance, a digit recognizer trained on clean, black-and-white MNIST images will likely fail when asked to recognize colorful, cluttered house numbers from the SVHN dataset. Most existing solutions fall into Domain Adaptation (DA), which requires at least some unlabeled data from the target environment. However, in real-world "wild" scenarios, we often face Domain Generalization (DG), where we have no access to the target data beforehand.

While previous DG methods focused primarily on making high-level features domain-invariant, this paper argues that adaptation should also occur at the image level. The challenge lies in performing this adaptation without knowing what the target domain looks like. The authors propose ADAGE (Agnostic DomAin GEneralization), a framework that "hallucinates" style-agnostic versions of training images to improve robustness.

The ADAGE Architecture

ADAGE is an end-to-end architecture composed of several interacting modules designed to strip away domain-specific "noise" (like lighting or background) while preserving core semantic content.

The ADAGE architecture overview, showing the Hallucinator (H) and the Domain Generalizer components.
  1. The Hallucinator (H): A lightweight convolutional block that modifies input images. It uses "layer aggregation" to build rich representations while maintaining a low parameter count to prevent overfitting and memorization of source styles.
  2. Image Domain Discriminator (I): This module attempts to identify the source domain of a hallucinated image. The Hallucinator is trained via a Gradient Reversal Layer (GRL) to fool this discriminator, effectively forcing it to remove domain-specific styles at the pixel level.
  3. Feature Extractor (F) & Feature Domain Discriminator (D): These perform a second level of adversarial alignment, ensuring that the high-level features extracted from the hallucinated images are indistinguishable across domains.
  4. The Classifier (C): This ensures that despite the "hallucination" process, the images still contain the necessary information to correctly identify the object category.

Experimental Evaluation

The researchers evaluated ADAGE on several standard benchmarks, including various digit datasets (MNIST, SVHN, etc.) and the ETH80 object dataset.

ADAGE consistently outperformed state-of-the-art baselines in both DG and multi-source DA scenarios:

  • Domain Generalization: In a 3-source digit experiment, ADAGE achieved an average accuracy of 80.3%, significantly beating the naive "combine sources" baseline (76.9%) and the previous state-of-the-art, MLDG (76.7%).
  • Domain Adaptation: When unlabeled target data was available, ADAGE reached 91.3% accuracy, an 8.6% improvement over the competitive MDAN method.
  • Object Classification: On the ETH80 dataset, ADAGE achieved 90.2% average accuracy, outperforming MLDG by 6%.

Visualizing Agnostic Hallucinations

A key insight of this work is the concept of "Machine-Centric Realism." The "agnostic images" produced by the Hallucinator often look bizarre or unrealistic to humans, featuring inverted colors or highlighted edges. However, these images are optimized for the network's benefit, providing a cleaner, style-free signal for classification.

Comparison of original source images and their hallucinated agnostic counterparts across MNIST, SVHN, SYNTH, and MNIST-M datasets.

By stripping style at the pixel level, ADAGE provides a more robust foundation for the feature extractor than methods that only align features at the end of the pipeline.

Conclusion

ADAGE demonstrates that hallucinating agnostic images is a powerful strategy for both domain generalization and adaptation. By combining pixel-level and feature-level adversarial training, the model learns to focus on the essential semantic features of an object. While the resulting images are not intended for human consumption, they significantly improve the robustness of deep learning models in unseen environments. Future work may extend this framework to "open set" scenarios where the target domain contains categories not present in the source data.

Summary updated

BibTeX
@inproceedings{carlucci2019hallucinating,
  author = {Fabio Maria Carlucci and Paolo Russo and Tatiana Tommasi and Barbara Caputo},
  title = {{Hallucinating Agnostic Images to Generalize Across Domains}},
  booktitle = {Workshops @ ICCV},
  year = {2019},
  doi = {10.1109/iccvw.2019.00403},
}
Figure