Table of Contents
Fetching ...

DGL-GAN: Discriminator Guided Learning for GAN Compression

Yuesong Tian, Li Shen, Xiang Tian, Dacheng Tao, Zhifeng Li, Wei Liu, Yaowu Chen

TL;DR

This paper addresses the computational burden of vanilla GANs by proposing DGL-GAN, which uses a fixed teacher discriminator as a supervision signal to train a narrower student generator. The approach combines the standard adversarial objective with a regularization term $Adv(G,D_{bar})$, stabilizing training via a two-stage procedure that first learns with the original GAN loss and then fine-tunes with teacher-guided supervision. Empirically, DGL-GAN achieves state-of-the-art compression on StyleGAN2 and BigGAN and also boosts uncompressed StyleGAN2 to a record $FID$ of $2.65$ on FFHQ, demonstrating the practical viability of discriminator-guided knowledge transfer for distributional learning. The results suggest a simple yet effective pathway to deploying high-quality GANs on resource-constrained devices, with potential for further refinements in the teacher model and training dynamics.

Abstract

Generative Adversarial Networks (GANs) with high computation costs, e.g., BigGAN and StyleGAN2, have achieved remarkable results in synthesizing high-resolution images from random noise. Reducing the computation cost of GANs while keeping generating photo-realistic images is a challenging field. In this work, we propose a novel yet simple {\bf D}iscriminator {\bf G}uided {\bf L}earning approach for compressing vanilla {\bf GAN}, dubbed {\bf DGL-GAN}. Motivated by the phenomenon that the teacher discriminator may contain some meaningful information about both real images and fake images, we merely transfer the knowledge from the teacher discriminator via the adversarial interaction between the teacher discriminator and the student generator. We apply DGL-GAN to compress the two most representative large-scale vanilla GANs, i.e., StyleGAN2 and BigGAN. Experiments show that DGL-GAN achieves state-of-the-art (SOTA) results on both StyleGAN2 and BigGAN. Moreover, DGL-GAN is also effective in boosting the performance of original uncompressed GANs. Original uncompressed StyleGAN2 boosted with DGL-GAN achieves FID 2.65 on FFHQ, which achieves a new state-of-the-art performance. Code and models are available at \url{https://github.com/yuesongtian/DGL-GAN}

DGL-GAN: Discriminator Guided Learning for GAN Compression

TL;DR

This paper addresses the computational burden of vanilla GANs by proposing DGL-GAN, which uses a fixed teacher discriminator as a supervision signal to train a narrower student generator. The approach combines the standard adversarial objective with a regularization term , stabilizing training via a two-stage procedure that first learns with the original GAN loss and then fine-tunes with teacher-guided supervision. Empirically, DGL-GAN achieves state-of-the-art compression on StyleGAN2 and BigGAN and also boosts uncompressed StyleGAN2 to a record of on FFHQ, demonstrating the practical viability of discriminator-guided knowledge transfer for distributional learning. The results suggest a simple yet effective pathway to deploying high-quality GANs on resource-constrained devices, with potential for further refinements in the teacher model and training dynamics.

Abstract

Generative Adversarial Networks (GANs) with high computation costs, e.g., BigGAN and StyleGAN2, have achieved remarkable results in synthesizing high-resolution images from random noise. Reducing the computation cost of GANs while keeping generating photo-realistic images is a challenging field. In this work, we propose a novel yet simple {\bf D}iscriminator {\bf G}uided {\bf L}earning approach for compressing vanilla {\bf GAN}, dubbed {\bf DGL-GAN}. Motivated by the phenomenon that the teacher discriminator may contain some meaningful information about both real images and fake images, we merely transfer the knowledge from the teacher discriminator via the adversarial interaction between the teacher discriminator and the student generator. We apply DGL-GAN to compress the two most representative large-scale vanilla GANs, i.e., StyleGAN2 and BigGAN. Experiments show that DGL-GAN achieves state-of-the-art (SOTA) results on both StyleGAN2 and BigGAN. Moreover, DGL-GAN is also effective in boosting the performance of original uncompressed GANs. Original uncompressed StyleGAN2 boosted with DGL-GAN achieves FID 2.65 on FFHQ, which achieves a new state-of-the-art performance. Code and models are available at \url{https://github.com/yuesongtian/DGL-GAN}
Paper Structure (16 sections, 10 equations, 12 figures, 11 tables, 1 algorithm)

This paper contains 16 sections, 10 equations, 12 figures, 11 tables, 1 algorithm.

Figures (12)

  • Figure 1: The MACs-Performance curve on FFHQ and ImageNet. (a) is the Params-Performance curve on compressing StyleGAN2 karras2020analyzing. (b) is the MACs-Performance curves on compressing BigGAN brock2018large.
  • Figure 4: The curves of output scores of the student discriminator $D$ with channel multiplier $1/2$ and the pretrained teacher discriminator $\overline{D}$.
  • Figure 5: The gradients $\nabla_{G(z)}{h(G(z))}$, $\nabla_{G(z)}{\overline{h}(G(z))}$, and the fake image $G(z)$, better to be viewed via zooming in. We separately visualize the gradient of three channels (i.e., R, G, and B) in $G(z)$, where the gradient values out of $\pm3$ standard deviations are omitted. Note that the gradients $\nabla_{G(z)}{h(G(z))}$ and $\nabla_{G(z)}{\overline{h}(G(z))}$ are calculated under the same input fake image $G(z)$, shown in (d) and (h).
  • Figure 6: (a) shows FID curves of training from scratch and two-stage training on StyleGAN2, and (b) shows the divergence behavior of training from scratch on BigGAN. Note that DGL-GAN on ImageNet exploits hinge loss, following BigGAN brock2018large, and ${\rm Adv}(G,\overline{D})=-\overline{D}(G(z))$. Thus we directly plot the curve of $\overline{D}(G(z))$.
  • Figure 7: The curves of FID and the output scores ($h(x)$ for real samples, $h(G(z))$ for fake samples) of the discriminator in the training process of uncompressed DGL-GAN and StyleGAN2, denoted as "Baseline" in the figure. For comparison, we only plot the stage from $20000$ kimg to $30000$ kimg.
  • ...and 7 more figures