Efficient Conditional GAN Transfer With Knowledge Propagation Across Classes

Mohamad Shahbazi, Zhiwu Huang, Danda Pani Paudel, Ajad Chhatkuli, Luc Van Gool

Abstract

Training conditional Generative Adversarial Networks (cGANs) typically requires massive datasets. This paper introduces a method for efficiently adding new classes to a pre-trained cGAN using very limited data. By representing new classes as a weighted combination of existing "old" classes—a process called Knowledge Propagation—the authors achieve significantly faster convergence (up to 5x) and higher image quality than standard fine-tuning or parameter-freezing techniques.

Introduction

Generative Adversarial Networks (GANs) typically require massive datasets to avoid "mode collapse" or training instability. While transfer learning has been explored for unconditional GANs, conditional GAN (cGAN) transfer presents unique challenges. In a cGAN, a single model generates images for hundreds of categories based on class labels. The goal is to add a brand-new category (e.g., "panda") to a model pre-trained on ImageNet using only a few dozen images, without access to the original training data and without compromising the model's ability to generate existing classes.

Methodology: Knowledge Propagation

The proposed approach, cGANTransfer, focuses on Conditional Batch Normalization (cBN). In modern cGANs, class-specific information is primarily encoded in the "scale" ($\gamma$) and "shift" ($\beta$) parameters of the BN layers.

Overview of Knowledge Propagation (c) compared to standard cGAN (a) and fine-tuning (b).

The core of the method involves three key components:

  1. Knowledge Propagation: Instead of learning new $\gamma$ and $\beta$ parameters from scratch, the model learns "similarity scores." A new class's parameters are calculated as a linear combination of the parameters of the old classes.
  2. Knowledge Sharing: Target classes jointly update a copy of the source parameters, termed "pseudo-classes," allowing new classes to collectively refine the "building blocks" they borrow.
  3. Residuals and Sparsity: To capture unique features, a small "residual" vector is added. $L_1$ regularization on similarity scores ensures the model borrows from only the most relevant source classes, maintaining a sparse and interpretable mapping.

By freezing the generator's convolutional filters and only training these small transfer blocks, the process is extremely parameter-efficient.

Experiments and Results

The researchers evaluated cGANTransfer across several challenging setups, including CIFAR-100, ImageNet-to-Places365 (a significant domain gap test), and AnimalFace.

Qualitative comparison of generated images across different transfer methods on the Places365 dataset.

Key Results

  • Speed: The proposed method is 4x to 5x faster to converge than Batch Statistics Adaptation (BSA), the previous state-of-the-art.
  • Quality: On the ImageNet-to-Places365 task, cGANTransfer achieved a Fréchet Inception Distance (FID) of 71.1, significantly outperforming BSA (85.9) and MineGAN (82.3).
  • Data Efficiency: The method remains robust even with as few as 100 images per class, where standard fine-tuning (TransferGAN) often fails.

Discussion and Insights

The authors identified a hierarchy of similarity, noting that different layers of the GAN benefit from different source classes—early layers might borrow "shape" while later layers borrow "texture" or "color." By learning similarity scores in the conditional space of BN parameters, the model discovers relationships between classes without ever seeing the original source data.

Limitations

While the generator is highly efficient, the discriminator still requires fine-tuning and can overfit on very small datasets. Additionally, the method's effectiveness depends on the diversity of the pre-trained "source" classes. Future work may explore extending this to lifelong learning and applying similar propagation techniques to the discriminator.

Summary updated

BibTeX
@inproceedings{shahbazi2021efficient,
  author = {Mohamad Shahbazi and Zhiwu Huang and Danda Pani Paudel and Ajad Chhatkuli and Luc Van Gool},
  title = {{Efficient Conditional GAN Transfer With Knowledge Propagation Across Classes}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01199},
}
Figure