Teachers Do More Than Teach: Compressing Image-to-Image Models

Qing Jin, Jian Ren, Oliver J. Woodford, Jiazhuo Wang, Geng Yuan, Yanzhi Wang, Sergey Tulyakov

Abstract

Generative Adversarial Networks (GANs) have set benchmarks in image synthesis but remain computationally prohibitive for edge deployment. We present the CAT (Compression And Teaching) framework, which accelerates the deployment of high-quality image-to-image GANs. By utilizing a specially designed teacher network as both a search space and a knowledge source, CAT achieves state-of-the-art image fidelity with up to 20x fewer computations. Crucially, the architecture search process is over 10,000x faster than previous Neural Architecture Search (NAS) methods, reducing search time from days to seconds.

Introduction

Generative Adversarial Networks (GANs) like CycleGAN and GauGAN require trillions of operations and massive memory, making real-time execution on mobile devices nearly impossible. Existing compression strategies generally fall into two categories: pruning/quantization, which often sacrifices image quality, and Neural Architecture Search (NAS), which is computationally expensive—often requiring days of GPU time to train a "supernet" to find a single efficient architecture. The CAT framework bridges this gap by providing a high-performing method that is incredibly fast to execute.

Methodology

The CAT framework redefines the teacher network's role through three primary innovations:

1. IncResBlock (Inception-based Residual Block)

Instead of standard $3 \times 3$ convolutions, the teacher network is constructed using blocks containing multiple parallel operations, including convolutions with $1 \times 1, 3 \times 3, 5 \times 5$ kernels and their depth-wise counterparts. This design creates a rich, inherent "search space" within the teacher itself.

The IncResBlock architecture provides a diverse search space within the teacher network.

2. One-Step Pruning

Rather than employing complex NAS, CAT trains the teacher once. It then performs "one-step" pruning by analyzing the scaling factors in normalization layers (e.g., Batch Norm). Using a simple binary search, the framework identifies a threshold that prunes the network to a specific computational budget almost instantly. This approach relies on the insight that normalization scales naturally learn channel importance even without explicit sparsity regularization.

3. Global Kernel Alignment (GKA)

To transfer knowledge from the "wide" teacher to the "narrow" student, CAT introduces Global Kernel Alignment. Unlike standard distillation that requires "adapter" layers to match feature dimensions, GKA measures the similarity between feature maps of different widths directly by treating them as kernels. This allows the student to learn the relational structure of the teacher's features without needing to match exact channel counts.

Experimental Results

CAT was evaluated on standard benchmarks including Horse$\leftrightarrow$Zebra (CycleGAN), Cityscapes (Pix2pix/GauGAN), and Map$\leftrightarrow$Aerial photo (Pix2pix).

Efficiency and Quality

As shown in the trade-off analysis, CAT consistently outperforms existing methods in both fidelity (FID) and computational cost (MACs).

FID-MACs Trade-off showing CAT achieving superior quality at lower computational costs compared to baselines.
  • CycleGAN (Horse$\to$Zebra): Compressed from 56.8B MACs to 2.55B MACs (a 22x reduction). Notably, the compressed model improved the FID score from 61.53 to 60.18, producing more realistic images than the original.
  • GauGAN (Cityscapes): Reduced computation from 281B MACs to 29.9B MACs while slightly increasing the mIoU from 62.18 to 62.35.
  • Search Speed: While previous state-of-the-art NAS methods required roughly $7.2 \times 10^4$ GPU seconds to find an architecture, CAT completes the process in 4 to 8 seconds.

Conclusion

The CAT framework demonstrates that a well-designed teacher network can serve as its own supernet, eliminating the need for expensive architecture searches. While highly effective for conditional GANs, future work may extend this to unconditional generators like StyleGAN and further optimize for hardware-specific latency on mobile chipsets.

Summary updated

BibTeX
@inproceedings{jin2021teachers,
  author = {Qing Jin and Jian Ren and Oliver J. Woodford and Jiazhuo Wang and Geng Yuan and Yanzhi Wang and Sergey Tulyakov},
  title = {{Teachers Do More Than Teach: Compressing Image-to-Image Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01339},
}
Figure