TL;DR
HyperDomainNet introduces a "domain-modulation" technique that slashes the number of trainable parameters for GAN domain adaptation from 30 million to just 6,000—a 5,000x reduction. By using a hypernetwork to predict these compact parameters from CLIP embeddings, the authors enable a single model to adapt to multiple target domains simultaneously and even generalize to entirely unseen styles.
Introduction: The Cost of Adaptation
State-of-the-art Generative Adversarial Networks (GANs), like StyleGAN2, are incredibly powerful but notoriously data-hungry. When researchers want to adapt a pretrained GAN to a new domain with limited data (e.g., turning a "human face" generator into a "Disney character" generator), the standard approach is Transfer Learning (TL).
However, standard TL has three major drawbacks:
- Parameter Inefficiency: Fine-tuning all 30 million weights of StyleGAN2 for every new domain is computationally expensive and requires massive storage for each specialized model.
- Mode Collapse: Fine-tuning on tiny datasets often causes the model to lose diversity, resulting in "boring" outputs that all look similar.
- Lack of Scalability: Existing methods usually train one model per domain. There is no "universal" way to make one model handle dozens of different styles based on a simple text or image query.
Methods: A Compact and Universal Approach
The authors propose three key innovations to solve these issues:
1. Domain-Modulation
Instead of updating all weights, the authors introduce a tiny 6,000-dimensional vector ($d$) that performs channel-wise scaling on the generator's weights. Mathematically, they modify the weights ($w$) such that $w'_{ijk} = d_i \cdot w_{ijk}$. This is inspired by Adaptive Instance Normalization (AdaIN) but applied specifically for domain adaptation, proving that most of a GAN's knowledge is stored in its structural weights, while "style" is controlled by a much smaller subset of features.
2. Indomain Angle Consistency Loss
To fight mode collapse, the authors noticed that standard CLIP-based losses (which align images with text descriptions) often pull all generated images toward a single "average" point of the target style. They introduced a new regularization loss that ensures the pairwise cosine distances between images in the CLIP feature space remain consistent before and after adaptation. This preserves the relative "diversity" of the original model.
3. HyperDomainNet
This is the "Universal" part. The authors trained a hypernetwork that takes a CLIP embedding of a target domain (either a text prompt like "Pixar style" or a single reference image) and predicts the 6,000-dimensional modulation vector $d$. This allows a single generator to switch styles on the fly.
Experiments and Key Results
The researchers primarily used StyleGAN2 pretrained on the FFHQ (human faces) dataset as their source. They evaluated adaptation on a wide variety of target domains, including Face Sketches (CUHK benchmark), Artistic Styles (Anime, Pixar, Impressionism, Pop Art, Zombie), and unseen domains to test generalization.
Efficiency and Diversity
The method achieved a 5,000x reduction in trainable parameters (6k vs 30M) while maintaining visual quality comparable to state-of-the-art methods like MindTheGap. Furthermore, on the Face Sketch benchmark, their method significantly improved Recall (a measure of diversity), jumping from 0.017 (standard MindTheGap) to 0.028 with their new loss and parameterization.
Multi-Domain Mastery and Zero-Shot Generalization
HyperDomainNet successfully learned to adapt to 20+ domains simultaneously within a single model, a feat previously considered infeasible due to the parameter count. Because the hypernetwork is conditioned on semantically rich CLIP embeddings, it can interpolate between styles. It can often produce a reasonable output for a prompt it has never seen before (like "Neanderthal") by navigating the embedding space.
Limitations and Future Work
While highly effective, the 6,000-parameter constraint works best when the target domain is "near" the source (e.g., faces to sketches). If the target is too different (e.g., faces to cars), full parameter fine-tuning is still necessary to account for massive geometric changes. Additionally, the quality of the adaptation is heavily tethered to the quality and coverage of the pretrained source model.
Future directions include exploring this technique for other architectures beyond StyleGAN2 and investigating how to further compress the hypernetwork itself.
Summary updated