Inspirational Adversarial Image Generation

Baptiste Rozière, Morgane Rivière, Olivier Teytaud, Jérémy Rapin, Yann LeCun, Camille CouprieIEEE TIP 2019

TL;DR

This paper introduces a method to generate images from pre-trained Generative Adversarial Networks (GANs) that are inspired by a user's input image or preferences. By optimizing the GAN's latent space, they can retrieve or create novel images that closely resemble a target, offering artists and designers a more intuitive way to explore and leverage GANs for creative inspiration.

What Problem Does This Paper Address?

Generative Adversarial Networks (GANs) are powerful tools for creating realistic images, but their latent spaces are high-dimensional and often lack intuitive meaning. This makes it difficult for users, especially artists and designers, to control the output and find specific, inspiring images. Existing methods for controlling GANs can be complex, require retraining, or are limited in their scope. This paper addresses the challenge of providing users with a simple, intuitive, and effective way to "steer" a pre-trained GAN to generate images that align with their creative vision, whether that vision is represented by an existing image or subjective preferences.

Methods

The core of the proposed method is an optimization process that searches the latent space of a trained GAN. Given an input "inspiration" image, the authors define an objective function that measures the similarity between the generated image and the inspiration. This similarity is captured by two main criteria:

  • Pixel-based similarity (L2 loss): A straightforward comparison of pixel values between the generated and target images. While simple, it struggles with variations in translation, rotation, and illumination, and doesn't capture abstract concepts well.
  • Feature-based similarity (VGG loss): This approach uses features extracted from a pre-trained VGG-19 network. By comparing the mean and standard deviation of feature maps from different layers, it captures more semantic information and is invariant to spatial transformations.

To find the optimal latent vector that minimizes this objective function, they explore various optimization algorithms:

  • Gradient-based optimizers: Including Adam and LBFGS, which leverage gradient information to efficiently search the latent space.
  • Gradient-free optimizers: Such as Differential Evolution (2PDE, DDE) and (1+1)-Evolution Strategy (DOPO), which are useful when gradients are unavailable or the problem is highly non-convex. These methods can also work with human preferences as the sole criterion.
  • Human-in-the-loop evolution (HEVOL): A novel approach where a human user iteratively selects the best generated images from a set of options, guiding the search without needing a specific target image.

They also incorporate a realism penalty using the GAN's discriminator to ensure generated images are plausible, and a latent vector penalty to keep the latent vector within a reasonable range. For conditional GANs, they handle class conditioning by either treating it as part of the continuous latent vector or by fixing the class input.

Datasets

The authors trained and evaluated their methods on several publicly available datasets:

  • Describable Textures Dataset (DTD): For texture generation.
  • RTW dataset: For clothing and fashion images.
  • Celeba-HQ: A high-resolution dataset of celebrity faces.
  • FashionGen: A large dataset of fashion images.

They did not introduce new datasets but rather utilized existing ones to demonstrate the versatility of their approach across different domains.

Key Insights and Ideas

  • Latent space optimization is a powerful tool for inspiration: The paper convincingly shows that by treating GAN latent space exploration as an optimization problem, users can effectively retrieve or generate images that match specific visual targets or subjective preferences.
  • Feature-based similarity is crucial for semantic matching: While pixel-level losses are simple, feature-based similarity using pre-trained networks like VGG-19 is essential for capturing abstract concepts and achieving semantically meaningful results, especially for complex targets like faces or fashion items.
  • Gradient-free and human-in-the-loop methods offer unique advantages: For tasks where a precise target image is unavailable or subjective preferences are key (like facial composites or fashion design), gradient-free optimizers and the HEVOL approach provide a flexible and intuitive alternative to purely gradient-based methods.
  • LBFGS is numerically superior but not always preferred by humans: While LBFGS consistently achieves the best numerical scores for retrieval, human studies often favored evolutionary algorithms (2PDE, DOPO) for their ability to find more robust and visually pleasing results, particularly in misspecified cases. This highlights a potential disconnect between objective metrics and human perception.

Key Results

  • Successful retrieval across diverse datasets: The method demonstrated its ability to generate satisfactory images inspired by targets from faces, fashion, and textures.
  • LBFGS excels numerically: For reconstruction tasks, LBFGS consistently outperformed other optimizers in terms of retrieval scores.
  • Human preference favors evolutionary methods for certain tasks: In misspecified cases and for fashion/texture retrieval, human studies indicated that gradient-free methods like 2PDE and DOPO yielded better results than gradient-based ones.
  • HEVOL achieves convincing results quickly: The human-in-the-loop approach (HEVOL) could generate satisfactory facial composites in as few as six iterations (under 3 minutes of user time), outperforming random search significantly in human preference studies.
  • Feature-based losses are better for semantic matching: For semi-specified and misspecified cases, feature-based similarity criteria were necessary to capture semantic meaning, whereas L2 loss was better for rough reconstruction.

Limitations and Future Work

  • Numerical vs. Human Preference: A key limitation is the observed discrepancy between numerical optimization scores and human judgment. While gradient-based methods like LBFGS are numerically superior, human evaluators often preferred results from evolutionary algorithms, suggesting that current similarity metrics might not fully capture human perception of "good" generation.
  • Computational Cost: Gradient-based methods, while numerically efficient per iteration, are significantly slower overall due to the additional computation of gradients. Gradient-free methods are faster per iteration but may require more iterations to converge.
  • Future Work: The authors suggest exploring more sophisticated similarity criteria, further investigating the trade-offs between numerical and human-based evaluation, and expanding the HEVOL framework to more complex generation tasks. They also highlight the potential for their methods in applications like interactive design tools and personalized content generation.

Summary updated

BibTeX
@misc{roziere2019inspirational,
  author = {Baptiste Rozière and Morgane Rivière and Olivier Teytaud and Jérémy Rapin and Yann LeCun and Camille Couprie},
  title = {{Inspirational Adversarial Image Generation}},
  year = {2019},
  eprint = {1906.11661},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.11661},
}
Figure