GAN Flashcards
What are generative models
Unsupervised method to build a model explaining data. Given training data they generate new instances extracted from modeled distribution
When training GAN the density estimation is explicitly known T F
F
GAN principle
Model distribution is learnt from training distribution to generate data through competitive two player game
Discriminator structure in GAN
Encoder (AE or CNN) and classifier (logistic neuron)
Gan schema
We get real sample from dataset and a generated sample by the generator which is fed with a random variable. The two samples are alternatively introduced in the net of the discriminator which find who is fake
The generator network of a Gan acts as a …
DECODER
Guidelines for GAN generator architecture
Generator is an upsampling network which implements deep deconvolution.
Guideline for discriminator archietecture in Gan
Use convolutional network performing classification. Some authors proposed also Fullyconnected FF
Goal of the generator network in Gan
Try to fool the discriminator by producing real-looking data
Role of the discriminator
Try to distinguish between real and fake data
Gan principle of training
The generator must be able to successfully trick the discriminator so that we are generating data that look like data from the training set
Training approach of GAN
Estimating jointly teta-d e teta-g in the so-called minimax game
Possible tasks for GAN
Generating images, image translation
How to generate images with a query?
Couple LLM and GAN
How GAN can be used in biomedicine?
Synthetic data generation for augmentation in training setup
Image tot image translation
Protein and gene synthetic data bank
Log-loss function when I want the output to be one
-ln(prediction)
Logloss function when I want the output to be zero
-ln(1-pred)
Which cost function the discriminator compute for a generated image?
-ln(1-D(G(z)))
Cost function of the generator in Gan
-ln(D(G(z)))
Formula of minmax game for GAN
Expectation values are used.
Min_tg max_td (E_x_pdata *ln(D(x)) +E_z_pmodel * ln(1-D(G(z)))
Express mathematically the goal of discriminator
Maximize objective such that D(x) is close to one and D(G(z)) is close to 0
Express mathematically the goal of the generator
Wants to minimize objective such that D(G(z)) is close to 1
Discriminator objective function. Which type of optimization
Max_td (everything)
Objective function of generator and the kind of optimization
Gradient descent
Min_tg(E_z(ln(1-Dtd(G5g(z))))
What is the problem of gradient descent on generator and how to solve
When sample is fake gradient is relatively flat while gradient signal is high mainly in the region where sample is already good.. We maximize instead the likelihood of discriminator being wrong
Gan algorithm for training
At each iteration:
GAN recommendations
Replace any pooling layers with strided convolution(discriminator) and fractional strided convolutions(gen)
Noted of FC LAYERS
Use ReLU in All layers of generator except output (use tank)
Use LeakyReLU in the discriminator for all layers
Define image to image translation
Transform images belonging to domain A into different domain B by transferring the typical characteristics of domain B
Application of image translation in biomedicine
Radiotherapy: re-planning and adaptation during treatment session
Diagnostic: use in medical centers with more limited resources
Which kind of NEt is suggested for image translation
Cyclic coherence GAN
GAN needs a priori density function of the generator t or f
F
Gan learns how to generate from training data through 2-players game t or f
T
GAN is more stable to train respect to traditional networks T or F
F