[Paper Review] All are Worth Words: A ViT Backbone for Diffusion Models
This paper proposes U-ViT, a vision transformer (ViT)-based backbone for diffusion models that treats time, condition, and noisy image patches as tokens and employs long skip connections between shallow and deep layers. U-ViT achieves state-of-the-art FID scores of 2.29 on ImageNet 256×256 class-conditional generation and 5.48 on MS-COCO text-to-image generation, demonstrating that ViT backbones with skip connections can outperform CNN-based U-Nets without requiring down/up-sampling operations.
Vision transformers (ViT) have shown promise in various vision tasks while the U-Net based on a convolutional neural network (CNN) remains dominant in diffusion models. We design a simple and general ViT-based architecture (named U-ViT) for image generation with diffusion models. U-ViT is characterized by treating all inputs including the time, condition and noisy image patches as tokens and employing long skip connections between shallow and deep layers. We evaluate U-ViT in unconditional and class-conditional image generation, as well as text-to-image generation tasks, where U-ViT is comparable if not superior to a CNN-based U-Net of a similar size. In particular, latent diffusion models with U-ViT achieve record-breaking FID scores of 2.29 in class-conditional image generation on ImageNet 256x256, and 5.48 in text-to-image generation on MS-COCO, among methods without accessing large external datasets during the training of generative models. Our results suggest that, for diffusion-based image modeling, the long skip connection is crucial while the down-sampling and up-sampling operators in CNN-based U-Net are not always necessary. We believe that U-ViT can provide insights for future research on backbones in diffusion models and benefit generative modeling on large scale cross-modality datasets.
Motivation & Objective
- To investigate whether vision transformers (ViT) can effectively replace CNN-based U-Net backbones in diffusion models.
- To evaluate the necessity of down-sampling and up-sampling operations in U-Net architectures for diffusion-based image generation.
- To determine the impact of long skip connections in ViT-based diffusion model backbones.
- To achieve state-of-the-art performance in unconditional, class-conditional, and text-to-image generation tasks using a simple ViT-based architecture.
Proposed method
- U-ViT treats all inputs—noisy image patches, time step embeddings, and condition embeddings—as tokens, enabling a unified token-based input representation.
- The model employs long skip connections between shallow and deep layers to preserve low-level features crucial for pixel-level reconstruction in diffusion models.
- It uses a standard ViT transformer encoder with class token and positional embeddings, followed by a decoder head with learned positional encodings.
- An optional 3×3 convolutional block is added before the final output to enhance visual quality.
- The architecture is applied in both pixel-space and latent-space diffusion models, with training using a noise prediction objective.
- The model is evaluated across multiple benchmarks: CIFAR-10, ImageNet 256×256, ImageNet 512×512, and MS-COCO, using FID and other metrics.
Experimental results
Research questions
- RQ1Can a vision transformer backbone replace the CNN-based U-Net in diffusion models without sacrificing performance?
- RQ2Is the down-sampling and up-sampling mechanism in U-Net essential for high-quality image generation in diffusion models?
- RQ3How critical are long skip connections in ViT-based diffusion model backbones compared to standard ViT architectures?
- RQ4Can a ViT-based architecture achieve state-of-the-art performance in text-to-image and class-conditional image generation without relying on large external datasets?
Key findings
- U-ViT achieves a state-of-the-art FID score of 2.29 on class-conditional ImageNet 256×256 generation, outperforming all prior methods without access to large external datasets.
- In text-to-image generation on MS-COCO, U-ViT-S (Deep) achieves a new SOTA FID of 5.48, demonstrating superior semantic alignment and image quality.
- U-ViT outperforms a CNN-based U-Net of similar size and FLOPs in both unconditional and conditional image generation tasks.
- Ablation studies confirm that long skip connections are crucial for performance, while down/up-sampling operations in U-Net are not always necessary for high-quality generation.
- U-ViT generates more semantically accurate samples than U-Net, especially in text-to-image generation, where it better captures objects like bats and balls from prompts.
- The model maintains strong performance across different sampling steps and metrics, including inception score, precision, and recall, indicating robust and high-quality generation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.