NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Few-shot Hybrid Domain Adaptation of Image Generator

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

Overview

This paper introduces Few-shot Hybrid Domain Adaptation (HDA), a novel task where a pre-trained image generator is adapted to multiple target domains simultaneously using only a few reference images from each. By replacing traditional GAN discriminators with a "directional subspace loss" powered by pre-trained vision transformers, the authors enable a single generator to synthesize images that blend disparate attributes—like a "smiling baby in a sketch style"—in just three minutes.

The Challenge of Hybrid Adaptation

Traditional Domain Adaptation (DA) focuses on shifting a generator from a source domain (e.g., real faces) to a single target domain (e.g., sketches). However, real-world applications often demand more complexity. What if you want to generate images that combine attributes from multiple distinct domains?

Target domains for hybrid adaptation

The authors identify three major hurdles in achieving this "Hybrid" adaptation:

  1. Data Scarcity: We rarely have "ground truth" images of a hybrid domain (e.g., datasets specifically featuring "smiling babies in a sketch style"). We typically only have images of the individual components.
  2. Discriminator Failure: In few-shot settings, standard GAN discriminators overfit easily. They tend to latch onto the easiest-to-learn features of one domain while ignoring others.
  3. Efficiency: Existing workarounds, like training separate models for each domain and interpolating them, are computationally expensive and result in massive model ensembles.

A Discriminator-Free Framework

To overcome these challenges, the researchers propose a discriminator-free framework that treats pre-trained image encoders (like Swin Transformer or Dinov2) as implicit domain classifiers.

1. Subspace Projection

Instead of relying on a discriminator to guess if an image is real, the framework projects reference images from each target domain into high-dimensional embedding subspaces. Each domain (e.g., "smile" or "sketch") occupies its own distinct region in this feature space.

2. Directional Subspace Loss

To adapt the generator, they introduce a two-part loss function:

  • Distance Loss ($L_{dist}$): This pulls the generated image's embedding toward the target subspaces. By minimizing the distance to multiple subspaces at once, the generator effectively "blends" the attributes.
  • Direction Loss ($L_{direct}$): This acts as the framework's "secret sauce." It ensures the adaptation moves perpendicularly toward the target subspaces. By guiding the change along the shortest path, the model preserves the original source characteristics (like the person's identity and pose) that are unrelated to the target domains.

3. Encoder Ensembles

To prevent the generator from inheriting the specific biases of a single vision model, the framework utilizes an ensemble of different pre-trained encoders. This approach leads to more robust and stylistically accurate results.

Experimental Results

The authors primarily used FFHQ (Flickr-Faces-HQ) as the source domain, adapting it to target domains including face attributes (babies, sunglasses, smiles), artistic styles (sketches, Raphael, caricatures), and non-face domains (LSUN Church adapted to Van Gogh paintings and "Haunted Houses"). Evaluations were performed in highly constrained 10-shot, 5-shot, and 1-shot settings.

Key Findings: * Superior Blending: Qualitative results demonstrate the model successfully combines attributes where baseline methods (like NADA or DoRM) often lose one of the attributes or fail to preserve the original person's identity. * Quantitative Edge: The method achieved the highest CLIP-Score (semantic alignment with text prompts) and Identity Similarity (preserving the source person's face) across all tested hybrid combinations. * Massive Speedup: The proposed method completes a 10-domain adaptation in just 3 minutes on a single GPU. For comparison, sequential adaptation takes roughly 20 hours, and interpolation methods take about 30 minutes while requiring much larger model sizes. * Editability: Images generated by the adapted model remain editable, allowing users to change poses or eye color using standard latent space manipulation techniques.

Limitations and Future Work

While highly effective, the approach has a few limitations. The "composition ratio" of different domains is controlled by a hyperparameter ($\alpha$). Currently, these weights require manual adjustment to achieve the perfect visual balance (e.g., ensuring a "sketch" style doesn't completely wash out a "smile" attribute). Furthermore, the authors note that the mathematical weights in the loss function do not always translate linearly to visual changes. Future work could involve automating this alignment so that the strength of each domain is more intuitive to control.

Summary updated

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