Information-Theoretic GAN Compression with Variational Energy-based Model

Minsoo Kang, Hyewon Yoo, Eunhee Kang, Sehwan Ki, Hyong-Euk Lee, Bohyung Han

Generative Adversarial Networks (GANs) have revolutionized image synthesis, but their deployment on edge devices like smartphones is often hindered by their massive memory and computational requirements. This paper introduces a novel framework for compressing GANs by leveraging information theory and Energy-Based Models (EBMs), offering a significant leap in generating high-quality images from much smaller models.

The Problem with Standard Knowledge Distillation

The standard approach to shrinking neural networks is Knowledge Distillation (KD), where a small "student" network is trained to mimic a larger, pre-trained "teacher." However, standard KD typically relies on simple pixel-wise comparisons (like $L_1$ or $L_2$ distance). For generative tasks, this approach falls short for two main reasons:

  1. High Dimensionality: Images contain millions of pixels; matching them one-by-one is highly inefficient.
  2. Distribution Mismatch: Generative models must match the distribution of outputs, not just specific pixel values. Pixel-wise losses often lead to blurry results or artifacts because they fail to account for the complex relationships between neighboring pixels.

Introducing VEM: Variational Energy-based Model

To overcome these limitations, the authors propose VEM (Variational Energy-based Model). The core idea is to maximize the Mutual Information (MI) between the teacher and the student. Because calculating MI directly for high-dimensional continuous data is mathematically intractable, the authors optimize a variational lower bound instead.

The "Secret Sauce": Energy-Based Models (EBMs)

Previous information-theoretic distillation methods assumed a simple Gaussian distribution for the variational bound. However, natural images are non-Gaussian and exhibit complex spatial dependencies.

VEM Framework Architecture

To address this, the framework introduces an Energy-Based Model as the variational distribution. The EBM is a deep neural network that assigns a scalar "energy" value to a pair of teacher and student outputs, where lower energy corresponds to higher probability. Because the EBM is a flexible neural network, it can learn to "understand" textures, shapes, and spatial structures far better than a simple mathematical formula.

Training Procedure

The training is an iterative three-step process:

  1. Optimize the EBM: Train the energy function to minimize the divergence between the true and variational distributions using Langevin dynamics (a type of Markov Chain Monte Carlo, or MCMC, sampling).
  2. Optimize the Student: Update the student generator to maximize the MI lower bound, essentially making the student's output more "informative" relative to the teacher's.
  3. Optimize the Teacher (Optional): In "online" settings, the teacher can also be updated.

Crucially, the MCMC sampling is only required during training. At inference time, the student network runs as a standard feed-forward generator with zero extra computational overhead.

Key Insights and Ideas

  • Beyond Pixels: By maximizing mutual information rather than minimizing pixel distance, the student learns the "essence" of the teacher's logic rather than just blindly copying its output.
  • Spatial Awareness: The EBM naturally considers the dependencies between pixels, preventing the "checkerboard artifacts" and blurring common in other compressed GANs.
  • Plug-and-Play Generality: VEM is not a standalone compression algorithm; it is a modular optimization technique. It consistently improves performance when added to existing state-of-the-art compression methods like OMGD, GCC, and CAGC.
  • The Initialization Trick: To speed up the notoriously slow MCMC process, the authors initialize the sampling with the student's current output. This "warm start" makes training significantly more efficient.

Key Results

The authors evaluated their method across several popular GAN architectures (Pix2Pix, CycleGAN, SAGAN, StyleGAN2) and tasks. The results show that VEM consistently sets new state-of-the-art benchmarks for GAN compression.

Quantitative Results on Pix2Pix
  • Quality Boost: On the Edges $\to$ Shoes dataset, adding VEM to the OMGD baseline improved the FID (Fréchet Inception Distance) from 27.39 to 24.59.
  • Semantic Accuracy: On Cityscapes, the VEM-enhanced model achieved a mean Intersection over Union (mIoU) of 49.39, outperforming the original uncompressed model (42.71) while using a fraction of the parameters.
  • StyleGAN2 Compression: On the high-resolution FFHQ dataset, the method achieved a 90.9% compression rate with an FID of 7.48, significantly outperforming other distillation techniques.
  • Qualitative Improvement: Visual results demonstrate that VEM-compressed models produce much cleaner backgrounds and more realistic textures compared to models compressed with standard $L_1/L_2$ distillation.

Limitations and Future Work

While inference is fast, training is more complex and time-consuming due to the Langevin dynamics steps required to update the EBM. Additionally, the method introduces a balancing hyperparameter ($\lambda_{MI}$), though sensitivity analyses suggest the model is relatively robust to its value.

Looking forward, the authors suggest that this information-theoretic approach could be extended beyond GANs to other dense prediction tasks, such as image super-resolution or inpainting, opening new doors for efficient, high-quality generative AI on edge devices.

Summary updated

BibTeX
@inproceedings{kang2022information,
  author = {Minsoo Kang and Hyewon Yoo and Eunhee Kang and Sehwan Ki and Hyong-Euk Lee and Bohyung Han},
  title = {{Information-Theoretic GAN Compression with Variational Energy-based Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=sRKNkpUMQNr},
}
Figure