Few-shot Hybrid Domain Adaptation of Image Generators

Hengjia Li, Yang Liu, Linxuan Xia, Yuqi Lin, Tu Zheng, Zheng Yang, Wenxiao Wang, Xiaohui Zhong, Xiaobo Ren, Xiaofei He · OpenReview

Abstract

Traditional Domain Adaptation (DA) for image generators typically focuses on one-to-one mapping, which struggles when attempting to merge multiple target attributes simultaneously. We present Hybrid Domain Adaptation (HDA), a discriminator-free framework that enables a pre-trained generator to synthesize images across multiple domains—such as "sketch," "smile," and "baby"—using only a few examples. By leveraging the geometric properties of pre-trained image encoders and a novel directional subspace loss, HDA achieves high-quality hybrid generation in minutes, significantly outperforming existing sequential or interpolation-based methods.

Introduction

Generative AI has seen significant success in domain adaptation, where a model trained on a source domain (e.g., realistic faces) is fine-tuned for a target domain (e.g., sketches). However, "one-to-many" adaptation remains a challenge. Creating a model that generates "smiling babies in a sketch style" typically requires a dataset of images that possess all three attributes simultaneously—a rare find in practice. Furthermore, traditional GAN-based approaches rely on discriminators that often overfit in few-shot scenarios, leading to a loss of identity or structural consistency.

Target domains for hybrid adaptation: sketch, smile, and baby.

The HDA Framework

HDA addresses these issues by replacing the traditional GAN discriminator with a guidance system based on frozen, pre-trained image encoders (e.g., Swin Transformer or DINOv2). These encoders project images into a feature space where different domains form well-separable subspaces.

Comparison between standard Domain Adaptation and the proposed Hybrid Domain Adaptation framework.

Directional Subspace Loss

The core of the HDA method is the Directional Subspace Loss, which consists of two components:

  1. Distance Loss: This pulls the features of generated images toward the subspaces of all target domains simultaneously, acting as a "blender" for attributes.
  2. Direction Loss: To maintain consistency, this loss ensures the adaptation path is perpendicular to the target subspaces. This prevents model collapse and preserves the original pose and identity of the source image.

Results and Discussion

The HDA method was evaluated using the Flickr-Faces-HQ (FFHQ) and LSUN Church datasets across various styles (Sketch, Raphael, Caricature) and attributes (Baby, Sunglasses, Smile).

Efficiency and Performance

HDA is remarkably efficient, completing adaptation in approximately 3 minutes on a single GPU. In contrast, competitive methods like DoRM or sequential adaptation can require 4 to 20 hours. Quantitatively, HDA achieves superior CLIP-Scores and Identity (ID) Similarity. For the "baby-smile" hybrid, HDA achieved a CLIP-Score of 23.08, outperforming NADA (20.45) and sequential learning (17.36).

Model Scalability

Unlike interpolation methods where model size grows with each added domain, HDA maintains a constant storage requirement (24M parameters) by producing a single integrated model. The use of an ensemble of encoders further improves results by mitigating the semantic bias of any single model.

Conclusion

Hybrid Domain Adaptation provides a robust, efficient solution for multi-domain image generation in data-scarce environments. By framing adaptation as a geometric problem in embedding space rather than a competitive game, HDA achieves state-of-the-art results in a fraction of the time required by previous methods. Future research will focus on automating the alignment of domain weights to better match human visual perception.

Summary updated

BibTeX
@inproceedings{li2024few,
  author = {Hengjia Li and Yang Liu and Linxuan Xia and Yuqi Lin and Tu Zheng and Zheng Yang and Wenxiao Wang and Xiaohui Zhong and Xiaobo Ren and Xiaofei He},
  title = {{Few-shot Hybrid Domain Adaptation of Image Generators}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=FE2e8664Sl},
}
Figure