All models

lightweight_gan_discriminator

Self-supervised GAN discriminator trained as a feature encoder with auto-encoding decoders.

Diffusion and generative · 420 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 (27 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
9.2M
Operations
420
Framework
PyTorch
Recurrent
No
Published
ICLR 2021
Cited by
176 (as of 19 October 2026)
Authors
Bingchen Liu, Yizhe Zhu, Kunpeng Song, Ahmed Elgammal
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
m5624
Graph hash
b84a6f033ed89021ac41f86ca0edac679a8c88b56872b5b290d8218b4620d37e
Skeleton hash
0a01f51f129f3807ac5fe0345f63fdb2a5716573c2ada6e52925b3c8b7b4ac5c
Architecture hash
37e91b6b0276a946d0c63cd443a1966c65be3e8ce2b6567de6039607a7c8591d
Diagram SHA-256
9d542a3ea9ea259acb5c933411c1f610de39aa6ca2217b3df07ab04e3ebd553a
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

This is the discriminator from lucidrains' lightweight-gan package, a third-party PyTorch implementation of the paper Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis that adds some techniques of its own. The paper's premise is that under few-shot, low-compute training a GAN needs a discriminator that keeps providing useful signals to the generator.

Its answer is a self-supervised discriminator trained as a feature-encoder with an extra decoder. The discriminator is treated as an encoder and trained with small decoders on a reconstruction loss computed only on real samples, which forces it to extract features that can be decoded back into the image. Two decoders read feature maps at two scales, 16x16 and 8x8, and each has only four conv layers producing 128x128 images, so the extra computation is small. The auto-encoding only regularizes the discriminator, and the generator is not involved. Adversarial training uses the hinge version of the loss.

In the paper's ablation the two proposed modules are orthogonal and the self-supervised discriminator makes the biggest contribution. The authors argue that this decoding regularization is what keeps the model from diverging where the baseline and StyleGAN2 diverge fast. In the lucidrains package the discriminator output can be 5x5 or 1x1, and the paper's author reported that 5x5 works better for art than for faces. This discriminator uses the 5x5 output.

Key idea. A self-supervised discriminator trained as a feature-encoder with small auto-encoding decoders gives the generator richer signals and stabilizes few-shot GAN training.

  • lightweight gan discriminator
  • lightweight gan
  • fastgan discriminator
  • fastgan
  • self-supervised discriminator
  • auto-encoding discriminator
  • few-shot image synthesis
  • gan discriminator
  • feature encoder
  • lucidrains

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

Cite the paper

@misc{liu2021fasterstabilizedgantraining,
      title={Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis}, 
      author={Bingchen Liu and Yizhe Zhu and Kunpeng Song and Ahmed Elgammal},
      year={2021},
      eprint={2101.04775},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2101.04775}, 
}