Generative Ratio Matching Networks

Akash Srivastava, Kai Xu, Michael U. Gutmann, Charles Sutton

Deep generative models (DGMs) often force researchers to choose between training stability and output quality. Generative Ratio Matching Networks (GRAM) provide a compelling alternative to traditional Generative Adversarial Networks (GANs) by replacing the unstable adversarial "zero-sum game" with a density ratio matching objective. By learning a projection that preserves the ratio between real and generated data densities, GRAM-nets achieve superior image quality on benchmarks like CIFAR-10 and CelebA while remaining robust to the hyperparameter changes that typically cause GANs to fail.

The Stability-Quality Trade-off

Training DGMs usually involves navigating a difficult trade-off:

  1. Generative Adversarial Networks (GANs) produce high-quality images but are notoriously difficult to train. They rely on a "saddlepoint optimization" (a zero-sum game) where a generator and a discriminator fight each other. If one becomes too strong too quickly, gradients vanish, leading to training instability or "mode collapse."
  2. Maximum Mean Discrepancy (MMD) Networks are much more stable because they use a fixed kernel to compare distributions instead of a learned adversary. However, they struggle with high-dimensional data like natural images, often producing blurry results because fixed kernels cannot capture the complex geometry of image manifolds.

GRAM aims to combine the stability of MMD-nets with the high-quality output of adversarial methods by "learning the kernel" without falling back into the trap of unstable saddlepoint optimization.

The GRAM Approach: Beyond Zero-Sum Games

The core innovation of this paper is Generative Ratio Matching (GRAM). Instead of the generator and critic playing a zero-sum game, they are trained to optimize different, complementary objectives.

The "aha moment" is realizing that the critic doesn't have to be an adversary. By framing the critic's task as "information preservation" (specifically density ratios), the architecture provides a consistent gradient signal to the generator.

  • The Critic: Its job is to map high-dimensional data into a lower-dimensional space. Crucially, it is trained to preserve density ratios. It ensures that the ratio of "real data density" to "generated data density" in the low-dimensional space matches the original high-dimensional space by maximizing the Pearson divergence between the two distributions.
  • The Generator: It attempts to produce samples that match the real data distribution within that low-dimensional space created by the critic, using the MMD criterion.

Because the critic is not trying to "defeat" the generator in a direct min-max battle, the training process is significantly more stable. The authors use a closed-form MMD-based estimator for the density ratio, allowing for joint stochastic gradient optimization of both networks.

Training curves showing the stability of the MMD loss and divergence over iterations.

Experimental Results

The authors evaluated GRAM-nets on several benchmarks, including synthetic 2D/3D Ring datasets, MNIST, CIFAR-10, and CelebA. GRAM-nets consistently outperformed both vanilla GANs and MMD-GANs in terms of sample quality and stability.

  • Image Quality: On CIFAR-10, GRAM-nets achieved a Frechet Inception Distance (FID) of 24.85, beating vanilla GANs (26.82) and significantly outperforming MMD-GANs (40.00). On CelebA, GRAM reached an FID of 27.04 compared to the GAN's 30.97.
  • Inception Score: On CIFAR-10, GRAM-nets achieved a score of 5.73, compared to 5.17 for GANs.
  • Hyperparameter Robustness & Stability: Unlike GANs, which often require meticulous tuning of learning rates and batch sizes to prevent divergence, GRAM-nets are remarkably resilient. In controlled experiments using 12 different configurations of generator capacity and noise dimensions, GRAM-nets converged in every single case, while GANs diverged in half of them.
  • Mode Capture: Qualitative results on the 2D ring dataset showed that GRAM-nets successfully captured all 8 modes of the distribution, whereas GANs frequently suffered from mode collapse.
Evolution of generated samples on the 2D ring dataset, demonstrating GRAM's ability to capture all 8 modes without collapsing.

Limitations and Future Work

While GRAM presents a significant step forward, it has a few limitations:

  • Projection Dimension: The performance of GRAM-nets is sensitive to the choice of the output dimension of the critic. While dimensionality reduction is helpful, reducing it too much (or not enough) can degrade the FID score.
  • Kernel Dependency: While GRAM-nets learn a projection, they still rely on a fixed Gaussian (RBF) kernel in the projected space. Future work could explore more flexible or learned kernel types within the GRAM framework.
  • Computational Cost: Calculating Gram matrices for MMD can be computationally expensive for very large batch sizes, though this is a general limitation of MMD-based methods rather than GRAM specifically.

Summary updated

BibTeX
@inproceedings{srivastava2020generative,
  author = {Akash Srivastava and Kai Xu and Michael U. Gutmann and Charles Sutton},
  title = {{Generative Ratio Matching Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=mmvV9gJdkWg},
}
Figure