# Spectral Normalization for Generative Adversarial Networks

Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida · arXiv · 2018-2-16

- **Problem** Unconstrained discriminators make GAN training unstable, and input-based penalties do not regularize the space away from the data and generator supports.
- **Method** Each weight matrix is divided by its largest singular value, estimated with power iteration, so every layer's spectral norm becomes one.
- **Results** Reached inception score 7.42 ±.08 on CIFAR-10 with a standard CNN, against 7.40 ±.12 for orthonormal regularization.

## Why an unconstrained discriminator destabilizes training

A GAN pairs a generator, which produces a model distribution, with a discriminator that tries to separate that distribution from the target. The discriminator estimates a density ratio between the two distributions, and in high-dimensional spaces that estimate is often inaccurate and unstable, so the generator can miss the multimodal structure of the target.

The difficulty is sharpest when the supports of the model and target distributions are disjoint: a discriminator can then separate them perfectly, its derivative with respect to the input is zero, and the generator receives no useful training signal.

The optimal discriminator's log-ratio has a derivative that can be unbounded or even incomputable, so the function class needs a regularity condition, and the natural choice is a bound on the Lipschitz constant. Earlier methods enforce such a bound with penalties on sampled inputs, and these cannot act on regions outside the data and generator supports without heuristic choices.

## Rescaling each layer by its spectral norm

The discriminator is a chain of linear maps \\( W^l \\) interleaved with element-wise activations, ending in a final layer \\( W^{L+1} \\) that maps to a scalar. For a linear layer \\( g(h)=Wh \\), the Lipschitz norm equals the spectral norm, \\( \\\|g\\\|\_{Lip} = \\sigma(W) \\), and for a composition the Lipschitz norm is at most the product of the layer norms.

Activations such as ReLU and leaky ReLU have Lipschitz norm 1, so the bound on the whole discriminator reduces to the product of the \\( \\sigma(W^l) \\) over all layers. The spectral norm is the largest singular value of a matrix, defined as \\\[ \\sigma(A) := \\max\_{h \\neq 0} \\frac{\\\|Ah\\\|\_2}{\\\|h\\\|\_2} \\\]

Spectral normalization divides each weight matrix by its own spectral norm, \\\[ \\bar W\_{SN}(W) := W/\\sigma(W) \\\] so that \\( \\sigma(\\bar W\_{SN}(W)) = 1 \\) for every layer and the product bound keeps the discriminator's Lipschitz norm at or below 1.

Computing the exact largest singular value at every update would be costly, so the method estimates \\( \\sigma(W) \\) with power iteration, using a single step per update.

This differs from the spectral norm regularization of Yoshida and Miyato (2017), which adds a penalty to the objective and never sets the norm to a designated value.

## What the normalized gradient adds

Differentiating the normalized weight gives a gradient of the value function that splits into the ordinary mini-batch term and a correction along the top singular pair \\( u\_1 v\_1^T \\): \\\[ \\frac{\\partial V(G,D)}{\\partial W} = \\frac{1}{\\sigma(W)}\\left(\\hat{E}\[\\delta h^T\] - \\lambda\\, u\_1 v\_1^T\\right) \\\] with \\( \\lambda := \\hat{E}\[\\delta^T \\bar W\_{SN} h\] \\).

Here \\( \\delta \\) is the transposed derivative of the value function with respect to \\( \\bar W\_{SN} h \\), and \\( \\hat{E} \\) is the empirical mean over the mini-batch.

The first term is the gradient the weight would receive without normalization. The second term penalizes the first singular component with an adaptive coefficient \\( \\lambda \\), which is positive when \\( \\delta \\) and \\( \\bar W\_{SN} h \\) point in similar directions. The authors argue that this stops the column space of W from collapsing onto one direction during training, so each layer does not become too sensitive along a single direction.

## Why rank matters for weight normalization and clipping

Weight normalization normalizes the L2 norm of each row of the weight matrix, and up to scale this is the constraint \\( \\sigma\_1^2 + \\sigma\_2^2 + \\cdots + \\sigma\_T^2 = d\_o \\) on the singular values of the normalized matrix \\( \\bar W\_{WN} \\), with \\( T = \\min(d\_i, d\_o) \\).

Under that constraint the norm of the normalized matrix applied to a unit vector is largest when the matrix has rank one, so one feature is left for discriminating the two distributions. The norm of the input and the rank therefore pull against each other under weight normalization.

Weight clipping has the same drawback, while spectral normalization fixes only the largest singular value, and the Lipschitz constant of a linear map depends on that value alone, so the other singular values remain free.

Orthonormal regularization adds the penalty \\( \\\|W^T W - I\\\|\_F^2 \\) to the objective, which sets all singular values to one, whereas spectral normalization only scales the spectrum so that its maximum is one.

The gradient penalty of WGAN-GP enforces unit gradient norm at interpolated points, and its effect depends on the generator's current support, which shifts during training; a high learning rate can destabilize it. Computing that gradient norm needs a full forward and backward pass, so WGAN-GP costs more per update than spectral normalization with single-step power iteration.

## Experimental setup for the comparisons

Unsupervised image generation is run on CIFAR-10 and STL-10 against other normalization techniques, and conditional generation on ILSVRC2012 (ImageNet) checks whether the method holds at a larger scale.

For convolutional weights \\( W \\in \\mathbb{R}^{d\_{out}\\times d\_{in}\\times h\\times w} \\), the operator is treated as a 2-D matrix of size \\( d\_{out}\\times(d\_{in}hw) \\), and the generator is trained with batch normalization. The spectral norm then depends on stride and padding, though the authors note that this changes the answer only by a predefined constant.

The standard adversarial objective is used for all methods except WGAN-GP, with a 128-dimensional latent variable drawn from a standard normal, and the generator is updated with the alternative cost in which the generator maximizes \\( \\log D(G(z)) \\). The hinge loss of Eq. (16) and Eq. (17) is also tested, which the authors note is equivalent to minimizing the reverse KL divergence.

Quality is measured with the inception score and the Fréchet inception distance (FID). Weight clipping uses a clipping constant c of 0.01, the gradient penalty uses λ of 10, and the multiplier parameters of weight normalization, batch normalization and layer normalization are excluded.

The Adam optimizer is used throughout, and six settings, A to F, vary the learning rate, the momentum parameters and \\( n\_{dis} \\). Settings D to F use a learning rate of 0.001 with \\( n\_{dis} \\) of 5, and the generator is updated 100K times unless otherwise noted.

## CIFAR-10 and STL-10 results

Across settings A to F, spectral normalization was relatively robust to aggressive learning rates and momentum parameters. WGAN-GP failed at high learning rates and high momentum on both CIFAR-10 and STL-10, and orthonormal regularization performed poorly at setting E on STL-10.

At the optimal settings, SN-GANs reached inception score 7.42 ±.08 and FID 29.3 on CIFAR-10, close to orthonormal regularization at 7.40 ±.12 and 29.0. On STL-10, orthonormal regularization was higher, at 8.56 ±.07 against 8.28 ±.09 for SN-GANs, with FIDs of 46.7 and 53.1. Weight clipping, WGAN-GP and weight normalization scored lower on CIFAR-10, at 6.41 ±.11, 6.68 ±.06 and 6.84 ±.07 respectively.

With the hinge loss of Eq. (17), SN-GANs reached 7.58 ±.12 on CIFAR-10 with FID 25.5. With the ResNet architecture, SN-GANs reached 8.22±.05 on CIFAR-10 and 9.10±.04 on STL-10, with FIDs of 21.7±.21 and 40.1±.50, while orthonormal regularization under Eq. (17) reached 7.92 ±.04 and 8.72 ±.06. The authors also compare generated images qualitatively and report SN-GANs as consistently better than weight normalization in image quality.

## Singular values and training cost

During training, the spectral norms of the normalized layers stayed roughly between 1 and 1.05.

For the best-scoring setting, the squared singular values of the final discriminator show that weight clipping and weight normalization concentrate on a few components in the first to fifth layers, so those matrices are rank deficient. Under spectral normalization the singular values are spread more broadly.

The authors argue that rank deficiency in lower layers is especially harmful for separating distributions on a low-dimensional manifold, because lower-layer outputs have passed through few rectifications and remain close to linear. They link the less diverse images from weight normalization to this effect.

## Feature map width and orthonormal regularization

Orthonormal regularization sets all singular values to one, so it treats every feature dimension equally, including dimensions that training would otherwise suppress. The authors increased the feature map dimension of the final layer on STL-10 to test this effect.

The inception score of orthonormal regularization deteriorates as the feature map dimension grows, while SN-GANs do not falter. The enlargement scales the input and output dimensions by the same factor, and setting C, which was optimal for orthonormal regularization, was used.

The final layer where spectral normalization prefers a small feature space had a dimension below 100, as shown in Figure 3b.

## ImageNet conditional generation

Conditional GANs were trained on ILSVRC2012 with 1000 classes, with images compressed to 128×128 pixels. The adversarial loss follows the conditional formulation of Mirza and Osindero (2014), with the hinge loss in place of the standard GAN loss.

GANs without normalization and GANs with layer normalization collapsed early and produced no meaningful images, while orthonormal regularization and SN-GANs produced images. The inception score of orthonormal regularization plateaued around 20K iterations, while SN-GANs kept improving afterwards.

To measure mode collapse, the authors computed intra MS-SSIM for pairs of independently generated images within each class. SN-GANs reached 0.101, against about 0.25 for AC-GANs, which the authors read as less mode collapse. The AC-GANs figure is a reference value and was not measured under the conditions of this comparison.

SN-GANs also outperformed orthonormal regularization with a projection discriminator in conditional GANs and in unconditional GANs.

## Limitations

On STL-10 at the same number of iterations, SN-GANs fell behind orthonormal regularization. SN-GANs were also trained for twice as many iterations on STL-10, because they did not seem to converge, and this longer run still finishes before WGAN-GP at the original iteration count.

The ResNet means and standard deviations are taken over models trained with different seeds, and each model's score is averaged over 5000 images generated 10 times. The methods in the ResNet comparison differ in both optimization and architecture.

The ImageNet comparison is run against orthonormal regularization only, and mode collapse is checked only with intra MS-SSIM on pairs of images from each class.

Multiplier parameters were excluded from the normalization baselines to keep them from violating the Lipschitz condition, and the authors report no gain from varying them.

## Paper info

- **Authors**: Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida
- **Venue**: arXiv · Preprint
- **First published**: 2018-2-16
- **Added**: 2026-10-20
- **Updated**: 2018-2-16
- **Version**: v1
- **arXiv**: 1802.05957
- **Category**: cs.LG · cs.CV · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1802.05957v1) · [PDF ↗](https://arxiv.org/pdf/1802.05957v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida (2018). Spectral Normalization for Generative Adversarial Networks. arXiv:1802.05957v1. https://arxiv.org/abs/1802.05957v1

**BibTeX**

```
@misc{miyato2018spectral,
  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},
  url = {https://arxiv.org/abs/1802.05957v1}
}
```

## Other paper commentary

- [Denoising Diffusion Implicit Models](https://refivu.com/en/papers/211aa1a1-08e2-40a7-b187-72384021f47a-denoising-diffusion-implicit-models.md)
- [Diffusion Models Beat GANs on Image Synthesis](https://refivu.com/en/papers/c4296a34-b538-4422-b11f-4a805621a24f-diffusion-models-beat-gans-on-image-synthesis.md)
- [A Style-Based Generator Architecture for Generative Adversarial Networks](https://refivu.com/en/papers/4dbbd963-fe20-4e79-9ec9-730023411ef1-a-style-based-generator-architecture-for-generative.md)
- [Wasserstein GAN](https://refivu.com/en/papers/6fbb2587-49dc-4b1a-9bb9-ee89b40b9221-wasserstein-gan.md)
- [Zero-Shot Text-to-Image Generation](https://refivu.com/en/papers/ec261d9b-e98a-4dcc-8961-c79073db25e2-zero-shot-text-to-image-generation.md)
- [Score-Based Generative Modeling through Stochastic Differential Equations](https://refivu.com/en/papers/11d114a6-a425-47ea-9133-db43e9c355d2-score-based-generative-modeling-through-stochastic.md)
- [OLMo: Accelerating the Science of Language Models](https://refivu.com/en/papers/674dc7cc-bbc8-47b3-a55b-69c562d96047-olmo-accelerating-the-science-of-language-models.md)
- [Highway Networks](https://refivu.com/en/papers/78251486-9138-48d8-a03c-8447a3433591-highway-networks.md)
- [Tree of Thoughts: Deliberate Problem Solving with Large Language Models](https://refivu.com/en/papers/708b6d99-e4dc-4582-abc4-e2de5a72d5d3-tree-of-thoughts-deliberate-problem-solving-with-large.md)
- [Self-Instruct: Aligning Language Models with Self-Generated Instructions](https://refivu.com/en/papers/b7e9c5f5-b8d4-4382-9c03-d006766b8f88-self-instruct-aligning-language-models-with-self-generated.md)
- [Rethinking Attention with Performers](https://refivu.com/en/papers/be31745a-9080-4105-b177-3b88d23e4f59-rethinking-attention-with-performers.md)
- [DeepSeek-V3 Technical Report](https://refivu.com/en/papers/761895a4-08f3-446f-98de-60152a184c97-deepseek-v3-technical-report.md)

## Terms in this paper

- [CIFAR-10](https://refivu.com/en/terms/19035a518d0a-cifar-10)
- [Batch Normalization](https://refivu.com/en/terms/2b3e5f8509f6-batch-normalization)
- [Generative adversarial networks](https://refivu.com/en/terms/889f2a50b737-generative-adversarial-networks)
- [FID](https://refivu.com/en/terms/e110afe65f86-fid)
- [layer normalization](https://refivu.com/en/terms/7af9eccdb60d-layer-normalization)
- [Adam optimizer](https://refivu.com/en/terms/aff9e901333e-adam-optimizer)
- [inception score](https://refivu.com/en/terms/25dbfbd4fd96-inception-score)
- [discriminator](https://refivu.com/en/terms/4e47ae7741de-discriminator)
- [spectral normalization](https://refivu.com/en/terms/bf3f626bf932-spectral-normalization)
- [WGAN-GP](https://refivu.com/en/terms/f80238817a09-wgan-gp)
- [hinge loss](https://refivu.com/en/terms/81cbdf4a8c8a-hinge-loss)
- [weight normalization](https://refivu.com/en/terms/4e6290a43b03-weight-normalization)
- [gradient penalty](https://refivu.com/en/terms/084724b3234b-gradient-penalty)
- [STL-10](https://refivu.com/en/terms/ae855199b458-stl-10)
- [power iteration method](https://refivu.com/en/terms/527229df7e20-power-iteration-method)
- [Spectral Norm](https://refivu.com/en/terms/bf6a3907b688-spectral-norm)
- [weight clipping](https://refivu.com/en/terms/0238aee26017-weight-clipping)
- [Lipschitz constant](https://refivu.com/en/terms/0ebdfcbc7934-lipschitz-constant)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/a69a23bf-3dd6-4b32-9fb1-444f7f67a6e8-spectral-normalization-for-generative-adversarial-networks)
