PSA: Pyramid Sparse Attention for Efficient Video Understanding and Generation

Xiaolong Li, Youping Gu, Xi Lin, Weijie Wang, Bohan ZhuangarXiv 2025 · DOI

Introduction

Modern video models, particularly Diffusion Transformers, are increasingly tasked with processing sequences tens of thousands of tokens long. However, the computational cost of standard attention mechanisms grows quadratically with sequence length, creating a significant bottleneck. To address this, researchers have traditionally turned to Block Sparse Attention (BSA). While BSA reduces computation by identifying and keeping only "important" blocks of data, it operates on a binary "keep or drop" logic. At high sparsity levels, this leads to a "granularity gap" where massive information loss results in visual artifacts or loss of global context.

This paper introduces Pyramid Sparse Attention (PSA), a novel approach that moves beyond binary masking. PSA allows models to maintain a "big picture" view of the video by using multi-resolution representations, enabling a more efficient trade-off between quality and computational cost.

The Pyramid Sparse Attention Framework

The core innovation of PSA is the Pyramid KV Block structure. Instead of discarding data, PSA creates a hierarchy of Key-Value (KV) representations through 1D mean pooling. This hierarchy allows the model to attend to critical regions at high resolution while maintaining a coarse, low-cost "glance" at the rest of the video.

The PSA architecture featuring Pyramid KV Blocks and Multi-Level Masking.

The framework consists of several key components:

  1. Pyramid KV Blocks: A hierarchy of KV representations (Level 1 to Level 4) is generated. Level 1 retains the original resolution, while higher levels provide progressively coarser views.
  2. Multi-Level Masking: A dedicated generator assigns query-key block pairs to specific levels based on relevance. Critical regions receive high-resolution attention, while less relevant areas are assigned to coarser levels, and only truly redundant blocks are dropped.
  3. Adaptive Scaling: To maintain a consistent probability distribution after the softmax layer, the authors introduce a scaling factor ($2^{h-1}$) to the attention scores, compensating for the pooling operations.

To ensure these operations run efficiently on modern hardware, the authors developed a decoupled block-tile kernel. This kernel separates logical block sizes from physical GPU tile sizes, achieving up to a 10x speedup over naive implementations.

Results and Efficiency

The primary advantage of PSA is its ability to capture a much larger portion of the input signal under the same computational budget. As shown in the comparison below, PSA can attend to 70% of active regions using the same FLOPs that a standard BSA model uses to attend to only 20%.

Comparison of computing density and attention output error between BSA, PSA, and Full Attention.

This "glance" advantage translates directly into higher quality. In video generation tasks using Wan2.1, PSA at 91% sparsity outperformed other sparse baselines, matching the visual fidelity of full-attention models while using 10x less compute. In video understanding benchmarks like Video-MME, PSA matched full-attention accuracy on the Qwen2.5-VL-7B model while using only ~35% of the FLOPs, showing particular strength in medium and long-duration videos.

Furthermore, PSA is highly compatible with other efficiency techniques. When combined with distillation methods like TDM on CogVideoX-5B, it enabled a 30.2x denoising speedup without sacrificing generation quality.

Conclusion and Future Work

PSA demonstrates that multi-resolution attention is a powerful alternative to binary sparsity for long-context video tasks. By bridging the granularity gap, it allows models to maintain global context while drastically reducing computational overhead.

Future research directions include automating the tuning of resolution thresholds and exploring 2D or 3D spatiotemporal pooling to achieve even higher compression ratios. Additionally, integrating PSA directly into the pre-training phase of foundation models could unlock further performance gains.

Summary updated

BibTeX
@misc{li2025psa,
  author = {Xiaolong Li and Youping Gu and Xi Lin and Weijie Wang and Bohan Zhuang},
  title = {{PSA: Pyramid Sparse Attention for Efficient Video Understanding and Generation}},
  year = {2025},
  eprint = {2512.04025},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.04025},
}
Figure