TL;DR
This paper introduces SD-DiT, a novel approach to accelerate the training of Diffusion Transformers (DiTs) for image generation. By decoupling the encoder and decoder and leveraging self-supervised discrimination between "teacher" and "student" noisy image views, SD-DiT achieves faster training and competitive generative quality compared to existing methods.
What Problem Does This Paper Address?
Diffusion Transformers (DiTs) have shown great promise in image generation, but they suffer from slow convergence and high computational costs during training. Existing methods to speed up training, like "mask strategy," which involves reconstructing masked image patches, introduce a discrepancy between training and inference and can lead to a fuzzy relationship between the reconstruction task and the primary generative task, ultimately hindering optimal performance. SD-DiT aims to overcome these limitations by introducing a more effective self-supervised learning approach.
Methods
SD-DiT frames the training process as a teacher-student learning problem. The core idea is to use self-supervised discrimination to guide the DiT's learning.
- Decoupled Encoder-Decoder: Unlike previous methods that jointly train the encoder and decoder for both reconstruction and generation, SD-DiT separates these roles. The encoder is responsible for learning discriminative features, while the decoder focuses solely on the generative task.
- Teacher-Student Discrimination: Discriminative pairs are created by taking an original image and generating two noisy versions: a "student" view with regular noise and a "teacher" view with minimal noise (closer to the original data distribution). These pairs are fed into separate teacher and student DiT encoders.
- Inter-Image Alignment: A novel discriminative loss is introduced to encourage the encoded representations of the visible patches from the teacher and student encoders to align in a shared embedding space. This promotes learning robust, invariant features.
- Generative Objective: The student DiT decoder then uses the processed student view (with invisible patches filled in) to perform the standard generative diffusion task.
- Teacher Update: The teacher encoder is updated using an Exponential Moving Average (EMA) of the student encoder, making it computationally efficient and avoiding the need for backpropagation through the teacher.
Datasets
The primary dataset used for training and evaluation is ImageNet-1K at a resolution of 256x256.
Key Insights and Ideas
- Decoupling is Key: Separating the discriminative and generative objectives into distinct encoder and decoder roles is crucial for avoiding the pitfalls of previous mask-based methods.
- Teacher-Student for Robustness: Using a teacher-student setup with carefully chosen noise levels for each view helps the model learn more robust representations by enforcing inter-image alignment. The teacher's minimal noise helps it act as a strong reference.
- Bridging the Training-Inference Gap: By focusing on discriminative learning for the encoder and standard generative diffusion for the decoder, SD-DiT avoids introducing artificial mask tokens during training that are absent during inference, thus mitigating the training-inference discrepancy.
- Optimal Mask Ratio: The paper finds that a specific mask ratio (around 20% for the student view) balances the benefits of mask strategy for contextual learning with the need for generative capacity.
Key Results
- Improved Training Speed: SD-DiT achieves significantly faster training compared to existing DiT models like DiT, MDT, and MaskDiT, while maintaining competitive or better generative performance. For instance, SD-DiT-S/2 reaches a FID of 48.39 with 9.2 steps/sec, outperforming MDT-S/2 (FID 53.46, 2.4 steps/sec).
- Competitive FID Scores: On ImageNet 256x256, SD-DiT-XL/2 achieves a FID of 9.01 with 1100k training steps, comparable to MDT-XL/2 (FID 9.60 with 1300k steps) and significantly better than DiT-XL/2.
- Ablation Studies: Removing the discriminative objective or the teacher branch significantly degrades performance, highlighting the importance of the proposed self-supervised discrimination.
- Teacher Noise Matters: Using a teacher view with minimal noise (close to the original data) is critical for effective discriminative learning, outperforming using noise from the same distribution as the student view.
Limitations and Future Work
- Mask Ratio Optimization: While the paper identifies an optimal mask ratio, further exploration into adaptive mask ratio strategies could be beneficial.
- Computational Cost: Although SD-DiT is more efficient than previous methods, DiTs are still computationally intensive. Future work could explore further optimizations.
- Dataset Generalization: While ImageNet results are strong, testing on a wider range of datasets and tasks would be valuable.
- Teacher Noise Scale: The paper empirically evaluates teacher noise scales, suggesting that the teacher noise should be far from the student noise distribution. Further theoretical grounding or broader empirical validation of this finding could be explored.
Summary updated