Abstract
We propose an information-theoretic knowledge distillation approach for the compression of generative adversarial networks (GANs), which aims to maximize the mutual information between teacher and student networks via a variational optimization based on an energy-based model (EBM). Because direct computation of mutual information in continuous domains is intractable, our approach optimizes the student network by maximizing a variational lower bound. We introduce an EBM relying on a deep neural network to represent a flexible variational distribution that captures high-dimensional spatial dependencies between pixels. As a generic optimization algorithm, this method can be incorporated into arbitrary GANs and dense prediction networks. We demonstrate consistent performance improvements across several existing compression models.
Introduction
Generative Adversarial Networks (GANs) have revolutionized image synthesis but remain notoriously resource-intensive. Their massive computational requirements make deployment on edge devices, such as smartphones, a significant challenge. Standard compression techniques like pruning or basic knowledge distillation often fail to preserve the visual quality of GANs because they rely on simple pixel-wise distances (e.g., $L_1$ or $L_2$ loss). These metrics ignore the complex spatial correlations inherent in natural images. Furthermore, previous information-theoretic attempts often assumed Gaussian distributions for pixel values, leading to blurry and low-quality outputs. This paper addresses these limitations by proposing a Variational Energy-based Model (VEM) to capture complex image distributions during distillation.
Methodology
The core of our framework is the maximization of Mutual Information (MI) between a large teacher network ($T$) and a compact student network ($S$). To overcome the intractability of calculating MI in high-dimensional spaces, we utilize a variational lower bound.
The Variational Energy-Based Model (VEM)
Unlike traditional methods that assume a simple Gaussian distribution, we employ a deep neural network to represent a flexible variational distribution. This Energy-Based Model (EBM) allows the framework to learn non-linear spatial dependencies between pixels, effectively capturing the structural "vibe" of the teacher's output.
Training and Inference
The training process involves an iterative three-step optimization:
- EBM Optimization: The EBM is trained to better estimate the MI while the teacher and student are fixed.
- Student Optimization: The student generator is updated using feedback from the EBM to maximize its MI with the teacher.
- MCMC Sampling: To sample from the complex EBM distribution, we use Markov Chain Monte Carlo (MCMC) via Langevin dynamics. We utilize a "Short-Run MCMC" approach, initializing the process with the student's current output to accelerate convergence.
Crucially, the EBM and MCMC sampling are only required during the training phase. Once distillation is complete, the EBM is discarded, resulting in zero additional inference cost for the deployed student model.
Experimental Results
We validated the VEM approach across paired image-to-image (Pix2Pix), unpaired image-to-image (CycleGAN), and unconditional generation (SAGAN, StyleGAN2) tasks.
Quantitative Performance
The VEM approach consistently outperformed existing state-of-the-art (SOTA) methods. For instance, in the Edges → Shoes task, combining VEM with the OMGD baseline achieved an FID of 24.59, significantly better than the baseline's 27.39 and the Gaussian-based VID's 28.02. Similar gains were observed in the Cityscapes dataset, where VEM achieved a superior mIoU of 49.39.
In unconditional generation, VEM improved StyleGAN2 compression on the FFHQ dataset, reducing the FID from 7.90 to 7.48 while maintaining a 90.91% compression rate. These results highlight that VEM is model-agnostic and provides consistent benefits when added to various base compression algorithms.
Conclusion and Future Work
This work demonstrates that modeling complex spatial dependencies through an energy-based variational distribution is key to effective GAN compression. By maximizing mutual information without restrictive Gaussian assumptions, VEM produces high-fidelity compressed models suitable for mobile deployment. While the MCMC sampling adds training overhead, the lack of inference-time cost makes it highly practical. Future research may extend this EBM-based approach to other dense prediction tasks, such as video synthesis or high-resolution image restoration.
Summary updated