提出 Prism 方法,让大模型长文本推理快 5.1 倍且不丢精度
Prism: Spectral-Aware Block-Sparse Attention
- 通过分解高频低频信号,从块级表示中恢复被抑制的位置信息
- 在不训练的情况下实现块重要性估计,比全注意力快 5.1 倍
- 适合追求长文本推理效率的模型部署者和系统优化研究者
块稀疏注意力可加速长上下文大模型预填充,但高效识别相关块仍是瓶颈。现有方法通常用粗粒度注意力作为块重要性代理,但常需昂贵的标记级搜索或评分,导致显著选择开销。本文揭示标准均值池化在旋转位置编码(RoPE)下的理论缺陷:均值池化充当低通滤波器,在高频维度引发破坏性干涉,形成对局部位置信息(如斜杠模式)的“盲区”。为此,我们提出 Prism——一种无需训练的谱感知方法,将块选择分解为高频与低频分支。通过能量温度校准,直接从池化表示中恢复被衰减的位置信号,实现仅基于块级操作的重要性估计,从而提升效率。大量实验表明,Prism 在保持与全注意力相当精度的同时,实现最高 5.1 倍加速。
原文摘要 · Abstract (English)
Block-sparse attention is promising for accelerating long-context LLM pre-filling, yet identifying relevant blocks efficiently remains a bottleneck. Existing methods typically employ coarse-grained attention as a proxy for block importance estimation, but often resort to expensive token-level searching or scoring, resulting in significant selection overhead. In this work, we trace the inaccuracy of standard coarse-grained attention via mean pooling to a theoretical root cause: the interaction between mean pooling and Rotary Positional Embeddings (RoPE). We prove that mean pooling acts as a low-pass filter that induces destructive interference in high-frequency dimensions, effectively creating a "blind spot" for local positional information (e.g., slash patterns). To address this, we introduce Prism, a training-free spectral-aware approach that decomposes block selection into high-frequency and low-frequency branches. By applying energy-based temperature calibration, Prism restores the attenuated positional signals directly from pooled representations, enabling block importance estimation using purely block-level operations, thereby improving efficiency. Extensive evaluations confirm that Prism maintains accuracy parity with full attention while delivering up to $\mathbf{5.1\times}$ speedup.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。