ParaGAN: A Scalable Distributed Training Framework for Generative Adversarial Networks

Ziji Shi, Jialin Li, Yang YouSoCC 2024

Abstract

Generative Adversarial Networks (GANs) are computationally intensive and notoriously difficult to scale across distributed systems due to their adversarial training dynamics and system-level bottlenecks. This paper introduces ParaGAN, a framework designed to optimize GAN training through a co-design of system-level data pipelines and numerical optimization strategies. By implementing congestion-aware data management and an asynchronous update scheme, ParaGAN achieves a 91% scaling efficiency across 1,024 TPU accelerators. Experimental results demonstrate that ParaGAN reduces the training time for BigGAN on ImageNet from 15 days to just 14 hours, while enabling the production of high-fidelity 1024 x 1024 resolution images.

Introduction

Training Generative Adversarial Networks (GANs) at scale presents a unique set of challenges compared to standard deep learning models. While traditional models minimize a single loss function, GANs involve a "minimax" game between two competing sub-networks: the Generator (G) and the Discriminator (D). This adversarial setup is inherently unstable and computationally expensive, often leading to diminishing returns when scaling across multiple nodes.

Existing distributed frameworks frequently encounter two primary obstacles. First, system bottlenecks—such as network congestion and inefficient data layouts—often leave high-performance accelerators idle. Second, numerical instability arises during large-batch training, frequently resulting in "mode collapse," where the generator fails to produce diverse outputs. ParaGAN addresses these issues by optimizing both the underlying system architecture and the mathematical approach to adversarial training.

System-Level Optimizations

ParaGAN utilizes a hardware-aware approach to maximize throughput and minimize idle time across large clusters.

Congestion-Aware Data Pipeline

In distributed environments, network latency between storage and compute nodes is rarely constant. ParaGAN monitors network latency in real-time, dynamically adjusting pre-fetching threads and buffer sizes. This ensures that accelerators remain saturated even in "noisy" cloud environments where network jitter is common.

Hardware-Aware Layout Transformation

Different hardware accelerators (e.g., NVIDIA A100s vs. Google TPUs) require specific data shapes for optimal performance. ParaGAN automatically transforms tensors to match these requirements—such as aligning data to multiples of 128 for TPU lanes. This reduces wasted compute cycles on zero-padding and significantly boosts hardware utilization.

Selective Mixed-Precision

To balance memory efficiency with numerical stability, ParaGAN employs Brain Float 16 (bf16) for the majority of computations. However, it maintains the final layers of both the Generator and Discriminator in full fp32 precision. These layers are highly sensitive to numerical overflow, and this selective approach prevents the training divergence often seen in pure half-precision setups.

Numerical Innovations

Beyond system architecture, ParaGAN introduces two key changes to the GAN training loop to improve stability and speed.

Asynchronous Update Scheme

Standard GAN training is serial: the Generator must wait for the Discriminator to update, and vice versa. ParaGAN decouples these updates, allowing both networks to run in parallel by utilizing buffered outputs from previous iterations. This breaks the strict data dependency, eliminating idle time and significantly increasing overall throughput without sacrificing the quality of the learned distribution.

Asymmetric Optimization Policy

ParaGAN recognizes that the Generator and Discriminator possess different learning dynamics. The framework applies an asymmetric optimization strategy, utilizing AdaBelief for the Generator and Adam for the Discriminator. AdaBelief allows the Generator to be more agile in learning the data distribution by adjusting weight updates based on the "belief" of the gradient, while Adam provides the robustness required for the Discriminator to maintain a stable boundary.

Experimental Evaluation

The framework was evaluated using the ImageNet (ILSVRC 2012) and CIFAR datasets. ParaGAN demonstrated exceptional performance in high-resolution synthesis, producing the first successful BigGAN training at 1024 x 1024 resolution—a fourfold increase over the original BigGAN implementation.

Key Results

  • Training Speed: BigGAN training on ImageNet was reduced from 15 days (on 8 GPUs) to 14 hours (on 1,024 TPUs).
  • Scaling Efficiency: The framework maintained 91% efficiency when scaling from 8 to 1,024 accelerators.
  • Throughput: System-level optimizations provided a 30-40% improvement in images processed per second compared to baseline implementations.
  • Image Quality: The 1024x1024 BigGAN achieved an Inception Score (IS) of 239.3 and a Frechet Inception Distance (FID) of 13.6, confirming that the accelerated training did not degrade model performance.

Conclusion and Future Work

ParaGAN demonstrates that the computational barriers to large-scale GAN training can be overcome through a combination of system-level awareness and numerical flexibility. While the asynchronous update scheme provides massive throughput gains, the authors note it may struggle during the final stages of convergence in extremely high-resolution tasks. Future iterations of the framework may explore a hybrid approach, utilizing asynchronous updates for rapid "warm-up" before transitioning to synchronous updates for final refinement. Additionally, formalizing the theoretical convergence guarantees for asynchronous adversarial training remains a priority for future research.

Summary updated

BibTeX
@inproceedings{shi2024paragan,
  author = {Ziji Shi and Jialin Li and Yang You},
  title = {{ParaGAN: A Scalable Distributed Training Framework for Generative Adversarial Networks}},
  booktitle = {SoCC},
  year = {2024},
}
Figure