论文精选

COBS:累积量阶块稀疏注意力方法

COBS: Cumulant Order Block Sparse Attention

精选理由

COBS在NSA基础上加了个二阶统计量,长上下文检索分数从0.3拉到0.82,接近稠密注意力但省了十几倍带宽,很实用。

AI 摘要

COBS通过引入压缩的二阶统计量改进了DeepSeek Native Sparse Attention(NSA)的块选择策略。在32k RULER长上下文检索基准上,COBS将平均分从NSA基线的0.2999提升至0.8195,接近稠密注意力的0.9040,缩小了约86%的差距。其KV缓存读取流量仅为稠密注意力的1/15.15,比NSA基线高1.21倍。模型保持短上下文行为,并在位置负对数似然上低于稠密注意力。

原文 · arXiv: DeepSeek

COBS: Cumulant Order Block Sparse Attention

Block sparse attention is a hardware friendly way to alleviate the key-value (KV) cache read bottleneck in large language models (LLMs). However, it is not prevalent among leading open-weight LLMs, which rely instead on dense attention or fine-grained selection, thereby motivating our analysis. We study DeepSeek's Native Sparse Attention (NSA) as a representative method, whose three-branch design lets us isolate block selection, the most challenging and consequential stage. We formalize selection and reduce it to ranking blocks by a single quantity, the attention mass: the sum of a block's attention scores. We show that if selection retrieves the blocks with the largest attention mass, block sparse attention can match the quality of dense attention. However, computing the exact attention mass requires reading every key, so the problem of block selection ultimately reduces to approximating this mass from a compact summary instead of the full keys. Via a cumulant expansion, we show why existing methods falter: their selection strategies attempt to estimate the attention mass, but are confined to a first-order approximation. Therefore, we propose COBS (Cumulant Order Block Sparse Attention), an attention method that builds on NSA, incorporating a novel selector that stores a compressed second-order statistic per block. On the 32k RULER long-context retrieval benchmark, COBS raises the NSA baseline's mean score from 0.2999 to 0.8195, approaching dense attention at 0.9040 and closing about 86% of the gap, while using only 1.21x the KV cache read traffic of the NSA baseline and 15.15x less read traffic than dense. The same model preserves short-context behavior and attains lower position-wise negative log-likelihood (NLL) than dense attention in our comparison.