00:00:00

Share Your Feedback 🏝️

Guiding a Diffusion Model

Guiding a Diffusion Model

MinWoo(Daniel) Park | Tech Blog

Read more
Previous: Evaluation | KorNAT Next: Meta Contextual Position Encoding

Guiding a Diffusion Model

  • Related Project: Private
  • Category: Paper Review
  • Date: 2024-06-05

Guiding a Diffusion Model with a Bad Version of Itself

  • url: https://arxiv.org/abs/2406.02507
  • pdf: https://arxiv.org/pdf/2406.02507
  • html https://arxiv.org/html/2406.02507v1
  • abstract: The primary axes of interest in image-generating diffusion models are image quality, the amount of variation in the results, and how well the results align with a given condition, e.g., a class label or a text prompt. The popular classifier-free guidance approach uses an unconditional model to guide a conditional model, leading to simultaneously better prompt alignment and higher-quality images at the cost of reduced variation. These effects seem inherently entangled, and thus hard to control. We make the surprising observation that it is possible to obtain disentangled control over image quality without compromising the amount of variation by guiding generation using a smaller, less-trained version of the model itself rather than an unconditional model. This leads to significant improvements in ImageNet generation, setting record FIDs of 1.01 for 64x64 and 1.25 for 512x512, using publicly available networks. Furthermore, the method is also applicable to unconditional diffusion models, drastically improving their quality.

Contents

TL;DR


  • 기존의 확산 모델은 조건부 및 비조건부 생성에서 특정 분포를 따르지 못하고, 과도하게 단순화된 이미지를 생성하는 문제가 있습니다.
  • 이 연구에서는 기존 모델의 한계를 극복하기 위해 ‘autoguidance’라는 새로운 기법을 제안합니다. 이 방법은 모델의 용량이나 훈련 시간을 제한함으로써 이미지의 질을 향상시킵니다.
  • 이 방법은 조건부 및 비조건부 생성 모두에서 이미지의 품질을 향상시키고, FID 및 기타 메트릭스에서 새로운 기록을 세울 수 있습니다.

[확산 모델의 기본 개념]

확산 모델은 노이즈가 가득한 데이터로부터 점진적으로 노이즈를 제거하며 이미지를 생성하는 과정을 수학적으로 모델링합니다. 이 과정은 주로 다음 두 가지 방정식을 이용하여 설명됩니다.

  1. 확률적 미분 방정식(Stochastic Differential Equation, SDE)

    \(dx_{\sigma} = -\sigma \nabla_{x_{\sigma}} \log p(x_{\sigma}; \sigma) d\sigma\)
    이 방정식은 $\sigma$의 감소에 따라 $x_{\sigma}$가 점점 원본 데이터 분포에 가까워지게 합니다.

  2. 점수 함수(Score Function)

    \(\theta = \arg\min_{\theta} \mathbb{E}_{y \sim p_{\text{data}}, \sigma \sim p_{\text{train}}, n \sim N(0, \sigma^2I)} \|D_{\theta}(y + n; \sigma) - y\|^2_2\)
    이는 신경망이 노이즈이 추가된 데이터로부터 원본 데이터를 복원하도록 훈련하는 과정입니다.


분류자-자유 유도 (Classifier-Free Guidance, CFG)

CFG는 생성 과정에서 고질적인 편향을 유발하여 이미지의 다양성을 감소시킬 수 있습니다. CFG는 높은 확률 영역에서의 생성을 강화하여 이미지의 질을 개선합니다. CFG는 두 개의 네트워크, 조건부 $D_1(x; \sigma, c)$와 비조건부 $D_0(x; \sigma)$를 사용하여 아래와 같은 가중치 조합을 통해 이미지를 생성합니다.

\[D_w(x; \sigma, c) = wD_1(x; \sigma, c) + (1 - w)D_0(x; \sigma, c)\]


[Autoguidance 방법]

  • 기존 문제의 극복

    Autoguidance는 CFG의 제한을 극복하고자, 본 모델의 열등 버전을 이용해 유도하고, 모델의 용량이나 훈련 시간을 의도적으로 제한해 보다 높은 질의 이미지 생성을 가능하게 합니다.

  • 기술적 구현

    본 연구에서는 이미지넷-512와 같은 데이터셋에 대하여 실험을 진행했으며, 여러가지 하이퍼파라미터와 모델의 설정을 조정하여 최적의 결과를 도출했습니다. Autoguidance는 FID(Fréchet Inception Distance)를 개선하며, 이전의 CFG 방법보다 우수한 성능을 보여줍니다.


[결론 및 향후 연구]

Autoguidance는 확산 모델을 이용한 이미지 생성에서의 패러다임을 제시합니다. 이 연구는 CFG의 한계를 극복하고, 조건부 및 비조건부 생성에서 모두 높은 품질의 이미지를 생성할 수 있는 방법을 탐구하였습니다. 향후 연구에서는 이 방법의 다양한 응용 가능성을 탐구하고, 더욱 정교한 모델 구조와 학습 알고리즘 개발에 초점을 맞출 예정이라고 합니다.

Previous: Evaluation | KorNAT Next: Meta Contextual Position Encoding

post contain ""

    No matching posts found containing ""