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

Compressing GANs using Knowledge Distillation

Angeline Aguinaldo, Ping-Yeh Chiang, Alexander Gain, Ameya Patil, Kolten Pearson, Soheil FeiziarXiv 2019

Introduction

State-of-the-art Generative Adversarial Networks (GANs) have grown increasingly massive, often containing tens or hundreds of millions of parameters. While these models produce high-fidelity images, their computational footprint—in terms of memory and power—makes them impractical for deployment in low-resource environments, such as smartphones or real-time embedded systems (low SWaP).

The primary obstacle to smaller models is that training them from scratch is notoriously difficult. Large networks benefit from over-parameterization, which simplifies the optimization landscape. In contrast, small networks frequently converge to poor local minima or suffer from "mode collapse." This research explores whether knowledge distillation can bridge this gap by transferring the learned representations of a large "teacher" GAN to a compact "student" GAN.

Methodology

The authors adapt Knowledge Distillation (KD) to the generative domain. Instead of training the student directly on raw data, the student is tasked with mimicking the teacher's outputs. Two primary training strategies were evaluated:

  1. Mean Squared Error (MSE) Loss: The student GAN receives the same latent vector ($z$) as a pre-trained teacher. The loss is calculated as the pixel-level difference between the student's and teacher's outputs, forcing the student to approximate the teacher's generative function.
  2. Joint Loss: To mitigate the blurriness often caused by pure MSE, a hybrid approach combines distillation loss with a standard adversarial loss. A discriminator pushes the student to produce sharper, more realistic details while the MSE loss maintains structural fidelity to the teacher.

The experiments utilized both DCGAN and Wasserstein GAN (WGAN) architectures.

Experimental Results

The proposed method was evaluated on MNIST, CIFAR-10, and Celeb-A datasets. The results demonstrate that distilled student models consistently outperform models of identical size trained using standard adversarial methods.

Quantitative and qualitative comparison across MNIST, CIFAR-10, and Celeb-A datasets. The plots show that student models (blue) achieve significantly better FID/Inception Scores than regular GANs (red) at small sizes, approaching teacher performance (yellow). The image grids show the visual quality across different compression levels (d).

Quantitative Performance

The quantitative results demonstrate massive efficiency gains across all benchmarks:

  • MNIST: Achieved a 1669:1 compression ratio, retaining 83% of the teacher's Inception Score.
  • CIFAR-10: Achieved a 58:1 ratio while maintaining competitive Frechet Inception Distance (FID) scores.
  • Celeb-A: Achieved an 87:1 ratio.

Qualitative Superiority

In side-by-side comparisons, the distilled "student" models produced recognizable faces and objects at sizes where "regularly" trained models produced only noisy, incoherent blobs. This suggests that the bottleneck for small GANs is optimization rather than capacity. By mimicking a teacher that has already found a "nice" part of the loss landscape, the student avoids the pitfalls of training from scratch.

Discussion and Limitations

While distillation enables massive compression, a "complexity ceiling" exists. As the compression ratio increases, image quality eventually degrades, manifesting as blurring. This is particularly evident on complex datasets like Celeb-A, where the student captures basic facial structure but loses high-frequency details at extreme compression levels.

Qualitative results on Celeb-A showing the impact of GAN size (d) on image quality. As d decreases, images become progressively blurrier, illustrating the fundamental limits of compression for complex facial data.

The authors conjecture that MSE loss is effective at capturing global image structure (the "bones"), while the adversarial component of the Joint Loss is necessary to add fine-grained details (the "skin").

Conclusion

Knowledge distillation provides a powerful framework for creating efficient GANs. By leveraging the "wisdom" of over-parameterized teachers, small student models can achieve performance levels previously thought impossible for their size. Future work may involve combining distillation with other compression techniques, such as weight pruning or quantization, to further push the boundaries of model efficiency.

Summary updated

BibTeX
@misc{aguinaldo2019compressing,
  author = {Angeline Aguinaldo and Ping-Yeh Chiang and Alexander Gain and Ameya Patil and Kolten Pearson and Soheil Feizi},
  title = {{Compressing GANs using Knowledge Distillation}},
  year = {2019},
  eprint = {1902.00159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.00159},
}
Figure