NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MMD GAN: Towards Deeper Understanding of Moment Matching Network

Chun-Liang Li, Wei-Cheng Chang, Yu Cheng, Yiming Yang, Barnabás Póczos

Abstract

Generative Moment Matching Networks (GMMN) provide a statistically grounded alternative to GANs by utilizing Maximum Mean Discrepancy (MMD) for distribution matching. However, their reliance on fixed kernels often leads to poor performance on complex data. This paper presents MMD GAN, which introduces adversarial kernel learning to GMMNs. By training a discriminator to learn a feature space that maximizes MMD, the model achieves significantly higher image quality and training efficiency. Experimental results on MNIST and CIFAR-10 demonstrate that MMD GAN outperforms traditional GMMNs and remains competitive with state-of-the-art GAN architectures.

Introduction

Deep generative modeling is currently dominated by Generative Adversarial Networks (GANs), which produce high-fidelity samples but suffer from training instabilities and mode collapse. Generative Moment Matching Networks (GMMNs) offer a more stable, kernel-based alternative using the Maximum Mean Discrepancy (MMD) two-sample test. Despite their theoretical elegance, GMMNs have historically struggled with complex datasets like CIFAR-10, requiring massive batch sizes and producing blurry results due to their reliance on fixed, manually-selected kernels (e.g., Gaussian kernels).

Methodology: Adversarial Kernel Learning

The primary innovation of MMD GAN is the transition from fixed kernels to adversarially learned kernels.

  1. Learned Feature Space: Instead of applying a kernel $k(x, y)$ directly to raw data, the model passes inputs through a neural network $f_\phi$, acting as a discriminator or encoder. The resulting kernel is $k(f_\phi(x), f_\phi(y))$. This allows the model to learn which features are most important for distinguishing real from fake data.
  2. Min-Max Optimization: The training process is formulated as a game where the discriminator $f_\phi$ seeks to find a feature space that maximizes the MMD distance between real and generated distributions, while the generator $G$ attempts to minimize it.
  3. Stability Enhancements: To prevent the discriminator from collapsing the feature space, the authors utilize autoencoder regularization to ensure the mapping $f_\phi$ remains informative. Additionally, a "feasible set reduction" constraint is applied to stabilize the expected values of real versus fake data during training.

Experimental Results

The authors evaluated MMD GAN across several benchmarks, including MNIST, CIFAR-10, CelebA, and LSUN Bedrooms.

Qualitative Comparison

As shown in the comparison below, MMD GAN significantly improves upon previous GMMN iterations. While GMMN-D and GMMN-C produce blurry or noisy approximations on CIFAR-10, MMD GAN generates sharp, recognizable objects.

Qualitative comparison of generated samples on MNIST (top) and CIFAR-10 (bottom) across GMMN variants and MMD GAN.

Quantitative Performance

On CIFAR-10, MMD GAN achieved an Inception Score of 6.17, a substantial improvement over the original GMMN (3.47) and even surpassing WGAN (5.88) in these experiments. Notably, MMD GAN achieves these results with standard batch sizes (e.g., 64), whereas original GMMNs often required batches exceeding 1000 to obtain a useful signal.

Discussion and Key Insights

  • Weak Topology and Convergence: The authors demonstrate that the MMD GAN loss function is continuous and differentiable, providing a smooth gradient for the generator even when distributions are disjoint, similar to the benefits of Wasserstein distance.
  • Infinite-Order Matching: Unlike WGAN, which primarily matches first-order moments, MMD with a Gaussian kernel in a learned feature space theoretically matches moments of all orders, allowing for more precise distribution alignment.
  • Training Monitoring: The MMD GAN loss serves as a reliable proxy for image quality, decreasing consistently as the generator improves, which simplifies the hyperparameter tuning process compared to standard GANs.

Conclusion

MMD GAN successfully bridges the gap between the statistical rigor of MMD and the representational power of deep learning. By learning the kernel adversarially, the model overcomes the efficiency and quality hurdles that previously limited GMMNs. Future work may explore diverse kernel architectures and further investigate the necessity of the injective mapping constraint in practice.

Summary updated

BibTeX
@inproceedings{li2017mmd,
  author = {Chun-Liang Li and Wei-Cheng Chang and Yu Cheng and Yiming Yang and Barnabás Póczos},
  title = {{MMD GAN: Towards Deeper Understanding of Moment Matching Network}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=r1ZCc8bOZS},
}
Figure