Question: 1 Problem 1 : Generative adversarial networks ( 5 0 points ) In this problem, suppose that we will implement a generative adversarial net -

1 Problem 1: Generative adversarial networks
(50 points)
In this problem, suppose that we will implement a generative adversarial net-
work (GAN) that models a high-dimensional data distribution pdata(x), where
xinRn. To do so, we will define a generator G:RkRn; we obtain samples
from our model by first sampling a k-dimensional random vector zN(0,I)
and then returning G(z).
We will also define a discriminator D:Rn(0,1) that judges how realistic
the generated images G(z) are, compared to samples from the data distribution
xpdata(x). Because its output is intended to be interpreted as a probability,
the last layer of the discriminattor is frequently the sigmoid function
(x)=11+e-x
There are several common variants of the loss functions used to train a
generative adversarial network (GAN). They can all be described as a procedure
where we alternately perform a gradient descent step on LD(;) with respect
to to train the discriminator D, and a gradient descent step on LG(;) with
respect to to train the generator G :
minLD(;),minLG(;)
In our lecture, we talked about the following losses, where the discriminator's
loss is given by:
LD(;)=-Expdata(x)[logD(x)]-EzN(0,I)[log(1-D(G(z)))]
and the generator's loss is given by the minimax loss:
LGminimax(;)=EzN(0,I)[log(1-D(G(z)))]
(25 points) the minimax loss for LG suffers from vanishing gradient
problem. In terms of the discriminator's logits, the minimax loss is
LGminimax(;)=EzN(0,I)[log(1-(h(G(z))))]
Show that the derivative of LGminimax with respect to is approximately 0 if
D(G(z))~~0, or equivalently, if h(G(z))0. You may use the fact that
'(x)=(x)(1-(x)). Why is this problematic for the training of the generator
when the discriminator successfully identifies a fake sample G(z)?
(25 points) To solve this vanishing gradient problem, we usually replace
LGminimax with other loss functions such as non-saturating loss LGnsgan[1] and
more other forms of loss functions can be found in [2]. You may plot differ-
ent loss functions including minimax loss and non-saturating loss to show the
contrast. You also need to explain why non-saturating loss can avoid vanishing
gradient problem.
LGnsgan(;)=-EzN(0,I)[logD(G(z))]
1 Problem 1 : Generative adversarial networks ( 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!