Distributional Adversarial Networks

Chengtao Li, David Alvarez-Melis, Keyulu Xu, Stefanie Jegelka, Suvrit Sra

TL;DR

Distributional Adversarial Networks (DAN) move beyond traditional Generative Adversarial Networks (GANs) by training discriminators to evaluate entire sets of data points rather than individual observations. By leveraging "Neural Mean Embeddings," DANs share gradient information across minibatches. This effectively cures the infamous mode collapse problem and provides a more stable training signal for complex distributions.

The Achilles' Heel of GANs: Mode Collapse

The most notorious failure mode of GANs is mode collapse—a scenario where the generator learns to produce only a tiny subset of the true data distribution (e.g., generating only the digit "1" when trained on the entire MNIST dataset).

The authors argue that the root cause is the "myopic" nature of standard discriminators. Traditional discriminators are single-input operators; they look at one image at a time and decide if it is real or fake. Mathematically, this causes the gradient to vanish in regions where the generator hasn't placed any mass yet. If the generator misses a mode, the discriminator becomes "too confident" about that empty region, and the signal for the generator to move mass there simply disappears.

Methods: Distributional Adversaries

To solve this, the authors propose Distributional Adversaries that operate on samples (sets of points) rather than single observations.

  1. Neural Mean Embedding (NME): Instead of feeding raw points to a classifier, the model first maps a batch of points through a neural network $\phi$ and then takes the average. This creates a fixed-length representation of the batch's overall distribution.
  2. Two Adversary Variants:
    • Sample Classifier (DAN-S): A discriminator that takes the NME of a batch and predicts a single label: "Is this entire batch real or fake?"
    • Two-sample Discriminator (DAN-2S): Inspired by statistical two-sample tests, this model takes two NMEs and predicts if they came from the same distribution or different ones.
  3. Gradient Weight Sharing: Because the loss is calculated on the batch's aggregate representation, the resulting gradient for every point in that batch is weighted by the same global confidence term. This "harmonizes" the updates and prevents the signal from vanishing in under-represented regions of the data space.
  4. Hybrid Objective: The authors often combine this distributional loss with a standard GAN loss (controlled by a hyperparameter $\lambda$) to provide the generator with both global distributional guidance and local, point-wise refinement.

Key Insights

  • The "Aha" Moment on Gradients: In a standard GAN, if a point is in a "fake-heavy" region, its gradient is high; if it's in a "real-heavy" region where the generator is missing, the gradient is zero. In DAN, because the discriminator sees the whole sample, it realizes the distribution is wrong even if individual points look "realistic." This forces the generator to spread its mass to missing modes.
  • Linear Efficiency: While similar to Maximum Mean Discrepancy (MMD) methods, DAN uses a learned neural embedding rather than a fixed kernel. This allows it to scale linearly with batch size, whereas kernel-based MMD is often quadratic.
  • Orthogonality: This isn't just a new loss function; it's a structural change to how the discriminator perceives data. It can be combined with existing improvements like Wasserstein loss or Gradient Penalty.

Key Results

DAN was evaluated across a diverse range of tasks, including synthetic data, image generation (MNIST, CelebA, CIFAR-10), and domain adaptation.

Mode Recovery: On synthetic Gaussian mixtures where vanilla GANs frequently collapsed to a single mode, DAN consistently recovered all modes.

Evolution of mode recovery on a 2D Gaussian mixture toy problem.

Quantitative Stability: On MNIST and Fashion-MNIST, DAN achieved lower Total Variation (TV) distances to the true label distribution, indicating a much more balanced generation of all classes compared to baselines like WGAN and MMD.

Total Variation distances on MNIST and Fashion-MNIST showing DAN's stability.

Diversity in Images: On the CelebA dataset, DAN produced faces with significantly higher diversity in backgrounds, skin tones, and hairstyles compared to standard baselines, which tended to produce "prototypical" faces.

Domain Adaptation: DAN-S improved accuracy by ~5% over the standard Domain-Adversarial Neural Network (DANN) on the MNIST-M task, proving that distributional matching is useful beyond just generative modeling.

Limitations and Future Work

  • Sample Size Sensitivity: The size of the batch (the "sample") fed to the discriminator is a crucial hyperparameter. If the batch is too small, the NME might not accurately represent the distribution; if it's too large, it might become computationally expensive or smooth over fine details.
  • Theoretical Formalization: While the intuitive justification for gradient sharing is strong, a more rigorous theoretical link between sample size and the number of modes a model can "see" remains an open area for research.
  • Higher-Order Moments: The current model relies on the mean of the embeddings. Future work could explore using higher-order statistics (variance, covariance) of the batch to capture even more complex distributional features.

Summary updated

BibTeX
@inproceedings{li2018distributional,
  author = {Chengtao Li and David Alvarez-Melis and Keyulu Xu and Stefanie Jegelka and Suvrit Sra},
  title = {{Distributional Adversarial Networks}},
  booktitle = {Workshops @ ICLR},
  year = {2018},
  url = {https://openreview.net/forum?id=VhR3ofgnmhC},
}
Figure