[https://cvpr2022-tutorial-diffusion-models.github.io/]
T = 노이즈를 더하는 시점, 이미지 파괴 과정.
T를 아주 크게 하여 점진적으로 노이즈를 추가하는 과정이다. 노이즈를 점진적으로 추가해야 reverse diffusion 과정에서 올바르게 노이즈를 제거하는 방법을 학습할 수 있다.
노이즈 추가
$$ q(x_t|x_{t-1})=N(x_t;\sqrt{1-\beta_t}x_{t-1},\beta_t I) $$
완전히 노이즈가 추가된 이미지는 결국 가우시안 분포를 따르게 된다.
[Denoising Diffusion-based Generative Modeling: Foundations and Applications]
이미지 생성 과정 = 노이즈를 제거하는 과정
그러나 이 과정인 $q(x_{t-1}|x_t)$는 계산이 불가하다.
$\beta_t$ 가 작을 때 정규분포로 근사 가능하다. ⇒ 이것 때문에 forward에서 beta를 작게 설정해야 하기 때문에 T가 커진다.
[Denoising Diffusion-based Generative Modeling: Foundations and Applications]
정규분포 근사
$$ p_\theta(x_{t-1}|x_t)=N(x_{t-1};\mu_\theta(x_t,t),\sigma_t^2 I)\approx q(x_{t-1}|x_t) $$
$$ L(\theta;x_0)=\mathbb{E}{q(x{1:T}|x_0)}\Bigg[ KL(q(x_T|x_0)||p(x_T)) + \sum_{t=2}^T KL(q(x_{t-1}|x_t,x_0)||p_\theta(x_{t-1}||x_t))-\log p_\theta(x_0|x_1) \Bigg] $$