首页 > AI前沿 > Native Position Reindexing for Sparse Attention

Native Position Reindexing for Sparse Attention

arXiv自然语言 2026-11-28 02:59 6 阅读 查看原文
用户需要我把一段纯文本的新闻正文(实际上是一段学术摘要)排版成语义化的HTML片段。 规则如下: 1. 只输出HTML片段本身,不要Markdown围栏,不要解释。 2. 每个自然段落用`

`包裹,长文用`

`/`

`划分小节(这里只有一段,可能不需要划分小节,或者可以稍微切分一下,但原文本就是一段,最好保持原样或者合理切分,但规则说“不得增删改内容”,所以最好就把整个作为几个段落或者一个段落,或者合理断句分段落。原文本是一整个段落,我可以直接用一个`

`包裹,或者根据句子逻辑分成几个`

`。为了排版美观,可以分成几个自然段,但不改变内容。不过“每个自然段落用

包裹”,原文本就是一个自然段,那就用一个`

`,或者适当分段。保险起见,保持原文的段落结构,原文就是一个段落,所以用一个`

`,或者把长句分成几个`

`。这里直接用一个`

`包裹整段,或者分成两三个`

`。为了符合“长文用

/

划分小节”,这里其实不长,就一段。直接输出`

...

`即可。 等等,原文本有没有任何列表、引用、代码?没有。 有重要句子可以用``。 让我们仔细看原文本: "Sparse attention typically inherits positional encodings designed for dense attention, despite changing each query's context. Although sparse attention bounds the number of attended keys, these encodings retain large original-sequence distances poorly covered or unseen during training. We argue that positional distances should instead be co-designed with sparse attention, letting long-range interactions share positional representations with short-range ones. To realize this co-design, we make position reindexing native to sparse-attention training: each query's selected tokens receive consecutive positions in their original order during both training and inference, limiting relative distances to the attention budget rather than the full sequence length. Unlike inference-time reindexing in StreamingLLM, native training lets the model adapt to these query-dependent positions rather than merely tolerate them. Applying this rule to rotary position encoding (RoPE) yields ReIndexing RoPE (RiRoPE). A challenge is that query-dependent rotations hinder reuse of rotated keys, erasing the efficiency gains of sparse attention; we address it with structure-aware rotation reuse and fused kernels that preserve tensor-core matrix multiplication without materializing per-pair rotated keys. With matched OLMo-3-7B continued pretraining, RiRoPE outperforms a sparse-attention baseline using RoPE with YaRN at 64K by 6.14 RULER points ($74.10 \to 80.24$) and 4.40 HELMET points ($42.97 \to 47.37$). At 512K---eight times the training length---it retains about 90\% of its 64K RULER score without further training or positional retuning. Native training also outperforms inference-only switching by 21.24 RULER points at 256K. Our work motivates co-designing positional encodings with sparse attention, reframing sparsity not merely as a computational constraint but as an opportunity for better long-context modeling." 为了体现排版,我可以把它分成几个`

`,或者添加`

`。但原文没有小节标题,如果我加`

`就属于“增删改内容”了(虽然规则说长文用h2/h3划分小节,但这里没有小节,硬加标题就是增加内容。所以不加标题,或者只使用`

`和``)。 规则4:保留原文所有信息,不得增删改内容。 所以我不能自己加标题。 我可以把原文本按逻辑分成几个`

`: 段落1:Sparse attention typically inherits... short-range ones. 段落2:To realize this co-design... merely tolerate them. 段落3:Applying this rule to rotary... per-pair rotated keys. 段落4:With matched OLMo-3-7B... long-context modeling. 或者就保持一个`

`,因为原文本就是一个自然段。为了安全,分成几个`

`也是可以的,因为“每个自然段落用

包裹”,原文本如果视为一个自然段,就用一个`

`。如果我手动断行,可能会被认为修改了内容(虽然换段不算修改文字)。最好直接用一个`

`包裹整段,或者在句子间用`
`?不,`

`包裹自然段即可。 我就用一个`

`包含全部文本,并适当使用``来强调重要句子。 重要句子: 1. We argue that positional distances should instead be co-designed with sparse attention, letting long-range interactions share positional representations with short-range ones. 2. Unlike inference-time reindexing in StreamingLLM, native training lets the model adapt to these query-dependent positions rather than merely tolerate them. 3. Our work motivates co-designing positional encodings with sparse attention, reframing sparsity not merely as a computational constraint but as an opportunity for better long-context modeling. 检查特殊字符: $74.10 \to 80.24$ 这里的 `\to` 需要保留吗?原文本中有 `\to`,可能是LaTeX语法。规则说“不得增删改内容”,所以保留 `\to`。或者用HTML实体?直接保留原字符 `\to` 最安全。 512K---eight times the training length--- 这里的 `---` 保留。 90\% 这里的 `\%` 保留。 构建HTML:

Sparse attention typically inherits positional encodings designed for dense attention, despite changing each query's context. Although sparse attention bounds the number of attended keys, these encodings retain large original-sequence distances poorly covered or unseen during training. We argue that positional distances should instead be co-designed with sparse attention, letting long-range interactions share positional representations with short-range ones. To realize this co-design, we make position reindexing native to sparse-attention training: each query's selected tokens receive consecutive positions in their original order during both training and inference, limiting relative distances to the attention budget rather than the full sequence length. Unlike inference-time reindexing in StreamingLLM, native training lets the model adapt to these query-dependent positions rather than merely tolerate them. Applying this rule to rotary position encoding (RoPE) yields ReIndexing RoPE (RiRoPE). A challenge is that query-dependent rotations hinder reuse of rotated keys, erasing the efficiency gains of sparse attention; we address it with structure-aware rotation reuse and fused kernels that preserve tensor-core matrix multiplication without materializing per-pair rotated keys. With matched OLMo-3-7B continued pretraining, RiRoPE outperforms a sparse-attention baseline using RoPE with YaRN at 64K by 6.14 RULER points ($74.10 \to 80.24$) and 4.40 HELMET points ($42.97 \to 47.37$). At 512K---eight times the training length---it retains about 90\% of its 64K RULER score without further training or positional retuning. Native training also outperforms inference-only switching by 21.24 RULER points at 256K. Our work motivates co-designing positional encodings with sparse attention, reframing sparsity not merely as a computational constraint but as an opportunity for better long-context modeling.

检查是否满足所有规则: 1. 只输出HTML片段本身,不要Markdown围栏、不要解释。 -> 满足。 2. 每个自然段落用

包裹,长文用

/

划分小节。 -> 原文只有一段,不需要h2/h3。 3. 列表内容用
  • ,引用用
    ,代码用
    ,重要句子可用。 -> 使用了。
    4. 保留原文所有信息,不得增删改内容。 -> 满足,包括 `\to` 和 `\%` 和 `---`。
    5.