Abstract: Diffusion models have demonstrated remarkable success in various image generation tasks, but their performance is often limited by the uniform processing of inputs across varying conditions and noise levels. To address this limitation, we propose a novel approach that leverages the inherent heterogeneity of the diffusion process. Our method, DiffMoE, introduces a batch-level global token pool that enables experts to access global token distributions during training, promoting specialized expert behavior. To unleash the full potential of the diffusion process, DiffMoE incorporates a capacity predictor that dynamically allocates computational resources based on noise levels and sample complexity. Through comprehensive evaluation, DiffMoE achieves state-of-the-art performance among diffusion models on ImageNet benchmark, substantially outperforming both dense architectures with 3x activated parameters and existing MoE approaches while maintaining 1x activated parameters. The effectiveness of our approach extends beyond class-conditional generation to more challenging tasks such as text-to-image generation, demonstrating its broad applicability across different diffusion model applications.
Introduction
Diffusion Transformers (DiTs) have emerged as a powerful architecture for high-fidelity image generation. However, standard DiTs suffer from a fundamental inefficiency: they process every input token uniformly. This "one-size-fits-all" approach ignores the inherent heterogeneity of the diffusion process.
Specifically, diffusion models exhibit two types of heterogeneity that uniform processing fails to exploit:
- Temporal Heterogeneity: The early stages of denoising (handling pure noise) require different computational strategies than the final stages of refining fine details.
- Spatial Heterogeneity: Image patches vary in complexity; a patch of clear sky requires far less computation than a detailed human face or intricate texture.
While Mixture-of-Experts (MoE) architectures have been proposed to address such inefficiencies in other domains, existing MoE methods often fail in diffusion tasks because they isolate tokens within single samples, preventing experts from learning the global distribution of features and noise levels across the dataset.
The DiffMoE Architecture
DiffMoE introduces a dynamic, expert-driven architecture designed to allocate computational resources where they are most needed. The core innovation lies in how tokens are pooled and how capacity is predicted.
Batch-level Global Token Pool
To overcome the limitations of token isolation, DiffMoE flattens all tokens across an entire training batch into a single global pool. This allows experts to select tokens from different images, noise levels, and prompts simultaneously. This cross-sample interaction forces experts to specialize in specific visual features or noise regimes, leading to a more efficient and capable model.
Dynamic Capacity Predictor
Unlike traditional MoE models that use fixed routing capacities (e.g., each expert receives a fixed percentage of tokens), DiffMoE employs a lightweight MLP-based capacity predictor. This module predicts the required "expert attention" for a given batch of tokens based on their complexity and the current noise level. During inference, a learned thresholding mechanism allows the model to dynamically adjust its compute budget, spending more time on "hard" samples and less on "easy" ones.
Experimental Results
The authors evaluated DiffMoE on several benchmarks, including ImageNet (256×256) and large-scale text-to-image datasets. The results demonstrate that DiffMoE is not only more efficient but also more effective than larger dense models.
Efficiency and Performance
DiffMoE-L-E16 (a Large model with 16 experts) consistently outperformed the significantly larger Dense-DiT-XL model. On ImageNet, DiffMoE achieved a Frechet Inception Distance (FID) of 14.41, surpassing the 14.77 achieved by the XL dense baseline, despite having fewer activated parameters during any single forward pass. On the ImageNet 7000K benchmark, DiffMoE-L-E8 set a new state-of-the-art with an FID of 2.13.
Key Insights
- Global Context: Access to the global token pool is essential. Without it, experts fail to distinguish between different stages of the diffusion process, leading to degraded performance.
- Resource Allocation: The model naturally learns to allocate more capacity to complex classes (e.g., technical instruments, detailed artifacts) and less to simpler natural subjects (e.g., cats, birds).
- Scalability: The performance gap between DiffMoE and standard baselines widens as the model size and the number of experts increase, suggesting strong potential for scaling to billion-parameter regimes.
Conclusion and Future Work
DiffMoE represents a significant step forward in making Diffusion Transformers more computationally intelligent. By treating the diffusion process as a heterogeneous task, it achieves superior results with lower activated parameter counts.
While the model is computationally efficient, its total parameter count remains high, necessitating significant VRAM. Future research may explore ways to reduce the memory footprint or extend this dynamic allocation to video generation, where temporal redundancy offers even greater opportunities for resource optimization.
Summary updated