ComGAN: Toward GANs Exploiting Multiple Samples

Haeone LeearXiv 2023 · DOI

Abstract

Generative Adversarial Networks (GANs) often struggle with training instability and mode collapse. While Relativistic GANs (RaGANs) introduced the concept of relative discrimination to mitigate these issues, they are constrained by a simple logit-subtraction mechanism. This paper introduces ComGAN (Comparative GAN), a framework that generalizes the relativistic approach by allowing the discriminator to perform complex semantic comparisons between multiple samples. Coupled with a novel Equality Regularization technique—which trains the model to recognize when samples are equally real or fake—ComGAN achieves state-of-the-art Fréchet Inception Distance (FID) scores and significantly enhanced training stability across standard benchmarks.

Introduction

Generative Adversarial Networks (GANs) have revolutionized generative modeling but remain notoriously difficult to optimize. Common failure modes include vanishing gradients and mode collapse, where the generator produces a narrow range of outputs. To address these, Relativistic GANs (RaGAN) shifted the discriminator's objective from an absolute question ("Is this image real?") to a relative one ("Is this image more real than that one?").

However, RaGANs are mathematically restricted to comparing the final scalar outputs (logits) of two images. This "logit-level" comparison prevents the discriminator from analyzing high-level semantic relationships, such as shared textures or structural patterns, between the samples. ComGAN aims to overcome this limitation by allowing for arbitrary architectures that can compare samples deeply within the feature space.

Methodology

1. The ComGAN Framework

ComGAN generalizes the relativistic concept by allowing the discriminator to take two inputs, $x$ and $y$, and process them through a joint function $C(x, y)$. Unlike RaGAN, which is limited to the form $C(x) - C(y)$, ComGAN can utilize any architecture—such as simple concatenation or attention mechanisms—to determine the relative "reality" of the pair. This allows the network to learn comparative features that a simple subtraction of final scores would overlook.

2. Equality Regularization

To further stabilize training, the authors introduce Equality Regularization. This technique forces the discriminator to output a "neutral" label (e.g., 0.5 for cross-entropy or 0 for other losses) when presented with two samples of the same type (two real images or two fake images). By defining a baseline for "equality," the model learns a more robust decision boundary, preventing the discriminator from becoming overconfident and providing steadier gradients for the generator.

3. ComFakeGAN

The researchers also explored ComFakeGAN, a variant where the generator uses other generated (fake) samples as a reference point for comparison. This demonstrates that the model can derive meaningful training signals even without constant reference to the real dataset, further highlighting the flexibility of the comparative framework.

Experimental Results

The proposed methods were evaluated on two standard computer vision benchmarks: CIFAR10 (60,000 images at 32x32 resolution) and Tiny-ImageNet (100,000 images at 64x64 resolution).

FID Superiority

The combination of ComGAN and equality regularization consistently outperformed both standard GANs and Relativistic GANs. The authors achieved the best FID scores in 7 out of 8 test cases across various loss functions, including SGAN, LSGAN, HingeGAN, and WGAN.

Stability and Efficiency

On the CIFAR10 dataset, applying equality regularization to a standard Relativistic GAN (SRaGAN-eq) improved the FID from 58.99 down to 32.76. Even the inherently stable Wasserstein GAN (WGAN) saw gains, with WGAN-GP-eq achieving a leading FID of 24.86. Notably, equality regularization is computationally "cheap" compared to methods like Gradient Penalty (GP) or Spectral Normalization, as it avoids complex second-order derivative calculations.

Discussion and Key Insights

  • Semantic Comparison vs. Logit Subtraction: The success of simple concatenation as an input method suggests that the "how" of comparison is vital. Allowing the neural network to see both images simultaneously enables it to capture global semantics that scalar subtraction misses.
  • The Power of Neutrality: Equality regularization proves that defining a "tie" (real vs. real) makes the discriminator a more effective judge of "wins" (real vs. fake).
  • Theoretical Foundation: The authors demonstrate that ComGAN objectives are theoretically linked to minimizing KL divergence, providing a rigorous mathematical basis for the observed empirical success.

Limitations and Future Work

While ComGAN showed significant promise, the authors noted that "ComSameGAN"—comparing a sample to itself—failed to provide sufficient training signals. Future research will focus on exploring more advanced architectures, such as Attention mechanisms, to better exploit comparative features. Additionally, scaling these methods to high-resolution datasets like ImageNet or FFHQ remains a priority to determine if the benefits of semantic comparison increase with image complexity.

Summary updated

BibTeX
@misc{lee2023comgan,
  author = {Haeone Lee},
  title = {{ComGAN: Toward GANs Exploiting Multiple Samples}},
  year = {2023},
  eprint = {2304.12098},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.12098},
}
Figure