GAN-QP: A Novel GAN Framework without Gradient Vanishing and Lipschitz Constraint

Jianlin Su

Abstract

Generative Adversarial Networks (GANs) often suffer from training instabilities like gradient vanishing. While Wasserstein GANs (WGANs) address this through the 1-Lipschitz constraint, enforcing this constraint via weight clipping, gradient penalties, or spectral normalization introduces computational overhead or restricts model capacity. This paper introduces GAN-QP, a framework that constructs a "Quadratic Potential" divergence directly in the dual space. This approach guarantees non-vanishing gradients without requiring explicit Lipschitz constraints, resulting in a training process that is both faster and more stable than WGAN-GP while maintaining high image quality.

Introduction

Standard GANs (SGANs) are notoriously difficult to train because they suffer from gradient vanishing when the real and fake data distributions do not overlap—a common scenario early in training. Wasserstein GANs (WGANs) solved this by changing the distance metric, but required the discriminator to satisfy a strict 1-Lipschitz constraint. Common methods to enforce this, such as weight clipping, Gradient Penalty (WGAN-GP), and Spectral Normalization (SN), have significant drawbacks. Weight clipping is unstable, WGAN-GP increases computational cost by ~50%, and SN restricts the network's modeling capacity. GAN-QP aims to provide the stability of WGAN without these constraints.

Methods

Instead of starting with a primal probability divergence (like Jensen-Shannon), the authors construct a valid divergence directly in the dual space, termed Quadratic Potential divergence (QP-div). This framework replaces hard gradient constraints with a quadratic penalty term based on the distance $d(x_r, x_f)$ between real ($x_r$) and fake ($x_f$) samples.

The discriminator objective maximizes the difference between real and fake scores, penalized by a quadratic term: $$T(x_r) - T(x_f) - \frac{(T(x_r) - T(x_f))^2}{2\lambda d(x_r, x_f)}$$

The generator objective simply minimizes the discriminator's score difference: $T(x_r) - T(x_f)$. This framework was also extended to adversarial feature learning as BiGAN-QP, incorporating an inference model.

Key Insights

  • Adaptive Lipschitz: Mathematical analysis shows that the optimal discriminator for GAN-QP automatically satisfies an adaptive Lipschitz constraint, bounding the discriminator without explicit penalties.
  • Distance-Weighted Learning: The generator's effective loss is weighted by the distance between samples, forcing it to focus on fake samples furthest from the real distribution.
  • Hyperparameter Robustness: Unlike the finicky penalty weight in WGAN-GP, the $\lambda$ parameter in GAN-QP acts as a simple scaling factor, making the model highly robust.

Experimental Results

GAN-QP demonstrates superior efficiency and performance across several benchmarks. Notably, it trains at the same speed as standard GANs (1x), whereas WGAN-GP is 1.5x slower due to gradient calculations.

FID convergence comparison across different GAN architectures.

On CelebA HQ 128x128, GAN-QP achieved a Frechet Inception Distance (FID) of 44.7, outperforming WGAN-GP (55.5) and matching SGAN-SN (44.5).

Comparison of Best FID and training speed on CelebA HQ 128x128.

At higher resolutions, GAN-QP continues to excel, outperforming SGAN-SN at 256x256 (FID 22.7 vs 27.9) and successfully generating 512x512 images with an FID of 26.64 after only two days of training on a single consumer GPU.

Conclusion

GAN-QP offers a mathematically elegant and computationally efficient alternative to Lipschitz-constrained GANs. By designing divergences directly in the dual space, it avoids gradient vanishing while maintaining full modeling capacity. Future work includes exploring the quadratic potential as a universal penalty for other GAN architectures and improving the convergence of the BiGAN-QP variant.

Summary updated

Abstract

We know SGAN may have a risk of gradient vanishing. A significant improvement is WGAN, with the help of 1-Lipschitz constraint on discriminator to prevent from gradient vanishing. Is there any GAN having no gradient vanishing and no 1-Lipschitz constraint on discriminator? We do find one, called GAN-QP. To construct a new framework of Generative Adversarial Network (GAN) usually includes three steps: 1. choose a probability divergence; 2. convert it into a dual form; 3. play a min-max game. In this articles, we demonstrate that the first step is not necessary. We can analyse the property of divergence and even construct new divergence in dual space directly. As a reward, we obtain a simpler alternative of WGAN: GAN-QP. We demonstrate that GAN-QP have a better performance than WGAN in theory and practice.
BibTeX
@misc{su2018gan,
  author = {Jianlin Su},
  title = {{GAN-QP: A Novel GAN Framework without Gradient Vanishing and Lipschitz Constraint}},
  year = {2018},
  eprint = {1811.07296},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.07296},
}
Figure