skip to content

Search

← From Noise to Image

Part I — Before Diffusion (2006–2020)

The GAN Golden Age

ProGAN to StyleGAN2: style modulation, latent arithmetic, and photorealistic faces of people who do not exist.

2017–2020 13 min read 4 papers

By late 2017 the adversarial objective from 2014 and the stabilization tricks that followed it had made GANs trainable without the coin-flip instability of the earlier years. What they had not yet produced was a face that survived a close look, or a resolution above a few hundred pixels on a side. Between October 2017 and December 2019, four papers out of two labs — NVIDIA and Google DeepMind — closed that gap and then overshot it, producing synthetic faces and ImageNet classes sharp enough that a website built to display them needed no caption to make its point.

Where We Were

The adversarial minimax game — a generator and a discriminator trained against each other until the generator’s output is indistinguishable from real data — was defined in 2014; its objective, its interpretation as a divergence minimization, and its characteristic failure mode of mode collapse are covered in Chapter 3. That objective trained, in principle, but not reliably: early GANs oscillated, collapsed onto a handful of outputs, or diverged outright. Chapter 4 covers the recipes that made training itself tractable — the convolutional architecture guidelines of DCGAN, the switch to the Wasserstein distance, and the gradient-penalty fix that made that distance enforceable in practice.

Those fixes solved stability, not scale. Through 2017, a GAN that trained reliably still tended to top out around 128×128 pixels; push the resolution higher and the same instabilities that gradient penalties had tamed at low resolution came back, because a single discriminator judging a high-resolution image all at once has an enormously harder job than one judging a thumbnail. Text-conditioned GANs of the same period, covered in Chapter 7, faced the identical ceiling from the opposite direction — StackGAN and AttnGAN generated recognizable scenes from captions, but at resolutions and fidelities well short of photographic.

Five fixes turn an unstable objective into a 1024 pixel generator Each card is a training-stability fix. The last one is where this chapter begins. Grey monospace text names the concrete mechanism or milestone. 2014-06 GAN objective Minimax game, generator versus a discriminator adversarial loss defined 2015-11 DCGAN Convolutional architecture guidelines for stability conv-only generator, batchnorm 2017-01 WGAN Wasserstein distance replaces the minimax loss smoother loss landscape 2017-03 WGAN-GP Gradient penalty enforces the Lipschitz constraint no more weight clipping 2017-10 ProGAN Progressive growing reaches full 1024px resolution 4x4 grown to 1024x1024 the adversarial objective a training-stability fix the resolution breakthrough this chapter opens on Stability and scale were solved as two separate problems, three years apart.
Stability was solved first, one fix at a time, over three years. Resolution and disentanglement were still open when this chapter starts. PNG ↓

The open question entering the second half of 2017 was not whether GANs could be made to train — that had been answered — but whether the same adversarial objective could be scaled to resolutions and fidelities that would hold up under scrutiny, and whether the smooth, disentangled latent space that generative models are supposed to offer could be delivered in practice rather than only in theory.

The Breakthrough

Progressive growing (ProGAN, October 2017). The first fix was procedural rather than architectural: instead of asking a generator and discriminator to learn a high-resolution mapping from scratch, start both networks at 4×4 pixels, let them converge, then add a new pair of layers that doubles the resolution, fading the new layers in gradually so the network never has to absorb a sudden jump in task difficulty (Karras et al., 2017). Repeating that doubling from 4×4 up to 1024×1024 let both networks master coarse structure — pose, overall shape — before ever being asked to render fine detail, and it made training an order of magnitude more stable at high resolution than training the full-resolution network directly. The paper shipped alongside a new dataset, CelebA-HQ, thirty thousand celebrity portraits cleaned and upscaled to 1024×1024, built specifically because no existing face dataset was clean enough at that resolution to train on.

Scale as a lever (BigGAN, September 2018). Where ProGAN scaled resolution through a training schedule, BigGAN scaled everything else: parameter count, batch size, and dataset breadth, applied to class-conditional generation across all 1,000 ImageNet categories rather than a single narrow domain like faces (Brock et al., 2018). The paper trained with a batch size of 2,048, distributed across 128 to 512 cores of a Google TPUv3 Pod with batch-normalization statistics computed across all devices rather than per-device — roughly an order of magnitude larger than typical GAN training at the time, and found that simply scaling batch size and channel width, without any other change, improved both the Inception Score and Fréchet Inception Distance substantially, at the cost of new training instabilities that had to be controlled with orthogonal regularization on the generator’s weights. That regularization had a second benefit: it made the generator well-behaved enough to support a “truncation trick,” in which sampling latent vectors from a narrower slice of the input distribution at inference time trades some output diversity for higher per-sample fidelity, a dial the paper’s users could turn continuously rather than a fixed choice baked into training.

Style as the interface (StyleGAN, December 2018). The same month CelebA-HQ was superseded by an even larger NVIDIA-built face dataset, Flickr-Faces-HQ (FFHQ), the field’s third structural idea arrived: stop feeding the latent code directly into the generator’s convolutional stack, and instead route it through an eight-layer mapping network into an intermediate latent space, then inject that intermediate code into every resolution level of the synthesis network via adaptive instance normalization (Karras et al., 2018). The generator also received an independent stream of per-pixel random noise, injected after each convolution, to explain the fine stochastic detail — individual strands of hair, skin pore placement — that has no business being tied to a person’s identity. The practical payoff was a latent space substantially more disentangled than a GAN’s raw input noise: style mixing, feeding different intermediate codes to different resolution levels, could swap a generated face’s coarse pose independently of its fine texture, because the two were no longer entangled in a single input vector.

Fixing the artifacts (StyleGAN2, December 2019). StyleGAN’s images carried tell-tale defects once anyone looked for them: water-droplet-like blob artifacts that tracked back to the instance normalization step in AdaIN, which could amplify a signal wherever the network needed to sneak information past it, and a separate “phase” artifact — details like teeth or eyes sticking to a fixed position on screen instead of following the face’s pose — that traced back to the progressive-growing schedule itself. StyleGAN2 replaced AdaIN’s explicit normalization with weight demodulation — folding the same effect into the convolution’s weights instead of the activations — and replaced progressive growing with a fixed-resolution architecture using skip connections and residual connections between resolutions, trained end to end from the start (Karras et al., 2019). A second regularizer, applied to the path length of the mapping from latent code to image, made that mapping more uniformly scaled and, as a side effect, made the generator dramatically easier to invert — to find the latent code that would have produced a given real photograph, a capability the original architecture had made unreasonably hard.

Two axes of GAN progress ran in parallel and never merged NVIDIA pushed resolution and disentanglement. Google DeepMind pushed scale. Only the destination overlaps. Grey monospace text names each paper's headline metric. RESOLUTION AND DISENTANGLEMENT, NVIDIA SCALE AND CLASS CONDITIONING, GOOGLE DEEPMIND ProGAN, Oct 2017 Progressive growing from 4px to 1024px FID 8.04, FFHQ baseline StyleGAN, Dec 2018 Mapping network plus AdaIN style control FID 4.40, FFHQ StyleGAN2, Dec 2019 Weight demodulation, path length regularizer FID 2.84, FFHQ BigGAN, Sep 2018 Batch 2048 across a TPUv3 pod IS 166.5, ImageNet 128px Two axes, stayed separate Neither paper borrowed the other's central idea self-attention: long-range coherence mapping network: disentanglement resolution and disentanglement track scale track where the two tracks are compared, not combined
Resolution and scale were solved by different labs, for different reasons, and neither result depended on the other. PNG ↓

The Mathematics

Progressive growing’s fade-in is the simplest of the four ideas to state precisely: during a transition between resolutions, the network’s output is a weighted blend of the old, lower-resolution path and the new, higher-resolution path, with the weight moved linearly from one to the other over training.

xout=(1−α)⋅Upsample(xlow)+α⋅xhighx_{\text{out}} = (1 - \alpha) \cdot \mathrm{Upsample}(x_{\text{low}}) + \alpha \cdot x_{\text{high}}
SymbolMeaning
xoutx_{\text{out}}blended output shown to the discriminator during a resolution transition
xlowx_{\text{low}}output of the already-trained, lower-resolution path, upsampled
xhighx_{\text{high}}output of the newly added, higher-resolution layer
α\alphafade-in weight, linearly annealed from 0 to 1

StyleGAN’s core mechanism is adaptive instance normalization, which takes a feature map produced by a convolution and rescales it using statistics derived from the style code rather than from the feature map’s own mean and variance:

AdaIN(xi,y)=ys,i xi−μ(xi)σ(xi)+yb,i\mathrm{AdaIN}(x_i, y) = y_{s,i} \, \frac{x_i - \mu(x_i)}{\sigma(x_i)} + y_{b,i}
SymbolMeaning
xix_ithe ii-th feature map after a convolution
μ(xi)\mu(x_i), σ(xi)\sigma(x_i)that feature map’s own per-channel mean and standard deviation
ys,iy_{s,i}learned scale for channel ii, derived from the style code
yb,iy_{b,i}learned bias for channel ii, derived from the style code

StyleGAN2 removes that explicit normalization step and folds an equivalent effect directly into the convolution’s weights, which is what “demodulation” means:

wijk′=si wijk∑i,k(si wijk)2+ϵw'_{ijk} = \frac{s_i \, w_{ijk}}{\sqrt{\sum_{i,k} (s_i \, w_{ijk})^2 + \epsilon}}
SymbolMeaning
wijkw_{ijk}original convolution weight, indexed by input channel, output channel, spatial position
sis_istyle-derived scale for input channel ii
wijk′w'_{ijk}demodulated weight actually used in the convolution
ϵ\epsilonsmall constant preventing division by zero

StyleGAN2’s second fix targets a different problem: making equal steps in latent space correspond to roughly equal-sized changes in the image, which the path length regularizer enforces by penalizing deviation from a running-average step size.

Lpl=Ew, y[(∥Jw⊤y∥2−a)2]L_{\mathrm{pl}} = \mathbb{E}_{\mathbf{w}, \, \mathbf{y}} \Big[ \big( \lVert \mathbf{J}_{\mathbf{w}}^{\top} \mathbf{y} \rVert_2 - a \big)^2 \Big]
SymbolMeaning
w\mathbf{w}sampled intermediate latent code
y\mathbf{y}random probe image drawn from a fixed noise distribution
Jw\mathbf{J}_{\mathbf{w}}Jacobian of the generator’s output with respect to w\mathbf{w}
aarunning average of the measured step size, updated during training

What It Enabled

The four papers moved unconditional face generation and class-conditional ImageNet generation from “recognizable but flawed” to “quantitatively state-of-the-art for the GAN family,” measured by the Fréchet Inception Distance whose construction and failure modes are covered in Chapter 21.

ModelYearDatasetResolutionQuality metric
ProGAN architecture, FFHQ baseline2018FFHQ1024×1024FID 8.04
StyleGAN2018FFHQ1024×1024FID 4.40
StyleGAN2 (config F)2019FFHQ1024×1024FID 2.84
BigGAN2018ImageNet 128px128×128IS 166.5, FID 7.4

FFHQ postdates the original 2017 ProGAN paper, which trained on CelebA-HQ; the FID 8.04 baseline above is the StyleGAN authors’ own reimplementation of the ProGAN architecture, retrained on FFHQ for a like-for-like comparison (Karras et al., 2018).

Two axes of progress ran in parallel and stayed separate for years: resolution and disentanglement, pushed by the NVIDIA line on faces, and scale and class-conditional breadth, pushed by BigGAN on ImageNet. Neither paper borrowed the other’s central idea — BigGAN’s self-attention layers, adapted from the alignment-era attention mechanism covered in language-models Chapter 4, addressed long-range spatial coherence, not style control; StyleGAN’s mapping network addressed disentanglement, not scale.

CapabilityBefore this chapter (2017)After (2019)
Practical face resolution128–256px before instability returns1024×1024, trained end to end
Latent space structureRaw input noise, entangledIntermediate ww space, style-mixable
Class-conditional ImageNet fidelityBlurry at scale, low diversity controlIS 166.5, continuous fidelity–diversity dial
Characteristic artifactsMode collapse, checkerboardingDiagnosed to source (AdaIN, progressive growing) and removed
Latent-to-image inversionEffectively impracticalTractable, enabled by path length regularization

The latent-space control this generation of GANs delivered — style mixing, a smoothly interpolable ww space, truncation as a fidelity dial — is the direct ancestor of the fine-tuning and personalization techniques covered in Chapter 16, even though the underlying generator family changed. Within two years, diffusion-based image models matched and then exceeded GAN sample quality on the same benchmarks, a transition covered in Chapter 10; GANs did not disappear, but they stopped being the default architecture for new state-of-the-art image models after roughly 2021.

Key Papers

PaperAuthorsYearLinkWhy it matters
Progressive Growing of GANs for Improved Quality, Stability, and VariationKarras et al.2017arXiv:1710.10196Introduced the low-to-high resolution training schedule that first made 1024×1024 GAN training stable, plus the CelebA-HQ dataset
Large Scale GAN Training for High Fidelity Natural Image SynthesisBrock et al.2018arXiv:1809.11096Showed that scaling batch size and parameters, with orthogonal regularization for stability, set new class-conditional ImageNet quality records and introduced the truncation trick
A Style-Based Generator Architecture for Generative Adversarial NetworksKarras et al.2018arXiv:1812.04948Replaced direct latent injection with a mapping network and AdaIN-based style modulation, producing a disentangled, style-mixable latent space and the FFHQ dataset
Analyzing and Improving the Image Quality of StyleGANKarras et al.2019arXiv:1912.04958Diagnosed StyleGAN’s blob artifacts to AdaIN and replaced it with weight demodulation; added path length regularization, improving both quality and latent-space invertibility

PM Lens

Papers referenced