2/11/2020 CS3750: ADVANCED MACHINE LEARNING GENERATIVE ADVERSARIAL NETWORKS Adapted from Slides made by Khushboo Thaker Presented by Tristan Maidment GROWTH (AND DECLINE) IN GAN PAPERS 1
2/11/2020 Overview Why Existing MiniMax Properties of GAN Generative Generative game theory GANs Framework Modelling? Models for GANs Why GAN Common Tricks for training is extensions to Conclusion GAN training HARD GANS Generative Modelling Inpu nput Outp tput ut Unsu super pervise ised Super pervised ised Training Examples Some representation of Data: X Data: X, y a probability Goal: Learn hidden Goal: Learn hidden distribution, which underlying structure of mapping from X -> y defines this example data space. 2
2/11/2020 Why Generative Modelling? Features Noisy Input Simulated Data Representative of Data Prediction of Semi-supervised Missing Data Future State Learning MAXIMUM LIKELIHOOD BASED MODELS π π¦ | π β = ARGMAX π | πΉ π¦~ππππ’π ππππ( π¦ π) 3
2/11/2020 PixelRNN PixelCNN WaveNet β¦ Generate image pixels from the corner β¦ Stable and Fast training β¦ Slow generation (sequential) β¦ Cannot generate samples based on latent code β¦ Tractable β¦ π π¦ = Ο π=1 π π(π¦ π |π¦ 1 ,π¦ 2 ,β¦ , π¦ πβ1 ) β¦ Maximum Likelihood based Training β¦ Chain Rule 4
2/11/2020 Variational Auto Encoder β¦ Able to achieve high likelihood β¦ Not asymptotically consistent unless q is perfect β¦ Lower Quality (blurry) samples β¦ Non tractable β¦ log π π¦ β₯ log π π¦ β πΈ πΏπ (π π¨ || π(π¨|π¦)) = πΉ π¨~π log π(π¦, π¨) + πΌ(π) Boltzmann Machine β¦ Energy Function Based Model β¦ Markov Chains donβt work for long sequences β¦ Hard to scale on large dataset β¦ π π¦, β = exp βπΉ π¦, β | π β¦ π = Ο π¦,β exp(βπΉ π¦, β ) 5
2/11/2020 Where are some properties of GANs? Can use latent information Asymptotically consistent No Markov Chain assumption Samples produced are high quality 6
2/11/2020 NEXT FRAME VIDEO GENERATION 7
2/11/2020 Generative Adversarial Networks x D(x) D G z G(z) D(G(z)) https://www.slideshare.net/xavigiro/deep-learning-for-computer-vision-generative-models-and-adversarial-training-upc-2016 8
2/11/2020 9
2/11/2020 βThe generative model can be thought of as analogous to a team Generative of counterfeiters, trying to produce fake currency and use it without detection, while the discriminative model is analogous to Adversarial the police, trying to detect the counterfeit currency. Competition in this game drives both teams to improve their methods until the Networks counterfeits are indistinguishable from the genuine articles.β β Goodfellow, et. Al. βGenerative Adversarial Netsβ (2014) Minimax Game β¦ Generator minimizes the log-probability of the discriminator being correct Approach β¦ Resembles Jensen-Shannon divergence β¦ Saddle point of Discriminatorβs loss 10
2/11/2020 Minimax Game β¦ Generator minimizes the log-probability of the discriminator being correct Approach β¦ Resembles Jensen-Shannon divergence β¦ Saddle point of Discriminatorβs loss Vanishing β¦ Gradient disappears if D is confident, i.e. D(G(z)) β 0 β¦ As can be seen that whenever the discriminator becomes Gradient Problem very confident the loss value will be zero β¦ Nothing to improve for Generator 11
2/11/2020 Heuristic Non- β¦ Generator maximizes the log probability of the discriminatorβs mistake Saturating Games β¦ Does not change when discriminator is successful COMPARISON OF GENERATOR LOSSES 12
2/11/2020 MODE COLLAPSE πππ π» πππ¦ πΈ π π»,πΈ β πππ¦ πΈ πππ π» π π»,πΈ 13
2/11/2020 Why are GENERATOR KEEPS MAINTAIN TRADE-OFF OF THE TWO LEARNING TASKS GENERATING SIMILAR GENERATING MORE NEED TO HAVE BALANCE TO IMAGES β SO NOTHING TO ACCURATE VS HIGH ACHIEVE STABILITY LEARN COVERAGE SAMPLES GANs hard to train? IF DISCRIMINATOR IS NOT IF DISCRIMINATOR IS OVER- SUFFICIENTLY TRAINED β TRAINED β VANISHING LEADS TO POOR GENERATOR GRADIENT PROBLEM PERFORMANCE 14
2/11/2020 One-Sided Label Smoothing Historically generated batches Tricks to Feature Matching Train GANs Batch Normalization Regularizing discriminator gradient in region around real data (DRAGAN) One-Sided Label Generator is VERY sensitive to output from Discriminator β¦ Regulates Discriminator gradients β¦ Smoothing Does-not reduce accuracy β¦ β¦ Increases confidence β¦ Only smooth positive samples 15
2/11/2020 Feature Matching β¦ Generated images must match statistics of real images β¦ Discriminator defines the statistics β¦ Generator is trained such that the expected value of statistics matches the expected value of real statistics β¦ Generator tries to minimize the L2 distance in expected values in some arbitrary space β¦ Discriminator defines that arbitrary space Batch Normalization β¦ Construct different mini-batches for real and fake β¦ Each mini-batch needs to contain only all real images or all generated images. β¦ Makes samples with-in a batch less dependent 16
2/11/2020 DRAGAN β¦ Failed GANs typically have extreme gradients/sharp peaks around real data β¦ Regularize GANs to reduce the gradient of the discriminator in region around real data GAN Variations β¦ Conditional GAN β¦ LapGAN β¦ DCGAN β¦ CatGAN β¦ InfoGan β¦ AAE β¦ DRAGAN β¦ IRGAN β¦ ProGAN β¦ and more! 17
2/11/2020 DCGAN β¦ Multiple Convolutional Layers β¦ Batch Normalization β¦ Strides with Convolution β¦ Leaky ReLUs DCGAN β¦ Multiple Convolutional Layers β¦ Batch Normalization β¦ Strides with Convolution β¦ Leaky ReLUs 18
2/11/2020 DCGAN β¦ Multiple Convolutional Layers β¦ Batch Normalization β¦ Strides with Convolution β¦ Leaky ReLUs Conditional GANs P(X|Y) β¦ Generator Learns P(X|Z,Y) β¦ Discriminator Learns P(L|X,Y) 19
2/11/2020 InfoGAN β¦ Rewards Disentanglement β¦ (individual dimensions capturing key attributes of images) β¦ Z β partitioned into two parts β¦ z β capture slight variation in the images β¦ y β captures the main attributes of the images β¦ Mutual Information β¦ maximizing mutual information Between the code and generator output 20
2/11/2020 InfoGAN β¦ Encoder BiGAN β¦ Decoder β¦ Discriminator 21
2/11/2020 LapGAN β¦ Scale GANs for large images β¦ Laplacian pyramid function is used to generate different scales of image LapGAN β¦ Scale GANs for large images β¦ Laplacian pyramid function is used to generate different scales of image 22
2/11/2020 PROGAN ADVERSARIAL AUTOENCODER (GAN + VAE) 23
2/11/2020 Conclusion GAN framework is GAN is still an active flexible to support GAN does not area of research variety of learning guarantee to converge problems GAN can capture Needs a lot of work in Evaluation of GAN is perceptual similarity theoretic foundation of still an open research and generates Network (Theis et. al) better images than VAE 24
2/11/2020 Software β¦ https://github.com/eriklindernoren/Keras-GAN β¦ https://github.com/eriklindernoren/PyTorch-GAN β¦ https://github.com/znxlwm/tensorflow-MNIST-cGAN-cDCGAN References Deep Learning Book GAN paper: https://arxiv.org/abs/1701.00160 GAN slides: http://slazebni.cs.illinois.edu/spring17/lec11_gan.pd GAN Tutorial: https://www.youtube.com/watch?v=HGYYEUSm-0Q 25
2/11/2020 THANK YOU! 26
Recommend
More recommend