
erik_bgan
Diffusion and generative14 ops1.5M params
A GAN variant that replaces the per-sample classification loss with a softmax over the whole batch.
Diffusion and generative · 14 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Softmax GAN is a variant of the generative adversarial network that changes the loss, not the architecture: the classification loss of the original GAN is replaced by a softmax cross-entropy loss over the samples of a single batch. The discriminator is trained to put all the probability mass on the real samples and none on the generated ones. The generator is trained so that every data point in the batch gets equal probability.
The softmax cross-entropy has a gradient that is non-zero until the softmaxed distribution matches the target, so the generator keeps receiving signal. The author argues that softmax across samples is more natural and explainable than minibatch discrimination and needs no extra parameters. Where the original GAN relates to Noise Contrastive Estimation, Softmax GAN is shown to be the Importance Sampling version of GAN.
Experiments on image generation used the celebA database, with Softmax GAN implemented by modifying the loss function of the DCGAN code. The captured member is the generator from the PyTorch-GAN collection's softmax_gan.py. That collection states that its architectures do not always mirror the papers and that it focuses on the core ideas rather than every layer configuration. The paper's experiments show that this simple change stabilizes GAN training.
Key idea. Softmax GAN swaps the per-sample classification loss for a batch-level softmax cross-entropy, which the author shows is the Importance Sampling version of GAN and which stabilizes training.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{lin2020softmaxgan,
title={Softmax GAN},
author={Min Lin},
year={2020},
eprint={1704.06191},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1704.06191},
}