2026-03-31 · 进阶 · 计算机视觉 · 自然语言处理 · 机器学习

HISA: Efficient Hierarchical Indexing for Fine-Grained Sparse Attention

该论文提出了一种名为HISA的分层索引稀疏注意力机制,通过两阶段的索引策略显著提升了长上下文处理中的稀疏注意力机制的效率。

更新于 2026-08-06。作者:Yufei Xu、Fanxu Meng、Fan Jiang、Yuxuan Wang、Ruijie Zhou、Jiexi Wu、Zhixin Pan、Zhaohui Wang、Xiaojuan Tang、Wenjie Pei、Tongxuan Liu、Di yin、Xing Sun、Muhan Zhang。

中文摘要

基于深度搜索稀疏注意力(DeepSeek Sparse Attention,简称DSA)的Token级稀疏注意力机制通过使用轻量级索引器为每个查询对历史中的每个标记进行评分,实现了细粒度的键选择,并且只在所选子集上计算注意力。虽然下游的稀疏注意力扩展效率很高,但索引器仍然需要为每个查询扫描整个前缀,引入了O(L^2)的每层瓶颈,随着上下文长度的增加,这变得难以承受。我们提出了HISA(分层索引稀疏注意力),它是索引器的直接替代品,将搜索过程从平面标记扫描转变为两阶段分层过程。首先,块级粗过滤器对池化块代表进行评分,以剪枝无关区域。然后,在剩余的候选块内应用原始索引器进行标记级细化。HISA保留了下游稀疏MLA操作所需的精确的token级top-k稀疏模式,且无需额外训练。在内核级基准测试中,HISA在32K上下文长度时实现了2倍的速度提升,在128K时实现了4倍的速度提升。在Needle-in-a-Haystack和LongBench上,我们直接将DeepSeek-V3.2中的索引器替换为HISA,无需任何微调。HISA在质量上与原始DSA非常接近,同时显著优于块稀疏基线。此外,由HISA和原始DSA产生的标记选择集的平均IoU大于99%,表明效率的提升几乎不会影响选择精度。

英文摘要

Token-level sparse attention mechanisms, exemplified by DeepSeek Sparse Attention (DSA), achieve fine-grained key selection by scoring every historical token for each query using a lightweight indexer, and then computing attention only over the selected subset. While the downstream sparse attention scales efficiently, the indexer still scans the entire prefix for every query, introducing an O(L^2) per-layer bottleneck that becomes prohibitive as context length grows. We propose HISA (Hierarchical Indexed Sparse Attention), a drop-in replacement for the indexer that transforms the search process from a flat token scan into a two-stage hierarchical procedure. First, a block-level coarse filter scores pooled block representatives to prune irrelevant regions. Then, a token-level refinement applies the original indexer only within the remaining candidate blocks. HISA preserves the exact token-level top-k sparsity pattern required by the downstream Sparse MLA operator and requires no additional training. On kernel-level benchmarks, HISA achieves a 2times speedup at 32K context length and 4times at 128K. On Needle-in-a-Haystack and LongBench, we directly replace the indexer in DeepSeek-V3.2 with HISA, without any fine-tuning. HISA closely matches the original DSA in quality while significantly outperforming block-sparse baselines. Moreover, the token selection sets produced by HISA and the original DSA exhibit a mean IoU greater than 99%, indicating that the efficiency gains come with virtually no impact on selection fidelity.

解读

一句话总结

该论文提出了一种名为HISA的分层索引稀疏注意力机制,通过两阶段的索引策略显著提升了长上下文处理中的稀疏注意力机制的效率。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt