[Paper Review] Top-k Training of GANs: Improving GAN Performance by Throwing Away Bad Samples
This paper proposes a simple one-line modification to GAN training: during generator updates, only the top-k most realistic samples (as scored by the critic) are used to compute gradients, discarding the rest. This top-k training improves FID scores across multiple GAN architectures, including reducing CIFAR-10 FID from 9.21 to 8.57, with no increase in computational cost.
We introduce a simple (one line of code) modification to the Generative Adversarial Network (GAN) training algorithm that materially improves results with no increase in computational cost: When updating the generator parameters, we simply zero out the gradient contributions from the elements of the batch that the critic scores as `least realistic'. Through experiments on many different GAN variants, we show that this `top-k update' procedure is a generally applicable improvement. In order to understand the nature of the improvement, we conduct extensive analysis on a simple mixture-of-Gaussians dataset and discover several interesting phenomena. Among these is that, when gradient updates are computed using the worst-scoring batch elements, samples can actually be pushed further away from their nearest mode. We also apply our method to recent GAN variants and improve state-of-the-art FID for conditional generation from 9.21 to 8.57 on CIFAR-10.
Motivation & Objective
- To improve GAN training stability and performance using a minimal, efficient modification to the standard training procedure.
- To investigate whether discarding low-scoring (least realistic) samples during generator updates leads to better model learning.
- To understand the underlying dynamics of gradient updates on bad vs. good samples in GAN training.
- To evaluate the method across diverse GAN architectures and datasets, including CIFAR-10 and ImageNet.
- To provide empirical and theoretical insight into why top-k sampling improves training, particularly in mode-seeking behavior.
Proposed method
- During generator parameter updates, only the k samples from the batch with the highest critic scores are used to compute gradients.
- The gradient contributions from the bottom (B-k) samples—those deemed least realistic by the critic—are zeroed out.
- The value of k is annealed over time: starting from the full batch size and decreasing to a minimum value using a decay rate γ.
- The method is applied only to the generator; the critic is updated using the full batch.
- The approach requires only a one-line code change to standard GAN training loops.
- The technique is evaluated on both a simple mixture-of-Gaussians toy dataset and real-world benchmarks like CIFAR-10 and ImageNet.
Experimental results
Research questions
- RQ1Does discarding low-quality samples during generator updates improve GAN training performance?
- RQ2Why do gradients from low-scoring samples hurt generator learning, and what direction do they push generated samples?
- RQ3How does the annealing schedule for k (the number of top samples used) affect final model quality?
- RQ4Can top-k training be generalized across different GAN architectures and datasets?
- RQ5What is the impact of using top-k updates on mode collapse and mode-seeking behavior in GANs?
Key findings
- Top-k training improves FID on CIFAR-10 from 9.21 to 8.57 for conditional image generation, representing a significant performance gain.
- On the mixture-of-Gaussians dataset, top-k training pushes generated samples toward their nearest mode, while bottom-k updates push them away, indicating that bad samples introduce harmful gradient signals.
- Using too small a decay rate γ or too large a minimum k (ν) degrades performance, showing sensitivity to hyperparameter tuning.
- Applying top-k updates only to the generator, not the critic, yields optimal results, as the critic still needs full-batch gradients for stable training.
- The method improves performance across multiple GAN variants without increasing computational cost, demonstrating broad applicability.
- The improvement is attributed to removing gradient updates that point away from the data manifold, especially as the critic becomes better at identifying unrealistic samples over time.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.