DoSA:点稀疏注意力

·

研究论文 · 2026/10/14

稀疏注意力只访问少量键,但找到这些键仍可能需要对每个键与每个索引头进行评分。我们提出DoSA(Dots Sparse Attention),一种无损方法,使该计算条件化,同时保持精确的令牌选择。其核心观察是Top-K选择需要足够证据来拒绝候选,而不必计算其完整分数。种子集提供获胜阈值的下界。非负头投影和联合残差界为正向贡献提供上界,而激活信息聚合为负头减去的幅度提供界。该证书将完整评分导向仍符合条件的候选;精确分数过滤进一步减少回写和选择工作。我们建立了该证书及其精确选择条件,并分析几何和选择边界如何影响其有效性。我们的GPU实现将完整Indexer加速至多2.74倍(相比SGLang)和1.69倍(相比LiteTopK),涵盖英语、中文和代码工作负载。在GLM-5.2和DeepSeek-V3.2上的端到端评估分别实现高达1.94倍和1.50倍的首令牌时间加速。

该工作提出了一种无损的稀疏注意力加速方法,在保持精确选择的同时显著提升效率,对大规模语言模型推理有重要实用价值。

Sparse attention visits few keys, yet finding them can still require scoring every key with every indexer head. We introduce DoSA (Dots Sparse Attention), a lossless method for making this computation conditional while preserving exact token selection. Its central observation is that Top-K selection requires sufficient evidence to reject a candidate, not necessarily its full score. A seed set supplies a lower bound on the winning threshold. Nonnegative head projections and joint residual bounds upper-bound positive contributions, while activation-informed aggregation bounds the magnitude subtracted by negative heads. The certificate directs full scoring toward candidates that remain eligible; exact-score filtering further reduces writeback and selection work. We establish the certificate and its exact-selection conditions, and analyze how geometry and selection margins govern its effectiveness. Our GPU implementation accelerates the complete Indexer by up to 2.74 times over SGLang and 1.69 times over LiteTopK across English, Chinese, and code workloads. End-to-end evaluation on GLM-5.2 and DeepSeek-V3.2 achieves up to 1.94 times and 1.50 times time-to-first-token speedups over the two baselines, respectively.

阅读原文

参与讨论