All models

studiogan_sngan

A GAN whose discriminator weights are divided by their largest singular value to keep training stable.

Diffusion and generative · 163 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 (22 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

Family
SNGAN
Parameters
5.4M
Operations
163
Framework
PyTorch
Recurrent
No
Published
ICLR 2018
Cited by
3,445 (as of 17 October 2026)
Authors
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida
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
m10301
Graph hash
cfec10eac66539c2f867ccb59e54de0a04100d1cd1d3e9ad7008e8d6cb75f85a
Skeleton hash
1e79a35d045842d305f41557b33f0b0102c72933dab2f0c0e00a8cc67b6a0843
Architecture hash
f0c0ca9415b650d5c234955086b7f8bebf152ff09cc8da8496fd259244b20c36
Diagram SHA-256
89ec5eda775a09105154a7a639960b7043a664debbeca45a8109446f83ef1741
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

About this model's family

SNGAN is the GAN that introduced spectral normalization, a weight normalization technique that stabilizes the training of the discriminator. The motivation is a familiar failure: in high dimensional spaces, the density ratio estimation by the discriminator is often inaccurate and unstable during the training, and generator networks fail to learn the multimodal structure of the target distribution. Worse, once a discriminator perfectly separates real from generated samples, the training of the generator comes to complete stop, because the derivative of the so-produced discriminator with respect to the input turns out to be 0.

The fix is small enough to read off the traced graph. Spectral normalization normalizes the spectral norm of the weight matrix of each discriminator layer so that it satisfies the Lipschitz constraint, dividing the weight by its largest singular value. Computing that value by singular value decomposition at every step would be expensive, so the authors use the power iteration method to estimate it, which costs very small additional computational time relative to the full computational cost of the vanilla GANs. The Lipschitz constant is the only hyper-parameter to be tuned, and the method worked well even without tuning it.

The captured rows come from PyTorch-StudioGAN, whose table lists SNGAN with a ResNetGAN backbone, conditional batch normalization in the generator, a projection discriminator and the hinge loss; one row is the generator alone. On CIFAR10, STL-10 and ILSVRC2012, the paper reports that spectrally normalized GANs generate images of better or equal quality relative to the previous training stabilization techniques.

Key idea. Spectral normalization: each discriminator weight matrix is divided by its spectral norm, estimated cheaply by power iteration, which enforces a Lipschitz constraint and stabilizes GAN training with one hyper-parameter.

  • sngan
  • sn-gan
  • spectral normalization
  • spectrally normalized gan
  • spectral normalization for generative adversarial networks
  • gan
  • image generation
  • cifar10
  • studiogan
  • projection discriminator

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

Cite the paper

@misc{miyato2018spectralnormalizationgenerativeadversarial,
      title={Spectral Normalization for Generative Adversarial Networks}, 
      author={Takeru Miyato and Toshiki Kataoka and Masanori Koyama and Yuichi Yoshida},
      year={2018},
      eprint={1802.05957},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1802.05957}, 
}