상세 컨텐츠

본문 제목

[논문 리뷰 스터디] Generative Adversarial Networks

심화 스터디/논문 리뷰 스터디

by Brian Moon 2023. 3. 23. 17:14

본문

✏️ 논문링크✏️

Generative Adversarial Networks

 

Generative Adversarial Networks

We propose a new framework for estimating generative models via an adversarial process, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that

arxiv.org


1. Introduction

Discriminative Model

GAN이전까지 딥러닝에서 좋은 성능을 냈던 모델은 Discriminative models였다. 이 때, Discriminative model은 보통 high-dimensional하고 rich sensory input을 class label에 맵핑하는 것이한다.다. 이는 backpropagation과 dropout algorithms를 주로 사용한다.

Deep Generative Model

Deep generative model은 두 가지 어려움이 존재했다.

  • Maximum likelihood estimation과 그와 관련된 여러 방법들에서 일어나는 다루기 힘든 수많은 확률적 계산들을 근사하는 것
  • Generative context에서 piecewise linear units(역전파, dropout에서 사용되며 gradient가 활용하기 좋음)의 이점들일 사용하기 어려움

GAN

Discriminative model ⇒ Policy

Data의 sample이 model distribution과 data distribution 중 어디에서 왔는지 구분하도록 learning한다.

Generative model ⇒ Counterfeiter

Fake currency를 detection하지 못하게 만든다. MLP를 거쳐서 random noise를 passing하면서 sample들을 생성해낸다. 이는 forward propagation만을 통해서 실행된다.

⇒ 이러한 두 모델이 counterfeit가 실제값과 구분하지 못할 때까지 서로의 능력을 향상시키는 구조인 것이고, 둘 다 backpropagation, dropout algorithms를 통해 학습한다.


2. Related Work

Skip!


3. Adversarial Nets

Adversarial modeling은 두 모델이 다 MLP일 때 적용이 어렵다.

 

Generative model

Generator distribution $p_g$이며 이를 data $x$에 대해 학습시키기 위하여 input noise variables $p_z(\bold z)$를 먼저 정의한다. 이후 이를 data space에 대해 맵핑하는 $G(z;\theta_g)$를 나타낸다. 이 때 $G$는 MLP의 parameter $\theta_g$로 표현되는 미분 가능한 함수이다.

⇒ Train to minimize $log(1-D(G(z))$

 

Discriminative model

이후 두 번째 MLP인 $D(x, \theta_d)$를 정의하고 $D$의 output은 single scalar이다. $D(x)$는 $p_g$가 아닌 data $x$의 확률을 나타내는 것이다.

⇒ Training examples와 G의 samples 모두 correct labels로 분류하도록 하는 probability를 maximize하도록 $D$를 train한다.


Blue line : $D$ , Black line : $p_x$, Green line : $p_g$

위의 그림에서 화살표들은 uniform distribution $z$에서 $x = G(z)$를 의미하고 이는 non-uniform distribution $p_g$를 나타낸다. 이 때, $G$는 $p_g$의 밀도가 낮으면 확장하고, 높으면 줄인다.

(a) : Convergence에 가까우려면 $p_g$가 $p_{data}$에 가까워지고, $D$가 정확한 classifier가 되어야한다.

(b) : $D$가 data로부터 나온 samples를 구분하도록 train되며, 다음과 같은 식에 수렴한다.

$$ D^*(x) = p_{data}(x)/{p_{data}(x) + p_g(x)} $$

(c) : $G$를 update한 후 $D$의 gradient가 $G(z)$가 더욱 data로 분류되는 regions로 가도록한다.

(d) : 여러 Steps이후, $G$와 $D$가 충분한 capacity를 가진다면 둘 다 발전할 수 없는 지점에 이른다. 이 때, $p_g = p_{data}$이며, $D(x) = 1/2$이다. 결국 Discriminator가 분별할 수 없는 상태에 이른다.

4. Theoretical Results

4.1 Global Optimality of $p_g = p_{data}$

Proposition 1. For $G$ fixed, the optimal discriminator $D$ is $D^G(x) = p{data}(x)/{p_{data}(x) + p_g(x)}$*

$x = G(z)$인 것을 명심하자! $z$는 samples의 개념인 것 같다.

 

Theorem 1. The global minimum of the virtual training criterion $C(G)$ is achieved if and only if $p_g = p_{data}$. At that point, $C(G)$ achieves the value $-log4$

$p_g = p_{data}$이면 $D^*G(x) = 1/2$이고 $C(G) = -log4$이다. 이에 이것이 최선의 값이고, 오직 $p_g = p{data}$일 때만 가능하다는 것은 아래와 같다.

Jensen-Shannon divergence가 두 개의 distributions사이에서는 항상 둘이 같을 때만 0이므로 $p_g =p_{data}$에서만 $C(G)$의 global minimum이 $C^* = -log4$인 것이다.


4.2 Convergence of Algorithm 1

 


관련글 더보기

댓글 영역