score network와 true score를 matching시키는 score matching objective는 data distribution의 support가 whole space일 때만 consistent한 score를 얻는다
ResNet, CIFAR-10, sliced score matching으로 실험해봤더니
그냥 데이터셋을 쓰면 loss가 잘 안 줄어드는데
data에 약간의 perturbation을 걸어서 perturbed data distribution이 전체 space를 support로 갖게 만들면 loss가 안정적으로 잘 줄어들었다
Low data density regions
low density regions에 data가 부족하면
1. score matching에서도 문제를 겪고
2. sampling하기도 어려워진다
Inaccurate score estimation with score matching
전체 space RD 중에 probability density가 거의 0인 구역 R이 있다 치면 (pdata(R)≈0)
pdata로부터 샘플링한 데이터셋에는 R에 속하는 데이터가 아예 없을 확률이 높다
그렇게 되면 score matching을 정확하게 해도 R 구역에서는 score가 정의되지 않거나 부정확하게 구해진다
Slow mixing of Langevin dynamics
pdata가 두 개의 distribution의 mixture이고, 두 distribution 사이에는 low density region이 있다 치자
pdata(x)=πp1(x)+(1−π)p2(x)
여기서 log gradient를 취하면 p1과 p2의 score 둘 다 π를 날려버린다
approximately disjoint supports를 가지는 distribution끼리 섞으면 이렇게 됨
이 상태로 Langevin dynamics를 진행하면 distribution끼리의 relative weights를 반영하지 못함
Noise Conditional Score Networks (NCSN)
NCSN
data에 Gaussian perturbation을 가하면 위에서 서술한 문제들을 해결 가능!
1) perturb data using various levels of noise
2) simultaneously estimate scores corresponding to all noise levels by training a single conditional score network
3) use Langevin dynamics to generate samples after training
definition
Let {σi}i=1L be a positive geometric sequence that satisfies σ2σ1=…=σLσL−1>1
여기서 σ1은 위에서 서술한 문제를 해결하기에 충분히 큰 noise여야 하고
σL은 true data에 거의 영향을 주지 않을 정도로 작은 noise여야 한다
Let qσ(x)≜∫pdata(t)N(x∣t,σ2I)dt denote the perturbed data dist.
모든 noise level σ에 대해 qσ(x)의 score를 예측하는 score network sθ(x,σ)를 학습시킨다 == Noise Conditional Score Network
Model architecture
본 논문에서는 image domain만 다룸
UNet + dilated convolution을 사용
score matching만 제대로 할 수 있으면 어떤 구조를 써도 ok
Learning NCSN via score matching
using Denoising score matching, objective is given as
얘를 결정하는 방법에는 여러 가지가 있지만, λ()l()의 크기가 대충 일정한 게 좋아보임
실험적으로, model이 optimal하게 학습되었을 때 ∣∣sθ(x,σ)∣∣2는 대략 σ1에 비례했음
따라서 λ(σ)=σ2로 세팅
λ()l()=21E[∣∣σsθ(x~)+σx~−x∣∣22]
모든 항이 상수에 비례한다
NCSN inference via annealed Langevin Dynamics
기존 Langevin dynamics는 fixed step size로 진행됨
- sampling 초반(σ가 클 때)에는 step size가 크고 점점 줄어들어 마지막에는 ϵ이 되도록 조절하는 annealed Langevin Dynamics 도입
- αi=ϵ⋅σL2σi2
- signal to noise(SNR) ratio 2αizαisθ(xi,σi)를 일정하게 유지하기 위해 이렇게 설정함