Abstract
Generative Adversarial Networks (GANs) excel at image-to-image translation but are notoriously resource-intensive, making them impractical for mobile devices. This paper introduces a novel knowledge distillation framework tailored specifically for GANs that compresses both the generator and the discriminator. By leveraging perceptual and triplet losses, the proposed method yields portable student GANs that achieve comparable visual quality to massive teacher models while using up to 16x fewer parameters and significantly less compute.
Introduction
GANs have achieved remarkable success in image-to-image translation tasks like style transfer, image enhancement, and domain adaptation. However, these models require enormous computational resources. For example, a standard high-fidelity GAN might require over 47 GFLOPs per image, restricting its use to high-end desktop GPUs and keeping it off edge devices like smartphones or smart cameras.
While neural network compression techniques like pruning or quantization exist, they are primarily designed for classification. Applying them to GANs is uniquely challenging because generators require massive parameter counts to map complex visual structures, generative tasks often lack an absolute "ground truth" to measure error, and standard compression disrupts the delicate minimax training dynamic between the generator and discriminator.
Methodology
The authors propose a specialized teacher-student Knowledge Distillation (KD) paradigm that transfers knowledge between both generators and discriminators.
Distilling the Generator
Instead of relying solely on pixel-wise Mean Squared Error (MSE), which often causes blurriness, the authors introduce a perceptual loss guided by the teacher's discriminator. By passing generated images through the first few layers of the pre-trained teacher discriminator, the student generator is trained to match high-level feature representations. This acts as a "soft target" that transfers structural and textural knowledge more effectively than raw pixel matching.
Distilling the Discriminator
To help the student generator learn, the student discriminator must also be highly capable. The authors train the student discriminator using a novel adversarial approach: it treats images generated by the heavy teacher network as "real" samples. To enforce this, they apply a Triplet Loss. In the student discriminator's feature space, true dataset images and teacher-generated images are pulled together, while student-generated images are pushed away. This helps the student discriminator build an accurate manifold of high-quality images, forcing the student generator to produce sharper outputs.
Key Results and Evaluation
The method was evaluated on Cityscapes (paired semantic label-to-photo) and ImageNet subsets (unpaired horse-to-zebra and summer-to-winter translation).
- Efficiency Gains: On Cityscapes, the distilled student model achieved a ~16x reduction in parameters (3.4M vs 54.41M) and ~15x reduction in compute (1.22G vs 18.15G FLOPs) with only a 0.6% drop in per-pixel accuracy.
- Visual Quality: Compared to vanilla distillation or training from scratch, the proposed method yielded sharp, realistic textures nearly indistinguishable from the heavy teacher model's outputs.
Discussion and Insights
A key insight of this work is that the teacher's discriminator is a superior feature extractor compared to standard VGG networks because it is already tuned to the specific target domain. Furthermore, using triplet loss elegantly enforces a hierarchy of image quality, providing a clear gradient signal for the student to improve.
While the student's performance is upper-bounded by the teacher, this framework is architecture-agnostic and can be adapted to various GAN variants. Future work may explore applying these techniques to even larger generative architectures like StyleGAN or diffusion-based models.
Summary updated