EC-DIT: Scaling Diffusion Transformers with Adaptive Expert-Choice Routing

Haotian Sun, Tao Lei, Bowen Zhang, Yanghao Li, Haoshuo Huang, Ruoming Pang, Bo Dai, Nan Du

TL;DR

EC-DIT introduces a scalable Mixture-of-Experts (MoE) architecture for Diffusion Transformers that uses expert-choice routing to adaptively allocate computation. By allowing experts to "choose" the most relevant image patches rather than forcing every patch to use the same amount of compute, the model scales efficiently to 97 billion parameters. This approach achieves state-of-the-art text-to-image alignment with minimal inference overhead.

The Challenge of Scaling Diffusion Transformers

Scaling Diffusion Transformers (DiTs) to billions of parameters is the current frontier for high-quality text-to-image synthesis. However, dense scaling is computationally expensive. While Mixture-of-Experts (MoE) is a proven solution for scaling Large Language Models (LLMs), standard "token-choice" routing—where each token picks its top-$k$ experts—is suboptimal for images.

In an image, not all patches are created equal. A patch of clear blue sky requires far less "thinking" than a patch containing a complex human face or intricate text. Standard MoE treats these patches uniformly, wasting compute on simple areas and potentially under-serving complex ones. Furthermore, token-choice routing often suffers from load-imbalance issues, requiring messy auxiliary losses to ensure all experts are utilized effectively.

Methods: Introducing EC-DIT

To address these inefficiencies, the authors propose EC-DIT, which replaces standard Feed-Forward Network (FFN) layers with MoE layers utilizing Expert-Choice (EC) routing.

Expert-Choice Routing Mechanism
  • Expert-Choice Routing: Unlike traditional MoE where tokens choose experts, in EC routing, each expert independently selects the top-$C$ tokens from the entire image sequence that it is most "interested" in processing.
  • Adaptive Computation: This mechanism allows a single important token (like a foreground object or text) to be processed by multiple experts, while "boring" background tokens might be skipped entirely by some layers. This creates a heterogeneous compute profile that perfectly matches the visual complexity of the scene.
  • Global Context: Because diffusion models process the entire image at once (unlike the causal, token-by-token nature of LLMs), EC-DIT can leverage global information to optimize token-to-expert allocation at every denoising step.
  • Inherent Load Balancing: Because each expert is hard-coded to pick exactly $C$ tokens, the workload is perfectly balanced across experts by design. This eliminates the need for the auxiliary balancing losses that typically complicate MoE training.

Datasets and Evaluation

The models were trained on approximately 1.2 billion text-image pairs sourced from the internet. Evaluation was conducted across several rigorous benchmarks:

  • GenEval: A benchmark for fine-grained text-to-image alignment (object counts, positions, colors).
  • Davidsonian Scene Graph (DSG): A VQA-based metric for semantic alignment.
  • MS-COCO: Used for standard zero-shot FID (image quality) and CLIP Score (alignment) evaluations.
  • PartiPrompts: Used for qualitative visual comparisons against external models like SD3-Large and FLUX.1.

Key Insights and Results

The core advantage of EC-DIT is turning the natural heterogeneity of image generation into an efficiency gain. Visualizations of the routing decisions act as a built-in heatmap, showing the model's "attention" shifting: early layers handle low-frequency background context, while later layers converge on textually significant details. You can literally see the model deciding that the text on a shirt requires more expert intervention than the surrounding pixels.

Performance and Qualitative Comparisons of EC-DIT vs Dense Models
  • State-of-the-Art Alignment: The largest model (EC-DIT-M-64E) achieved a GenEval score of 71.68%, surpassing SD3-Large (71.00% with DPO) despite EC-DIT not using any specialized fine-tuning like DPO.
  • Efficiency Gains: EC-DIT-3XL-32E achieved alignment scores comparable to much larger dense models while maintaining an inference speed that is only ~33.8% of an 8B dense model's time.
  • Scaling Milestone: By increasing the number of experts (up to 64), the authors successfully scaled the architecture to 97.21 billion parameters, making it the largest sparse diffusion transformer reported to date.
  • Superior Convergence: EC-DIT models reached lower training loss significantly faster than their dense counterparts. For example, an EC-DIT-XXL model at 200k steps outperformed a dense model that required 400k steps.
  • Qualitative Superiority: Visual comparisons show EC-DIT is vastly better at rendering complex prompts (e.g., specific text rendering or unusual object combinations) where other SOTA models often hallucinate or miss objects entirely.

Limitations and Future Work

While highly effective, the authors note a few limitations and directions for future research:

  • Semantic Awareness: The model adapts well to pattern complexity, but future work could more explicitly incorporate object semantics or complex compositional relationships into the routing logic.
  • Video Generation: The global context required for EC routing makes it a natural candidate for video generation, where temporal consistency across "video chunks" is critical.
  • Hardware Constraints: For the largest "M" configuration, the authors had to reduce the number of layers (from 46 to 38) to fit the model into the High Bandwidth Memory (HBM) of training accelerators, indicating that memory bandwidth remains a bottleneck for extreme scaling.

Summary updated

BibTeX
@inproceedings{sun2025ec,
  author = {Haotian Sun and Tao Lei and Bowen Zhang and Yanghao Li and Haoshuo Huang and Ruoming Pang and Bo Dai and Nan Du},
  title = {{EC-DIT: Scaling Diffusion Transformers with Adaptive Expert-Choice Routing}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=PxlfzEePC0},
}
Figure