Paper commentary
Analyzing and Improving the Image Quality of StyleGAN
Demodulation removes StyleGAN's droplet artifacts while keeping style control
- Problem StyleGAN images carry blob-shaped droplet artifacts that appear in the intermediate feature maps. The authors trace them to instance normalization, which can erase information in feature magnitudes.
- Method The authors replace instance normalization with weight demodulation. It rescales the convolution weights so each output map has roughly unit scale, so the style block becomes one convolution.
- Results On FFHQ, the full StyleGAN2 model scored an FID of 2.84, compared to 4.40 for the baseline StyleGAN.
Where the droplet artifacts come from
Most StyleGAN images carry blob-shaped artifacts that look like water droplets. The droplet is often hard to see in the final picture, but it is present in the intermediate feature maps. It appears around 64×64 resolution, in every feature map, and grows stronger at higher resolutions. That is puzzling, since a flaw this consistent should be easy for the discriminator to catch.
Such normalization can erase information carried by the magnitudes of the features relative to one another. The authors hypothesize that the generator exploits this by creating one strong, localized spike that dominates the feature statistics, which lets it scale the rest of the signal freely. When the normalization step is removed, the droplets disappear completely, which supports that hypothesis.
Replacing normalization with demodulation
The key idea is to skip normalizing the activations and instead bake the expected output scale into the convolution weights. Before that step, the authors simplify the style block so the normalization has less to do. They move the bias and noise outside the style block, where they act on normalized data, and they need only the standard deviation, not the mean.
A style modulation scales each input feature map, which can be written as scaling the weights: \( w'_{ijk} = s_i \cdot w_{ijk} \), where \( s_i \) is the scale of the \( i \)th input feature map. If the inputs have unit standard deviation, the output standard deviation is \( \sigma_j = \sqrt{\sum_{i,k} (w'_{ijk})^2} \), the L2 norm of the modulated weights for output map \( j \).
Demodulation divides the weights by this norm, with a small constant \( \epsilon \) for numerical safety: \( w''_{ijk} = w'_{ijk} / \sqrt{\sum_{i,k} (w'_{ijk})^2 + \epsilon} \). Each output map is thereby scaled by roughly \( 1/\sigma_j \), so the whole style block becomes one convolution with adjusted weights.
This is weaker than instance normalization, since it rests on assumptions about the signal rather than the actual contents of the feature maps. The same kind of statistics appears in network initializers and in weight normalization, but the authors know of no earlier use as a replacement for data-dependent normalization. To avoid handling the activation function inside the formula, the authors scale the activation functions so that they keep the expected signal variance.
Does demodulation keep quality?
The new design removes the characteristic artifacts while keeping full control over styles, as the accompanying video shows. On FFHQ, FID barely moves, from 4.40 for the baseline to 4.39 with weight demodulation. Recall rises from 0.399 to 0.425, and precision drops from 0.721 to 0.702.
The authors read this shift toward recall as a good trade, because recall can be traded for precision through truncation but not the other way around. PPL, reported as path length in Table 1, falls from 212.1 to 175.4 on the same FFHQ setup. So the change keeps FID intact, and the later changes build on this base.
Why a smoother mapping should mean better images
The authors observe that perceptual path length, which measures how much images change under small latent steps, tracks perceived quality. On LSUN Cat the authors see a clear link between PPL and semantic consistency of the images. FID and P&R can give identical scores to generators whose visual quality clearly differs, so PPL offers a complementary signal.
The authors explain the link this way: the discriminator punishes broken images, so the generator benefits from stretching the good region of latent space. Low-quality images would then be squeezed into small regions where the latent code changes rapidly, and those distortions hurt training in the long run. Minimizing PPL directly would be a mistake, since it leads to a degenerate solution with zero recall.
So the authors design a regularizer that targets a smoother mapping without this drawback.
Path length regularization step by step
The regularizer asks that a fixed-size step in W gives a fixed-magnitude change in the image, wherever the step starts. At a point w, the local scaling is captured by the Jacobian \( J_w = \partial g(w) / \partial w \) of the synthesis mapping \( g \). The authors draw random images y with normally distributed pixels and w from f(z), then penalize the squared gap between \( \lVert J_w^{T} y \rVert_2 \) and a target a.
The penalty is \[ \mathbb{E}_{w,y\sim\mathcal{N}(0,I)} \left( \lVert J_w^{T} y \rVert_2 - a \right)^2 \] The authors state that in high dimensions this penalty is minimized when \( J_w \) is orthogonal, up to a global scale.
Computing \( J_w \) explicitly would be costly, so the authors use the identity \( J_w^{T} y = \nabla_w (g(w) \cdot y) \), which backpropagation computes. So the global scale is found during optimization rather than set by hand.
The approach is close to the Jacobian clamping regularizer of Odena et al., with one difference: the authors compute \( J_w^{T} y \) analytically, where Odena et al. use finite differences. Spectral normalization constrains only the largest singular value, so it doesn't guarantee good conditioning. The authors report that spectral normalization compromises FID whether it is added alongside their contributions or used instead of them.
Effect of lazy and path length regularization
Lazy regularization runs the R1 term once every 16 minibatches, and the authors find this causes no harm. On FFHQ, config C scored FID 4.38, compared to 4.39 for config B, while PPL moved from 175.4 to 158.0.
Path length regularization in config D cuts FFHQ PPL from 158.0 to 122.5, compared to config C. The per-image PPL distribution tightens without the mode being pushed to zero. FID on FFHQ goes from 4.38 to 4.34 at the same step, so FFHQ quality does not get worse.
On LSUN Car the same step raises FID from 2.83 to 3.43, while PPL falls from 981.6 to 651.2. The authors read Table 1 as a trade-off between FID and PPL on datasets that are less structured than FFHQ.
Replacing progressive growing with skips and residuals
Progressive growing stabilizes high-resolution training, but it leaves phase artifacts, where teeth stay aligned to the camera instead of following the pose. The authors think each resolution serves as the output resolution during growing, pushing the intermediate layers toward excessive high frequencies. They therefore look for an architecture that gets the same low-to-high focus without growing.
They start from MSG-GAN, which connects matching resolutions with multiple skip connections, and simplify it into output skips. In output skips, the generator upsamples the RGB outputs of each resolution and sums them, and the discriminator receives the downsampled input at each block. A residual variant adds residual connections, scaled by 1/√2 to cancel the doubling of signal variance.
With the original discriminator on FFHQ, output skips cut PPL from 265 to 169, while FID stays at 4.32 to 4.33. A residual discriminator then lowers FID to 3.31 with output skips, compared to 4.33 with the original discriminator. The authors note that a residual generator was harmful, with LSUN Car FID as the lone exception when both networks were residual.
The authors keep output skips and a residual discriminator, without progressive growing, as config E. On FFHQ, config E scored FID 3.31 and PPL 124.5.
Resolution use and the capacity limit
The skip generator sums RGB outputs from several resolutions, so each resolution's contribution can be measured directly. The authors compute the standard deviation of pixel values from each tRGB layer over 1024 random samples of w, then normalize so the values sum to 100%. Early in training the share shifts from low to high resolutions, much as progressive growing does, but without changing the topology.
The highest resolution never comes to dominate by the end of training, so the generator may not fully use the target resolution. The generated images look like sharpened 512×512 images rather than true 1024×1024 ones, lacking pixel detail present in the training data.
Config F puts more weight on the highest resolution in Figure 8b, and its FFHQ FID falls to 2.84 with recall at 0.492, compared to 3.31 and 0.449 for config E. The large baseline (config A) also improves, to FID 3.98, compared to 2.84 for StyleGAN2 under config F.
Gains across LSUN categories
On LSUN Car at 512×384, FID drops from 3.27 for StyleGAN (config A) to 2.32 for StyleGAN2 (config F). PPL drops from 1485 to 416 on the same dataset, and LSUN Cat shows FID from 8.53 to 6.93 with PPL from 924 to 439.
Church and Horse follow the same pattern, with FID going from 4.21 to 3.86 and from 3.83 to 3.43. PPL drops from 742 to 342 on Church and from 1405 to 338 on Horse. The authors list training lengths of 57M, 88M, 48M and 100M images for Car, Cat, Church and Horse. They suggest larger sizes could help further, which these runs don't test.
Projecting images back into W
Projection searches for a latent code in the original W that reproduces a given image. The authors add ramped-down noise to the latent code during optimization, so the search explores more of the space. They also optimize the noise inputs, with an autocorrelation regularizer that keeps the noise from carrying coherent signal.
The authors compare LPIPS histograms for LSUN Car and FFHQ, for both generators. For StyleGAN images the mapping from W to images appears too complex for projection to succeed reliably, even though a matching code should exist. Projections of real training images show visible differences from the originals, as expected.
The authors find it encouraging that attribution gets easier even as image quality improves.
Training cost
Config E trains about 40% faster, at 61 img/s. StyleGAN2 (config F) trains at 31 img/s, only slightly more expensive than the original StyleGAN. Most of the speedup comes from simplified dataflow due to demodulation, lazy regularization and code optimizations.
In total it used about 51 single-GPU years of computation on Volta-class GPUs.
Limitations
Path length regularization trades FID for PPL on less structured data, as the LSUN Car row shows. The projection results cover only LSUN Car and FFHQ, and the LSUN table covers only four categories.
The capacity test doubles the feature maps in the highest-resolution layers only, and the authors leave larger sizes open. FID and P&R rely on classifiers that favor textures, which the authors say can compromise those metrics.
Paper info
- Authors
- Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, Timo Aila
- Venue
- arXiv · Preprint
- First published
- 2019-12-3
- Added
- 2026-11-6
- Updated
- 2020-3-23
- Version
- v2
- arXiv
- 1912.04958
- Category
- cs.CV · cs.LG · cs.NE · eess.IV · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
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
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, Timo Aila (2019). Analyzing and Improving the Image Quality of StyleGAN. arXiv:1912.04958v2. https://arxiv.org/abs/1912.04958v2
BibTeX
@misc{karras2019analyzing,
title = {{Analyzing and Improving the Image Quality of StyleGAN}},
author = {Tero Karras and Samuli Laine and Miika Aittala and Janne Hellsten and Jaakko Lehtinen and Timo Aila},
year = {2019},
eprint = {1912.04958},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1912.04958v2}
}