Abstract
Generative Adversarial Networks (GANs) have achieved remarkable success in image synthesis but often require significant computational resources, complicating deployment on diverse hardware. We present Slimmable GANs (SlimGANs), a framework for training a single "once-for-all" generator that can adjust its width at runtime to accommodate varying power budgets. By leveraging parameter-shared discriminators and stepwise inplace distillation, SlimGANs ensure visual consistency and high image quality across all configurations, often surpassing the performance of individually trained models.
Introduction
The rapid scaling of GAN architectures, such as BigGAN, has led to state-of-the-art image generation at the cost of high computational demands. In practice, hardware capabilities vary significantly between high-end servers and mobile devices. Traditionally, supporting multiple devices required training and maintaining several independent models for different "power budgets," a process that is both computationally expensive and difficult to manage.
Slimmable Neural Networks (SNNs) have addressed similar issues in classification, but applying them to GANs introduces unique challenges:
- Divergence Estimation: Training a discriminator to evaluate multiple generators of varying sizes simultaneously.
- Consistency: Ensuring that a single latent seed produces the same image structure regardless of the chosen model width.
- Label Integration: Managing class-conditional information across varying channel counts.
Methodology
SlimGAN addresses these challenges by focusing on width-slimmability—adjusting the number of channels per layer—which directly reduces the memory footprint during inference.
Parameter-Shared Discriminators
Rather than using a single discriminator for all widths or entirely independent discriminators, SlimGAN employs a set of discriminators that share initial layers. This architecture provides the necessary flexibility for different generator scales while benefiting from shared feature learning.
Stepwise Inplace Distillation
To maintain "spatial and time translation consistency," the authors implement a distillation process where wider generator versions act as teachers for narrower ones. This occurs stepwise during training (e.g., 100% width teaches 75%, which then teaches 50%), forcing the models to agree on image content even as detail levels vary.
Sliceable Conditional Batch Normalization (scBN)
For conditional tasks, scBN slices a single large label embedding vector into smaller sub-vectors for narrower widths. This ensures label information is shared across all model versions while minimizing parameter overhead.
Experiments and Results
SlimGAN was evaluated on standard benchmarks including CIFAR-10/100, CelebA, and ImageNet.
Performance and Efficiency
SlimGAN consistently outperformed individually trained GANs. On CIFAR-10, a 0.25× SlimGAN achieved an FID of 37.3, compared to 46.9 for a standalone model of the same size. On ImageNet, SlimGAN surpassed individually trained BigGANs in both Inception Score (IS) and Frechet Inception Distance (FID). Furthermore, the total parameter count for a SlimGAN supporting four widths is nearly identical to a single full-sized model.
Visual Consistency
A key advantage of SlimGAN is its ability to maintain structural consistency across widths. Without the proposed distillation, narrower models often produce inconsistent results, such as altered hair colors or background structures for the same latent code.
Discussion and Conclusion
The training of narrow networks appears to provide a "virtuous cycle," where the extra informative signals act as regularization for the wider shared parameters. While this work focuses on width-slimmability, future research may explore depth-slimmable architectures or applications in text-to-image synthesis. SlimGAN represents a significant step toward flexible, efficient, and high-quality generative modeling for real-world deployment.
Summary updated