COEGAN: Evaluating the Coevolution Effect in Generative Adversarial Networks

Victor Costa, Nuno Lourenço, João Correia, Penousal MachadoarXiv 2019 · DOI

TL;DR

COEGAN introduces a coevolutionary neuroevolution framework to automate the design of Generative Adversarial Network (GAN) architectures. By evolving populations of generators and discriminators against each other, the system discovers efficient network topologies while significantly improving training stability and mitigating common issues like mode collapse.

What Problem Does This Paper Address?

Generative Adversarial Networks (GANs) are notoriously difficult to train. They often suffer from vanishing gradients (where the discriminator becomes too good, leaving the generator with no useful feedback) and mode collapse (where the generator produces only a limited variety of samples).

Furthermore, designing the "perfect" architecture for a GAN is currently a manual, trial-and-error process. Researchers typically spend hours fine-tuning hyperparameters and layer configurations. While neuroevolution—using evolutionary algorithms to design neural networks—has shown promise in other areas, applying it to the competitive, two-player game of GANs presents unique coordination challenges.

Methods

The authors propose COEGAN, which adapts the DeepNEAT algorithm into a competitive coevolutionary environment.

The Evolutionary Loop

Instead of training a single pair of networks, COEGAN maintains two separate populations: one for generators and one for discriminators.

  • Genotypes: Each individual's "DNA" consists of an array of genes representing layers (Linear, Conv2d, or Deconv2d) and their activation functions.
  • Pairing Strategy: The authors found that an "all vs. all" strategy—where every generator is evaluated against every discriminator in a generation—provided the most stable training environment.
  • Speciation: To protect innovative but initially weak architectures, COEGAN uses speciation to ensure diverse topologies have time to mature before facing stiff competition.

Fitness and Weight Transfer

A key innovation is the fitness function. While discriminators use standard GAN loss, the authors found raw loss was too unstable for generators. Instead, they use the Fréchet Inception Distance (FID) as the fitness metric for generators, which better captures image quality and diversity.

Crucially, COEGAN employs weight inheritance. When a network is mutated (e.g., adding a layer), the weights from compatible existing layers are preserved. This allows the evolution to build upon learned features rather than starting from scratch every generation.

Figure 5: The average number of times a gene was reused when trained on the MNIST dataset.
Figure 5 demonstrates that genes (and their learned weights) are successfully preserved and reused across generations.

Datasets

The model was evaluated on two standard computer vision benchmarks:

  1. MNIST: The classic dataset of handwritten digits (0-9).
  2. Fashion-MNIST: A more complex dataset consisting of 10 categories of clothing items (shoes, shirts, etc.).

Key Insights and Ideas

  • FID over Loss: Using FID as a selection criterion is a major "aha" moment. It provides a more reliable signal for the evolutionary algorithm than the volatile adversarial loss, guiding the population toward genuinely better image synthesis.
  • Stability through Diversity: The population-based approach acts as a natural defense against training failure. If an individual suffers from mode collapse, its fitness drops, and it is naturally phased out of the gene pool.
  • Complexification: The system starts with simple architectures and gradually adds complexity. As seen in Figure 4, the average number of layers grows over time as the networks "learn" they need more capacity to compete.
Figure 4: The average number of layers on the MNIST dataset.

Key Results

COEGAN was compared against a random search baseline and a manually designed reference architecture based on DCGAN.

  • Superior Quality: COEGAN achieved significantly better (lower) FID scores than both the random search and the DCGAN baseline on both MNIST and Fashion-MNIST.
  • Efficiency: Interestingly, COEGAN discovered architectures that were shallower (fewer layers) than the DCGAN reference but performed better, suggesting that evolved topologies can be more efficient than hand-designed ones.
  • Training Stability: The authors reported no evidence of vanishing gradients or mode collapse across their experimental runs, validating the stabilizing effect of the coevolutionary approach.
Figure 6: Root mean squared error on the MNIST dataset.
Figure 6 shows that while DCGAN might achieve lower RMSE, COEGAN provides a more stable and innovative evolutionary path.

Limitations and Future Work

While successful, the authors acknowledge a few hurdles:

  • Computational Cost: The "all vs. all" pairing strategy, while stable, is computationally expensive as the number of evaluations scales quadratically with population size.
  • Scalability: The experiments were limited to low-resolution datasets (28x28 pixels). Future work is needed to see if COEGAN can scale to high-resolution datasets like CelebA or CIFAR-10.
  • Search Space Constraints: The current study limited genomes to 6 layers. Expanding this limit and the variety of available layer types (e.g., residual blocks) could unlock even more powerful architectures.

Summary updated

BibTeX
@misc{costa2019coegan,
  author = {Victor Costa and Nuno Lourenço and João Correia and Penousal Machado},
  title = {{COEGAN: Evaluating the Coevolution Effect in Generative Adversarial Networks}},
  year = {2019},
  eprint = {1912.06180},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.06180},
}
Figure