Abstract
We propose to use a quality estimator and evolutionary methods to search the latent space of generative adversarial networks trained on small, difficult datasets, or both. The new method leads to the generation of significantly higher quality images while preserving the original generator's diversity. Human raters preferred an image from the new version with frequency 83.7% for Cats, 74% for FashionGen, 70.4% for Horses, and 69.2% for Artworks, and minor improvements for the already excellent GANs for faces. This approach applies to any quality scorer and GAN generator.
Introduction
Generative Adversarial Networks (GANs) have revolutionized image synthesis but remain highly dependent on large, high-quality datasets. When trained on limited or complex data, GANs frequently produce "broken" images characterized by unrealistic artifacts, such as incoherent textures or anatomical errors. Traditional solutions often involve modifying the training objective or data augmentation strategies, which can be computationally expensive and difficult to tune.
EvolGAN introduces a "plug-and-play" alternative: instead of retraining the generator, we can improve output quality by intelligently searching the latent space at inference time. By treating the pre-trained generator as a fixed mapping, EvolGAN uses an evolutionary algorithm guided by an external quality scorer to find latent vectors that yield superior images.
Methodology: Evolutionary Latent Space Search
The core mechanism of EvolGAN is a shift from random sampling to inference-time optimization. The process involves three primary components: a pre-trained Generator ($G$), a Quality Scorer ($Q$), and an Optimizer.
The optimization follows a (1 + 1)-Evolution Strategy. Starting from a randomly drawn latent vector $z_0$, the algorithm iteratively generates mutations. If a mutated vector $z'$ produces an image $G(z')$ with a higher quality score than the current best, it is retained. The quality scorer used is typically Koncept512, a model trained on human ratings to predict technical image quality (e.g., sharpness, lack of artifacts).
A critical hyperparameter is the mutation strength $\alpha$. Low values of $\alpha$ restrict the search to a local neighborhood, ensuring the final image is a "cleaned-up" version of the original sample, thereby preserving the generator's diversity. Higher values allow for a more global search, potentially finding higher quality at the cost of original sample fidelity.
Results and Discussion
EvolGAN was evaluated across several challenging datasets, including StyleGAN2 models trained on cats, horses, and artworks. Qualitative results demonstrate a significant reduction in common GAN artifacts.
Human preference studies confirmed these improvements. Raters preferred EvolGAN-generated images over standard GAN outputs 83.7% of the time for the Cats dataset and 70.4% for Horses. Importantly, diversity metrics (LPIPS) showed that when using local search ($\alpha=0$), the diversity of the generated images remains nearly identical to the original model, avoiding the common pitfall of mode collapse.
Limitations
The method's performance is tied to the quality scorer. When applied to non-photorealistic data like the PokeGAN dataset, Koncept512—trained on real-world photos—struggled to provide meaningful guidance, sometimes leading to degenerate results. Additionally, the iterative nature of the search adds computational overhead, requiring 40 to 300 generator passes per image.
Conclusion
EvolGAN demonstrates that significant quality gains can be achieved without retraining GANs. By leveraging off-the-shelf quality estimators and simple evolutionary strategies, it provides a flexible, accessible way to "polish" generative outputs, making GANs more robust for use with small or difficult datasets.
Summary updated