목차
이번 포스팅에서는 deep generative model이 어떻게 분류되는지 high level에서 알아보고, 이러한 generative model을 공부하기 앞서 알아두어야 할 기본 지식을 간단히 복기해보자.
Taxonomy of Deep Generative models
Deep generative model은 학습 방식에 따라 다음과 같이 분류할 수 있다.
- Autoregressive models (ex. PixelCNN)
- Flow-based models (ex. RealNVP)
- Latent variable models
- Implicit models (ex. GANs)
- Prescribed models (ex. VAEs)
- Energy-based models
Diffusion model의 경우 굳이 분류하자면 latent variable model이 될 것이다.
각 분류에 따라 어떤 방식으로 학습을 진행하는지 간단하게 알아보자.
Autoregressive Models (ARM)
Autoregressive model은 이름 그대로 autoregressive하게, 즉 sequential data에 대해서 순차적으로 학습을 진행한다. (chain rule 사용)
데이터
모든 conditional disrtibution
Flow-based Models
Flow-based model에서는 change of variables라는 공식을 활용하여 invertible transformation
여기서
Latent Variable Models
Latent variable model에서는 저차원의(low-dimensional) latent space를 활용하여 다음과 같은 generative process를 가정한다.
Latent variable
Energy-based Models
Energy-based model은 physics에 기반한 방법으로, 요즘은 활발히 연구되고있진 않다. Generative model들의 group을 Energy function
Summary (Comparison)
Deep generative model들을 분류한 다양한 모델의 특성은 다음과 같이 표로 나타낼 수 있다.

Pre-knowledges
생성 모델을 알아보기 이전에, 이해에 필수적인 간단한 확률 통계 지식을 되짚어보자.
Basic Discrete Distributions
Discrete distribution에는 대표적으로 Bernoulli distribution과 categorical distribution이 있다. 둘은 각각 '동전 뒤집기 (biased)', 'm개 면이 있는 주사위 뒤집기 (biased)'로 이해해볼 수 있다.
Bernoulli distribution | Categorical distribution | |
Dimensions | {Heads, Tails} | {1, ..., m} |
Property | ||
Expression | ||
Sampling | 동전 던지기 | 주사위 굴리기 |
Joint Distribution
1개 픽셀 생성(색 지정)
어떤 이미지에서 임의의 pixel의 color를 모델링한다고 해보자. 그러면 다음과 같은 세 가지 discrete random variable이 정의될 것이다.
- Red channel (R) :
- Green channel (G) :
- Blue channel (B) :
한 픽셀에 color를 랜덤하게 생성해주려면 joint distribution
이렇게, pixel 하나의 color를 샘플링하는 데에도 엄청나게 많은 경우의 수가 존재한다.
1개 흑백 이미지 생성
좀 더 단순화시켜서, 이번에는 n개 픽셀에 대해 binary(Bernoulli) random variable
이때, 가능한 state(image data 하나)의 경우의 수는
그런데, 만약
여기서 가능한 state 개수는
즉,
따라서, conditional independence를 활용하여 모델을 단순화한다.(연산량을 줄인다.)
두 event
또한 random variables
여기서
이를 간단히
위와 같이 조건부 독립을 만족할 경우(X와 Y가 Z가 주어졌을 때 독립이면) event
이러한 성질을 통해 parameter 개수를 줄여줄 수 있다.
Chain rule and Bayes' rule
Chain rule과 Bayes' rule도 중요한 기본 개념이다.
먼저, Chain rule은 events
그리고 Bayes' rule은 event
위에서 다뤘던 '1개 흑백 이미지 생성' 예시에서, chain rule을 활용하면 joint distribution을 다음과 같이 나타낼 수 있다.
좌변의 distribution을 정하기 위한 parameter 개수는
하지만, chain rule을 통해 factorize한 term에 대해 conditional independence 성질을 적용하여 parameter 개수를 줄여줄 수 있다.
모델이 Markov model이라 가정하자. Markov model이란, 오직 이전의 값에만 의존하는 모델로, '이전
그러면 다음과 같이 joint distribution이 단순화된다.
따라서 parameter 개수는
최근댓글