Deep generative model은 지난 몇 년간 놀라운 성능을 보여줬다. 이제 이러한 모델로부터 생성된 샘플은 자세히 관찰하지 않으면 실제 데이터와 구분하기 어려운 수준이 되었으며, 적용 범위는 super resolution, domain editing, artistic manipulation, text-to-speech, music generation 등으로 다양해지고 있다.
이러한 generative model은 VAE와 같은 likelihood based model 혹은 GAN과 같은 implicit generative model의 두 가지 type으로 구별할 수 있다. GAN은 random noise로부터 image를 생성하는 generator와 image가 진짜인지 가짜인지 구별하는 discriminator를 사용한다. GAN model은 커질수록 high-quality, high-resolution image를 생성할 수 있지만 true distribution의 다양성을 내포하고 있다고 보기는 어렵다. 또한 GAN은 계산 과정이 까다로우며, overfitting을 방지하기 위한 만족스러운 generalization measure가 존재하지 않는다는 문제점이 있다.
반면 likelihood based method는 training data에 대해 negative log-likelihood (NLL)을 최적화한다. 이 objective는 unseen data에 대한 정보까지 포함하기 때문에 GAN에서 나타나는 lack of diversity 문제를 해결할 수 있다. 하지만 직접적으로 pixel space에서 likelihood를 최대화하는 것이 어렵다는 문제가 있다.
본 논문에서는 autoencoder-based vector quantization을 활용하여 이미지를 discrete latent space로 압축시키는 방법을 사용한 generative model인 VQ-VAE-2를 제안한다. 이는 VQ-VAE 모델을 보완한 것으로, original image를 30배 넘게 압축했지만 복원된 이미지가 Fig. 1과 같이 원본과 거의 비슷한 것을 확인할 수 있었다. 또한 본 모델은 기존 모델과 비교했을 때 simplicity는 비슷했지만 학습 속도를 30배 빠르게 하는 효과를 보였다.
Figure 1: Class-conditional 256x256 image samples from a two-level model trained on ImageNet.
본 모델은 VQ-VAE model의 구조를 기반으로 하였다. VQ-VAE 모델은 $\mathbf x$가 input으로 주어졌을 때 non-linear mapping인 encoder를 통해 $E(\mathbf x)$로 변환되고, codebook의 prototype vector 중 가장 가까운 prototype vector $\mathbf e_k$로 quantized된다. 이를 식으로 나타내면 다음과 같다.
Decoder 역시 non-linear function의 구조로, 이렇게 얻은 codebook의 벡터를 통과시켜 data로 복원한다. 이 mapping을 학습하기 위해 reconstruction error의 gradient가 decoder와 encoder를 통해 back-propagated되고, 이 과정에서 straight-through gradient estimator가 사용된다.
VQ-VAE model은 codebook의 vector space를 얻기 위해 objective에 codebook loss와 commitment loss의 2가지 term을 추가했다. Codebook loss는 선택된 codebook $\mathbf e$가 $E(\mathbf x)$와 얼마나 가까운지 나타내는 term이고, commitment loss는 학습이 빠르게 이루어질 수 있도록 보정해주는 term이다. 전체적인 objective를 식으로 나타내면 다음과 같다.
이때 다음의 exponential moving average를 사용할 경우 Equation 2에서 2번째 loss term을 대체할 수 있다.
Deep autoregressive model은 여러 data modality에 대해 density estimation에서 state of the art를 달성한 probabilistic model이다. 주요 아이디어는 joint probability에 대해 chain rule을 적용하는 것으로, 식으로 나타내면 $p_\theta(\mathbf x)=\Pi_{i=0}^n p_\theta(x_i|\mathbf x_{<i})$와 같다.