TL;DR
This paper introduces USP, a novel self-supervised pretraining framework that initializes diffusion models using masked latent modeling within a VAE's latent space. USP achieves comparable or better performance on downstream understanding tasks while significantly accelerating convergence and improving generation quality in diffusion models, all without additional training cost or memory overhead.
What Problem Does This Paper Address?
The paper tackles the challenge of effectively pretraining models for both image generation and understanding tasks simultaneously. While the pretraining-finetuning paradigm has been highly successful in image recognition, applying it to generative models like diffusion models is complicated by several factors:
- Input Mismatch: Image recognition models typically process clean images, whereas diffusion models inherently deal with noisy inputs.
- Architecture Mismatch: Modern generative models often use latent diffusion models with Variational Autoencoders (VAEs), while VAEs are less common in standard vision understanding architectures. Furthermore, Vision Transformer (ViT) architectures, popular in recognition, are modified for diffusion models.
- Divergent Loss Functions and Labels: Image recognition and generation tasks often use different loss functions and label formats, making unified training difficult.
Existing methods like REPA [97] attempt to align diffusion model representations with off-the-shelf pretrained models but require substantial computational resources and external teacher backbones, increasing GPU memory and reducing training speed. The authors aim to bridge this gap with a simpler, unified approach.
Methods
USP proposes a two-step strategy:
- Latent Space Pretraining: Images are first encoded into a latent space using a frozen, off-the-shelf VAE (specifically, SD-VAE [71] is mentioned).
- Masked Latent Modeling: Within this VAE latent space, a masked latent modeling (MLM) approach is employed. A subset of latent patches is randomly masked, and a standard ViT encoder processes the unmasked patches. A decoder then reconstructs the masked patches. This MLM objective is designed to learn robust representations without requiring labeled data or task-specific losses, making it efficient and fast.
The pretrained ViT encoder and a "PatchConv" module are then used to initialize downstream tasks. The decoder is discarded after pretraining. The authors also carefully adapt the normalization layers (AdaLN-Zero) and positional embeddings to ensure seamless integration of pretrained weights into diffusion models like DiT and SiT.
Datasets
- Training: The paper mentions using large-scale datasets for pretraining, similar to those used in image recognition. Specific details on the pretraining dataset size are not explicitly stated, but the context implies large image datasets.
- Evaluation:
- Image Generation: ImageNet (256x256 resolution) is used for evaluating generation quality.
- Image Understanding: ImageNet-1k is used for classification (Top-1 accuracy and linear probe accuracy), and ADE20K is used for semantic segmentation (mIoU).
Key Insights and Ideas
- Latent Space is Key: By operating in the VAE's latent space, USP sidesteps the input mismatch between clean and noisy images inherent in diffusion models.
- Masked Latent Modeling for Robustness: MLM in the latent space proves to be an effective unsupervised strategy for learning discriminative representations beneficial for both generation and understanding.
- Unified Pretraining: The framework successfully unifies pretraining for both image generation and recognition tasks, demonstrating that a single pretraining paradigm can benefit multiple downstream applications.
- Efficiency Gains: USP achieves significant speedups in training diffusion models without requiring additional computational resources or memory overhead for downstream tasks.
- Orthogonality: USP is shown to be orthogonal to other acceleration methods like REPA and VAVAE, meaning it can be combined with them for even greater improvements.
Key Results
- Image Generation:
- USP significantly improves performance across various DiT model sizes. For DiT-B/2, it achieves an FID of 24.18 after 1M training steps, outperforming the baseline by 31.26.
- Achieves 11.7x faster convergence on DiT-XL/2 and 46.6x faster convergence on SiT-XL/2 compared to vanilla DiT/SiT.
- Image Understanding:
- Classification (ImageNet-1k): USP achieves comparable fine-tuning performance and significant improvements in linear classification accuracy compared to MAE. For ViT-Large, USP achieves 84.8% SFT Acc and 74.5% LP Acc, slightly outperforming ViT-Large-MAE.
- Semantic Segmentation (ADE20K): USP outperforms MAE by about 0.5% mIoU.
- Training Cost: USP achieves a threshold FID of 9.6 using approximately 15% and 5% fewer computational resources than the original DiT and REPA, respectively.
Limitations and Future Work
- VAE Choice: The paper notes that the choice of VAE can impact performance, with some VAEs (like SD-VAE) potentially having limited feature compression and reconstruction capabilities, which can affect downstream understanding tasks. Replacing it with a VAE with stronger reconstruction (from [51]) improved performance.
- Layer Normalization Adaptation: While the authors adapt LayerNorm, they acknowledge that further investigation into optimal adaptation strategies for LayerNorm parameters could be beneficial.
- Future Work: The authors suggest that their approach serves as a potent baseline for future research in unified pretraining for generative and understanding tasks. They also highlight the potential for further exploration of different VAE architectures and more sophisticated adaptation strategies for network components. The paper also implies that the pretraining cost can be further amortized across multiple downstream tasks, suggesting a direction for future exploration of multi-task learning.
Summary updated