[Paper Review] Metropolis-Hastings Generative Adversarial Networks
This paper proposes Metropolis-Hastings Generative Adversarial Networks (MH-GAN), which use the trained discriminator as a density ratio estimator to construct a Markov chain Monte Carlo (MCMC) wrapper around a pre-trained generator. By applying the Metropolis-Hastings algorithm to samples from the generator using the discriminator’s output as acceptance probabilities, MH-GAN produces samples from the true data distribution—even when the generator is imperfect—achieving state-of-the-art Inception scores and improved sample quality on CIFAR-10 and CelebA.
We introduce the Metropolis-Hastings generative adversarial network (MH-GAN), which combines aspects of Markov chain Monte Carlo and GANs. The MH-GAN draws samples from the distribution implicitly defined by a GAN's discriminator-generator pair, as opposed to standard GANs which draw samples from the distribution defined only by the generator. It uses the discriminator from GAN training to build a wrapper around the generator for improved sampling. With a perfect discriminator, this wrapped generator samples from the true distribution on the data exactly even when the generator is imperfect. We demonstrate the benefits of the improved generator on multiple benchmark datasets, including CIFAR-10 and CelebA, using the DCGAN, WGAN, and progressive GAN.
Motivation & Objective
- Address the limitation of standard GANs, which rely solely on the generator for sampling and may produce biased or low-quality samples even after training.
- Leverage the discriminator’s ability to estimate density ratios more accurately than the generator’s sampling capability, especially in high-dimensional spaces.
- Improve sample quality by constructing a wrapped generator $G'$ that uses MCMC to correct for generator distributional errors.
- Demonstrate that with a perfect discriminator, MH-GAN can produce exact samples from the true data distribution $p_{\text{data}}$, even when the generator is imperfect.
- Address the poor calibration of GAN discriminators, which undermines the reliability of rejection sampling and MCMC-based methods, by introducing calibration techniques for improved performance.
Proposed method
- Use the discriminator $D$ from a pre-trained GAN to compute the density ratio $\frac{p_D(\mathbf{x})}{p_G(\mathbf{x})} = \frac{D(\mathbf{x})}{1 - D(\mathbf{x})}$, which is sufficient for the Metropolis-Hastings acceptance ratio.
- Construct a wrapped generator $G'$ that generates samples via an MCMC independence sampler, where proposals come from the original generator $G$.
- Apply the Metropolis-Hastings algorithm to accept or reject proposals based on the discriminator’s output, ensuring the stationary distribution matches $p_D$, which equals $p_{\text{data}}$ at optimality.
- Introduce calibration techniques—such as isotonic regression and temperature scaling—to improve the reliability of discriminator scores for acceptance decisions.
- Use multiple MCMC iterations (e.g., $k=640$ or $k=800$) to refine the sampling process and improve distributional alignment with real data.
- Apply the MH-GAN framework to diverse GAN architectures, including DCGAN, WGAN, and progressive GAN, demonstrating broad applicability.
Experimental results
Research questions
- RQ1Can the discriminator’s output be used to correct distributional biases in a generator’s samples through MCMC sampling?
- RQ2Does the MH-GAN framework achieve exact sampling from the true data distribution when the discriminator is optimal, even if the generator is imperfect?
- RQ3How does MH-GAN compare to alternative sampling methods like discriminator rejection sampling (DRS) in terms of sample quality and acceptance rate?
- RQ4To what extent does discriminator miscalibration affect MCMC-based sampling, and can calibration techniques improve MH-GAN performance?
- RQ5Can MH-GAN be effectively applied to advanced GAN architectures like progressive GAN to enhance sample quality in high-resolution image generation?
Key findings
- MH-GAN significantly improves Inception scores across all tested models (DCGAN, WGAN, progressive GAN) on CIFAR-10 and CelebA, with all improvements being statistically significant ($p < 0.05$) via paired t-test.
- With a perfect discriminator, MH-GAN produces exact samples from the true data distribution $p_{\text{data}}$, even when the generator is imperfect, fulfilling a theoretical guarantee not met by prior methods.
- Calibration of the discriminator (especially via isotonic regression) leads to a substantial performance boost, reducing the $Z$-statistic from $-77.57$ to $48.98$ (raw) to $-2.91$ to $3.60$ (calibrated), indicating improved reliability.
- The MH-GAN achieves higher acceptance rates and better sample quality than DRS, with human evaluation showing MH-GAN selects significantly fewer warped or flawed images than PGAN or DRS on CelebA-HQ.
- On the progressive GAN, MH-GAN reduced the number of warped images to zero in 16 sampled batches, while DRS still produced 7 flawed samples, and MH-GAN outperformed PGAN at $p=0.013$ in a one-sided test.
- The distribution of discriminator scores for MH-GAN samples closely matches that of real images, indicating effective correction of mode collapse and distributional bias in the generator.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.