StyleDomain: Efficient and Lightweight Parameterizations of StyleGAN for One-shot and Few-shot Domain Adaptation

Aibek Alanov, Vadim Titov, Maksim Nakhodnov, Dmitry P. Vetrov · DOI

Abstract

Domain adaptation of GANs is a problem of fine-tuning GAN models pretrained on a large dataset (e.g. StyleGAN) to a specific domain with few samples (e.g. painting faces, sketches, etc.). While there are many methods that tackle this problem in different ways, there are still many important questions that remain unanswered. In this paper, we provide a systematic and in-depth analysis of the domain adaptation problem of GANs, focusing on the StyleGAN model. We perform a detailed exploration of the most important parts of StyleGAN that are responsible for adapting the generator to a new domain depending on the similarity between the source and target domains. As a result of this study, we propose new efficient and lightweight parameterizations of StyleGAN for domain adaptation. Particularly, we show that there exist directions in StyleSpace (StyleDomain directions) that are sufficient for adapting to similar domains. For dissimilar domains, we propose Affine+ and AffineLight+ parameterizations that allows us to outperform existing baselines in few-shot adaptation while having significantly less training parameters. Finally, we examine StyleDomain directions and discover their many surprising properties that we apply for domain mixing and cross-domain image morphing.

Introduction

Generative Adversarial Networks (GANs), particularly StyleGAN2, are the gold standard for high-fidelity image synthesis. However, they are notoriously data-hungry. Adapting a model trained on human faces (FFHQ) to a new domain—such as 17th-century oil paintings or sketches—usually involves fine-tuning the entire generator. This standard approach is computationally expensive, prone to overfitting on small datasets, and results in massive storage requirements for every new style.

This paper addresses a fundamental question: Which specific parts of StyleGAN are actually necessary for domain adaptation? By identifying the most influential components, we can achieve state-of-the-art one-shot and few-shot adaptation with up to 1000x fewer trainable parameters.

Methodology

We provide a systematic analysis of StyleGAN2’s components—Mapping Network, Affine Layers, and Synthesis Network—to find the most efficient way to "shift" the model into a new domain.

Architecture of the proposed lightweight parameterizations.

We propose three main lightweight parameterizations:

  1. StyleSpace & StyleSpaceSparse: For "similar" domains (e.g., faces to sketches), we discover that modifying weights is unnecessary. Instead, we optimize a direction ($\Delta s$) in the StyleSpace ($S$)—the channel-wise style parameters. In the "Sparse" version, we prune 80% of these coordinates, leaving only ~1.2K trainable parameters.
  2. Affine+: For "distant" domains (e.g., faces to dogs), StyleSpace is insufficient. We propose adding weight offsets to the affine layers and just one convolutional block (at 64x64 resolution), accounting for only ~2% of the total network size.
  3. AffineLight+: To push efficiency further, we apply low-rank decomposition to the affine layer offsets, reducing the parameter count by two orders of magnitude compared to full fine-tuning.

Key Results

Our experiments demonstrate that surgical modifications to the network yield superior results compared to full fine-tuning:

  • Extreme Efficiency: StyleSpaceSparse uses only 1.2K parameters (vs. 30M in a full model) to achieve comparable quality for one-shot style transfer.
  • Memory Savings: Storing 12 different adapted domains requires only 56.4KB, compared to 1.8GB for full fine-tuning.
  • Superior Few-Shot Performance: In 10-shot scenarios (e.g., FFHQ $\rightarrow$ Cat), Affine+ achieved an FID of 38.40, significantly outperforming the standard StyleGAN-ADA (FID 51.38).
  • Speed: Training time is reduced by 5-10% because the model avoids expensive backward passes through the entire mapping network.

Key Insights and Applications

The paper proves a hierarchy of adaptation: similar domains only require shifting style vectors, while dissimilar domains require modifying convolutional filters at specific resolutions.

Cross-domain image morphing and mixing using StyleDomain directions.

Beyond efficiency, StyleDomain directions exhibit unique properties:

  • Mixability: StyleDomain directions are additive. Summing a "The Joker" direction and a "Pixar" direction generates a "Joker-style Pixar" face.
  • Transferability: A "Sketch" direction found for human faces can be applied to a model already fine-tuned for dogs, resulting in a "Sketchy Dog."
  • Orthogonality to Semantics: Domain adaptation directions appear to be orthogonal to semantic editing directions. This allows for stable edits (like aging or smiling) on adapted images using tools like InterFaceGAN.

Conclusion

StyleDomain demonstrates that "less is more" in GAN adaptation. While StyleSpace is incredibly efficient for similar domains, Affine+ offsets are mandatory when the target domain's geometry differs significantly from the source. These findings enable the creation of "style-libraries" that can be hot-swapped onto any fine-tuned StyleGAN model, offering a scalable path for generative domain adaptation.

Summary updated

BibTeX
@inproceedings{alanov2022styledomain,
  author = {Aibek Alanov and Vadim Titov and Maksim Nakhodnov and Dmitry P. Vetrov},
  title = {{StyleDomain: Efficient and Lightweight Parameterizations of StyleGAN for One-shot and Few-shot Domain Adaptation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2022},
  doi = {10.48550/arxiv.2212.10229},
}
Figure