All models

pytorch_gan_relativistic_gan_generator

A plain GAN generator whose family name comes from the relativistic discriminator loss it was trained against.

Diffusion and generative · 13 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (18 KB)

Open in a new tab

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.

At a glance

Parameters
1M
Operations
13
Framework
PyTorch
Recurrent
No
Published
ICLR 2019
Cited by
901 (as of 17 October 2026)
Authors
Alexia Jolicoeur-Martineau
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8444
Graph hash
95d9a2d2868bceea4de98873cc2af5bef6f183700be16f1d40ca27d57980164c
Skeleton hash
1c096f818ff50d948050c050ec2ef79d717fb15bef8a88332532db3f7afb3948
Architecture hash
a272765c51a959d85e7faafad35a0ba3acd5702e518c0f8764e8bf3320f77cf1
Diagram SHA-256
41957ce5f41c94e7ae547dd719775072971dd82590b76594784afd8a672465bd
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

A relativistic GAN changes what the discriminator estimates: not whether an input is real, but whether given real data is more realistic than randomly sampled fake data. The argument is that a standard GAN generator only pushes fake data towards real when it should also lower the probability that real data is real, since half of each mini-batch is known to be fake. A second variant, the relativistic average discriminator, compares each input's critic to the average critic of samples of the opposite type. Both generalize to non-standard GAN losses as RGANs and RaGANs, and the author shows that IPM-based GANs are a subset of RGANs using the identity function.

Empirically, RGANs and RaGANs were significantly more stable and produced higher quality samples than their non-relativistic counterparts. A standard RaGAN with gradient penalty beat WGAN-GP while needing only a single discriminator update per generator update. RaGANs could also generate plausible 256x256 images from a very small sample of 2011 images where GAN and LSGAN could not.

Because the change lives in the loss, the networks themselves are ordinary: the experiments used the standard CNN of Miyato et al. and a relatively standard DCGAN architecture. The author's code shows the whole change as a few lines, with the discriminator loss becoming a binary cross-entropy with logits on the difference between real and fake predictions.

Key idea. A relativistic discriminator that estimates whether real data is more realistic than fake data, which makes GANs more stable and their samples higher quality without changing the networks.

  • Relativistic GAN
  • RGAN
  • RaGAN
  • relativistic discriminator
  • relativistic average GAN
  • Jolicoeur-Martineau
  • GAN loss
  • image generation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{jolicoeurmartineau2018relativisticdiscriminatorkeyelement,
      title={The relativistic discriminator: a key element missing from standard GAN}, 
      author={Alexia Jolicoeur-Martineau},
      year={2018},
      eprint={1807.00734},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1807.00734}, 
}