Prism: Spectral-Aware Block-Sparse Attention
Abstract
Lay Summary
LLMs can process long documents, code, and videos, but standard attention becomes very slow as inputs grow. Sparse attention speeds this up by looking at only the most relevant blocks, but choosing those blocks efficiently is difficult. We identify an important caveat in a common shortcut: when tokens are averaged after RoPE positional encoding, mean pooling can act like a low-pass filter, washing out fine-grained local position information. This explains why prior block-selection methods often need expensive token-level corrections. To address this, we propose Prism, which separates broad semantic signals from local positional signals and restores their balance through online calibration without extra hyperparameters. Prism requires no model training and uses only efficient block-level operations. Across long-document, retrieval, and video tasks, Prism preserves nearly the same quality as full attention while making long-context processing much faster, with up to 5.1× speedup.