提出金字塔稀疏注意力,提升视频理解与生成的效率与质量
PSA: Pyramid Sparse Attention for Efficient Video Understanding and Generation
- 用多级池化键值表示替代二值掩码,实现更精细的注意力控制
- 在低计算预算下保持上下文信息,视频任务性能优于现有稀疏注意力方法
- 支持视频理解与生成,硬件友好设计适合实际部署
注意力机制是基础模型的核心,但其二次复杂度仍是扩展的关键瓶颈。为此,高效注意力机制发展迅速,稀疏性成为主流范式。当前方法通常以二值掩码保留或丢弃整个键值块,高稀疏度下导致显著信息损失。为此,我们提出金字塔稀疏注意力(Pyramid Sparse Attention, PSA),适用于视频理解与生成任务。PSA不采用二值掩码,而是引入多级池化键值表示,实现更细粒度的掩码控制。具体地,每个查询块动态将低池化层级分配给关键键值块,高层级分配给次要块,形成介于完全保留与彻底剪枝之间的信息插值。该设计类比定点量化与计算机视觉中的经典特征金字塔网络,有效缓解信息损失的同时保持计算效率。它采用原生硬件友好的内核,利用解耦块-瓦片设计确保高效执行。在视频理解与生成基准测试中,PSA在保持上下文信息和视觉保真度方面表现优异,始终优于或媲美现有稀疏注意力基线,在效率-质量权衡上更具优势。代码与模型权重已公开:http://ziplab.co/PSA
原文摘要 · Abstract (English)
Attention mechanisms are the core of foundation models, but their quadratic complexity remains a critical bottleneck for scaling. This challenge has driven the development of efficient attention mechanisms, with sparsity emerging as the dominant paradigm. Current methods typically retain or discard entire key-value blocks with binary masks, resulting in substantial information loss under high sparsity. To mitigate this gap, we present Pyramid Sparse Attention (PSA), a versatile module applicable to both video understanding and generation tasks. Instead of binary masking, PSA introduces multi-level pooled KV representations, enabling finer mask granularity. Specifically, each query block dynamically allocates lower pooling levels to critical KV blocks and higher levels to less important ones, creating an informative interpolation between full retention and complete pruning. This design, analogous to fixed-point quantization and classical feature pyramid networks in computer vision, effectively mitigates information loss while preserving computational efficiency under a low compute budget. It works with a native, hardware-friendly kernel that leverages decoupled block-tile design to ensure efficient execution. Across video understanding and generation benchmarks, PSA preserves contextual information and visual fidelity, consistently outperforming or achieving comparable performance over existing sparse attention baselines with superior efficiency-quality trade-offs. Our code and model weights are publicly available at: http://ziplab.co/PSA
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。