Paper

SAS: A Simple Attention Sparsification That Learns Context Ranking Directly Without Distillation

TL;DR — In post-training attention sparsification, inject the continuous scores produced by the selector into the attention logits as a log gate. This bypasses the gradients blocked by discrete Top-K selection, allowing the selector to be trained end-to-end with the language modeling loss, without auxiliary distillation. As a result, at a tight budget (1024 tokens), it lifts GPQA-Diamond by up to +15.5 points over SeerAttention-R on Qwen3-4B/8B/14B, and cuts decoding latency by up to 5.6× at 512K context.


Core Idea

The bottleneck of long-context inference is attention’s quadratic complexity. With a context of $n$ tokens, if autoregressive decoding reads all preceding tokens at every step, the cumulative cost grows to $O(n^2)$ (source: §3). Most deployed high-performance LLMs use dense attention, which makes post-training sparsification — sparsifying attention after the fact without retraining — practically attractive.

The key question is “how to pick the most useful context units (tokens or blocks) for each query within a limited attention budget” (source: §1). Learnable selector-based methods have emerged, but hard Top-K selection is non-differentiable, so the gradient of the language modeling loss cannot flow to the selector (source: Fig. 1a). Existing methods instead take a detour of distilling the dense attention distribution of each layer into the selector (source: §1).

SAS’s insight is exactly at this point. Distillation teaches the selector “where the original dense model looks,” but this is misaligned with the objective of “what effect it has on the final prediction under a fixed budget” (ranking misalignment) (source: §1). SAS makes the selector’s scores a differentiable part of the attention computation, letting the language modeling loss directly update the selector (source: Fig. 1b).

Central hypothesis: The authors hypothesize that by injecting the selector’s continuous scores into the attention logits as a log gate, one can overcome the ranking misalignment of auxiliary distillation and learn a more accurate context ranking under budget constraints.


Background: The Problem They Address

Standard attention is defined as follows (source: §3, Eq. 1):

$$o = \text{softmax}(qK^\top)\,V$$

where $q \in \mathbb{R}^{d}$ is the query of the current token, and $K, V \in \mathbb{R}^{n \times d}$ are the keys and values of the $n$ preceding tokens. Block-sparse attention restricts the query to attend only to a selected set of blocks $\mathcal{S}$, reducing the cost to $O(|\mathcal{S}|)$ (source: §3, Eq. 2):

$$o = \text{softmax}(qK_{\mathcal{S}}^\top)\,V_{\mathcal{S}}$$

To construct $\mathcal{S}$, the $n$ positions of the context are partitioned into $C = n/b$ blocks $\{B_1, \dots, B_C\}$ of $b$ tokens each, and a lightweight selector $R_\theta(\cdot)$ computes per-block relevance scores $s \in \mathbb{R}^{C}$ before picking the top $K$ blocks (source: §3, Eq. 3):

$$I = \text{Top-K}(s, K), \qquad \mathcal{S} = \bigcup_{m \in I} B_m$$

The problem is that under this hard Top-K, the selected index set is piecewise constant with respect to the scores. In other words, no useful gradient flows from the loss to update the selector (source: §3, Fig. 1a).

The hook that existing learned methods hang on here is per-layer dense attention distillation — supervising the selector to match the original dense model’s attention mass in each layer. This has two critical limitations (source: §1):

  1. Layer-wise objectives ignore cross-layer complementarity. A block missed in one layer can be compensated by another layer, but per-layer local objectives cannot capture this.
  2. Only the attention weights are matched; the effect of the actually attended values (the V matrix) on the final prediction is ignored.

In other words, distillation imitates “where to look (the attention distribution)” but fails to optimize “what actually contributes to the prediction” — this is the research gap the paper defines.


New Approach: SAS (Simple Attention Sparsification)

The core of SAS is the reframing of “selection = context ranking” (source: §4.1). Top-K selection is ultimately determined by the ordering of the selector’s scores. A good selector should assign a higher rank to blocks more useful to the prediction, so making the selector learn a continuous ordering over blocks during training lays the foundation for sparse block selection.

To this end, SAS adopts the following four design choices (source: §4.3):

  1. Inner softmax gate injection: the gate is added to the inner logits rather than outside the softmax.
  2. Normalized gate activation (softmax): the history block scores are normalized with a softmax to calibrate against the always-retained current block.
  3. Continuous gate (soft gate): relative priority is preserved instead of collapsing into a binary Top-K mask.
  4. Sparse training scope: only the selected blocks are updated rather than all blocks, lowering cost.

The selector produces scores $s$ only over the history blocks $\mathcal{H} = \{B_1, \dots, B_C\}$ and converts them into positive gates. The current block $B_0$ is always retained and has gate 1 (source: §4.1, Eq. 4):

$$g = \phi(s) \in \mathbb{R}^{C}_{+}, \qquad g_0 = 1$$

The training-time attention computation is (source: §4.3, Eq. 9):

$$o_{SAS} = \text{softmax}\big(qK_{\mathcal{S}}^\top + \log g_{\mathcal{S}}\big)\,V_{\mathcal{S}}$$

Selected history blocks receive an added normalized log-gate bias, and the current block remains bias-free with gate 1 (i.e., $\log 1 = 0$). At inference, the learned ranking is converted back into discrete Top-K indices for use (source: Alg. 1, 2).

Why the Four Design Choices Matter

In a controlled experiment (Qwen3-4B, GPQA-Diamond, budget 2048 tokens, avg@16), the performance when each design element is swapped is as follows (source: Tab. 1):

Design elementChoiceFinal accuracy (%)
(Baseline) No gate56.1
Gate placementInner softmax vs outer softmax54.4 vs 41.6
Gate activationsoftmax vs sigmoid vs raw logit54.4 vs 17.0 vs 18.8
Ranking preservationContinuous (soft) vs hard STE54.4 vs 46.0
Training scopeFull vs sparse54.4 vs 54.8

The mechanism of each element is as follows:

  • Gate placement: the inner gate directly controls the reallocation of attention mass. The inner gate’s gradient is $dg^{inner}_m = \sum_{i \in B_m} \frac{\tilde{p}_i}{g_m}\,do^\top(v_i - o)$, which lets it learn relative importance across blocks. In contrast, the outer gate’s gradient is $dg^{outer}_m = \sum_{i \in B_m} p_i\,do^\top v_i$, which only multiplies the already-fixed attention probabilities $p_i$, merely rescaling the value contribution of the V matrix (source: §4.2.2, Eq. 5).
  • Gate activation: softmax normalization gives $\log g_m = s_m - \text{LSE}(s)$, providing calibration against the current block. In experiments, the sigmoid gate saturates at 1 and raw logit injection collapses toward 0, ultimately converging to gate-free attention (source: §4.2.2, Fig. 3). The competitive nature of softmax prevents these trivial solutions.
  • Ranking preservation: with a hard STE gate, the softmax denominator sums only over the selected set $\mathcal{S}$, so the weights of dropped blocks $\tilde{p}^{hard}_i = \exp(z_i - \text{LSE}_{\mathcal{S}})$ grow exponentially without bound, causing gradient explosion (source: §4.2.2, Eq. 7, Appx. D.2). The continuous gate normalizes all tokens with a single denominator, keeping weights bounded.
  • Training scope: with the sparse scope, non-selected blocks do not receive their own gradients and are only updated indirectly through the selected blocks, making early convergence slow; however, the final performance converges with the full scope (source: §4.2.2, Tab. 9, Appx. C). Since it is cheaper, subsequent experiments use the sparse scope.

How It Works: A Concrete Walkthrough

Let us trace the full pipeline with a small example. Splitting a context of length $n = 256$ into blocks of size $b = 64$ gives $C = 4$ blocks, and set the budget (number of attended blocks) to $K = 2$.

Step 1 — Selector score computation. Given the query $q$ and each block’s key summary, the selector scores the 4 history blocks. Suppose $s = [0.8, 1.5, 0.3, 0.6]$ (source: Alg. 1, line 1).

Step 2 — Gate transform. Normalize with $g = \text{softmax}(s)$. $e^{0.8} \approx 2.23$, $e^{1.5} \approx 4.48$, $e^{0.3} \approx 1.35$, $e^{0.6} \approx 1.82$, for a total of about $9.88$, so:

$$g \approx [0.23,\ 0.45,\ 0.14,\ 0.18]$$

The current block $B_0$ is given $g_0 = 1$. Here $g$ encodes “relative priority” — a signal that block 2 is the most important (source: §4.1, Eq. 4).

Step 3 — Top-K selection. Pick the top 2 blocks $\{B_2, B_1\}$ by $g$ to form the participation set $\mathcal{S} = B_0 \cup B_2 \cup B_1$ (source: Alg. 1, line 3).

Step 4 — Gate injection. Add the log gates of the selected blocks to the attention logits. Since $\log g \approx [-1.47, -0.80, -1.97, -1.71]$, a bias of about $-0.80$ is added to $B_2$ and about $-1.47$ to $B_1$:

$$o = \text{softmax}\big(qK_{\mathcal{S}}^\top + \log g_{\mathcal{S}}\big)\,V_{\mathcal{S}}$$

Because the gate sits inside the softmax, $B_2$ is allocated more attention mass than the other blocks, and this gradient flows back through $\log g$ to the selector (source: §4.3, Fig. 1b).

Step 5 — Gradient backpropagation. The language modeling loss $L_{LM}$ propagates gradients along the path $o \to g \to s \to R_\theta$, updating the selector so that it ranks “blocks that actually help the prediction” higher (source: §4.3, Eq. 9). Discrete Top-K is only used separately from gate injection at training time, so it does not block gradients.

Step 6 — Inference. After training, blocks are selected simply as $I = \text{Top-K}(s, K)$ without gates, and dense sparse attention is performed (source: Alg. 2). Since only the discrete selection remains, it has the same inference cost structure as the original model.

Kernel implementation. A naive implementation materializes the full attention matrix before adding the gates, causing memory to blow up in long-sequence training. SAS fuses gate injection into the FlashAttention-style tiled $qK^\top$ computation with a Triton kernel. It streams KV tiles, adds the log gates to the logits, masks non-selected blocks with $- \infty$, leaves the current block bias-free, and performs online softmax. The backward pass sums the score gradients of tokens within selected blocks and compresses them into a block-wise log-gate gradient (source: §4.3, Alg. 3, 4, Appx. E).


Performance Validation: Main Results

The evaluation setup has three axes. Reasoning (MATH500, GPQA-Diamond, AIME24, AIME25), long-context understanding (LongBench), and agents (BFCL Multi-Turn, VitaBench). Backbones are Qwen3-4B/8B/14B, and the selector uses the AttnGate architecture, identical to SeerAttention-R with only the training signal differing. The selector was trained on OpenR1-Math-220k (about 93.7K examples) for 1 epoch, with sequence length 32,768, block size 64, AdamW lr 1e-3 (source: §5.1).

Reasoning Benchmarks

SAS’s advantage is largest at a tight budget (1024 tokens) (source: Tab. 2):

MetricSeerAttention-RSASFull Attn
MATH500 (4B)84.6790.6593.93
GPQA-Diamond (4B)39.8450.4156.19
GPQA-Diamond (14B)45.6461.1465.25

That is, +6.0~7.7 points on MATH500 and +10.6~15.5 points on GPQA-Diamond over SeerAttention-R (source: §1). Since the two share the same selector architecture and differ only in the training signal, this gap directly demonstrates that the language modeling loss is a better supervision signal than distillation (source: §5.2).

Training-free sparsification baselines collapse sharply at tight budgets. Sliding Window and StreamingLLM use fixed local patterns and drop context that matters for reasoning, while Quest collapses to 0 points on AIME24/25 at a budget of 2048 (source: §5.2, Tab. 2).

At a budget of 4096, SAS catches up to or overtakes dense attention. For example, on AIME24 (Qwen3-4B), SAS scores 71.72 vs 71.25 for full attention, recovering dense inference performance while reading only a tiny fraction of the KV blocks (source: §5.2, Tab. 2).

Long-Context Understanding

On LongBench, SAS outperforms SeerAttention-R at nearly every budget and backbone. At a budget of 4096, Qwen3-14B averages 56.2 vs 56.6 for full attention, approaching dense (source: Tab. 3). Notably, even though the selector was trained only on math data, it transfers well to long-context understanding — suggesting that the ranking learning is not overfit to a specific task but has learned a general notion of “context useful to the prediction” (source: §5.2).

Agent Tasks

On BFCL Multi-Turn, SAS leads at every backbone and budget, with +3.5 at budget 2048 on Qwen3-4B (32.50 vs 29.00), and nearly closes the gap at budget 4096 on Qwen3-14B (44.00 vs 44.50 for full attention) (source: Tab. 4). On VitaBench as well, at a budget of 4096 it shows advantages across most Delivery/Instore/OTA metrics, demonstrating that end-to-end selection remains stable in realistic long-horizon tool-use settings (source: §5.2, Tab. 5).

Extension to Continued Pretraining

The same end-to-end formulation was applied to the continued pretraining of OLMo3-7B (about 50B tokens, sequence 8,192, 13,000 steps) (source: §5.3). On downstream-task averages, SAS reaches 43.28, on par with sliding window (43.24), ahead of HiLS-Attn-RoPE (41.68), and close to the dense baseline (43.88) (source: Tab. 6). On the LongBench average it records 30.0, tying for first place, surpassing the dense baseline (29.0) and sliding window (28.0) (source: Tab. 7). The improvements are concentrated on >8K long inputs, showing that the gains arise where accurate block selection matters.

Analysis: Why End-to-End Learning Makes a Better Selector

Per-layer mass coverage is actually lower. SAS covers less attention mass in each layer than distillation (source: Fig. 5a). This is because distillation takes “covering the full attention mass” as an explicit objective, whereas SAS was never trained with that objective.

But oracle recall of the cross-layer union is higher. Since selections are distributed across layers, each method’s block selections were merged into a union across all layers and measured for overlap recall against the full-attention oracle set (source: §6.1, Eq. 11):

$$\text{Recall}(I_{all}, I_{all}^{\star}) = \frac{|I_{all} \cap I_{all}^{\star}|}{|I_{all}^{\star}|}$$

SAS consistently records higher recall at every context length and budget (source: Fig. 5b). That is, while distillation fits per-layer local objectives, SAS is trained end-to-end and therefore picks blocks complementarily across layers.

Shorter reasoning traces, fewer truncations. At budget 4096 on Qwen3-4B, SAS produces shorter average generation lengths than distillation and a lower truncation rate at the maximum length of 32,768. The gap is largest on AIME, which requires long reasoning (source: §6.2, Fig. 6). When important context is dropped, the model reasons in a longer, more diffuse way and is prone to hitting the cap; SAS reaches the answer in fewer tokens thanks to more effective selection.

Decoding Efficiency

Measured on SGLang with Qwen3-4B on a single GPU (tp=1), CUDA graphs, and steady-state decoding (source: §6.3). Dense attention reads the entire KV cache at every step and slows down linearly with context, whereas SAS reads only a fixed block budget and stays nearly flat. At batch 1, 8K is nearly tied, while 64K/256K/512K are 2.4× / 4.6× / 5.6× faster. At batch 8, it rises to about 13× at 64K (source: Fig. 7a, 7b).

An interesting finding is the shift of the bottleneck. Decomposing a decode step into selector scoring, Top-K selection, and attention computation, attention is capped by the budget and stays constant regardless of context. In contrast, selector scoring scans all block summaries and grows with context, while Top-K selection grows even faster because it must sort all candidate blocks, rising from 21% at 8K to 90% at 512K (source: Fig. 7c). In other words, at extreme lengths the real bottleneck is not attention itself but the selection stage, which becomes the primary target of future kernel optimization.


Our Perspective: Strengths, Limitations, and Why This Work Matters

Strengths

  • Conceptual simplicity. It removes the entire distillation pipeline (teacher attention storage, per-layer distillation losses) and replaces it with a single “add the gate to the logits.” The selector is trained with a single language modeling loss (source: §4.3). It is highly portable to practice.
  • Reliability of the controlled comparison. The selector architecture and even the inference procedure are identical to SeerAttention-R, with only the training signal changed, cleanly attributing the observed performance gap to “distillation vs. language modeling loss” (source: §5.1).
  • Engineering completeness. It provides both the Triton training kernel (no attention-matrix materialization) and the SGLang inference backend (paged KV cache, FlashInfer, GQA, CUDA graphs), demonstrating that a “simple idea” actually runs at long-context scale (source: §4.3, §5.1).

Limitations

  • Performance degrades at extreme long-context lengths. On RULER, SAS is better than SeerAttention-R but drops sharply as the context grows. At 128K on Qwen3-4B, SAS at budget 4096 reaches only 21.87 vs 63.81 for full attention (source: Appx. B, Tab. 8). The authors diagnose the cause as pooling-based block summaries — needle-like local signals are lost in block compression.
  • The selection stage becomes the new bottleneck. It reduces attention cost, but at extreme lengths selector scoring and Top-K sorting account for 90% of the decode step, eating into the speedup (source: Fig. 7c). A large part of the benefit is concentrated in the 8K–64K context range.
  • Evaluation gaps. Validation is still missing for variables important in real deployment, such as quantization, combination with diverse selector architectures, and heterogeneous per-layer budget allocation.

Why This Work Matters

The paper’s real contribution is not the performance numbers but a principled answer to “how sparse selection should be learned.” It pinpoints why distillation as surrogate supervision is insufficient (ranking misalignment) and, with gradient derivations, how each of the four design choices (gate placement, activation, continuity, training scope) affects the gradient signal (source: §4.2.2, Appx. D). These are design principles reusable by any future learned sparsification method.


What Comes Next: The Road Ahead

The direction the authors state is a more expressive yet efficient selector — one that can capture needle-like fine-grained signals even under block compression, which would narrow the gap on RULER-style long-context tasks (source: Appx. B). In addition, reasonable next steps would be:

  1. Kernel optimization of the selection stage. Mitigating the true bottleneck that Fig. 7c points to (selector scoring + Top-K sorting) with hierarchical indexes or approximate Top-K is the key to sustaining extreme-long-context speedups.
  2. Hierarchical / multi-resolution summaries. Instead of restricting block summaries to a single pooling vector, combining them with low-cost hierarchical summaries (e.g., HiLS-style) could attack the local-signal preservation problem.
  3. Transfer validation across broader distributions. Currently the selector is trained only on math data and shown to transfer to other tasks. Verifying transfer on heterogeneous distributions such as code, retrieval, and dialogue, along with stability on quantized backbones, would raise real-deployment confidence.
  4. Heterogeneous per-layer budgets. The SAS analysis showed cross-layer complementarity. Rather than giving the same Top-K to every layer, reallocating the budget by per-layer importance could yield higher performance for the same compute.

In summary, SAS uses “simplicity” as its weapon to solve the supervision-signal problem of post-training sparsification at the root, and its design principles and engineering form a solid foundation that follow-up research can build on.


Reference — Paper: SAS: Simple Attention Sparsification via End-to-End Optimization of Context Ranking (arXiv:2609.13141v1, 2026). Code: https://github.com/Tencent-Hunyuan/Simple-Attention-Sparsification.

Tables from the paper

Tables converted mechanically from the arXiv e-print LaTeX source. The numbers are the paper’s own and did not pass through a model.

Table 1. Evaluation results on the RULER benchmark.

BudgetMethodQwen3-4B 4KQwen3-4B 8KQwen3-4B 16KQwen3-4B 32KQwen3-4B 64KQwen3-4B 128KQwen3-8B 4KQwen3-8B 8KQwen3-8B 16KQwen3-8B 32KQwen3-8B 64KQwen3-8B 128KQwen3-14B 4KQwen3-14B 8KQwen3-14B 16KQwen3-14B 32KQwen3-14B 64KQwen3-14B 128K
FullFull Attn92.9591.2786.6179.2573.1763.8193.1090.1389.5987.0477.2573.8795.2892.7192.9192.1592.1982.23
2048SeerAttn-R92.0879.2856.0130.2918.1213.0992.1580.1663.7642.1624.4913.9994.4084.5062.8044.7330.7314.95
SAS\xspace92.8278.2263.9439.5425.6517.9292.4581.3969.3446.9430.3119.3894.4385.1069.0154.7634.1223.80
4096SeerAttn-R93.4987.9072.9347.4127.9616.2992.9690.1377.3957.9237.4318.7595.2891.6276.7764.9642.3422.36
SAS\xspace93.4989.0975.7251.9035.5321.8792.9687.9679.8863.5039.1823.4695.2891.5283.3566.8245.9229.95

Table 2. Final accuracy (%) of full training scope versus sparse training scope across model scales and token budgets. Standard deviations are shown in parentheses.

BudgetTrain scopeMATH500 4BMATH500 8BMATH500 14BGPQA-Diamond 4BGPQA-Diamond 8BGPQA-Diamond 14BAIME24 4BAIME24 8BAIME24 14BAIME25 4BAIME25 8BAIME25 14B
1024full91.331.191.711.193.081.051.422.955.622.861.772.9------
sparse90.651.191.271.192.931.050.412.853.172.961.142.9------
2048full93.001.093.091.193.561.054.402.958.432.964.142.868.136.770.736.676.676.755.397.359.277.364.047.2
sparse93.471.093.171.093.541.054.862.858.742.865.092.868.856.670.736.777.766.656.387.358.417.264.197.1
4096full93.101.093.401.094.121.054.802.860.322.864.392.971.176.673.526.778.496.661.307.364.247.167.587.0
sparse93.671.094.231.095.230.855.112.960.422.865.032.871.726.873.496.778.286.459.977.363.417.267.296.9

Table 3. Ablation of four gating design choices on GPQA-Diamond using Qwen3-4B with a 2048-token budget. We report avg@16 accuracy (%), with avgaverage generation length; standard deviations (2.0–2.8) are omitted. $\mathbf{g}_{\sigma}$ denotes sigmoid-activated gates, and full$^{*}$ simulates full-scope training by adding noise before Top-$K$. Formulations show only historical-context terms; the current block always uses a unit gate.

SettingGate Pos.Gate Act.Rank Pres.Train Sco.10 step100 step1000 step1 epoch
Baseline
(1) $\operatorname{softmax}(\mathbf q\mathbf K^\top)\mathbf V$56.18547
I. Gate Position (inner $\operatorname{softmax}$ vs. outer $\operatorname{softmax}$)
(2) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\mathbf g)\mathbf V$inner$\operatorname{softmax}$full30.82527752.28696153.76977154.471091
(3) $\operatorname{softmax}(\mathbf q\mathbf K^\top)(\mathbf g\odot\mathbf V)$outer$\operatorname{softmax}$full28.32559438.91696943.21280141.613807
II. Gate Activation ($\operatorname{softmax}$, $\operatorname{sigmoid}$, or none)
(4) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\mathbf g)\mathbf V$inner$\operatorname{softmax}$full30.82527752.28696153.76977154.471091
(5) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\mathbf g_{\sigma})\mathbf V$inner$\operatorname{sigmoid}$full19.62771720.42799717.62798917.028444
(6) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\mathbf s)\mathbf V$innerfull23.42754019.92741818.92670318.826401
III. Ranking Preservation (continuous vs. discrete)
(7) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\mathbf g)\mathbf V$inner$\operatorname{softmax}$full30.82527752.28696153.76977154.471091
(8) $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\hat{\mathbf{g}})\mathbf V$inner$\operatorname{softmax}$full46.59821142.48438149.67135146.072891
IV. Training Scope (full scope vs. sparse scope)
(9)1 $\operatorname{softmax}(\mathbf q\mathbf K^\top+\log\mathbf g)\mathbf V$inner$\operatorname{softmax}$full30.82527752.28696153.76977154.471091
(10) $\operatorname{softmax}(\mathbf q\mathbf K_{\mathcal S}^\top+\log\mathbf g_{\mathcal{S}})\mathbf V_{\mathcal S}$inner$\operatorname{softmax}$sparse24.82750451.08087153.67401154.874101
(11) $\operatorname{softmax}(\mathbf q\mathbf K_{\tilde{\mathcal S}}^\top+\log\mathbf g_{\tilde{\mathcal{S}}})\mathbf V_{\tilde{\mathcal S}}$inner$\operatorname{softmax}$$^{*}$full$^{*}$26.32735051.27732152.67424152.275521

Table 4. Evaluation results on reasoning benchmarks. Quest$^\ast$ denotes results extracted from Figure 5 of SeerAttention-R using the WebPlotDigitizer tool, while SeerAttn-R$^\#$ denotes our reproduced results. Standard deviations are shown in parentheses.

BudgetMethodMATH500 4BMATH500 8BMATH500 14BGPQA-Diamond 4BGPQA-Diamond 8BGPQA-Diamond 14BAIME24 4BAIME24 8BAIME24 14BAIME25 4BAIME25 8BAIME25 14B
FullFull Attn93.9394.4395.2256.1960.5465.2571.2574.4878.9166.4167.8670.21
1024Sliding Window20.181.3--1.5210.5--------
Quest$^*$10.3831.6554.454.058.7618.15------
StreamingLLM72.721.872.171.873.471.813.861.713.041.819.072.2------
SeerAttn-R84.6783.5786.1239.8439.4345.64------
SAS\xspace90.651.191.271.192.931.050.412.853.172.961.142.9------
2048Sliding Window50.721.8--8.9311.6--5.4712.4--2.1911.1--
Quest40.7468.6681.5212.1724.8341.01012.9825.12012.6627.22
StreamingLLM83.651.583.401.584.971.427.182.427.462.434.062.729.697.225.897.128.857.415.946.115.946.315.686.2
SeerAttn-R91.8591.6793.0249.9454.4161.6855.8358.2363.6545.1643.3048.70
SAS\xspace93.471.093.171.093.541.054.862.858.742.865.092.868.856.670.736.777.766.656.387.358.417.264.197.1
4096Sliding Window75.331.6--23.742.6--19.745.7--16.355.7--
Quest71.5986.6890.7623.2143.1858.0212.4143.9946.6712.4132.1442.13
StreamingLLM91.031.191.121.192.071.140.402.842.272.847.352.945.947.946.358.049.328.131.567.331.157.432.607.5
SeerAttn-R94.1094.0095.1255.4060.4863.8369.3271.3575.7358.5957.8164.79
SeerAttn-R$^{\#}$93.001.194.250.994.830.854.862.859.032.963.672.869.166.969.436.975.106.856.597.657.667.464.697.0
SAS\xspace93.671.094.231.095.230.855.112.960.422.865.032.871.726.873.496.778.286.459.977.363.417.267.296.9

Table 5. Evaluation results on LongBench, grouped by input length (0-4K, 4-8K, and 8K+ tokens).

BudgetMethodQwen3-4B 0-4KQwen3-4B 4-8KQwen3-4B 8K+Qwen3-4B Avg.Qwen3-8B 0-4KQwen3-8B 4-8KQwen3-8B 8K+Qwen3-8B Avg.Qwen3-14B 0-4KQwen3-14B 4-8KQwen3-14B 8K+Qwen3-14B Avg.
FullFull Attn53.952.450.552.257.454.151.754.459.255.655.056.6
2048SeerAttn-R53.551.648.451.257.053.147.652.658.954.351.554.9
SAS\xspace53.652.148.851.557.053.949.353.459.254.453.955.8
4096SeerAttn-R54.052.149.751.957.453.950.053.859.054.853.555.7
SAS\xspace53.852.449.852.057.454.150.453.958.954.854.856.2

Table 6. Evaluation results on BFCL (Multi-Turn).

BudgetMethodQwen3-4BQwen3-8BQwen3-14B
FullFull Attn35.7542.7544.50
2048SeerAttn-R29.0034.3838.88
SAS\xspace32.5036.7539.50
4096SeerAttn-R33.3839.2543.88
SAS\xspace34.3841.2544.00

Table 7. Evaluation results on VitaBench with Qwen3-14B.

BudgetMethodDelivery Avg@4Delivery Pass@4Delivery Pass4Instore Avg@4Instore Pass@4Instore Pass4OTA Avg@4OTA Pass@4OTA Pass4
FullFull Attn29.03.362.04.88.02.727.22.964.04.85.02.212.52.137.04.81.01.0
2048SeerAttn-R32.23.067.04.74.02.019.02.548.45.12.11.54.21.414.94.30.00.0
SAS\xspace30.03.361.04.99.02.919.22.551.05.03.01.710.21.828.04.50.00.0
4096SeerAttn-R32.53.163.04.84.02.026.72.856.04.91.01.011.72.229.04.51.01.0
SAS\xspace34.23.068.04.64.02.028.73.061.04.95.02.212.32.327.04.42.01.4

Table 8. Evaluation results on general downstream tasks for OLMo3-7B continued pretraining.

TaskOlmo3-BaseOlmo3-512SWAHiLS-Attn RoPESAS\xspace-RoPE
General Knowledge
MMLU (5-shot)59.9059.1256.6958.58
GPQA (5-shot)29.2931.3124.7526.77
Hellaswag (10-shot)44.1742.9633.1750.63
ARC-c (25-shot)53.5655.5954.9252.54
BoolQ (5-shot)61.0164.2263.4362.87
Race (3-shot)73.8972.9769.5074.05
Mathematics
CMath41.5339.9842.4442.17
GSM8K37.0033.4335.7134.42
Code
CRUX24.6224.5025.6219.25
HumanEval+20.1019.5018.9020.10
MBPP+37.6032.3033.3034.60
Average43.8843.2441.6843.28

License

Author: Jaehun Ryu

Link: https://jaehun.me/en/posts/sas-simple-attention-sparsification-via-end-to-end-optimization-of-context-ranking/

License: CC BY 4.0

This work is licensed under the Creative Commons Attribution 4.0 International License. You are free to use it for any purpose, including commercial use, as long as you provide proper attribution.

Comments