arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.06028cs.CV
收藏

SparseDiT:面向高效扩散 Transformer 的令牌稀疏化

SparseDiT: Token Sparsification for Efficient Diffusion Transformer

Zhejiang University(浙江大学);Damo Academy, Alibaba Group(阿里达摩院);Hupan Lab(虎斑实验室)

Shuning Chang, Pichao Wang, Jiasheng Tang, Fan Wang, Yi Yang

AI总结:

SparseDiT 通过在空间和时间维度对扩散 Transformer 进行令牌稀疏化,在保持生成质量的同时大幅降低计算量并提升推理速度。

摘要:

扩散 Transformer(DiT)以其出色的生成性能而闻名;然而,由于自注意力中的二次复杂度和所需的大量采样步骤,它们受到显著计算成本的制约。尽管在加速采样过程方面已取得进展,但 DiT 内部潜在的架构低效问题仍未得到充分探索。我们提出了 SparseDiT,这是一个新颖的框架,在空间和时间维度上实施令牌稀疏化,以提高计算效率,同时保持生成质量。在空间上,SparseDiT 采用三段式架构,根据每层的特征需求分配令牌密度:底层使用 Poolingformer 进行高效的全局特征提取,中层使用稀疏-密集令牌模块(SDTM)来平衡全局上下文与局部细节,顶层使用密集令牌来细化高频细节。在时间上,SparseDiT 在去噪阶段动态调节令牌密度,随着后续时间步中更精细细节的出现逐步增加令牌数量。SparseDiT 的空间自适应架构与其时间剪枝策略之间的这种协同作用,使得一个统一的框架能够在整个生成过程中平衡效率与保真度。我们的实验证明了 SparseDiT 的有效性:在 512x512 ImageNet 上,DiT-XL 的 FLOPs 降低了 55%,推理速度提升了 175%,且 FID 分数相近;在视频生成数据集上,FLOPs 降低了 56%;在文本到图像生成任务中,PixArt-α 的推理速度提升了 69%,FID 分数下降了 0.24。SparseDiT 为基于扩散的高质量生成提供了一种可扩展的解决方案,并与采样优化技术兼容。

英文摘要:

Diffusion Transformers (DiT) are renowned for their impressive generative performance; however, they are significantly constrained by considerable computational costs due to the quadratic complexity in self-attention and the extensive sampling steps required. While advancements have been made in expediting the sampling process, the underlying architectural inefficiencies within DiT remain underexplored. We introduce SparseDiT, a novel framework that implements token sparsification across spatial and temporal dimensions to enhance computational efficiency while preserving generative quality. Spatially, SparseDiT employs a tri-segment architecture that allocates token density based on feature requirements at each layer: Poolingformer in the bottom layers for efficient global feature extraction, Sparse-Dense Token Modules (SDTM) in the middle layers to balance global context with local detail, and dense tokens in the top layers to refine high-frequency details. Temporally, SparseDiT dynamically modulates token density across denoising stages, progressively increasing token count as finer details emerge in later timesteps. This synergy between SparseDiT spatially adaptive architecture and its temporal pruning strategy enables a unified framework that balances efficiency and fidelity throughout the generation process. Our experiments demonstrate SparseDiT effectiveness, achieving a 55% reduction in FLOPs and a 175% improvement in inference speed on DiT-XL with similar FID score on 512x512 ImageNet, a 56% reduction in FLOPs across video generation datasets, and a 69% improvement in inference speed on PixArt-$α$ on text-to-image generation task with a 0.24 FID score decrease. SparseDiT provides a scalable solution for high-quality diffusion-based generation compatible with sampling optimization techniques.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑