广义空间传播网络的并行序列建模
Parallel Sequence Modeling via Generalized Spatial Propagation Network
AI总结:
提出广义空间传播网络(GSPN),通过线扫描和稳定性上下文条件直接处理二维图像,缩短序列长度至根号N,无需位置嵌入,在视觉任务中达到最先进性能,并大幅加速SD-XL生成。
摘要:
我们提出了广义空间传播网络(GSPN),这是一种针对视觉任务优化的新注意力机制,其固有地捕获二维空间结构。现有的注意力模型,包括Transformer、线性注意力和如Mamba等状态空间模型,将多维数据作为一维序列处理,损害了空间连贯性和效率。GSPN通过直接操作空间连贯的图像数据,并通过线扫描方法形成密集的成对连接,克服了这些限制。GSPN的核心是稳定性上下文条件,它确保在二维序列上进行稳定、上下文感知的传播,并将有效序列长度减少到具有N个元素的正方形映射的$\sqrt{N}$,显著提高计算效率。凭借可学习的、输入相关的权重且不依赖位置嵌入,GSPN在视觉任务中实现了卓越的空间保真度和最先进的性能,包括ImageNet分类、类别引导的图像生成和文本到图像生成。值得注意的是,在生成16K图像时,GSPN将具有softmax注意力的SD-XL加速了超过$84\times$。
英文摘要:
We present the Generalized Spatial Propagation Network (GSPN), a new attention mechanism optimized for vision tasks that inherently captures 2D spatial structures. Existing attention models, including transformers, linear attention, and state-space models like Mamba, process multi-dimensional data as 1D sequences, compromising spatial coherence and efficiency. GSPN overcomes these limitations by directly operating on spatially coherent image data and forming dense pairwise connections through a line-scan approach. Central to GSPN is the Stability-Context Condition, which ensures stable, context-aware propagation across 2D sequences and reduces the effective sequence length to $\sqrt{N}$ for a square map with N elements, significantly enhancing computational efficiency. With learnable, input-dependent weights and no reliance on positional embeddings, GSPN achieves superior spatial fidelity and state-of-the-art performance in vision tasks, including ImageNet classification, class-guided image generation, and text-to-image generation. Notably, GSPN accelerates SD-XL with softmax-attention by over $84\times$ when generating 16K images.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。