Skip to content
BIASED

StyleGAN: a style-based generator

Block 1 of 8~2 min

Why the code is entangled

The extension Scaling GANs: ProGAN, SAGAN and BigGAN brought adversarial training to sharp 1024×10241024 \times 1024 faces. Control is another matter. The noise zz enters the generator once, at the first layer, and moving along one of its coordinates usually changes pose, identity and lighting all at once. Such a code is called entangled.

The reason is the fixed prior. The generator must turn p(z)=N(0,I)p(z) = \mathcal N(0, I) into the data distribution, so every region of zz-space has to produce a realistic image, at the frequencies of the training set. Suppose two factors, how masculine a face looks and how long its hair is, sit on two axes of zz, and the data contain no long-haired men. Straight axes would fill that corner with exactly the images the data lack. To avoid it, the generator bends the axes, and then one coordinate of zz changes both factors. Nothing in the GAN loss pushes back: the discriminator judges whole images, not how the code is organized.

StyleGAN (Karras, Laine and Aila, 2019) no longer feeds zz to the image layers. A mapping network, an 8-layer MLP, first turns z∈R512z \in \mathbb R^{512} into an intermediate code. We call this network MM, because ff is the critic in this course, and write its output as

w=M(z)∈W=R512.w = M(z) \in \mathcal W = \mathbb R^{512}.

The distribution of ww is not fixed in advance; it is whatever MM makes it. So the bending can happen inside MM, and W\mathcal W is free to keep the factors on straighter axes. Free to, not forced to: the bet is that realistic images are easier to draw from a less entangled code. Two measurements later in this topic check the bet.

Answers are saved on the server and tied to this browser until you sign in.