Skip to content
AI360Xpert
Paper Breakdowns
Paper breakdown

StyleGAN2

StyleGAN2 eliminates droplet artifacts by replacing AdaIN with weight demodulation and improves latent interpolation with path length regularization.

Paper: Analyzing and Improving the Image Quality of StyleGAN

Authors: Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, Timo Aila · 2020

Read the paper
StyleGAN2 eliminates AdaIN artifacts by baking modulation directly into the convolution weights.
StyleGAN2 eliminates AdaIN artifacts by baking modulation directly into the convolution weights.

The Problem

The original StyleGAN architecture generated unprecedentedly high-resolution images, but it suffered from persistent visual flaws. The most notorious were "water-droplet" artifacts—blobs that appeared in the background or on faces—and phase artifacts, where features like teeth or eyes would remain static while the head rotated.

These issues were traced back to the Adaptive Instance Normalization (AdaIN) operation. Because AdaIN normalized the feature maps after convolution independently of each other, it destroyed information about relative feature scales. To bypass this, the generator learned to smuggle signal strength by creating extreme, localized spikes in the feature maps, which visually manifested as the droplet artifacts.

The Idea

Instead of modulating and normalizing the feature maps at runtime with AdaIN, the authors realized they could achieve the same styling effect by directly modifying the convolution weights themselves before applying them to the data.

This approach, called Weight Demodulation, bakes the style vector's scale directly into the convolution weights, ensuring that the statistics of the feature maps remain bounded without requiring destructive instance normalization.

How It Works

StyleGAN2 introduces several architectural and training improvements to eliminate artifacts and improve the latent space:

Weight Demodulation Instead of applying AdaIN to the feature maps, the style vector is used to scale the weights of the convolution layers. To prevent the signal from exploding, these modified weights are then "demodulated" (normalized) by their own expected variance. This mathematical restructuring removes the need for instance normalization entirely, eliminating the droplet artifacts.

Path Length Regularization To ensure the latent space is well-behaved, a new regularization term forces the mapping from the latent space to the image space to be smooth. If you move a fixed distance in the latent space, the image should change by a consistent magnitude, regardless of where you are in the space. This makes interpolations visually smoother and easier to invert.

No Progressive Growing The original StyleGAN used progressive growing (training at low resolutions, then slowly adding layers for higher resolutions) to stabilize training, but this caused phase artifacts. StyleGAN2 abandons progressive growing, replacing it with a new hierarchical architecture using skip connections and residual nets, allowing the model to focus on high-resolution details without locking low-frequency features in place.

Why It Mattered

StyleGAN2 completely solved the bizarre artifacts that plagued its predecessor while establishing a new state-of-the-art for unconditional image synthesis. By smoothing out the latent space with path length regularization, it became vastly easier for researchers to project real images into the latent space (GAN inversion) and perform semantic edits, like changing a subject's age or expression.

What Came After

StyleGAN2 became the de facto standard for high-fidelity face and image generation for years. It enabled an entire sub-field of semantic image editing and GAN inversion research. The architecture was later refined in StyleGAN3, which addressed translation equivariance to fix remaining texture-sticking issues. While diffusion models (like Denoising Diffusion Probabilistic Models) eventually overtook GANs for general text-to-image tasks, StyleGAN2 remains highly relevant for real-time, high-quality domain-specific generation.