SlideShare a Scribd company logo
1 of 61
Download to read offline
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Natural data in high dimensional spaces concentrates close to lower dimensional manifolds.
Probability density decreases very rapidly when moving away from the supporting manifold.
Manifold Hypothesis (assumption)
Introduction
Introduction
Introduction
Interpolation in high dimension Interpolation in manifold
Introduction
Generative Models
Generative Models
• PixelRNN and PixelCNN
• Variational Autoencoders (VAE) – Latent model
• Generative Adversarial Networks (GANs)
Generative Models
Generative Models
• PixelRNN and PixelCNN
• Variational Autoencoders (VAE) – Latent model
• Generative Adversarial Networks (GANs)
Generative Models
Taxonomy of Deep Generative Models
- Ian Goodfellow -
Generative Models
Generative Models
Generative Models
𝑃 𝑋
X는 손글씨 2로 이루어진 데이터
Generative Models
Generative Models
Generative Models
우리가 찾고 싶은 model
𝑝 𝑑𝑎𝑡𝑎 𝑥 ≈ 𝑝 𝑚𝑜𝑑𝑒𝑙 𝑥
NOT
What Machine learns
Generative Models
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
결국 Latent Model 은 어떠한 z를 통해서 y를 찾아내는 것
𝑓(𝑧1)
𝑓(𝑧2)
𝑓(𝑧3)
만약 𝑧1, 𝑧2, 𝑧3 가 서로 아무 관계 없는 임의의 숫자라면 Z값을 찾아내는 게 의
미가 있을까? -> 그러한 모델은 의미가 없다. 만들어 내봤자, Target과 똑같은
것만 만듬
우리는 새로운 데이터를 원함
왜? 분명 같은 숫자 간에는 무언가 관계가 있을 테니까 그것을 생성하게 해줄 임
의의 Z도 무언가 관계가 있으면 좋을 것이다. 더불어 Z간의 관계를 알 수 있다면
우리는 그것을 Control해 Y값도 변화시킬 수 있을 것이다.
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
𝜃 = 𝑎𝑟𝑔max
𝜃
ෑ 𝑃 𝜃(𝑥𝑖) = 𝑎𝑟𝑔max
𝜃
𝑃 𝜃(𝑥1, 𝑥2 , … … … , 𝑥 𝑛−1, 𝑥 𝑛)
x를 iid한 Data Set X에서 sampling한 한 개의 데이터라고 할 때
𝜃 는 𝑥1, 𝑥2 , … … … , 𝑥 𝑛−1, 𝑥 𝑛각각의 데이터 셋들이 모두 잘 나오게 해야 하므로
확률 ς 𝑃 𝜃(𝑥𝑖) 를 최대화 하는 값이어야 한다.
Variational Autoencoders (VAE)
𝑃𝑑𝑎𝑡𝑎 𝑥 ≈ 𝑃 𝑚𝑜𝑑𝑒𝑙 𝑥 = ‫׬‬ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧 𝑑𝑧 = σ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧
위의 𝜃 이용해서 바로 𝑃 𝑚𝑜𝑑𝑒𝑙 𝑥 계산하면 안되나?
Maximum likelihood 𝜃 = 𝑎𝑟𝑔max
𝜃
σ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧
Variational Autoencoders (VAE)
Multivariate cases − log 𝑝 𝑦𝑖 𝑓𝜃 𝑥𝑖
Gaussian distribution Categorical distribution
𝑓𝜃 𝑥𝑖 = 𝜇𝑖 𝑓𝜃 𝑥𝑖 = 𝑝𝑖
Distribution estimation
𝑥𝑖
𝑝 𝑦𝑖 𝑥𝑖
Likelihood값을 예측하는 것이 아니라,
Likelihood의 파라미터값을 예측하는 것이
다.
𝑥𝑖𝑥𝑖
Mean Squared Error Cross-entropy
Variational Autoencoders (VAE)
If 𝑝 𝑥 𝑔 𝜃(𝑧) = 𝒩 𝑥 𝑔 𝜃 𝑧 , 𝜎2 ∗ 𝐼 , the negative log probability
of X is proportional squared Euclidean distance between 𝑔 𝜃(𝑧) and
𝑥.
𝑥 : Figure 3(a)
𝑧 𝑏𝑎𝑑 → 𝑔 𝜃 𝑧 𝑏𝑎𝑑 : Figure 3(b)
𝑧 𝑏𝑎𝑑 → 𝑔 𝜃 𝑧 𝑔𝑜𝑜𝑑 : Figure 3(c) (identical to x but shifted down and
to the right by half a pixel)
𝑥 − 𝑧 𝑏𝑎𝑑
2 < 𝑥 − 𝑧 𝑔𝑜𝑜𝑑
2
→ 𝑝 𝑥 𝑔 𝜃(𝑧 𝑏𝑎𝑑) >𝑝 𝑥 𝑔 𝜃(𝑧 𝑔𝑜𝑜𝑑)
Solution 1: we should set the 𝜎 hyperparameter of our Gaussian
distribution such that this kind of erroroneous digit does not
contribute to p(X) → hard..
Solution 2: we would likely need to sample many thousands of
digits from 𝑧 𝑔𝑜𝑜𝑑 → hard..
𝑝(𝑥) ≈ ෍
𝑖
𝑝 𝑥 𝑔 𝜃 𝑧𝑖 𝑝(𝑧𝑖)
Question: Why don’t we use maximum likelihood estimation directly?
생성기에 대한 확률모델을 가우시안으로 할 경우,
MSE관점에서 가까운 것이 더 p(x)에 기여하는 바가
크다.
MSE가 더 작은 이미지가 의미적으로도 더 가까운 경
우가 아닌 이미지들이 많기 때문에 현실적으로 올바
른 확률값을 구하기가 어렵다.
Variational Autoencoders (VAE)
Sampling한 하나의 digits은 당연히 P(X)를 추정하는데
큰 영향을 못 줌
Variational Autoencoders (VAE)
http://shakirm.com/papers/VITutorial.pdf
𝑝 𝑧ȁ𝑥
≈ 𝑞 𝜙 𝑧ȁ𝑥 ~𝑧
𝑥Generator
gθ(.)
Latent Variable Target Data
One possible solution : sampling 𝑧 from 𝑝(𝑧ȁ𝑥)
[ Variational Inference ]
Variational Autoencoders (VAE)
VI란 사후확률(posterior) 분포 p(z|x)를 다루기 쉬운 확률분포 q(z)로 근사(approximation)하는 걸 말합
니다. 사후확률 분포를 계산하는게 불가능에 가까울 정도로 어려운 경우가 많기 때문
Variational Autoencoders (VAE)
사후확률 분포 p(z|x)와 q(z) 사이의 KLD를 계산하고, KLD가 줄어드는 쪽으로 q(z)를 조금씩 업데이
트하는 과정을 반복하면 사후확률을 잘 근사하는 q∗(z)를 얻게 될 것이라는 게 VI의 핵심 아이디어.
Variational Autoencoders (VAE)
Variational Inference with Monte Carlo sampling
Variational Autoencoders (VAE)
[ Jensen’s Inequality ]
For concave functions f(.)
f(E[x])≥E[f(x)]
log 𝑝 𝑥 = log න 𝑝 𝑥ȁ𝑧 𝑝(𝑧)𝑑𝑧 ≥ නlog 𝑝 𝑥ȁ𝑧 𝑝(𝑧)𝑑𝑧
log 𝑝 𝑥 = log න 𝑝 𝑥ȁ𝑧
𝑝(𝑧)
𝑞 𝜙(𝑧ȁ𝑥)
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 ≥ න log 𝑝 𝑥ȁ𝑧
𝑝(𝑧)
𝑞 𝜙(𝑧ȁ𝑥)
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧
log 𝑝 𝑥 ≥ න log 𝑝 𝑦ȁ𝑧 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 − න log
𝑞 𝜙(𝑧ȁ𝑥)
𝑝 𝑧
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧
Variational lower bound Evidence lower bound (ELBO)
= 𝔼 𝑞 𝜙 𝑧ȁ𝑥 log 𝑝 𝑥ȁ𝑧 − 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ȁ𝑝 𝑧
Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 1
←
←Variational inference
𝐸𝐿𝐵𝑂(𝜙)
ELBO를 최대화하는 𝜙∗
값을 찾으면 log 𝑝 𝑥 = 𝔼 𝑞 𝜙∗ 𝑧ȁ𝑥 log 𝑝 𝑥ȁ𝑧 − 𝐾𝐿 𝑞 𝜙∗ 𝑧ȁ𝑥 ȁ𝑝 𝑧 이다.
Variational Autoencoders (VAE)
Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 2
log 𝑝 𝑥 = න log 𝑝 𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧← ‫׬‬ 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 = 1
= න log
𝑝 𝑥, 𝑧
𝑝 𝑧ȁ𝑥
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧← 𝑝 𝑥 =
𝑝(𝑥, 𝑧)
𝑝(𝑧ȁ𝑥)
= න log
𝑝 𝑥, 𝑧
𝑞 𝜙 𝑧ȁ𝑥
∙
𝑞 𝜙 𝑧ȁ𝑥
𝑝 𝑧ȁ𝑥
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧
= න log
𝑝 𝑥, 𝑧
𝑞 𝜙 𝑧 𝑥
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 + න log
𝑞 𝜙 𝑧 𝑥
𝑝 𝑧ȁ𝑥
𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧
𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ∥ 𝑝 𝑧 𝑥𝐸𝐿𝐵𝑂(𝜙)
두 확률분포 간의 거리≥0
log 𝑝 𝑥
𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ȁ 𝑝 𝑧ȁ𝑥
𝐸𝐿𝐵𝑂(𝜙)
𝜙1 𝜙2
KL을 최소화하는 𝑞 𝜙 𝑧ȁ𝑥 의 𝜙값을 찾으면 되는데 𝑝 𝑧ȁ𝑥 를 모르기 때문에,
KL최소화 대신에 ELBO를 최대화하는𝜙값을 찾는다.
Variational Autoencoders (VAE)
Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 2
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
𝑥𝑖 𝑞 𝜙 𝑧ȁ𝑥𝑖
𝜇𝑖
𝜎𝑖
Reconstruction Error
𝐿𝑖 𝜙, 𝜃, 𝑥𝑖 = −𝔼 𝑞 𝜙 𝑧ȁ𝑥𝑖
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 + 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧
𝔼 𝑞 𝜙 𝑧ȁ𝑥 𝑖
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 = නlog 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑞 𝜙 𝑧ȁ𝑥𝑖 𝑑𝑧
≈
1
𝐿
෍
𝑧 𝑖,𝑙
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝑙
Monte-carlo technique →
𝑧 𝑖,1
𝑧 𝑖,2
𝑧 𝑖,𝑙
𝑧 𝑖,𝐿……
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,1
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,2
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝑙
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝐿
……
mean
……
Reconstruction
Error
• L is the number of samples for latent vector
• Usually L is set to 1 for convenience
SAMPLING
https://home.zhaw.ch/~dueo/bbs/files/vae.pdf
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Variational Autoencoders (VAE)
Regularization
KL divergence
𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧 =
1
2
𝑡𝑟 𝜎𝑖
2
𝐼 + 𝜇𝑖
𝑇
𝜇𝑖 − 𝐽 + ln
1
ς 𝑗=1
𝐽
𝜎𝑖,𝑗
2
=
1
2
෍
𝑗=1
𝐽
𝜎𝑖,𝑗
2
+ ෍
𝑗=1
𝐽
𝜇𝑖,𝑗
2
− 𝐽 − ෍
𝑗=1
𝐽
ln 𝜎𝑖,𝑗
2
=
1
2
෍
𝑗=1
𝐽
𝜇𝑖,𝑗
2
+ 𝜎𝑖,𝑗
2
− ln 𝜎𝑖,𝑗
2
− 1
priorposterior
𝑥𝑖 𝑞 𝜙 𝑧ȁ𝑥𝑖
𝜇𝑖
𝜎𝑖
𝐽
𝐿𝑖 𝜙, 𝜃, 𝑥𝑖 = −𝔼 𝑞 𝜙 𝑧ȁ𝑥 𝑖
log 𝑝 𝜃 𝑥𝑖ȁ𝑧 + 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧
Easy to compute!!
Variational Autoencoders (VAE)
𝑥𝑖
𝑞 𝜙 ∙
𝜇𝑖
𝜎𝑖
𝜇𝑖
𝑔 𝜃(∙)
𝑧 𝑖
𝜖𝑖
SAMPLING
Reparameterization
Trick
Gaussain
Encoder
Gaussian
Decoder
Reconstruction Error: σ 𝑗=1
𝐷
𝑥 𝑖,𝑗−𝜇𝑖,𝑗
′
2
2
Regularization :
1
2
σ 𝑗=1
𝐽
𝜇𝑖,𝑗
2
+ 𝜎𝑖,𝑗
2
− ln 𝜎𝑖,𝑗
2
− 1
𝐷
𝐽
𝒩(0, 𝐼)
Variational Autoencoders (VAE)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
References
References
References
오토인코더의 모든 것 by 이활석 (NAVER)
Youtube: https://youtu.be/rNh2CrTFpm4, Slideshare: https://www.slideshare.net/NaverEngineering/ss-96581209
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기 by 최윤제 (NAVER)
Youtube: https://youtu.be/odpjk7tGY0, Slideshare: https://www.slideshare.net/NaverEngineering/1-gangenerative-adversarial-
network
Theory and Application of Generative Adversarial Networks by Ming-Yu Liu, Julie Bernauer, Jan Kautz (NVIDIA)
Youtube: https://youtu.be/KudkR-fFu_8, Slideshare: https://www.slideshare.net/mlreview/tutorial-on-theory-and-application-of-
generative-adversarial-networks
Tutorial on Variational Autoencoders by Carl Doersch (Carnegie Mellon / UC Berkeley)
Arxiv: https://arxiv.org/pdf/1606.05908.pdf
Generative Adversarial Nets (2014) NIPS by Goodfellow et al
https://papers.nips.cc/paper/5423-generative-adversarial-nets.pdf
Variational Auto Encoder, Generative Adversarial Model

More Related Content

What's hot

Lecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningLecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningSang Jun Lee
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016Taehoon Kim
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks ISang Jun Lee
 
Adversarial Attack in Neural Machine Translation
Adversarial Attack in Neural Machine TranslationAdversarial Attack in Neural Machine Translation
Adversarial Attack in Neural Machine TranslationHyunKyu Jeon
 
Deep learning study 1
Deep learning study 1Deep learning study 1
Deep learning study 1San Kim
 
Auto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-EncodersAuto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-EncodersJinho Lee
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...홍배 김
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)Donghyeon Kim
 
Image processing - Histogram Equalization
Image processing - Histogram EqualizationImage processing - Histogram Equalization
Image processing - Histogram Equalization우진 신
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명홍배 김
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)홍배 김
 
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)WON JOON YOO
 
Vs^3 net for machine reading comprehension question answering
Vs^3 net for machine reading comprehension question answeringVs^3 net for machine reading comprehension question answering
Vs^3 net for machine reading comprehension question answeringNAVER Engineering
 
03.12 cnn backpropagation
03.12 cnn backpropagation03.12 cnn backpropagation
03.12 cnn backpropagationDea-hwan Ki
 
neural network 기초
neural network 기초neural network 기초
neural network 기초Dea-hwan Ki
 

What's hot (16)

Lecture 3: Unsupervised Learning
Lecture 3: Unsupervised LearningLecture 3: Unsupervised Learning
Lecture 3: Unsupervised Learning
 
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기 DEVIEW 2016
 
Lecture 4: Neural Networks I
Lecture 4: Neural Networks ILecture 4: Neural Networks I
Lecture 4: Neural Networks I
 
Adversarial Attack in Neural Machine Translation
Adversarial Attack in Neural Machine TranslationAdversarial Attack in Neural Machine Translation
Adversarial Attack in Neural Machine Translation
 
Deep learning study 1
Deep learning study 1Deep learning study 1
Deep learning study 1
 
Auto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-EncodersAuto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-Encoders
 
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
InfoGAN: Interpretable Representation Learning by Information Maximizing Gene...
 
[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)[기초개념] Graph Convolutional Network (GCN)
[기초개념] Graph Convolutional Network (GCN)
 
Image processing - Histogram Equalization
Image processing - Histogram EqualizationImage processing - Histogram Equalization
Image processing - Histogram Equalization
 
Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명Recurrent Neural Net의 이론과 설명
Recurrent Neural Net의 이론과 설명
 
Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)Focal loss의 응용(Detection & Classification)
Focal loss의 응용(Detection & Classification)
 
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리를 학습을 위한 파워포인트. (Deep Learning for Natural Language Processing)
 
Vs^3 net for machine reading comprehension question answering
Vs^3 net for machine reading comprehension question answeringVs^3 net for machine reading comprehension question answering
Vs^3 net for machine reading comprehension question answering
 
03.12 cnn backpropagation
03.12 cnn backpropagation03.12 cnn backpropagation
03.12 cnn backpropagation
 
2016 UCPC 풀이
2016 UCPC 풀이2016 UCPC 풀이
2016 UCPC 풀이
 
neural network 기초
neural network 기초neural network 기초
neural network 기초
 

Similar to Variational Auto Encoder, Generative Adversarial Model

Chapter 19 Variational Inference
Chapter 19 Variational InferenceChapter 19 Variational Inference
Chapter 19 Variational InferenceKyeongUkJang
 
Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pcaJinhwan Suk
 
개념 이해가 쉬운 Variational Autoencoder (VAE)
개념 이해가 쉬운 Variational Autoencoder (VAE)개념 이해가 쉬운 Variational Autoencoder (VAE)
개념 이해가 쉬운 Variational Autoencoder (VAE)jaypi Ko
 
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalueJeonghun Yoon
 
02.09 naive bayesian classifier
02.09 naive bayesian classifier02.09 naive bayesian classifier
02.09 naive bayesian classifierDea-hwan Ki
 
04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )Jeonghun Yoon
 
03. linear regression
03. linear regression03. linear regression
03. linear regressionJeonghun Yoon
 
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)Jeonghun Yoon
 
Multinomial classification and application of ML
Multinomial classification and application of MLMultinomial classification and application of ML
Multinomial classification and application of ML희수 박
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)WON JOON YOO
 
Crash Course on Graphical models
Crash Course on Graphical modelsCrash Course on Graphical models
Crash Course on Graphical modelsJong Wook Kim
 
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformationJeonghun Yoon
 
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theoryJeonghun Yoon
 
Deep Learning from scratch 5장 : backpropagation
 Deep Learning from scratch 5장 : backpropagation Deep Learning from scratch 5장 : backpropagation
Deep Learning from scratch 5장 : backpropagationJinSooKim80
 
RLCode와 A3C 쉽고 깊게 이해하기
RLCode와 A3C 쉽고 깊게 이해하기RLCode와 A3C 쉽고 깊게 이해하기
RLCode와 A3C 쉽고 깊게 이해하기Woong won Lee
 
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Model
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic ModelCVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Model
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Modeljaypi Ko
 
Probability with MLE, MAP
Probability with MLE, MAPProbability with MLE, MAP
Probability with MLE, MAPJunho Lee
 

Similar to Variational Auto Encoder, Generative Adversarial Model (20)

Chapter 19 Variational Inference
Chapter 19 Variational InferenceChapter 19 Variational Inference
Chapter 19 Variational Inference
 
Vae
VaeVae
Vae
 
Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pca
 
개념 이해가 쉬운 Variational Autoencoder (VAE)
개념 이해가 쉬운 Variational Autoencoder (VAE)개념 이해가 쉬운 Variational Autoencoder (VAE)
개념 이해가 쉬운 Variational Autoencoder (VAE)
 
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue
 
Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)
 
02.09 naive bayesian classifier
02.09 naive bayesian classifier02.09 naive bayesian classifier
02.09 naive bayesian classifier
 
04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )
 
03. linear regression
03. linear regression03. linear regression
03. linear regression
 
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)
 
Multinomial classification and application of ML
Multinomial classification and application of MLMultinomial classification and application of ML
Multinomial classification and application of ML
 
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
 
Crash Course on Graphical models
Crash Course on Graphical modelsCrash Course on Graphical models
Crash Course on Graphical models
 
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation
 
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theory
 
Deep Learning from scratch 5장 : backpropagation
 Deep Learning from scratch 5장 : backpropagation Deep Learning from scratch 5장 : backpropagation
Deep Learning from scratch 5장 : backpropagation
 
07. PCA
07. PCA07. PCA
07. PCA
 
RLCode와 A3C 쉽고 깊게 이해하기
RLCode와 A3C 쉽고 깊게 이해하기RLCode와 A3C 쉽고 깊게 이해하기
RLCode와 A3C 쉽고 깊게 이해하기
 
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Model
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic ModelCVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Model
CVPR 2022 Tutorial에 대한 쉽고 상세한 Diffusion Probabilistic Model
 
Probability with MLE, MAP
Probability with MLE, MAPProbability with MLE, MAP
Probability with MLE, MAP
 

More from SEMINARGROOT

Metric based meta_learning
Metric based meta_learningMetric based meta_learning
Metric based meta_learningSEMINARGROOT
 
Sampling method : MCMC
Sampling method : MCMCSampling method : MCMC
Sampling method : MCMCSEMINARGROOT
 
Demystifying Neural Style Transfer
Demystifying Neural Style TransferDemystifying Neural Style Transfer
Demystifying Neural Style TransferSEMINARGROOT
 
Towards Deep Learning Models Resistant to Adversarial Attacks.
Towards Deep Learning Models Resistant to Adversarial Attacks.Towards Deep Learning Models Resistant to Adversarial Attacks.
Towards Deep Learning Models Resistant to Adversarial Attacks.SEMINARGROOT
 
The ways of node embedding
The ways of node embeddingThe ways of node embedding
The ways of node embeddingSEMINARGROOT
 
Graph Convolutional Network
Graph  Convolutional NetworkGraph  Convolutional Network
Graph Convolutional NetworkSEMINARGROOT
 
Denoising With Frequency Domain
Denoising With Frequency DomainDenoising With Frequency Domain
Denoising With Frequency DomainSEMINARGROOT
 
Bayesian Statistics
Bayesian StatisticsBayesian Statistics
Bayesian StatisticsSEMINARGROOT
 
Coding Test Review 3
Coding Test Review 3Coding Test Review 3
Coding Test Review 3SEMINARGROOT
 
Time Series Analysis - ARMA
Time Series Analysis - ARMATime Series Analysis - ARMA
Time Series Analysis - ARMASEMINARGROOT
 
Differential Geometry for Machine Learning
Differential Geometry for Machine LearningDifferential Geometry for Machine Learning
Differential Geometry for Machine LearningSEMINARGROOT
 
Generative models : VAE and GAN
Generative models : VAE and GANGenerative models : VAE and GAN
Generative models : VAE and GANSEMINARGROOT
 
Understanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence FunctionsUnderstanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence FunctionsSEMINARGROOT
 
Attention Is All You Need
Attention Is All You NeedAttention Is All You Need
Attention Is All You NeedSEMINARGROOT
 
WWW 2020 XAI Tutorial Review
WWW 2020 XAI Tutorial ReviewWWW 2020 XAI Tutorial Review
WWW 2020 XAI Tutorial ReviewSEMINARGROOT
 
Coding test review 2
Coding test review 2Coding test review 2
Coding test review 2SEMINARGROOT
 
Locality sensitive hashing
Locality sensitive hashingLocality sensitive hashing
Locality sensitive hashingSEMINARGROOT
 
Coding Test Review1
Coding Test Review1Coding Test Review1
Coding Test Review1SEMINARGROOT
 

More from SEMINARGROOT (20)

Metric based meta_learning
Metric based meta_learningMetric based meta_learning
Metric based meta_learning
 
Sampling method : MCMC
Sampling method : MCMCSampling method : MCMC
Sampling method : MCMC
 
Demystifying Neural Style Transfer
Demystifying Neural Style TransferDemystifying Neural Style Transfer
Demystifying Neural Style Transfer
 
Towards Deep Learning Models Resistant to Adversarial Attacks.
Towards Deep Learning Models Resistant to Adversarial Attacks.Towards Deep Learning Models Resistant to Adversarial Attacks.
Towards Deep Learning Models Resistant to Adversarial Attacks.
 
The ways of node embedding
The ways of node embeddingThe ways of node embedding
The ways of node embedding
 
Graph Convolutional Network
Graph  Convolutional NetworkGraph  Convolutional Network
Graph Convolutional Network
 
Denoising With Frequency Domain
Denoising With Frequency DomainDenoising With Frequency Domain
Denoising With Frequency Domain
 
Bayesian Statistics
Bayesian StatisticsBayesian Statistics
Bayesian Statistics
 
Coding Test Review 3
Coding Test Review 3Coding Test Review 3
Coding Test Review 3
 
Time Series Analysis - ARMA
Time Series Analysis - ARMATime Series Analysis - ARMA
Time Series Analysis - ARMA
 
Differential Geometry for Machine Learning
Differential Geometry for Machine LearningDifferential Geometry for Machine Learning
Differential Geometry for Machine Learning
 
Generative models : VAE and GAN
Generative models : VAE and GANGenerative models : VAE and GAN
Generative models : VAE and GAN
 
Effective Python
Effective PythonEffective Python
Effective Python
 
Understanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence FunctionsUnderstanding Blackbox Prediction via Influence Functions
Understanding Blackbox Prediction via Influence Functions
 
Attention Is All You Need
Attention Is All You NeedAttention Is All You Need
Attention Is All You Need
 
Attention
AttentionAttention
Attention
 
WWW 2020 XAI Tutorial Review
WWW 2020 XAI Tutorial ReviewWWW 2020 XAI Tutorial Review
WWW 2020 XAI Tutorial Review
 
Coding test review 2
Coding test review 2Coding test review 2
Coding test review 2
 
Locality sensitive hashing
Locality sensitive hashingLocality sensitive hashing
Locality sensitive hashing
 
Coding Test Review1
Coding Test Review1Coding Test Review1
Coding Test Review1
 

Variational Auto Encoder, Generative Adversarial Model

  • 1.
  • 6. Introduction Natural data in high dimensional spaces concentrates close to lower dimensional manifolds. Probability density decreases very rapidly when moving away from the supporting manifold. Manifold Hypothesis (assumption)
  • 9. Introduction Interpolation in high dimension Interpolation in manifold
  • 11. Generative Models Generative Models • PixelRNN and PixelCNN • Variational Autoencoders (VAE) – Latent model • Generative Adversarial Networks (GANs)
  • 12. Generative Models Generative Models • PixelRNN and PixelCNN • Variational Autoencoders (VAE) – Latent model • Generative Adversarial Networks (GANs)
  • 13. Generative Models Taxonomy of Deep Generative Models - Ian Goodfellow -
  • 16. Generative Models 𝑃 𝑋 X는 손글씨 2로 이루어진 데이터
  • 19. Generative Models 우리가 찾고 싶은 model 𝑝 𝑑𝑎𝑡𝑎 𝑥 ≈ 𝑝 𝑚𝑜𝑑𝑒𝑙 𝑥 NOT What Machine learns
  • 22. Variational Autoencoders (VAE) 결국 Latent Model 은 어떠한 z를 통해서 y를 찾아내는 것 𝑓(𝑧1) 𝑓(𝑧2) 𝑓(𝑧3) 만약 𝑧1, 𝑧2, 𝑧3 가 서로 아무 관계 없는 임의의 숫자라면 Z값을 찾아내는 게 의 미가 있을까? -> 그러한 모델은 의미가 없다. 만들어 내봤자, Target과 똑같은 것만 만듬 우리는 새로운 데이터를 원함 왜? 분명 같은 숫자 간에는 무언가 관계가 있을 테니까 그것을 생성하게 해줄 임 의의 Z도 무언가 관계가 있으면 좋을 것이다. 더불어 Z간의 관계를 알 수 있다면 우리는 그것을 Control해 Y값도 변화시킬 수 있을 것이다.
  • 27. Variational Autoencoders (VAE) 𝜃 = 𝑎𝑟𝑔max 𝜃 ෑ 𝑃 𝜃(𝑥𝑖) = 𝑎𝑟𝑔max 𝜃 𝑃 𝜃(𝑥1, 𝑥2 , … … … , 𝑥 𝑛−1, 𝑥 𝑛) x를 iid한 Data Set X에서 sampling한 한 개의 데이터라고 할 때 𝜃 는 𝑥1, 𝑥2 , … … … , 𝑥 𝑛−1, 𝑥 𝑛각각의 데이터 셋들이 모두 잘 나오게 해야 하므로 확률 ς 𝑃 𝜃(𝑥𝑖) 를 최대화 하는 값이어야 한다.
  • 28. Variational Autoencoders (VAE) 𝑃𝑑𝑎𝑡𝑎 𝑥 ≈ 𝑃 𝑚𝑜𝑑𝑒𝑙 𝑥 = ‫׬‬ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧 𝑑𝑧 = σ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧 위의 𝜃 이용해서 바로 𝑃 𝑚𝑜𝑑𝑒𝑙 𝑥 계산하면 안되나? Maximum likelihood 𝜃 = 𝑎𝑟𝑔max 𝜃 σ 𝑃 ȁ𝑥 𝑔 𝜃 𝑧 𝑃 𝑧
  • 29. Variational Autoencoders (VAE) Multivariate cases − log 𝑝 𝑦𝑖 𝑓𝜃 𝑥𝑖 Gaussian distribution Categorical distribution 𝑓𝜃 𝑥𝑖 = 𝜇𝑖 𝑓𝜃 𝑥𝑖 = 𝑝𝑖 Distribution estimation 𝑥𝑖 𝑝 𝑦𝑖 𝑥𝑖 Likelihood값을 예측하는 것이 아니라, Likelihood의 파라미터값을 예측하는 것이 다. 𝑥𝑖𝑥𝑖 Mean Squared Error Cross-entropy
  • 30. Variational Autoencoders (VAE) If 𝑝 𝑥 𝑔 𝜃(𝑧) = 𝒩 𝑥 𝑔 𝜃 𝑧 , 𝜎2 ∗ 𝐼 , the negative log probability of X is proportional squared Euclidean distance between 𝑔 𝜃(𝑧) and 𝑥. 𝑥 : Figure 3(a) 𝑧 𝑏𝑎𝑑 → 𝑔 𝜃 𝑧 𝑏𝑎𝑑 : Figure 3(b) 𝑧 𝑏𝑎𝑑 → 𝑔 𝜃 𝑧 𝑔𝑜𝑜𝑑 : Figure 3(c) (identical to x but shifted down and to the right by half a pixel) 𝑥 − 𝑧 𝑏𝑎𝑑 2 < 𝑥 − 𝑧 𝑔𝑜𝑜𝑑 2 → 𝑝 𝑥 𝑔 𝜃(𝑧 𝑏𝑎𝑑) >𝑝 𝑥 𝑔 𝜃(𝑧 𝑔𝑜𝑜𝑑) Solution 1: we should set the 𝜎 hyperparameter of our Gaussian distribution such that this kind of erroroneous digit does not contribute to p(X) → hard.. Solution 2: we would likely need to sample many thousands of digits from 𝑧 𝑔𝑜𝑜𝑑 → hard.. 𝑝(𝑥) ≈ ෍ 𝑖 𝑝 𝑥 𝑔 𝜃 𝑧𝑖 𝑝(𝑧𝑖) Question: Why don’t we use maximum likelihood estimation directly? 생성기에 대한 확률모델을 가우시안으로 할 경우, MSE관점에서 가까운 것이 더 p(x)에 기여하는 바가 크다. MSE가 더 작은 이미지가 의미적으로도 더 가까운 경 우가 아닌 이미지들이 많기 때문에 현실적으로 올바 른 확률값을 구하기가 어렵다.
  • 31. Variational Autoencoders (VAE) Sampling한 하나의 digits은 당연히 P(X)를 추정하는데 큰 영향을 못 줌
  • 32. Variational Autoencoders (VAE) http://shakirm.com/papers/VITutorial.pdf 𝑝 𝑧ȁ𝑥 ≈ 𝑞 𝜙 𝑧ȁ𝑥 ~𝑧 𝑥Generator gθ(.) Latent Variable Target Data One possible solution : sampling 𝑧 from 𝑝(𝑧ȁ𝑥) [ Variational Inference ]
  • 33. Variational Autoencoders (VAE) VI란 사후확률(posterior) 분포 p(z|x)를 다루기 쉬운 확률분포 q(z)로 근사(approximation)하는 걸 말합 니다. 사후확률 분포를 계산하는게 불가능에 가까울 정도로 어려운 경우가 많기 때문
  • 34. Variational Autoencoders (VAE) 사후확률 분포 p(z|x)와 q(z) 사이의 KLD를 계산하고, KLD가 줄어드는 쪽으로 q(z)를 조금씩 업데이 트하는 과정을 반복하면 사후확률을 잘 근사하는 q∗(z)를 얻게 될 것이라는 게 VI의 핵심 아이디어.
  • 35. Variational Autoencoders (VAE) Variational Inference with Monte Carlo sampling
  • 36. Variational Autoencoders (VAE) [ Jensen’s Inequality ] For concave functions f(.) f(E[x])≥E[f(x)] log 𝑝 𝑥 = log න 𝑝 𝑥ȁ𝑧 𝑝(𝑧)𝑑𝑧 ≥ නlog 𝑝 𝑥ȁ𝑧 𝑝(𝑧)𝑑𝑧 log 𝑝 𝑥 = log න 𝑝 𝑥ȁ𝑧 𝑝(𝑧) 𝑞 𝜙(𝑧ȁ𝑥) 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 ≥ න log 𝑝 𝑥ȁ𝑧 𝑝(𝑧) 𝑞 𝜙(𝑧ȁ𝑥) 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 log 𝑝 𝑥 ≥ න log 𝑝 𝑦ȁ𝑧 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 − න log 𝑞 𝜙(𝑧ȁ𝑥) 𝑝 𝑧 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 Variational lower bound Evidence lower bound (ELBO) = 𝔼 𝑞 𝜙 𝑧ȁ𝑥 log 𝑝 𝑥ȁ𝑧 − 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ȁ𝑝 𝑧 Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 1 ← ←Variational inference 𝐸𝐿𝐵𝑂(𝜙) ELBO를 최대화하는 𝜙∗ 값을 찾으면 log 𝑝 𝑥 = 𝔼 𝑞 𝜙∗ 𝑧ȁ𝑥 log 𝑝 𝑥ȁ𝑧 − 𝐾𝐿 𝑞 𝜙∗ 𝑧ȁ𝑥 ȁ𝑝 𝑧 이다.
  • 37. Variational Autoencoders (VAE) Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 2 log 𝑝 𝑥 = න log 𝑝 𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧← ‫׬‬ 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 = 1 = න log 𝑝 𝑥, 𝑧 𝑝 𝑧ȁ𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧← 𝑝 𝑥 = 𝑝(𝑥, 𝑧) 𝑝(𝑧ȁ𝑥) = න log 𝑝 𝑥, 𝑧 𝑞 𝜙 𝑧ȁ𝑥 ∙ 𝑞 𝜙 𝑧ȁ𝑥 𝑝 𝑧ȁ𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 = න log 𝑝 𝑥, 𝑧 𝑞 𝜙 𝑧 𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 + න log 𝑞 𝜙 𝑧 𝑥 𝑝 𝑧ȁ𝑥 𝑞 𝜙(𝑧ȁ𝑥)𝑑𝑧 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ∥ 𝑝 𝑧 𝑥𝐸𝐿𝐵𝑂(𝜙) 두 확률분포 간의 거리≥0 log 𝑝 𝑥 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥 ȁ 𝑝 𝑧ȁ𝑥 𝐸𝐿𝐵𝑂(𝜙) 𝜙1 𝜙2 KL을 최소화하는 𝑞 𝜙 𝑧ȁ𝑥 의 𝜙값을 찾으면 되는데 𝑝 𝑧ȁ𝑥 를 모르기 때문에, KL최소화 대신에 ELBO를 최대화하는𝜙값을 찾는다.
  • 38. Variational Autoencoders (VAE) Relationship among 𝑝 𝑥 , 𝑝 𝑧 𝑥 , 𝑞 𝜙 𝑧ȁ𝑥 : Derivation 2
  • 43. Variational Autoencoders (VAE) 𝑥𝑖 𝑞 𝜙 𝑧ȁ𝑥𝑖 𝜇𝑖 𝜎𝑖 Reconstruction Error 𝐿𝑖 𝜙, 𝜃, 𝑥𝑖 = −𝔼 𝑞 𝜙 𝑧ȁ𝑥𝑖 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 + 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧 𝔼 𝑞 𝜙 𝑧ȁ𝑥 𝑖 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 = නlog 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑞 𝜙 𝑧ȁ𝑥𝑖 𝑑𝑧 ≈ 1 𝐿 ෍ 𝑧 𝑖,𝑙 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝑙 Monte-carlo technique → 𝑧 𝑖,1 𝑧 𝑖,2 𝑧 𝑖,𝑙 𝑧 𝑖,𝐿…… log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,1 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,2 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝑙 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 𝑖,𝐿 …… mean …… Reconstruction Error • L is the number of samples for latent vector • Usually L is set to 1 for convenience SAMPLING https://home.zhaw.ch/~dueo/bbs/files/vae.pdf
  • 47. Variational Autoencoders (VAE) Regularization KL divergence 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧 = 1 2 𝑡𝑟 𝜎𝑖 2 𝐼 + 𝜇𝑖 𝑇 𝜇𝑖 − 𝐽 + ln 1 ς 𝑗=1 𝐽 𝜎𝑖,𝑗 2 = 1 2 ෍ 𝑗=1 𝐽 𝜎𝑖,𝑗 2 + ෍ 𝑗=1 𝐽 𝜇𝑖,𝑗 2 − 𝐽 − ෍ 𝑗=1 𝐽 ln 𝜎𝑖,𝑗 2 = 1 2 ෍ 𝑗=1 𝐽 𝜇𝑖,𝑗 2 + 𝜎𝑖,𝑗 2 − ln 𝜎𝑖,𝑗 2 − 1 priorposterior 𝑥𝑖 𝑞 𝜙 𝑧ȁ𝑥𝑖 𝜇𝑖 𝜎𝑖 𝐽 𝐿𝑖 𝜙, 𝜃, 𝑥𝑖 = −𝔼 𝑞 𝜙 𝑧ȁ𝑥 𝑖 log 𝑝 𝜃 𝑥𝑖ȁ𝑧 + 𝐾𝐿 𝑞 𝜙 𝑧ȁ𝑥𝑖 ȁ𝑝 𝑧 Easy to compute!!
  • 48. Variational Autoencoders (VAE) 𝑥𝑖 𝑞 𝜙 ∙ 𝜇𝑖 𝜎𝑖 𝜇𝑖 𝑔 𝜃(∙) 𝑧 𝑖 𝜖𝑖 SAMPLING Reparameterization Trick Gaussain Encoder Gaussian Decoder Reconstruction Error: σ 𝑗=1 𝐷 𝑥 𝑖,𝑗−𝜇𝑖,𝑗 ′ 2 2 Regularization : 1 2 σ 𝑗=1 𝐽 𝜇𝑖,𝑗 2 + 𝜎𝑖,𝑗 2 − ln 𝜎𝑖,𝑗 2 − 1 𝐷 𝐽 𝒩(0, 𝐼)
  • 50. Generative Adversarial Networks (GANs) Generative Adversarial Networks (GANs)
  • 60. References 오토인코더의 모든 것 by 이활석 (NAVER) Youtube: https://youtu.be/rNh2CrTFpm4, Slideshare: https://www.slideshare.net/NaverEngineering/ss-96581209 1시간만에 GAN(Generative Adversarial Network) 완전 정복하기 by 최윤제 (NAVER) Youtube: https://youtu.be/odpjk7tGY0, Slideshare: https://www.slideshare.net/NaverEngineering/1-gangenerative-adversarial- network Theory and Application of Generative Adversarial Networks by Ming-Yu Liu, Julie Bernauer, Jan Kautz (NVIDIA) Youtube: https://youtu.be/KudkR-fFu_8, Slideshare: https://www.slideshare.net/mlreview/tutorial-on-theory-and-application-of- generative-adversarial-networks Tutorial on Variational Autoencoders by Carl Doersch (Carnegie Mellon / UC Berkeley) Arxiv: https://arxiv.org/pdf/1606.05908.pdf Generative Adversarial Nets (2014) NIPS by Goodfellow et al https://papers.nips.cc/paper/5423-generative-adversarial-nets.pdf