티스토리 뷰
Paper/ETC
[Paper 리뷰] Elucidating the Design Space of Diffusion-based Generative Models
feVeRin 2024. 4. 7. 14:21반응형
Elucidating the Design Space of Diffusion-based Generative Models
- 현재의 diffusion-based generative model은 불필요하게 복잡함
- EDM
- Diffusion model에 대한 구체적인 design choice을 위한 명확한 design space를 제시
- 이를 위해 sampling, training process, score network의 pre-conditioning 등에 대한 다양한 변경 사항들을 identify 함
- 논문 (NeurIPS 2022) : Paper Link
1. Introduction
- Diffusion-based generative model은 conditional/unconditional 설정 모두에서 뛰어난 합성 성능을 보이고 있음
- 이러한 diffusion model에 대한 개선은 sampling schedule, training dynamics, noise level parameterization 등으로 다양하게 파생되어 있음
- 따라서 diffusion model에 대한 available design space를 파악하기 어렵고, 전체 system을 건들지 않고서는 개별적인 component를 쉽게 수정할 수 없음
-> 그래서 practical standpoint에서 diffusion model에 대한 여러 설계 관점을 분석
- EDM
- Taining, sampling 단계에서 나타나는 tanglible object와 algorithm에 집중하여 분석
- 이를 통해 각 component가 어떻게 연결되어 있는지, 전체 system 설계 시 어느 정도의 degree of freedom이 가능한지에 대한 insight를 얻는 것을 목표로 함
- 이때 neural network를 사용하여 Gaussian noise로 corrupt 된 training data를 noise-level dependent marginal distribution을 score로써 모델링하는 denoising score matching에 중점을 둠
- Diffusion model을 사용하여 image를 합성하는 sampling process에 대한 분석을 수행
- 가장 성능이 좋은 discretization 방법, high-order Runge-Kutta method, 다양한 sampler schedule, sampling process에서의 stochasticity의 유용성을 평가
- 해당 분석, 개선을 통해 얻어진 sampler를 활용하여 합성에 필요한 sampling step 수를 크게 줄임
- 가장 성능이 좋은 discretization 방법, high-order Runge-Kutta method, 다양한 sampler schedule, sampling process에서의 stochasticity의 유용성을 평가
- Score-modeling neural network의 training 관점에서 여러 설정들을 분석
- 일반적으로 사용되는 DDPM, NCSN을 기반으로 network input/output에 대한 pre-conditioning, diffusion model의 loss function 등을 평가하여 training dynamics를 개선할 수 있는 방법을 탐색
- 추가적으로 training 중 noise level에 대한 imporved distribution를 제안하고, non-leaking augmentation이 diffusion model에 유용하다는 것을 밝힘
- Taining, sampling 단계에서 나타나는 tanglible object와 algorithm에 집중하여 분석
< Overall of EDM >
- Diffusion model의 design space에 대한 종합적인 분석을 수행하여 성능을 개선할 수 있는 최적의 방안을 탐색
- 결과적으로 분석된 개선 방법을 적용하여 기존 diffusion model들보다 우수한 성능을 달성
2. Expressing Diffusion Models in a Common Framework
- 표준편차
를 갖는σdataσdata 로 data distribution를 나타내고, 표준편차pdata(x)pdata(x) 의σσ Gaussian noise를 data에 추가하여 얻어진 mollified distributioni.i.d.i.i.d. 가 있다고 하자p(x;σ)p(x;σ) 의 경우,σmax≫σdataσmax≫σdata 는 pure Gaussian noise와 practically indistinguishable 함p(x;σmax)p(x;σmax) - Diffusion model의 아이디어는, noise image
를 randomly sampling 한 다음, 각x0∼N(0,σ2maxI) 에서 noise levelxi∼p(xi;σi) 인 imageσ0=σmax>σ1>...>σN=0 로 sequentially denoise 하는 것xi
- 결과적으로 해당 process의 endpoint 은 data에 따라 distribute 됨xN - Score matching에서는 sample
가 time에 따라 변화할 때 desired distributionx 를 유지할 수 있는 Stochastic Differential Equation (SDE)를 활용함p
- 이를 통해 각 iteration에서 noise를 제거하고, 추가하는 stochastic solver를 활용하여 앞선 diffusion process를 구축할 수 있음 - 추가적으로 randomness의 source가 initial noise image
인 probability flow Ordinary Differential Equation (ODE)도 활용 가능함x0
- 논문에서는 해당 ODE에서 시작하여 sampling trajectory와 discretization 설정을 검토
- ODE Formulation
- Probability flow ODE는 timestep이 forward/backward로 이동할 때 image의 noise level을 continuously increase 하거나 reduce 함
- ODE를 공식화하기 위해서는, 먼저 time
에서 desired noise level을 define 하는 schedulet 를 choice 해야 함σ(t)
- e.g.) 로 설정하면 constant-speed heat diffusion에 해당하므로 mathmatically natural 함σ(t)∝√t
- BUT, 이때 schedule choice는 diffusion model에서 중요한 의미를 가지므로 단순한 theroretical convenience로써 choice 되어서는 안 됨 - Probability flow ODE의 defining characteristic은 sample
를 timexa∼p(xa;σ(ta)) 에서ta 로 진행했을 때, sampletb 를 산출한다는 것 (forward/backward 모두에서)xb∼p(xb;σ(tb)) - 이때 score matching에 따르면 아래 requirement를 만족함:
(Eq. 1)dx=−˙σ(t)σ(t)∇xlogp(x;σ(t))dt
- : time derivative˙σ
- : score function으로써, 주어진 noise level에서 더 높은 data density를 가리키는 vector field∇xlogp(x;σ) - 해당 ODE의 infinitesimal forward step은 noise level의 변화에 따라 sample을 data에서 멀리 떨어지게 함
- 반대로 backward step을 수행하면 sample은 data distribution으로 이동
- 이때 score matching에 따르면 아래 requirement를 만족함:
- ODE를 공식화하기 위해서는, 먼저 time
- Denoising Score Matching
- Score function은 densitiy function
의 intractable normalization constant에 의존하지 않는다는 property를 가짐p(x;σ) 가 아래와 같이 각D(x;σ) 에서σ 로부터 개별적으로 얻어진 sample들에 대해 expectedpdata denoising error를 최소화하는 denoiser function이라고 하면:L2
(Eq. 2)Ey∼pdataEn∼N(0,σ2I)||D(y+n;σ)−y||22
(Eq. 3)then∇xlogp(x;σ)=(D(x;σ)−x)/σ2
- : training image,y : noisen - 이때 score function은
의 signal에서 noise component를 isolate 하고, (Eq. 1)은 time에 따라 이를 amplify 하거나 diminish 함x
- 여기서 ideal 한 의 behavior는 아래 그림과 같이 나타남D - Diffusion model에서의 key observation은
가 (Eq. 2)에 따라 training 된 neural networkD(x;σ) 로 구현될 수 있다는 것임Dθ(x;σ)
- 이때 에는Dθ 를 적절한 dynamic range로 scaling 하는 것과 같은 pre-/post-processing step을 사용할 수 있음x

- Time-dependent Signal Scaling
- Additional scale schedule
를 도입하고s(t) 를 기존의 non-scaled variablex=s(t)ˆx 의 scaled version이라고 하자ˆx - 그러면 time에 따른 probability density가 변경되고 결과적으로 ODE solution trajectory도 변화함
- 이때 얻어지는 ODE는 (Eq. 1)의 generalization으로써:
(Eq. 4)dx=[˙s(t)s(t)x−s(t)2˙σ(t)σ(t)∇xlogp(xs(t);σ(t))]dt
- 의 definition을p(x;σ) 와 independent 하게 유지하기 위해, score function을 evaluating 할 때s(t) 의 scaling을 explicitly undo 함x
- Solution by Discretization
- ODE를 solve 하기 위해 (Eq. 3)을 (Eq. 4)로 substituting 하여 point-wise gradient를 정의하고, numerical integration을 사용하여 solution을 얻을 수 있음
- 즉, discrete time interval에 대해 finite step을 수행하는 것과 같음
- 이를 위해 discrete sampling time
에서 동작하는 Euler method, Runge-Kutta method 같은 integration method가 필요함{t0,t1,...,tN}
- 주로 사용되는 Euler method 보다 2nd order solver가 더 나은 computational trade-off를 제공하는 것으로 나타남
- Putting It Together
- 최종적으로 논문에서는 아래 [Table 1]과 같이 3가지의 기존 diffusion model들에 대해, deterministic variant를 위한 formula를 제시함
- 이러한 reframing의 목적은 기존 방법들에서 서로 복잡하게 얽혀있는 independent component를 찾아내는 것에 있음
- 결과적으로 논문에서 제시하는 EDM framework에는 각 component 간의 implicit dependency가 존재하지 않음
- 즉, 하나의 component를 변경할 때 모델의 수렴성을 위해 다른 component를 수정할 필요가 없음
- 실제로, 각 component에 대한 적절한 조합은 기존 방법들보다 더 잘 동작 가능함

3. Improvements to Deterministic Sampling
- Output quality의 향상과 sampling의 computational cost를 줄이는 것은 diffusion model에 대한 주요 개선 방향임
- 여기서 논문은 sampling process와 관련된 choice들이 network arhcitecture와 training detail과 같은 component들과 independent 하다고 가정함
- 즉, 에 대한 training procedure는Dθ 를 dictate 해서는 안됨σ(t),s(t),{ti}
- Sampler 측면에서 는 black box이기 때문Dθ - 따라서 논문은 3가지 pre-trained diffusion model에 대해 서로 다른 sampler를 evaluating 하여 해당 결과를 분석함
- 이때 기존 sampler 구현을 사용하여 각 모델에 대한 baseline result를 얻은 다음, 앞선 [Table 1]에서 제시된 formula들을 사용하여 해당 sampler들을 수정
- 이를 통해 다양한 choice들을 평가하여 diffusion model의 sampling process에 대한 general improvement를 제시함 - Comparisons
- DDPM++ const (VP) : DDPM을 기반으로 variance preserving (VP)를 적용
- NCSN++ const (VE) : SMLD를 기반으로 variance exploding (VE)를 적용
- DDIM : imporved DDPM을 활용하는 ADM (dropout) 모델 - Reults
- 아래 그림과 같이 Neural Function Evaluation (NFE)를 Frechet Inception Distance (FID)의 함수로 나타내어 합성된 image의 품질을 확인해 보면,
- Sampling process가 의 cost에 전적으로 좌우된다는 점을 고려하면 NFE의 향상은 sampling 속도의 향상으로 볼 수 있음Dθ
- 특히 기존 deterministic sampler에 비해 논문에서 수정된 sampler는 일관적으로 더 나은 결과를 보임
- 이때 기존 sampler 구현을 사용하여 각 모델에 대한 baseline result를 얻은 다음, 앞선 [Table 1]에서 제시된 formula들을 사용하여 해당 sampler들을 수정
- 여기서 논문은 sampling process와 관련된 choice들이 network arhcitecture와 training detail과 같은 component들과 independent 하다고 가정함

- Discretization and High-order Integrators
- ODE를 numerically solve 하는 것은 true solution trajectory를 따르는 approximation과 같음
- 이때 각 step에서 solver는
step에 걸쳐 누적되는 truncation error를 발생시키고, local error는 일반적으로 step size에 의해 super-linearly scale 되므로N 을 늘리면 solution의 accuracy가 향상됨N
- 일반적으로 사용되는 Euler method는 step size 에 대해h local error를 가지는 first-order ODE solver임O(h2)
- 반면 higher-order Runge-Kutta method는 더 유리하게 사용될 수 있지만, step 당 를 multiple evaluation 해야 함Dθ - 논문에서는 2nd-order Heun method가 diffusion model에서 truncation error와 NFE 간의 최적의 trade-off를 제공하는 것을 발견함
- 이를 위해 아래의 [Algorithm 1]과 같이
와ti 사이의ti+1 의 변화를 설명할 수 있는dx/dt 에 대한 additional correction step을 도입함xi+1 - 이러한 correction은 step 당
를 한 번 더 evaluation 하는 대신Dθ 의 local error를 발생시킴O(h3)
- 으로 stepping 하면 0으로 나누는 문제가 발생하므로, 해당 경우에는 Euler method로 revert 함σ=0
- 이를 위해 아래의 [Algorithm 1]과 같이
- Time step
는 step size와 truncation error가 서로 다른 noise level에서 어떻게 distribute 되는지를 결정함{ti} - 결과적으로
가 감소함에 따라 step size는 monotonically decrease 해야 하는 것으로 나타남σ - 논문에서는 time step이 noise level의 sequence
에 따라 정의되는 paramterized scheme을 활용함{σi}
- i.e.)ti=σ−1(σi) 라고 하고,σi<N=(Ai+B)ρ 이 되도록 constantσ0=σmax,σN−1=σmin 를 select하면:A,B
(Eq. 5)σi<N=(σmax1ρ+iN−1(σmin1ρ−σmax1ρ))ρ,andσN=0
- :ρ 근처의 longer step을 expense 하여σmax 근처의 step이 단축되도록 제어σmin
- 일 때는 각 step에서 truncation error가 거의 동일하지만,ρ=3 가 5~10일 때는 우수한 sampling 성능을 보임ρ
- 즉, 주변의 error가 큰 영향력을 가진다는 것을 의미하고, 논문에서는σmin 로 설정하여 사용함ρ=7
- 결과적으로
- Heun method에 기반한 (Eq. 5)를 sampler로 사용했을 때, 가장 낮은 NFE를 보이면서 Euler method와 동일한 FID를 얻을 수 있음
- 이때 각 step에서 solver는

- Trajectory Curvature and Noise Schedule
- ODE solution trajectory는 function
에 의해 정의되는데, 해당 function에 대한 choice는σ(t),s(t) 의 curvature에 비례하여 scale될 수 있으므로, truncation error를 줄일 수 있는 방법을 제공함dx/dt - 논문에서는 해당 function에 대한 최적의 choice를
로 제시σ(t)=t,s(t)=1
- 해당 choice를 통해 (Eq. 4)는 로 simplify 되고,dx/dt=(x−D(x;t))/t 와σ 는 서로 interchangeable 해짐t - 임의의
에서x,t 에 대한 single Euler step은 denoised imaget=0 를 생성하므로, solution trajectory의 접선은 항상 denoiser output을 향함Dθ(x;t) - 즉, linear solution trajectory에 해당하는 noise level에 따라 천천히 변화한다고 볼 수 있고, 실제로 아래 그림에서 (c)의 1D ODE는 이러한 효과를 나타냄
- 마찬가지로 (b)의 real data에서도 동일한 결과를 확인할 수 있음
- 여기서 서로 다른 denoiser target 간의 변화는 상대적으로 좁은 range에서 발생함σ
- 이는 advocated schedule에 따라 ODE curvature가 동일한 range로 제한되는 것과 일치한다고 볼 수 있음
- 논문에서는 해당 function에 대한 최적의 choice를

- Discussion
- Deterministic sampling을 개선하기 위해 논문에서 제시한 방법들은 앞선 [Table 1]의 sampling 부분과 같음
- 이를 적용해 보면 VP에서 7.3배, VE에서 300배, DDIM에서 3.2배의 NFE를 개선하여 가속효과를 얻을 수 있음
- 실제로 single NVIDIA V100에서 초당 26.3개의 CIFAR-10 image를 생성 가능함 - 이러한 결과는 sampling process가 각 모델이 train 된 방식과 orthogonal 하다는 논문의 가정과 일치함
- 이를 적용해 보면 VP에서 7.3배, VE에서 300배, DDIM에서 3.2배의 NFE를 개선하여 가속효과를 얻을 수 있음
4. Stochastic Sampling
- Deterministic sampling은 ODE를 inverting 하여 실제 image를 latent representation으로 변환하는 기능을 제공함
- BUT, ODE는 각 step에서 image에 noise를 inject 하는 stochastic sampling보다 output 품질이 떨어지는 경향이 있음
- 따라서 ODE와 SDE가 이론적으로는 동일한 distribution을 recover 한다는 점을 고려했을 때, stochasticity의 역할을 정확히 파악할 필요가 있음
- Background
- 먼저 SDE는 (Eq. 1)의 probability flow ODE와 time-varying Langevin diffusion SDE의 합으로 generalize 됨:
(Eq. 6)dx±=−˙σ(t)σ(t)∇xlogp(x;σ(t))dta⏟probability flow ODE(Eq. 1)±β(t)σ(t)2∇xlogp(x;σ(t))dt⏟deterministic noise decay+√2β(t)σ(t)dωt⏟noise injection⏟Langevin diffusion SDE
- : standard Wiener process,ωt : Anderson의 time reversal formula와 관련하여, time을 forward/backward로 이동시키는 SDEdx+,dx−
- Langevin term은 deterministic score-based denoising term과 stochastic noise injection term의 합으로 구성됨
- 는 기존 noise가 새로운 noise로 replace 되는 relative rate를 나타냄β(t)
- SDE에서는 를 사용하여 forward process에서 score를 vanish시킴β(t)=˙σ(t)/σ(t) - Implicit Langevin diffusion은 주어진 time에서 desired marginal distribution으로 sample을 drive 하여 이전 sampling step들에서 발생하는 error를 수정함
- 이때 discrete ODE solver를 사용하여 Langevin term을 근사하면, 그 자체로 error가 발생함
- 한편으로 non-zero
를 사용하는 방법이 제시되긴 했지만, 일반적으로 score-matching에서β(t) 에 대한 implicit choice를 활용할 수 있는 special property는 존재하지 않음β(t)
- 따라서 최적의 stochasticity는 empirically determine 되어야 함
- Stochastic Sampler
- EDM은 2nd order deterministic ODE integrator와 noise 추가/제거에 대한 explicit Langevin-like churn을 결합한 stochastic sampler를 제안함 (아래 [Algorithm 2])
- 각 step
에서 noise leveli (ti )의 sample=σ(ti) 가 주어지면, 다음의 두 sub-step을 수행함xi - 먼저 higher noise level
에 reach 하기 위해 factorˆti=ti+γiti 에 따라 sample에 noise를 추가함γi≥0 - 이후 increased-noise sample
에서 single step으로ˆxi 에서ˆti 까지의 backward ODE를 solve 함ti+1
- 이는 noise level 에서 sampleti+1 을 생성함xi+1
- 먼저 higher noise level
- 해당 방식과 Euler-Maruyama 간의 주요한 차이점을 알아보면,
- (Eq. 6)을 discretize 할 때, Euler-Maruyama는 noise injection 이후 intermediate state가 아니라 iteration step 시작 시
가 initial state로 유지된다고 가정함x,σ
- 따라서 먼저 noise를 추가하고 ODE step을 수행하는 것으로 볼 수 있음 - 반면 논문에서 제안하는 EDM의 sampler는 [Algorithm 2]의 7행에서
를 evaluate 하는 데 사용된 parameter가 noise injection 이후의 state를 나타냄Dθ
- 이때 Euler-Maruyama-like method는 대신에xi;ti 를 사용함ˆxi;ˆti - 결과적으로 0에 approaching 하는
의 극한에서는 해당 choice 간의 차이가 없을 수 있지만, large step에서 낮은 NFE를 원하는 경우 그 차이는 커질 수 있음Δt
- (Eq. 6)을 discretize 할 때, Euler-Maruyama는 noise injection 이후 intermediate state가 아니라 iteration step 시작 시
- 각 step

- Practical Considerations
- Stochasticity의 양을 늘리는 것은 이전 sampling step에서 발생한 error를 수정하는데 효과적임
- BUT, 아래와 같은 몇 가지 단점이 있음
- 먼저 과도한 Langevin-like noise 추가/제거로 인해 모든 dataset와 denoiser network를 사용하여 얻어진 image의 detail이 손상되는 것으로 나타남
- 특히 매우 낮거나 높은 noise level에서는 color가 oversaturate 되는 경향이 나타남
- 이는 practical denoiser가 (Eq. 3)에서 slightly non-conservative vector field를 유도하여 Langevin diffusion의 premise를 violating 하기 때문 - 실제로 analytical denoiser를 사용하는 경우 위와 같은 degradation이 나타나지 않음
- Degradation이
로 인해 발생하는 경우, sampling 중에 heuristic 한 방법을 통해서만 해결할 수 있음Dθ(x;σ)
- 따라서 specific range의 noise level 내에서만 stochasticity를 enabling 하여 oversaturated color로의 drift를 방지함ti∈[Stmin,Stmax] - 먼저 해당 noise level에 대해
을 정의하자γi=Schurn/N - 여기서
은 stochasticity의 양을 제어하고, image에 이미 존재하는 것보다 더 많은 nosise가 발생하지 않도록Schurn 를 clamp 함γi - 이때
를 1보다 약간 크게 설정하여 새로 더해진 noise에 대한 표준편차를 inflate 하여 detail의 손상을 방지할 수 있음Snoise
- 이는 에 대한 non-conservativity 가정의 주요 component가 많은 noise를 제거하려는 경향이 있기 때문Dθ(x;σ)
- 즉, -trained denoiser로 인해 평균으로의 회귀가 발생할 가능성이 높음L2
- 여기서
- BUT, 아래와 같은 몇 가지 단점이 있음
- Evaluation
- 아래 그림과 같이 제안된 stochastic sampler는 low step count에서 기존 sampler보다 우수한 성능을 보임
- 결과적으로 이러한 sampler 수정만으로 FID 2.07을 달성한 기존 ImageNet-64 model을 1.55로 크게 개선함
- 한편으로 stochasticity로 인해 최적의 결과를 얻기 위해서는 implict/explicit 한 heuristic choice가 항상 요구된다는 한계가 있음
- 따라서 논문에서는 grid search를 사용하여 case-by-case로 의 최적 값을 탐색{Schurn,Stmin,Stmax,Snoise}

5. Pre-conditioning and Training
를 모델링하기 위해 neural network를 직접 training 하는 것은 ideal 하지 않음D - Input
은 clean signalx=y+n 와 noisey 의 combination이므로 magnitude는 noise leveln∼N(0,σ2I) 에 따라 크게 달라질 수 있기 때문σ
- 따라서 를 neural network로 직접 나타내지 않고, 대신Dθ 에서 파생되는 다른 networkDθ 를 training 함Fθ - 기존에는
-dependent normalization factor를 통해 input scaling을 처리하고 unit variance로 scale 된σ 을 예측하기 위해n 를 training 하여 output을 pre-conditioning 함Fθ
- 여기서 signal은 을 통해 reconstruct 됨Dθ(x;σ)=x−σFθ(⋅) - 이러한 방식은 large
에서 noiseσ 을 정확하게 cancel out 하고 correct scale로 output을 제공하기 위해 fine-tuning이 필요함n - 이때 network에서 발생하는 모든 error는
의 factor 만큼 amplify 되므로, expected outputσ 를 직접 예측하는 것이 더 쉬울 수 있음D(x;σ) - 따라서 기존의 parameterization과 동일하게, 논문에서는
나y 을 추정할 수 있는n -dependent skip connection으로써 neural network를 pre-conditioning 함σ - 결과적으로
는 다음과 같이 나타낼 수 있음:Dθ
(Eq. 7)Dθ(x;σ)=cskip(σ)x+coutFθ(cin(σ)x;cnoise(σ))
- : train 할 neural network,Fθ : skip connection에 대한 modulatecskip(σ)
- : input/output magnitude,cin(σ),cout(σ) : noise levelcnoise(σ) 를σ 에 대한 condition으로 mappingFθ
- 이때 network에서 발생하는 모든 error는
- Noise level에 대해 (Eq. 2)의 weighted expectation을 취하면 overall training loss
을 얻을 수 있음Eσ,y,n[λ(σ)||D(y+n;σ)−y||22]
-σ∼ptrain,y∼pdata,n∼N(0,σ2I)
- 여기서 주어진 noise level 를 sampling 할 확률은σ 로 주어지고, 해당 weight는ptrain(σ) 로 주어짐λ(σ) - (Eq. 7)에서 raw network output
에 대해 해당 loss를 equivalent 하게 나타낼 수 있음:Fθ
(Eq. 8)Eσ,y,n[λ(σ)cout(σ)2⏟effective weight||Fθ(cin(σ)⋅(y+n);cnoise(σ))⏟network output−1cout(σ)(y−cskip(σ)⋅(y+n))⏟effective training target||22]
- 이는 의 effective training target을 나타내므로 pre-conditioning function에 대한 적절한 choice를 결정할 수 있음Fθ
- 결과적으로 network input과 training target에 unit variance 을 사용하고,(cin,cout) 을 통해cskip) 의 error를 가능한 적게 amplifiying 하여 [Table 1]의 결과를 도출함Fθ
- 에 대한 formula는 empirically chosen 됨cnoise - 아래의 표는 앞선 deterministic sampler를 사용하여 얻어진 FID 결과를 보여줌
- 실제로 기존 설정인
을 pre-condition로 대체하면 (config D),{cin,cout,cnoise,cskip} resolution에서 향상되는 결과를 보여주는 VE를 제외하고 FID가 크게 변하지 않고 유지되는 것으로 나타남64×64 - 즉, pre-conditioning은 FID를 직접적으로 개선하는 대신, training 과정을 robust 하게 만들어 loss function을 효과적으로 redesign 하는데 도움을 줌
- 실제로 기존 설정인
- Input

- Loss Weighting and Sampling
- (Eq. 8)은 (Eq. 7)의 pre-condition에 따라
를 training하면Fθ 의 weight로 effective per-sample loss가 발생하는 것을 나타냄λ(σ)cout(σ)2 - Effective loss weight를 balance 하기 위해,
로 설정함λ(σ)=1/c2out
- 이는 아래 그림의 (a)와 같이, 전체 range에 대한 initial training loss도 equalize 함σ - 추가적으로 training 중 noise level을 choice 하는
도 선택되어야 함ptrain(σ)
- Training 이후 per- loss를 확인해 보면, intermediate noise level에서만 상당한 reduction이 나타남σ
- 매우 낮은 level에서는 vanishingly small noise component를 discern 하기가 어렵고, 매우 높은 level에서는 training objective가 dataset average의 정답과 항상 dissimilar 함 - 따라서 논문은 [Table 1]과 같이
에 대한 simple log-normal distribution을 사용함ptrain(σ)
- 결과적으로 위의 표와 같이, 제안한 과ptrain (config E)를 pre-conditioning (config D)와 함께 사용했을 때, 모든 경우에서 FID의 상당한 개선으로 이어짐λ
- Effective loss weight를 balance 하기 위해,
- Augmentation Regularization
- 작은 dataset으로 diffusion model에 대한 potential overfitting을 방지하기 위해, augmentation pipeline을 활용함
- 해당 pipeline은 noise injection 이전에 training image에 대해 다양한 geometric transformation을 반영함
- 여기서 생성된 image에 augmentation이 누출되지 않도록
에 대한 conditioning input으로 augmentation parameter를 제공함Fθ
- 추론 시에는 non-augmented image만 생성되도록 해당 parameter를 0으로 설정함 - 결과적으로 위의 표와 같이 unconditional CIFAR-10에 대해 1.79, 1.97 FID의 우수한 성능을 달성함
- Stochastic Sampling Revisited
- 아래 그림의 (b), (c)와 같이 stochastic sampling과의 연관성은 모델 자체가 개선됨에 따라 감소하는 것으로 나타남
- 실제로 training 단계에서는 (b)의 결과와 같이 deterministic sampling으로 가장 우수한 결과를 얻었음
- 반면 CIFAR-10에서 stochastic sampling은 training 단계에서 좋지 않을 수 있음

- ImageNet-64
- 최종적으로 제안된 training improvement를 사용하여 class-conditional ImageNet-64 모델을 scratch로 training 해보면
- 이때 ADM architecture를 기반으로 (config E)를 사용하여 training 함
- 결과적으로 얻어진 모델은 기존의 1.48 FID 보다 우수한 1.38 FID를 달성
- 특히, 앞선 CIFAR-10의 결과와 달리 ImageNet에서는 stochastic sampling이 deterministic sampling보다 우수한 성능을 보임
반응형