Abstract
Deep Generative Models (DGMs) such as GANs frequently produce samples that lack consistency or realism. While the discriminator is typically discarded after training, it encodes critical information about the target data distribution. This paper proposes Discriminator Gradient Flow (DGflow), a framework that refines generated samples by evolving them along the gradient flow of an entropy-regularized $f$-divergence. DGflow utilizes the density-ratio trick and latent space refinement to improve sample quality across various architectures, including GANs, VAEs, and Normalizing Flows. Our approach achieves state-of-the-art results on CIFAR10 and synthetic datasets, demonstrating a robust and universal method for post-training sample refinement.
1. Introduction
Generative Adversarial Networks (GANs) have achieved remarkable success in synthesizing realistic data. However, the quality of generated samples remains inconsistent; even a well-trained generator often produces distorted or unrealistic outputs. Traditionally, the discriminator—the network trained to distinguish real from synthetic data—is discarded once training concludes.
Recent research suggests that this practice is inefficient, as the discriminator contains valuable information regarding the true data distribution. While existing methods attempt to use the discriminator for rejection sampling or iterative tweaking, these approaches are often computationally expensive, sensitive to noise tuning, and limited to standard GAN architectures. This paper addresses these limitations by introducing a unifying framework that extends sample refinement to a broader family of models, including Variational Autoencoders (VAEs) and Normalizing Flows.
2. Methodology
The core of the proposed method is Discriminator Gradient Flow (DGflow). This technique refines generated samples by moving them along the gradient flow of an entropy-regularized $f$-divergence. Mathematically, it establishes a vector field that directs the generated distribution toward the real data distribution.
Key components of the DGflow framework include:
- Density-Ratio Estimation: DGflow leverages the pre-trained discriminator to estimate the ratio between real and generated data densities. This ratio determines the direction and magnitude of the refinement steps.
- Latent Space Refinement: To avoid visual artifacts associated with direct pixel manipulation, DGflow updates the latent vectors (the low-dimensional noise inputs) before passing them through the generator. This ensures that the refined samples remain within the manifold of the generator.
- Density Ratio Corrector: For models lacking a native discriminator (e.g., VAEs), the authors utilize a surrogate discriminator and a "corrector" network. This allows likelihood-based models to benefit from the same gradient-flow refinement used in GANs.
3. Experimental Setup
The authors evaluated DGflow across several domains:
- Synthetic 2D Datasets: 25Gaussians and 2DSwissroll were used to visualize the correction of "spurious modes"—data points generated in incorrect regions.
- Image Datasets: Performance was benchmarked on CIFAR10 (32x32) and STL10 (resized to 32x32 or 48x48).
- Text Dataset: The Billion Words Dataset was used to assess improvements in character-level language modeling.
4. Results and Insights
DGflow demonstrates significant quantitative and qualitative improvements across all tested models. On the synthetic 25Gaussians dataset, DGflow increased the proportion of high-quality samples from 26.5% to 89.5%.
In image generation tasks on CIFAR10, applying DGflow to an SN-ResNet-GAN reduced the Fréchet Inception Distance (FID) from 14.10 to 9.62. Furthermore, it achieved an Inception Score (IS) of 9.35, surpassing the class-conditional BigGAN (9.22) despite being an unconditional model.
Beyond GANs, DGflow provided substantial gains for likelihood-based models. For instance, it improved a VAE's FID on CIFAR10 from 129.5 to 116.0 and a Glow (Normalizing Flow) model's FID from 100.5 to 79.02. In text generation, the method visibly corrected structural and spelling errors, as reflected in improved statistical divergence scores (JS-4 and JS-6).
5. Conclusion and Future Work
DGflow provides a unifying framework for sample refinement, proving that existing methods like DOT and DDLS are special cases of this broader gradient flow formulation. Unlike previous Langevin-based methods, DGflow's density-ratio formulation preserves diversity even in deterministic settings.
However, challenges remain. The current implementation relies on "stale" density estimates that are not updated during the flow, which can lead to degradation if the refinement process is too long. Future work will focus on computationally efficient ways to update these estimates dynamically and establishing automated stopping criteria to prevent over-refinement.
Summary updated