목록Research/Generative Model (10)
숟가락 그만 얹어

기존의 classifier-based guidance는 noise level에 따른 classifier를 따로 학습시켜야 할 뿐만 아니라 classifier based metric인 IS와 FID를 의도적으로 향상하기 위한 adversarial attack일 수 있다고 저자는 주장한다. 본 논문에서 제안하는 guidance 방식은 conditional diffusion model의 output과 unconditional model의 output의 차이의 방향으로 sample을 생성하도록 유도한다. 이때 unconditional model은 conditional model의 condition을 0 또는 null을 나타내는 방식으로 만든다 이는 여러 가지로 해석이 가능한데, 1) implicit classi..

Diffusion model의 sampling step을 줄이기 위해 제안된 연구. DDPM의 generalized version이라고 볼 수 있겠다. 논문이 어렵게 쓰여있지만 key idea는 sigma라는 stochastic parameter를 두어 q(x(t-1)|x(t), x(0))에 대해 새로운 form을 제안한 것이다. 이 form은 여전히 nice property를 만족한다. (즉, nice property를 만족하면서 x(t)와 x(0)를 condition으로 사용하는 form을 제안) [2]에서는 위 form을 forward/reverse process의 mu function을 x(t)와 noise의 linear combination으로 가정한 것이라고 해석한다. (즉, 각 process..

Diffusion model의 아이디어는 잉크가 물속에서 퍼져나가는 과정 (forward process)과 이를 역으로 되돌리는 과정 (reverse process)으로 이루어져 있다. 이미 퍼져나간 잉크를 다시 한데 모으는 것은 매우 어려울 것이다. 그러나 시간을 잘게 쪼개면 순간의 입자 운동은 예측 가능할 것이고, 거꾸로 모으는 것도 가능할 수 있다. Objective 여러 likelihood-based generative model이 그렇듯이 p(x)를 잘 모델링하여 high-quality fake sample을 생성하는 것이 diffusion model의 objective이다. VAE와 유사하게 latent model이지만, 시간에 따른 여러 trajectory path가 있고 latent spa..

Generative learning algorithm 중 하나인 GDA는 p(y|x)를 구하는 Bayes rule (p(y|x) = p(x|y)p(y), classification 문제라면 분모 term p(x)은 필요 없다)에서 p(x|y)를 Gaussian으로 모델링하는 것이다. 2 class classification 문제라면 아래와 같이 모델링이 가능하다. 이때 학습이 필요한 parameter는 Bernoulli의 phi, Gaussian의 u0, u1, cov (모든 class가 cov를 공유한다)이다. 각 parameter는 empirically 계산하면 된다. References [1] http://cs229.stanford.edu/notes/cs229-notes2.pdf

God이 추천해주신 논문. 먼저, video generation 문제를 해결하기 위한 여러 approach가 소개되어 있어 유익했다. Video는 대부분의 경우 다음 상황이 쉽게 예측되기도 하지만 (공을 던지면 어디로 날아갈까?), 그렇지 않은 경우도 있다 (공이 바닥에 떨어지면 어디로 튈까?). 전자와 후자를 background/motion, content/pose, mse/adversarial loss 등으로 생각해 볼 수 있을 것이다. 본 논문에서는 deterministic/stochastic 관점에서 learned prior을 이용하여 deterministic predictor에 예측의 난이도 (uncertainty)를 넘겨주는 model을 제안하였다. 아래 그림에서 training은 (b), i..

Efficient implementation을 위해 위 식을 tensor 형태로 표현하면 Key : (batch_size, head, seq_length, d)Query : (batch_size, head, seq_length, d)A : (seq_length, seq_length, d) Tensor A는 embedding (i, j)의 learnable position distance 정보를 담고 있음. i와 j의 relative distance가 일정 이상 (k) 멀어지면 clip하여 설정한 index k 또는 -k의 embedding이 사용되도록 설계함. Query * Key : (batch, head, seq_length, seq_length)Query * A : (batch_size, head,..

VAE loss = likelihood + (beta * KL loss) Autoregressive VAE 중 posterior collapse를 방지하기 위해 고안된 scheduling technique으로 학습 초기에는 beta 값을 작게 하여 latent z에 의미 있는 정보가 담기도록 강제하고, beta 값을 점점 키워 prior에 맞추도록 한다. def kl_annealing(epoch, start, end, rate=0.9): return end + (start - end)*(rate)**epoch References [1] S. R. Bowman et al., Generating Sentences from a Continuous Space, CoNLL 2016

Seqeuence 모델을 VAE 형태로 표현하면 global latent z를 이용하여 다양한 속성의 sequence를 생성할 수 있다. 이때, decoder가 encoder의 condition을 무시하고 sequence를 생성하는 posterior collapse 현상이 자주 발생한다고 한다. VAE loss에서 KL term이 0이 되는, 어떤 local optima에 빠지는 상황인데 한동대 김인중 교수님께서 그 이유를 잘 정리해주셨다. Posterior collapse가 발생하는 이유 1. Decoder가 latent z 없이 과거 데이터만으로 충분히 generation이 가능한 경우 2. Ill-posed problem이기 때문에 조건에 맞는 다양한 latent z가 존재할 수 있는 가능성 3. ..

AutoEncoder와 GAN은 데이터를 생성한다는 점에서는 유사하지만 latent space를 표현하기 위해서는 AE의 encoder-decoder design이 더 자연스럽다. (하지만 데이터 생성은 잘 못한다) 이 latent feature란 놈이 왜 중요하냐면 우리가 manually feature를 뽑고 label을 달아주지 않아도 딥러닝이 궁극의 feature를 알아서 만들어준다는 기대가 있기 때문이다. 이 feature는 각 unit이 하나의 semantic을 표현하도록 잘 disentangle 되어야 한다. 본 논문에서는 GAN과 비슷한 수준으로 데이터를 생성하고, disentangled representation을 학습하는 AE를 제안하였다. F는 deterministic function으..

VAE에서 latent space를 discrete representation으로 나타내는 방법이다. 일종의 dictionary라고 볼 수도 있는데, continuous feature를 사전에 정해진 개수만큼 trainable한 dictionary feature로 mapping한다. Motivation은 다음과 같다. - Discrete representations are a more natural fit for many domains (vision, nlp, speech) - Good generator and useful latent features - To prevent “posterior collapse” occurred by powerful decoder Forward pass 단계는 다음과 같다..