NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Diffusion Transformer with Step-Wise Dynamic Attention Mediators

Yifan Pu, Zhuofan Xia, Jiayi Guo, Dongchen Han, Qixiu Li, Duo Li, Yuhui Yuan, Ji Li, Yizeng Han, Shiji Song, Gao Huang, Xiu Li

Introduction

Diffusion Transformers (DiTs) have become the backbone of state-of-the-art generative AI systems, such as Sora and Stable Diffusion V3. Despite their success, these models face a significant scalability challenge: the quadratic complexity ($O(N^2)$) of self-attention. As researchers push toward higher resolutions and longer video sequences, the computational cost of every token attending to every other token becomes a major bottleneck. This paper introduces Attention Mediators and a Step-wise Dynamic Adjustment strategy to address this inefficiency, achieving up to a 45.4% speedup while maintaining or even improving generative quality.

Methodology: Attention Mediators

To break the quadratic bottleneck, the authors introduce a small set of bottleneck tokens known as Attention Mediators ($M$). Instead of allowing all image tokens (queries $Q$ and keys $K$) to interact directly, the attention mechanism is decomposed into two linear-complexity steps:

  1. Information Aggregation: The keys ($K$) aggregate their information into the mediators ($M$).
  2. Information Extraction: The queries ($Q$) extract the necessary information from these mediators.

This transformation reduces the computational complexity to $O(N \cdot n)$, where $n$ (the number of mediators) is much smaller than $N$ (the number of image tokens). This linear scaling is particularly beneficial for high-resolution tasks.

Step-wise Dynamic Adjustment

The researchers observed that the redundancy of attention patterns is not uniform throughout the denoising process. In the early stages, when the image is primarily noise, the attention outputs are highly homogeneous. As the process continues and fine details emerge, the need for more complex attention patterns increases.

The proposed solution is a dynamic schedule that adjusts the number of mediator tokens at each step:

  • Initial Phases: Use very few mediators to maximize efficiency when redundancy is high.
  • Final Phases: Gradually increase the number of mediators to capture intricate details.

The timing of these transitions is determined by a sample-specific metric based on the latent distance between adjacent denoising steps. This flexibility allows users to trade off a marginal amount of quality for significant speedups, tailoring the generation process to their specific inference budget.

Empirical Evidence: Quantifying Redundancy

The core justification for this dynamic approach comes from an analysis of token redundancy using Jensen-Shannon Divergence (JSD). By measuring the divergence of attention outputs across different layers and time steps, the authors provided empirical proof that exhaustive attention is often unnecessary.

Divergence scores across layers for DiT and SiT models throughout the denoising process, illustrating the redundancy in early stages.

As shown in the figure, divergence scores are significantly lower at the start of the sampling process (e.g., step 250 for DiT or $t=1.0$ for SiT) across multiple layers. This confirms that tokens are largely homogeneous during the initial noise-clearing phase, validating the use of a bottleneck (mediators) to save resources without losing structural information.

Key Results and Performance

The integration of Attention Mediators with the Scalable Interpolant Transformer (SiT-XL/2) yielded impressive results on the ImageNet-1k benchmark:

  • Generative Quality: The method achieved a state-of-the-art FID score of 2.01 on $256 \times 256$ images, outperforming the baseline SiT (2.06) and DiT (2.27).
  • High-Resolution Scaling: The benefits of linear scaling become more pronounced at higher resolutions. The method achieved a 15.7% speedup at $512 \times 512$ and a 45.4% speedup at $1024 \times 1024$ compared to standard baselines.
  • Regularization Effect: Interestingly, the mediator bottleneck acts as a form of regularization. By forcing the model to focus on global structure before local noise, it can actually lead to better final image quality than the original full-attention models.

Limitations and Future Work

While the method offers significant gains, some areas remain for future exploration:

  • Threshold Tuning: The dynamic schedule currently relies on thresholds ($\rho$) that require a small-scale grid search to optimize. Automating this process for any given model is a logical next step.
  • Hardware Optimization: While theoretical FLOPs are reduced, actual wall-clock speedups depend on how well hardware handles the two-step mediator attention compared to highly optimized kernels like FlashAttention.
  • Video Generation: The authors suggest that temporal redundancy in video diffusion likely offers even greater opportunities for optimization using this mediator-based approach.

Conclusion

By dynamically mediating attention, this research provides a scalable path forward for high-resolution generative modeling. The approach effectively balances the trade-off between computational efficiency and generative fidelity, making large-scale Diffusion Transformers more accessible for complex tasks.

Summary updated

BibTeX
@inproceedings{pu2024efficient,
  author = {Yifan Pu and Zhuofan Xia and Jiayi Guo and Dongchen Han and Qixiu Li and Duo Li and Yuhui Yuan and Ji Li and Yizeng Han and Shiji Song and Gao Huang and Xiu Li},
  title = {{Efficient Diffusion Transformer with Step-Wise Dynamic Attention Mediators}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72633-0\_24},
}
Figure