SlideShare una empresa de Scribd logo
1 de 41
Descargar para leer sin conexión
GAN - Theory and Applications
Michele De Simoni @mr_ubik
Federico Di Mattia @_iLeW_
Paolo Galeone @paolo_galeone
Emanuele Ghelfi @manughelfi
https://bit.ly/2Y1nqay
August 30, 2019
1
Overview
1. Introduction
2. Models definition
3. GANs Training
4. Types of GANs
5. GANs Applications
3
Introduction
“
Generative Adversarial Networks is the most
interesting idea in the last ten years in
machine learning.
Yann LeCun, Director, Facebook AI
”
4
Generative Adversarial Networks
Two components, the generator and the discriminator:
• The generator G needs to capture the data distribution.
• The discriminator D estimates the probability that a sample
comes from the training data rather than from G.
Figure 1: Credits: Silva
5
Generative Adversarial Networks
GANs game:
min
G
max
D
VGAN(D, G) = E
x∼pdata(x)
[log D(x)]+ E
z∼pz (z)
[log(1−D(G(z)))]
6
Generative Adversarial Networks
GANs game:
min
G
max
D
VGAN(D, G) = E
x∼pdata(x)
[log D(x)]
real samples
+ E
z∼pz (z)
[log(1−D(G(z)))]
6
Generative Adversarial Networks
GANs game:
min
G
max
D
VGAN(D, G) = E
x∼pdata(x)
[log D(x)]
real samples
+ E
z∼pz (z)
[log(1 − D(G(z)))]
generated samples
6
GANs - Discriminator
• Discriminator needs to:
• Correctly classify real data:
max
D
E
x∼pdata(x)
[log D(x)] D(x) → 1
• Correctly classify wrong data:
max
D
E
z∼pz (z)
[log(1 − D(G(z)))] D(G(z)) → 0
• The discriminator is an adaptive loss function.
7
GANs - Generator
• Generator needs to fool the discriminator:
• Generate samples similar to the real ones:
min
G
E
z∼pz (z)
[log(1 − D(G(z)))] D(G(z)) → 1
9
GANs - Generator
• Generator needs to fool the discriminator:
• Generate samples similar to the real ones:
min
G
E
z∼pz (z)
[log(1 − D(G(z)))] D(G(z)) → 1
• Non saturating objective (Goodfellow et al., 2014):
min
G
E
z∼pz (z)
[− log(D(G(z)))]
9
GANs - Generator Objectives
• Minimax: log(1 − D(G(z)))
0 0.5 1
−6
−4
−2
0
2
4
D(G(z))
JG
Minimax
10
GANs - Generator Objectives
• Minimax: log(1 − D(G(z)))
• Non-saturating: − log(D(G(z)))
0 0.5 1
−6
−4
−2
0
2
4
D(G(z))
JG
Minimax
Non-saturating
10
Models definition
GANs - Models definition
• Different architectures for different data types.
• Tuple of numbers? Fully Connected Neural Networks
11
GANs - Models definition
• Different architectures for different data types.
• Text or sequences? Recurrent Neural Networks
11
GANs - Models definition
• Different architectures for different data types.
• Images? Convolutional Neural Networks
1
latent
1
fc
32768
256
*conv1
32
128
*conv2
64
64
*conv3
128
K
*conv4
128
3 128
conv5
Latent Vector Conv/Deconv Fully Connected Batch Norm Relu
11
GANs Training
GANs - Training
• D and G are competing against each other.
• Alternating execution of training steps.
• Use minibatch stochastic gradient descent/ascent.
12
GANs - Training - Discriminator
How to train the discriminator?
Repeat from 1 to k:
1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z)
13
GANs - Training - Discriminator
How to train the discriminator?
Repeat from 1 to k:
1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z)
2. Sample minibatch of m examples x(1), . . . , x(m) from pdata(x)
13
GANs - Training - Discriminator
How to train the discriminator?
Repeat from 1 to k:
1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z)
2. Sample minibatch of m examples x(1), . . . , x(m) from pdata(x)
3. Update D:
J =
1
m
m
i=1
log D(x(i)
) + log(1 − D(G(z(i)
)))
D performance
θd = θd + λ θd
J
13
GANs - Training - Generator
How to train the generator?
Update executed only once after D updates:
1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z)
14
GANs - Training - Generator
How to train the generator?
Update executed only once after D updates:
1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z)
2. Update G:
J =
1
m
m
i=1
log(D(G(z(i)
)))
G performance
θg = θg + λ θgJ
14
GANs - Training - Considerations
• Optimizers: Adam, Momentum, RMSProp.
• Arbitrary number of steps or epochs.
• Training is completed when D is completely fooled by G.
• Goal: reach a Nash Equilibrium where the best D can do is
random guessing.
15
Types of GANs
Types of GANs
Two big families:
• Unconditional GANs (just described).
• Conditional GANs (Mirza and Osindero, 2014).
16
Conditional GANs
• Both G and D are conditioned on some extra information y.
• In practice: perform conditioning by feeding y into D and G.
Figure 2: From Mirza and Osindero (2014)
17
Conditional GANs
The GANs game becomes:
min
G
max
D
E
x∼pdata(x|y)
[log D(x, y)] + E
z∼pz (z)
[log(1 − D(G(z|y), y))]
Notice: the same representation of the condition has to be
presented to both network.
18
GANs Applications
Unconditional - Face Generation - Karras et al. (2017)
19
Conditional - Domain Translation - Isola et al. (2016)
20
Conditional - Semantic Image Synthesis - Park et al. (2018)
21
Conditional - Image Super Resolution - Ledig et al. (2016)
22
Real-world GANs
• Semi-Supervised Learning (Salimans et al., 2016)
• Image Generation (almost all GAN papers)
• Image Captioning
• Anomalies Detection (Zenati et al., 2018)
• Program Synthesis (Ganin et al., 2018)
• Genomics and Proteomics (Killoran et al., 2017) (De Cao and
Kipf, 2018)
• Personalized GANufactoring (Hwang et al., 2018)
• Planning
References
[De Cao and Kipf 2018] De Cao, Nicola ; Kipf, Thomas: MolGAN:
An Implicit Generative Model for Small Molecular Graphs.
(2018). – (2018)
[Ganin et al. 2018] Ganin, Yaroslav ; Kulkarni, Tejas ; Babuschkin,
Igor ; Eslami, S. M. A. ; Vinyals, Oriol: Synthesizing Programs for
Images Using Reinforced Adversarial Learning. (2018). – (2018)
[Goodfellow et al. 2014] Goodfellow, Ian J. ; Pouget-Abadie,
Jean ; Mirza, Mehdi ; Xu, Bing ; Warde-Farley, David ; Ozair,
Sherjil ; Courville, Aaron ; Bengio, Yoshua: Generative
Adversarial Networks. (2014). – (2014)
[Hwang et al. 2018] Hwang, Jyh-Jing ; Azernikov, Sergei ; Efros,
Alexei A. ; Yu, Stella X.: Learning Beyond Human Expertise with
Generative Models for Dental Restorations. (2018). – (2018)
[Isola et al. 2016] Isola, Phillip ; Zhu, Jun-Yan ; Zhou, Tinghui ;
Efros, Alexei A.: Image-to-Image Translation with Conditional
Adversarial Networks. (2016). – (2016)
[Karras et al. 2017] Karras, Tero ; Aila, Timo ; Laine, Samuli ;
Lehtinen, Jaakko: Progressive Growing of GANs for Improved
Quality, Stability, and Variation. (2017). – (2017)
[Killoran et al. 2017] Killoran, Nathan ; Lee, Leo J. ; Delong,
Andrew ; Duvenaud, David ; Frey, Brendan J.: Generating and
Designing DNA with Deep Generative Models. (2017). – (2017)
[Ledig et al. 2016] Ledig, Christian ; Theis, Lucas ; Huszar,
Ferenc ; Caballero, Jose ; Cunningham, Andrew ; Acosta,
Alejandro ; Aitken, Andrew ; Tejani, Alykhan ; Totz, Johannes ;
Wang, Zehan ; Shi, Wenzhe: Photo-Realistic Single Image
Super-Resolution Using a Generative Adversarial Network.
(2016). – (2016)
[Mirza and Osindero 2014] Mirza, Mehdi ; Osindero, Simon:
Conditional Generative Adversarial Nets. (2014). – (2014)
[Park et al. 2018] Park, Taesung ; Liu, Ming-Yu ; Wang,
Ting-Chun ; Zhu, Jun-Yan: Semantic Image Synthesis with
Spatially-Adaptive Normalization. (2018). – (2018)
[Salimans et al. 2016] Salimans, Tim ; Goodfellow, Ian ;
Zaremba, Wojciech ; Cheung, Vicki ; Radford, Alec ; Chen, Xi:
Improved Techniques for Training GANs. (2016). – (2016)
[Silva ] Silva, Thalles: An Intuitive Introduction to
Generative Adversarial Networks (GANs)
[Zenati et al. 2018] Zenati, Houssam ; Foo, Chuan S. ; Lecouat,
Bruno ; Manek, Gaurav ; Chandrasekhar, Vijay R.: Efficient
GAN-Based Anomaly Detection. (2018). – (2018)

Más contenido relacionado

La actualidad más candente

量子アニーリングを用いたクラスタ分析
量子アニーリングを用いたクラスタ分析量子アニーリングを用いたクラスタ分析
量子アニーリングを用いたクラスタ分析Shu Tanaka
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Hojin Yang
 
Tips for data science competitions
Tips for data science competitionsTips for data science competitions
Tips for data science competitionsOwen Zhang
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networksYunjey Choi
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational AutoencoderMark Chang
 
Denoising Diffusion Probabilistic Modelsの重要な式の解説
Denoising Diffusion Probabilistic Modelsの重要な式の解説Denoising Diffusion Probabilistic Modelsの重要な式の解説
Denoising Diffusion Probabilistic Modelsの重要な式の解説Tomonari Masada
 
Kaggleのテクニック
KaggleのテクニックKaggleのテクニック
KaggleのテクニックYasunori Ozaki
 
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...Deep Learning JP
 
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIGenerative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIWithTheBest
 
Kaggle Avito Demand Prediction Challenge 9th Place Solution
Kaggle Avito Demand Prediction Challenge 9th Place SolutionKaggle Avito Demand Prediction Challenge 9th Place Solution
Kaggle Avito Demand Prediction Challenge 9th Place SolutionJin Zhan
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial NetworksMustafa Yagmur
 
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...Deep Learning JP
 
最近(2020/09/13)のarxivの分布外検知の論文を紹介
最近(2020/09/13)のarxivの分布外検知の論文を紹介最近(2020/09/13)のarxivの分布外検知の論文を紹介
最近(2020/09/13)のarxivの分布外検知の論文を紹介ぱんいち すみもと
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical ImagingSanghoon Hong
 
Explicit Density Models
Explicit Density ModelsExplicit Density Models
Explicit Density ModelsSangwoo Mo
 
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Amol Patil
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and ApplicationsEmanuele Ghelfi
 
End-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersSeunghyun Hwang
 

La actualidad más candente (20)

量子アニーリングを用いたクラスタ分析
量子アニーリングを用いたクラスタ分析量子アニーリングを用いたクラスタ分析
量子アニーリングを用いたクラスタ分析
 
Variational Autoencoder Tutorial
Variational Autoencoder Tutorial Variational Autoencoder Tutorial
Variational Autoencoder Tutorial
 
Tips for data science competitions
Tips for data science competitionsTips for data science competitions
Tips for data science competitions
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
 
Denoising Diffusion Probabilistic Modelsの重要な式の解説
Denoising Diffusion Probabilistic Modelsの重要な式の解説Denoising Diffusion Probabilistic Modelsの重要な式の解説
Denoising Diffusion Probabilistic Modelsの重要な式の解説
 
Kaggleのテクニック
KaggleのテクニックKaggleのテクニック
Kaggleのテクニック
 
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
 
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIGenerative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
 
Kaggle Avito Demand Prediction Challenge 9th Place Solution
Kaggle Avito Demand Prediction Challenge 9th Place SolutionKaggle Avito Demand Prediction Challenge 9th Place Solution
Kaggle Avito Demand Prediction Challenge 9th Place Solution
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
 
独立成分分析 ICA
独立成分分析 ICA独立成分分析 ICA
独立成分分析 ICA
 
20191019 sinkhorn
20191019 sinkhorn20191019 sinkhorn
20191019 sinkhorn
 
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...
[DL輪読会]Factorized Variational Autoencoders for Modeling Audience Reactions to...
 
最近(2020/09/13)のarxivの分布外検知の論文を紹介
最近(2020/09/13)のarxivの分布外検知の論文を紹介最近(2020/09/13)のarxivの分布外検知の論文を紹介
最近(2020/09/13)のarxivの分布外検知の論文を紹介
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
 
Explicit Density Models
Explicit Density ModelsExplicit Density Models
Explicit Density Models
 
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and Applications
 
End-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with Transformers
 

Similar a EuroSciPy 2019 - GANs: Theory and Applications

Generative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksGenerative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksDenis Dus
 
brief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsbrief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsParham Zilouchian
 
A Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksA Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksJong Wook Kim
 
GAN in medical imaging
GAN in medical imagingGAN in medical imaging
GAN in medical imagingCheng-Bin Jin
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networksKyuri Kim
 
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...Universitat Politècnica de Catalunya
 
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...Codiax
 
GDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game DevelopmentGDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game DevelopmentElectronic Arts / DICE
 
Generative adversarial network and its applications to speech signal and natu...
Generative adversarial network and its applications to speech signal and natu...Generative adversarial network and its applications to speech signal and natu...
Generative adversarial network and its applications to speech signal and natu...宏毅 李
 
Generative Adversarial Network and its Applications to Speech Processing an...
Generative Adversarial Network and its Applications to Speech Processing an...Generative Adversarial Network and its Applications to Speech Processing an...
Generative Adversarial Network and its Applications to Speech Processing an...宏毅 李
 
Tutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksTutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksMLReview
 
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetup
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetupLucas Theis - Compressing Images with Neural Networks - Creative AI meetup
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetupLuba Elliott
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsArtifacia
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기NAVER Engineering
 
Deep image generating models
Deep image generating modelsDeep image generating models
Deep image generating modelsLuba Elliott
 
GANs and Applications
GANs and ApplicationsGANs and Applications
GANs and ApplicationsHoang Nguyen
 
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...宏毅 李
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANShyam Krishna Khadka
 
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...Universitat Politècnica de Catalunya
 

Similar a EuroSciPy 2019 - GANs: Theory and Applications (20)

Generative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksGenerative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural Networks
 
brief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsbrief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANs
 
A Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksA Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial Networks
 
GAN in medical imaging
GAN in medical imagingGAN in medical imaging
GAN in medical imaging
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
 
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
 
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...
Jakub Langr (University of Oxford) - Overview of Generative Adversarial Netwo...
 
GDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game DevelopmentGDC2019 - SEED - Towards Deep Generative Models in Game Development
GDC2019 - SEED - Towards Deep Generative Models in Game Development
 
Generative adversarial network and its applications to speech signal and natu...
Generative adversarial network and its applications to speech signal and natu...Generative adversarial network and its applications to speech signal and natu...
Generative adversarial network and its applications to speech signal and natu...
 
Generative Adversarial Network and its Applications to Speech Processing an...
Generative Adversarial Network and its Applications to Speech Processing an...Generative Adversarial Network and its Applications to Speech Processing an...
Generative Adversarial Network and its Applications to Speech Processing an...
 
Tutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksTutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial Networks
 
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetup
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetupLucas Theis - Compressing Images with Neural Networks - Creative AI meetup
Lucas Theis - Compressing Images with Neural Networks - Creative AI meetup
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their Applications
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
 
Deep image generating models
Deep image generating modelsDeep image generating models
Deep image generating models
 
GANs and Applications
GANs and ApplicationsGANs and Applications
GANs and Applications
 
gan.pdf
gan.pdfgan.pdf
gan.pdf
 
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...
ICASSP 2018 Tutorial: Generative Adversarial Network and its Applications to ...
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGAN
 
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...
Generative Adversarial Networks (D2L5 Deep Learning for Speech and Language U...
 

Último

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Último (20)

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 

EuroSciPy 2019 - GANs: Theory and Applications

  • 1. GAN - Theory and Applications Michele De Simoni @mr_ubik Federico Di Mattia @_iLeW_ Paolo Galeone @paolo_galeone Emanuele Ghelfi @manughelfi https://bit.ly/2Y1nqay August 30, 2019 1
  • 2.
  • 3. Overview 1. Introduction 2. Models definition 3. GANs Training 4. Types of GANs 5. GANs Applications 3
  • 5. “ Generative Adversarial Networks is the most interesting idea in the last ten years in machine learning. Yann LeCun, Director, Facebook AI ” 4
  • 6. Generative Adversarial Networks Two components, the generator and the discriminator: • The generator G needs to capture the data distribution. • The discriminator D estimates the probability that a sample comes from the training data rather than from G. Figure 1: Credits: Silva 5
  • 7. Generative Adversarial Networks GANs game: min G max D VGAN(D, G) = E x∼pdata(x) [log D(x)]+ E z∼pz (z) [log(1−D(G(z)))] 6
  • 8. Generative Adversarial Networks GANs game: min G max D VGAN(D, G) = E x∼pdata(x) [log D(x)] real samples + E z∼pz (z) [log(1−D(G(z)))] 6
  • 9. Generative Adversarial Networks GANs game: min G max D VGAN(D, G) = E x∼pdata(x) [log D(x)] real samples + E z∼pz (z) [log(1 − D(G(z)))] generated samples 6
  • 10. GANs - Discriminator • Discriminator needs to: • Correctly classify real data: max D E x∼pdata(x) [log D(x)] D(x) → 1 • Correctly classify wrong data: max D E z∼pz (z) [log(1 − D(G(z)))] D(G(z)) → 0 • The discriminator is an adaptive loss function. 7
  • 11.
  • 12. GANs - Generator • Generator needs to fool the discriminator: • Generate samples similar to the real ones: min G E z∼pz (z) [log(1 − D(G(z)))] D(G(z)) → 1 9
  • 13. GANs - Generator • Generator needs to fool the discriminator: • Generate samples similar to the real ones: min G E z∼pz (z) [log(1 − D(G(z)))] D(G(z)) → 1 • Non saturating objective (Goodfellow et al., 2014): min G E z∼pz (z) [− log(D(G(z)))] 9
  • 14. GANs - Generator Objectives • Minimax: log(1 − D(G(z))) 0 0.5 1 −6 −4 −2 0 2 4 D(G(z)) JG Minimax 10
  • 15. GANs - Generator Objectives • Minimax: log(1 − D(G(z))) • Non-saturating: − log(D(G(z))) 0 0.5 1 −6 −4 −2 0 2 4 D(G(z)) JG Minimax Non-saturating 10
  • 17. GANs - Models definition • Different architectures for different data types. • Tuple of numbers? Fully Connected Neural Networks 11
  • 18. GANs - Models definition • Different architectures for different data types. • Text or sequences? Recurrent Neural Networks 11
  • 19. GANs - Models definition • Different architectures for different data types. • Images? Convolutional Neural Networks 1 latent 1 fc 32768 256 *conv1 32 128 *conv2 64 64 *conv3 128 K *conv4 128 3 128 conv5 Latent Vector Conv/Deconv Fully Connected Batch Norm Relu 11
  • 21. GANs - Training • D and G are competing against each other. • Alternating execution of training steps. • Use minibatch stochastic gradient descent/ascent. 12
  • 22. GANs - Training - Discriminator How to train the discriminator? Repeat from 1 to k: 1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z) 13
  • 23. GANs - Training - Discriminator How to train the discriminator? Repeat from 1 to k: 1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z) 2. Sample minibatch of m examples x(1), . . . , x(m) from pdata(x) 13
  • 24. GANs - Training - Discriminator How to train the discriminator? Repeat from 1 to k: 1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z) 2. Sample minibatch of m examples x(1), . . . , x(m) from pdata(x) 3. Update D: J = 1 m m i=1 log D(x(i) ) + log(1 − D(G(z(i) ))) D performance θd = θd + λ θd J 13
  • 25. GANs - Training - Generator How to train the generator? Update executed only once after D updates: 1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z) 14
  • 26. GANs - Training - Generator How to train the generator? Update executed only once after D updates: 1. Sample minibatch of m noise samples z(1), . . . , z(m) from pz(z) 2. Update G: J = 1 m m i=1 log(D(G(z(i) ))) G performance θg = θg + λ θgJ 14
  • 27. GANs - Training - Considerations • Optimizers: Adam, Momentum, RMSProp. • Arbitrary number of steps or epochs. • Training is completed when D is completely fooled by G. • Goal: reach a Nash Equilibrium where the best D can do is random guessing. 15
  • 29. Types of GANs Two big families: • Unconditional GANs (just described). • Conditional GANs (Mirza and Osindero, 2014). 16
  • 30. Conditional GANs • Both G and D are conditioned on some extra information y. • In practice: perform conditioning by feeding y into D and G. Figure 2: From Mirza and Osindero (2014) 17
  • 31. Conditional GANs The GANs game becomes: min G max D E x∼pdata(x|y) [log D(x, y)] + E z∼pz (z) [log(1 − D(G(z|y), y))] Notice: the same representation of the condition has to be presented to both network. 18
  • 33. Unconditional - Face Generation - Karras et al. (2017) 19
  • 34. Conditional - Domain Translation - Isola et al. (2016) 20
  • 35. Conditional - Semantic Image Synthesis - Park et al. (2018) 21
  • 36. Conditional - Image Super Resolution - Ledig et al. (2016) 22
  • 37. Real-world GANs • Semi-Supervised Learning (Salimans et al., 2016) • Image Generation (almost all GAN papers) • Image Captioning • Anomalies Detection (Zenati et al., 2018) • Program Synthesis (Ganin et al., 2018) • Genomics and Proteomics (Killoran et al., 2017) (De Cao and Kipf, 2018) • Personalized GANufactoring (Hwang et al., 2018) • Planning
  • 38. References [De Cao and Kipf 2018] De Cao, Nicola ; Kipf, Thomas: MolGAN: An Implicit Generative Model for Small Molecular Graphs. (2018). – (2018) [Ganin et al. 2018] Ganin, Yaroslav ; Kulkarni, Tejas ; Babuschkin, Igor ; Eslami, S. M. A. ; Vinyals, Oriol: Synthesizing Programs for Images Using Reinforced Adversarial Learning. (2018). – (2018) [Goodfellow et al. 2014] Goodfellow, Ian J. ; Pouget-Abadie, Jean ; Mirza, Mehdi ; Xu, Bing ; Warde-Farley, David ; Ozair, Sherjil ; Courville, Aaron ; Bengio, Yoshua: Generative Adversarial Networks. (2014). – (2014)
  • 39. [Hwang et al. 2018] Hwang, Jyh-Jing ; Azernikov, Sergei ; Efros, Alexei A. ; Yu, Stella X.: Learning Beyond Human Expertise with Generative Models for Dental Restorations. (2018). – (2018) [Isola et al. 2016] Isola, Phillip ; Zhu, Jun-Yan ; Zhou, Tinghui ; Efros, Alexei A.: Image-to-Image Translation with Conditional Adversarial Networks. (2016). – (2016) [Karras et al. 2017] Karras, Tero ; Aila, Timo ; Laine, Samuli ; Lehtinen, Jaakko: Progressive Growing of GANs for Improved Quality, Stability, and Variation. (2017). – (2017) [Killoran et al. 2017] Killoran, Nathan ; Lee, Leo J. ; Delong, Andrew ; Duvenaud, David ; Frey, Brendan J.: Generating and Designing DNA with Deep Generative Models. (2017). – (2017)
  • 40. [Ledig et al. 2016] Ledig, Christian ; Theis, Lucas ; Huszar, Ferenc ; Caballero, Jose ; Cunningham, Andrew ; Acosta, Alejandro ; Aitken, Andrew ; Tejani, Alykhan ; Totz, Johannes ; Wang, Zehan ; Shi, Wenzhe: Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network. (2016). – (2016) [Mirza and Osindero 2014] Mirza, Mehdi ; Osindero, Simon: Conditional Generative Adversarial Nets. (2014). – (2014) [Park et al. 2018] Park, Taesung ; Liu, Ming-Yu ; Wang, Ting-Chun ; Zhu, Jun-Yan: Semantic Image Synthesis with Spatially-Adaptive Normalization. (2018). – (2018) [Salimans et al. 2016] Salimans, Tim ; Goodfellow, Ian ; Zaremba, Wojciech ; Cheung, Vicki ; Radford, Alec ; Chen, Xi: Improved Techniques for Training GANs. (2016). – (2016)
  • 41. [Silva ] Silva, Thalles: An Intuitive Introduction to Generative Adversarial Networks (GANs) [Zenati et al. 2018] Zenati, Houssam ; Foo, Chuan S. ; Lecouat, Bruno ; Manek, Gaurav ; Chandrasekhar, Vijay R.: Efficient GAN-Based Anomaly Detection. (2018). – (2018)