db-SP: Accelerating Sparse Attention for Visual Generative Models with Dual-Balanced Sequence Parallelism

Siqi Chen, Ke Hong, Tianchen Zhao, Ruiqi Xie, Zhenhua Zhu +2 more
11/28/2025
cs.CVcs.LG

Official code: thu-nics/db-SP (8 stars, last commit 2026-04-08).

Abstract

Scaling Diffusion Transformer (DiT) inference via sequence parallelism is critical for reducing latency in visual generation, but is severely hampered by workload imbalance when applied to models employing block-wise sparse attention. The imbalance stems from the inherent variation in sparsity across attention heads and the irregular distribution of dense blocks within the sparse mask, when sequence parallelism is applied along the head dimension (as in Ulysses) or the block dimension (as in Ring Attention). In this paper, we formalize a sparse imbalance ratio to quantify the imbalance, and propose db-SP, a sparsity-aware sequence parallelism technique that tackles the challenge. db-SP contains a dual-level partitioning approach that achieves near-perfect workload balance at both the head and block levels with negligible overhead. Furthermore, to handle the evolving sparsity patterns across denoising steps and layers, db-SP dynamically determines the parallel degrees for the head and block dimensions at runtime. Experimental results demonstrate that db-SP delivers an end-to-end speedup of 1.25x and an attention-specific speedup of 1.40x over state-of-the-art sequence parallel methods on average. Code is available at https://github.com/thu-nics/db-SP.

View on arXivView PDF

Code Implementations(1)

thu-nics/db-SPOfficial100%

This repository contains the official implementation of db-SP, a sparsity-aware sequence parallelism strategy designed to accelerate sparse attention in visual generative models (e.g., Diffusion Transformers).

82Shell, PythonNov 28, 20256 months ago

Similar Papers

Cite this paper

@article{chen2025dbsp,
  title  = {db-SP: Accelerating Sparse Attention for Visual Generative Models with Dual-Balanced Sequence Parallelism},
  author = {Siqi Chen and Ke Hong and Tianchen Zhao and Ruiqi Xie and Zhenhua Zhu and Xudong Zhang and Yu Wang},
  year   = {2025},
  eprint = {2511.23113},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.23113v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.23113.svg)](https://codeofpaper.com/paper/2511.23113)

Discussion