Skip to main content
QUICK REVIEW

[논문 리뷰] DiM: Diffusion Mamba for Efficient High-Resolution Image Synthesis

Yao Teng, Yue Wu|arXiv (Cornell University)|2024. 05. 23.
Medical Image Segmentation TechniquesComputer Science인용 수 3
한 줄 요약

이 논문은 상태공간모델을 활용하여 트랜스포머의 제곱형 복잡도를 극복함으로써 효율적인 고해상도 이미지 생성을 위한 새로운 Mamba 기반 백본인 Diffusion Mamba (DiM)를 제안한다. 다중 방향 스캔, 학습 가능한 패딩 토큰, 국소적 특징 강화를 도입함으로써 DiM는 FLOPs를 크게 감소시키면서도 이미지넷 512×512에서 SOTA 수준의 FID 점수(2.40)를 달성하였으며, 훈련 없이도 1536×1536 해상도로의 업샘플링을 가능하게 한다.

ABSTRACT

Diffusion models have achieved great success in image generation, with the backbone evolving from U-Net to Vision Transformers. However, the computational cost of Transformers is quadratic to the number of tokens, leading to significant challenges when dealing with high-resolution images. In this work, we propose Diffusion Mamba (DiM), which combines the efficiency of Mamba, a sequence model based on State Space Models (SSM), with the expressive power of diffusion models for efficient high-resolution image synthesis. To address the challenge that Mamba cannot generalize to 2D signals, we make several architecture designs including multi-directional scans, learnable padding tokens at the end of each row and column, and lightweight local feature enhancement. Our DiM architecture achieves inference-time efficiency for high-resolution images. In addition, to further improve training efficiency for high-resolution image generation with DiM, we investigate "weak-to-strong" training strategy that pretrains DiM on low-resolution images ($256 imes 256$) and then finetune it on high-resolution images ($512 imes 512$). We further explore training-free upsampling strategies to enable the model to generate higher-resolution images (e.g., $1024 imes 1024$ and $1536 imes 1536$) without further fine-tuning. Experiments demonstrate the effectiveness and efficiency of our DiM. The code of our work is available here: {\url{https://github.com/tyshiwo1/DiM-DiffusionMamba/}}.

연구 동기 및 목표

  • 고해상도 이미지 생성에서 트랜스포머 기반 확산 모델의 높은 계산 비용을 해결하기 위해.
  • 선형 복잡도를 가지는 시퀀스 모델인 Mamba를 1D 순차 모델 설계에 맞춰 2D 이미지 데이터에 적응시키기 위해.
  • 약한-강한 미세조정 전략을 제안함으로써 고해상도 이미지 생성의 훈련 효율성을 향상시키기 위해.
  • 미세조정된 해상도를 초월한 고해상도 이미지 생성을 훈련 없이 가능하게 하기 위해 훈련 없이 업샘플링 기법을 활용하기 위해.

제안 방법

  • 행 우선, 열 우선, 그리고 역순 스캔를 포함한 다중 방향 스캔를 활용하여 2D 이미지 토큰에 Mamba를 적응시켜 전역 수용 영역를 제공한다.
  • 공간적으로는 인접하지만 순서상으로는 끊어진 토큰들(예: 한 행의 끝과 다음 행의 시작 사이) 간에 학습 가능한 패딩 토큰을 도입하여 공간 연속성을 유지한다.
  • 입력 및 출력 헤드에 경량 3×3 디프스와이즈 컨벌루션 레이어를 통합하여 국소적 특징 일관성을 향상시킨다.
  • 얕은 층과 깊은 층 사이에 장거리 skip connection을 적용하여 확산 노이즈 제거 과정에서 픽셀 수준 재구성 성능을 향상시킨다.
  • 약한-강한 훈련 전략을 구현: 256×256 이미지에서 사전 훈련하고 512×512 이미지에서 미세조정하여 훈련 비용을 감소시킨다.
  • 훈련 없이 업샘플링을 탐색: 512×512에서 미세조정한 후 모델의 일반화 능력을 활용하여 추가 조정 없이 직접 1024×1024 및 1536×1536에서 생성 가능하게 한다.
Figure 1 : The images generated by our model trained on ImageNet. The resolutions are $1024\times 1024$ , $512\times 512$ and $256\times 256$ . The classifier-free guidance weight is set to 4.0.
Figure 1 : The images generated by our model trained on ImageNet. The resolutions are $1024\times 1024$ , $512\times 512$ and $256\times 256$ . The classifier-free guidance weight is set to 4.0.

실험 결과

연구 질문

  • RQ1선형 복잡도를 가지는 시퀀스 모델인 Mamba가 고해상도 이미지 생성을 위한 확산 모델에서 트랜스포머를 효과적으로 대체할 수 있는가?
  • RQ2Mamba의 1D 인과 모델링 방식을 어떻게 적응시켜 이미지 토큰의 2D 공간 구조를 유지할 수 있는가?
  • RQ3'약한-강한' 미세조정 전략이 고해상도 확산 모델의 훈련 비용을 크게 감소시키는가?
  • RQ4훈련 없이 업샘플링을 통해 DiM가 추가 조정 없이도 고해상도 이미지(예: 1024×1024 및 1536×1536)를 생성할 수 있는가?
  • RQ5다양한 아키텍처 구성요소(예: 다중 스캔, 패딩 토큰, 국소적 컨벌루션) 중에서 성능과 안정성에 가장 기여하는 것은 무엇인가?

주요 결과

  • DiM-Huge는 단지 31900만 개의 훈련 샘플만을 사용하여 이미지넷 512×512에서 FID 점수 2.40을 달성하였으며, U-ViT와 유사한 성능을 내었고, 데이터량을 37% 줄였다.
  • 1500만 개의 512×512 이미지(3% of U-ViT의 데이터)를 사용하여 DiM-Huge는 FID-50K 3.94를 달성하여 높은 데이터 효율성을 입증하였다.
  • 다중 방향 스캔 전략(4개 방향)이 가장 뛰어난 성능을 보였으며, 단일 방향 스캔 대비 FID를 1.48점 감소시켰다.
  • 제거 분석 결과, 다중 스캔 방향이 성능 향상에 가장 기여하며, 그 다음으로 장거리 스킵 커넥션과 패딩 토큰이 영향을 미쳤다.
  • DiM는 512×512에서 미세조정된 모델을 기반으로 훈련 없이 업샘플링을 통해 직접 1024×1024 및 1536×1536 해상도의 시각적으로 타당한 이미지를 생성하였다.
  • DiM-Small는 파rameter 수가 유사한 다른 모델들을 능가하여 CIFAR-10에서 FID 2.92를 기록하였으며, 스케일에 따른 강력한 성능을 확인하였다.
Figure 2 : Overview. The inputs of our framework is a noisy image/latent, with a timestep and a class condition. The noisy inputs are transformed into patch-wise features, processed by a depth-wise convolution, and appended with time, class, and padding tokens. The features are flattened and scanned
Figure 2 : Overview. The inputs of our framework is a noisy image/latent, with a timestep and a class condition. The noisy inputs are transformed into patch-wise features, processed by a depth-wise convolution, and appended with time, class, and padding tokens. The features are flattened and scanned

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.