PapersSelected

AttnEx 提出稀疏注意力索引新方法,长上下文 TTFT 提速最高 1.76x

AttnEx: Sparse-Attention Indexing with Per-Layer Head Allocation and Streaming Top-k

Why we picked it

训练稀疏注意力的论文,思路是按每层注意力覆盖度分配索引器头数,每层约 15 个头就顶上 DeepSeek-V3.2 的 64 个。在 H200 上实测 1M token 场景 TTFT 快 1.76x。做长文本推理部署的工程师可以直接看。

论文 AttnEx 针对可训练稀疏注意力索引器的开销问题提出改进:现有索引器对每个 query 用统一头数给所有前置 key 打分,导致长 prefill 计算量大,且打分矩阵会与 KV cache 争抢 GPU 显存。

Body

AttnEx 的核心是按每层的 attention coverage(选中 key 捕获的注意力概率质量占比)来分配索引器头数,并把 key 打分与精确 top-k 选择融合,只写出存活的候选 key。结果上每层只需约 15 个头,而 DeepSeek-V3.2 需要 64 个、GLM-5.1 需要 32 个;在八个 128K-token 基准上质量与原索引器相当。

推理性能方面,在 vLLM 与八张 H200 GPU 上,AttnEx 在原生上下文窗口内将 TTFT(首 token 时间)最高加速 1.52x,在 1M token 下于默认 512 MB 打分矩阵预算内最高加速 1.76x。这为长上下文推理部署提供了一条不改模型权重、仅优化索引器的路径。

Original · arXiv: DeepSeek

AttnEx: Sparse-Attention Indexing with Per-Layer Head Allocation and Streaming Top-k

Trainable sparse attention reduces long-context inference cost by using a multi-head indexer to select a fixed number of keys k per query in each layer. The indexer still scores every preceding key with a uniform head count, making long prefill compute-intensive, and its score matrix competes with the key-value (KV) cache for GPU memory. Existing methods reduce scoring through cross-layer reuse or coarse block filtering, but either can miss relevant keys. Attention Express (AttnEx) sizes each layer's indexer by its attention coverage, the share of attention probability mass captured by the selected keys. AttnEx also fuses key scoring with exact top-k selection and writes only surviving candidates. With about 15 heads per layer instead of 64 in DeepSeek-V3.2 and 32 in GLM-5.1, AttnEx keeps quality comparable to the original indexers on eight 128K-token benchmarks. In vLLM on eight H200 GPUs, AttnEx speeds up time to first token (TTFT) by up to 1.52x within the native context windows and 1.76x at 1M tokens under the default 512 MB score-matrix budget.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include AttnEx, DeepSeek-V3.2, GLM-5.1, vLLM.

Primary source verification: published directly by arXiv: DeepSeek with first-party authority.

Spotted an error in the summary or translation? Tell us