Paper Reading Notes · arXiv:2610.18654

Kwai Summary Attention V2: one set of Summary tokens as both compressed memory and sparse index

A technical report from Kuaishou's OneRec team. On top of KSA's 3:1 hybrid layout, two drop-in modifications: C-KSA compresses the remote Summary KV one level further into layer-local Meta entries, and S-KSA uses those same Summaries as queries to score and select text blocks. At 1.9B and 128K context, resident cache drops by 40.4%, prefill throughput rises 1.51× and decode 1.27×, while the mean RULER score moves only from 72.61 to 72.39.
Authors: OneRec Team (Kuaishou) Paper: arXiv:2610.18654 Type: Technical Report
KV cache compressionSummary tokenBlock-sparse attentionLong contextHybrid architectureRULERInference speedup
01 · Overview

Overview: KSA V2 in one sentence

The whole report argues one thing: in hybrid architectures built around Summary tokens such as KSA, those Summary tokens are wasted — they are computed at every layer and refined layer by layer, yet they are only ever read as a "low-resolution memory" by the KSA layers. The authors observe that the same Summaries can do two jobs at once: act as KV memory that can be compressed further, and act as the index for sparse routing. Two drop-in layer types follow from that idea, together called KSA V2.

Resident cache (1.9B, 128K)
6.31 GiB vs Hybrid KSA 10.59 / Full 24.00; −40.4% / −73.7%
Prefill throughput (128K)
44,971 tok/s vs 29,837 / 20,830; 1.51× over Hybrid KSA, 2.16× over Full
Decode throughput (128K)
198.85 tok/s vs Hybrid KSA 157.02; 1.23–1.32× across lengths
RULER six-length mean (1.9B)
72.39% vs the parent Hybrid KSA at 72.61%, Full at 67.55%
Remote-history compression factor
$k_s k_m = 1024$ KSA alone only has $k_s = 8$
S-KSA remote budget
$K = 4096$ tokens about 3.9% of the positions in a 128K context

Figure 1 is the report card for the whole paper: capability on the left, cost on the right. On the left, the horizontal axis is RULER accuracy at six sequence lengths (4K→128K); blue Full is dense attention, Hybrid KSA is the parent model, and the rightmost C-KSA+S-KSA (Ours) is the model of this paper. All three are plotted across all six lengths, and the reading is direct: the new model matches or slightly beats the parent at 4K/8K/16K, trails it by less than one point from 32K to 128K, while Full has already collapsed to 48.75% at 128K. The two small panels on the right cover cost: matrix FLOPs per token, and the ratio relative to Full.

Left: long-context and general capabilities; Right: per-token FLOPs and cache size
Figure 1: Left: long-context and general capabilities of 1.9B C-KSA+S-KSA and the reference models reported in KSA. Right: per token inference FLOPs and cache size (1GiB = 230 bytes). The left panel answers "did any capability drop": across six RULER lengths plus Mean plus nine general-capability benchmarks, C-KSA+S-KSA's RULER mean of 72.4 is essentially level with Hybrid KSA's 72.6 while sitting well above Full's 67.6, and general capabilities are broadly on par. The right panel answers "how much was saved": the curves fan out with sequence length, and the two annotations attach to the FLOPs panel and the cache panel respectively. The paper's claim only emerges when the two panels are read together: the savings were not bought with capability. The multipliers annotated in the figure, and their relationship to the paper's text, are covered in the note below — the text and the in-figure labels do not fully agree, and that matters for reproduction. Report p.1

💡 Click any image to open the full-resolution original; click again or press Esc to close.

Reading conventions: every number on this page takes the paper as its authority. Where this page organizes, summarizes, or converts the paper's own configuration, that is marked explicitly with [organized] or [estimated], so it can be told apart from the paper's own figures. Symbols follow the paper: $k_s$ is the text chunk size per Summary, $k_m$ is how many Summaries one Meta entry aggregates, $b$ is the routing block size, $W$ is how many chunks the local window covers, $K$ is the remote token budget of a sparse layer, and $N$ is the text length.
One-line mnemonic: C-KSA is about saving memory (compressing the remote Summary KV by a further factor of $k_m$, but only the copy that gets stored, never coarsening the Summary representation that flows between layers); S-KSA is about saving compute (replacing the Full layers that used to read all history with "first let the Summaries pick blocks, then read only the selected original text blocks"). Neither adds input tokens or changes the token layout, which is exactly why both can be retrofitted into an already-trained model.

Section 2Background: where long-context serving actually gets expensive

To see why KSA V2 looks the way it does, split "expensive" into three distinct kinds of expensive. Each has a different best answer, and lumping them together leads to the wrong conclusion.

The four technical routes the field has taken are, at bottom, trade-offs between these three bills rather than solutions to a single problem:

  1. Per-token compression (GQA (Ainslie et al., 2023), MLA (DeepSeek-AI et al., 2024), and quantization methods such as KIVI) — makes storage per position cheaper while leaving the number of positions unchanged. It compresses "how many bytes per token", not $N$. The payoff on this line is clean and lossless, but the ceiling is explicit.
  2. Sparse attention (DSA (DeepSeek-AI et al., 2025), MoBA (Lu et al., 2025), NSA (Yuan et al., 2025)) — keeps token-level KV and only reduces which positions each query reads. It brings compute and bandwidth down, but the cache itself does not shrink, and it needs an extra criterion for "where should I read".
  3. Sliding window / linear and recurrent attention (sliding window in Mistral (Jiang et al., 2023); recurrent variants in Gated DeltaNet (Yang et al., 2025)) — both storage and compute come down, and the recurrent state is even independent of context length. The price is that direct access to distant original tokens is lost: history can only be read back indirectly through a repeatedly aggregated state.
  4. Hybrid architectures — interleave the above classes by layer, keeping a few full attention layers for direct access to the original text. This is the most robust engineering compromise, and it is where the KSA family sits.
Why hybrid is the main line rather than pure linear.The failure mode of purely linear/recurrent models is not "slightly worse average metrics" but a sudden collapse on tasks that require retrieving an exact distant literal span — an aggregated state is an irreversible summary. Hybrid uses a few full layers as a safety net, downgrading that failure mode from "collapse" to "somewhat more expensive". But it leaves a structural hazard behind: those few full attention layers become the performance and cost bottleneck of the entire model. KSA V2 is aimed squarely at that hazard.

Section 3The upstream KSA recap: how Summary tokens work

Kwai Summary Attention (KSA, (Chu et al., 2026)) is a rather unusual instance of the hybrid route. Its core mechanism fits in one sentence: after every $k_s$ text tokens, insert one learnable Summary token.

Inside a KSA layer, the visible set of a text query splits in two: nearby chunks are read at full resolution (nearby detail matters and is cheap), while distant chunks are read only through their Summary (one KV entry per chunk). That compresses the number of KV entries for distant history from $k_s$ down to 1 — a $k_s$-fold compression along the sequence dimension.

Hybrid KSA interleaves these KSA layers with full attention layers at a 3:1 ratio: three KSA layers followed by one full layer. The left half of Figure 2 in the paper shows exactly this structure.

The most important and most easily missed point: the Summary's KV flows between layers. A Summary token is not an auxiliary entry used only as a cache inside its own layer; its hidden state is passed on as input to the next layer, which reads it and refines it further. The deeper the layer, the more "mature" the information the Summary carries.
This is the key to every design decision in KSA V2: because the Summary must be passed forward, any coarsening of it pollutes every subsequent layer. Conversely, if you want distant history stored more cheaply without polluting later layers, the only way out is "compress on the way into storage, do not compress on the way forward". C-KSA is that sentence translated into an architecture.

The payoff from KSA is real: the paper reports that it outperforms same-sized full attention models on long-range information retrieval. But it also leaves two spaces unexploited — and those two spaces are the entire motivation for KSA V2.

Section 4Two bottlenecks: Summary tokens are under-used

The paper's motivation statement is explicit and can be compressed into one line: a Summary is computed and refined at every layer, yet only ever used as low-resolution memory — losing on both ends.

Bottleneck (i): the compression rate is tied to the chunk

A KSA layer "stores one entry per distant chunk", so compressing harder means only one thing: raising $k_s$. But $k_s$ also determines the granularity of the Summary: the larger $k_s$ is, the more original text each Summary must summarize, so it is a coarser summary; and that coarser Summary is then read and refined by every later layer. In other words, raising $k_s$ is a global coarsening of the representation, and the whole network pays for it.

This is not a theoretical worry. KSA reports its own 4B ablation showing that coarser Summary chunks degrade retrieval performance (the paper restates this conclusion in Related Work, and KSA V2 Section 3.7 runs a dedicated direct-versus-hierarchical compression comparison).

In engineering terms: inside KSA, "save memory" and "keep retrieval accuracy" are two ends of the same knob, and you cannot have only the first. To reach 1024× compression you must move $k_s$ from 8 to 1024, which means each Summary summarizes 1024 tokens — no longer a summary but a flattened average. What KSA V2 does is pull apart two things that used to be welded together: how much you store, and how coarse what you pass forward is.

Bottleneck (ii): the full layer reads all the KV yet pays quadratic prefill

The other half of the waste sits in the full attention layers. Interspersing them among KSA layers does preserve exact access to the original text, but it costs: $O(N^2)$ attention compute during prefill, and reading the whole history for every query during decode. Meanwhile the Summary tokens demonstrably "describe every chunk", and the full layer never consults them at all.

The problem is that most of what the full layer reads in is irrelevant. The measurement the paper offers (an oracle block-selection experiment on a frozen Hybrid KSA, corresponding to Figure 12 and Table 10):

At 128K context, oracle block selection restricts the main attention's read set to about 3.9% of the text positions, yet retains about 82% of the decode attention mass and achieves retrieval performance close to dense.

That statement carries two implications, and both are worth pausing on:

  1. Attention is highly concentrated. Roughly 97% of positions contribute less than 20% of the attention mass. Dense attention spends $O(N^2)$ compute on positions that do not matter.
  2. What is missing is not sparsity but a cheap criterion for "where to look". The oracle is called an oracle because it uses dense attention probabilities to choose. A real system does not have those probabilities, so it needs a router that is cheap enough and learnable during training. And the Summary — which already describes every chunk — is precisely a ready-made router, except that KSA never consults it.

Section 5The core insight: one Summary, two roles

Put the two bottlenecks of Section 4 side by side and the answer is almost self-evident. The paper's insight can be written as one asymmetric statement:

As memory, a Summary can be compressed once more at the moment it is stored, without coarsening the representation that is passed on; as an index, a Summary can direct the exact-access layers to which original blocks to look at. The efficient layers store coarsely, the exact layers read finely, and the Summary connects the two.

Note the most delicate part of that sentence — it avoids coarsening by choosing when to compress rather than how hard:

There is also one property that matters enormously in practice: neither layer type adds tokens or rearranges the Summary layout. Both consume Summaries that already exist, so they can be retrofitted directly into a pre-trained hybrid model — no tokenizer change, no pre-training from scratch. Every experiment in the paper follows that route, which is also why its experimental cost stays at the "continued pretraining" scale.

Difference from neighbouring work (citation attribution follows the paper's own labelling). CSA in DeepSeek-V4 (DeepSeek-AI et al., 2026) also performs learned dimension-wise aggregation, but it aggregates the KV of text tokens and lets the result participate in subsequent computation as a new entry; C-KSA aggregates the KV of Summaries, and its product is private to the layer. S-KSA differs from DSA in that DSA selects at token level whereas S-KSA drops to block level, with $b$ times fewer routing candidates; and differs from CSA in that CSA's main attention reads compressed text, while S-KSA's main attention reads the original text KV.

Section 6Architecture overview and overall payoff

The figure below is worth a few minutes to map every block onto the text. On the left is the Hybrid structure of KSA V1, in the middle the two ways the new layers are substituted in, and on the right the overall shape of KSA V2.

Architecture overview: from Hybrid KSA to KSA V2
Figure 2: Architecture overview: from Hybrid KSA to KSA V2. Left: the Hybrid structure of KSA V1, with Full layers and KSA layers interleaved 3:1 and the KV compression rate tied rigidly to the Summary layout. Middle: how the two new layer types substitute in — three KSA layers become C-KSA (compressing Summary KV into Meta KV inside the layer; note the $1/k_m$ marked in the figure), and the fourth, Full layer becomes S-KSA (sink + selected blocks + local KV). Right: the final shape of KSA V2, where the Summary token layout is completely unchanged, which is what makes retrofit possible. The thing to hold onto when reading this figure is "no new tokens, no layout change — the only thing that changes is how each layer reads and writes KV". Report p.3

The overall conclusion the paper draws condenses into one line: at 1.9B (MHA) and 128K sequence scale, resident cache drops 40.4%, prefill throughput rises 1.51×, and decode throughput rises 1.27× relative to Hybrid KSA; relative to Full the cache reduction is 73.7% and the prefill speedup 2.16×.

The finer breakdown lives in Figure 1 in Section 1. It has two panels answering two different questions, and they should not be read as one; the note below is written against the annotations in that figure.

The multipliers in the right panel: the text and the in-figure labels disagree, so always say which source you are quoting.
• Text (Section 3.6): at 128K, per text token matrix-FLOPs is lower by 6.38× relative to Full and by 2.76× relative to Hybrid KSA; the BF16 KV and index-key cache is smaller by 3.86× relative to Full and by 1.35× relative to Hybrid KSA.
• In-figure labels: the FLOPs panel reads "6.4× lower" and "2.3× lower"; the cache panel reads "3.9× smaller" and "2.9× smaller".
• Cross-check [organized]: the two comparisons against Full agree (6.4≈6.38, 3.9≈3.86); the two comparisons against Hybrid KSA do not — the in-figure 2.3× / 2.9× correspond to the text's 2.76× / 1.35×. The cache item can also be cross-validated against the paper's own measured values: at 128K the resident cache is Full 24.00 GiB, Hybrid KSA 10.59 GiB, C-KSA+S-KSA 6.31 GiB, so $24.00/6.31 = 3.80$ (matches the in-figure 3.9) while $10.59/6.31 = 1.68$ (matches neither the text's 1.35 nor the in-figure 2.9). This page consistently uses the written Section 3.6 numbers, and marks 2.3× / 2.9× as "in-figure label, inconsistent with the text".

Section 7Three contributions and how to read the rest

The paper states three contributions, each matching a problem it solves:

  1. C-KSA: at storage time, compress Summary KV into layer-local Meta entries, so that further compression of distant history no longer requires coarser Summaries.
  2. S-KSA: turn the existing Summaries into block-level routing keys and run sparse attention over the selected original-text blocks.
  3. Deployment and boundaries: a retrofit recipe and GPU kernels that convert a pre-trained Hybrid KSA, with RULER performance level with the parent model; plus an explicit report of where the remaining cost sits and under what conditions the method fails.

The third deserves a separate sentence. This report is candid about failure modes: the remaining cost is mainly the original-text KV kept by the sparse layers, and block selection degrades on aggregation-heavy tasks (frequent-word extraction falls from 45.00% to 26.67%). A technical report willing to spell out its degradation is worth more to an engineer than two extra points of headline metric.

How to read on.Section 8 onwards is the method proper: notation and overall layout first (Section 8), then C-KSA's two-level aggregation (Section 9) and attention-mass correction (Section 10), then S-KSA's block aggregation and routing (Section 11). Section 12 uses the configuration in Table 2 to turn every symbol into a countable integer — it is worth doing the arithmetic yourself as you go. Section 13 covers the KV cache layout and memory analysis, and Section 14 the kernels.

Section 8Notation and overall layout: count your cards first

The method section pins down its symbols immediately. Every formula that follows uses them, so two minutes spent here pays for itself many times over.

The overall layout follows Hybrid KSA's 3:1: three C-KSA layers followed by one S-KSA layer, repeating. This matters — KSA V2 does not change the layer ratio, it only replaces each layer of the old "three KSA + one Full" pattern with a stronger version. The conversion is therefore drop-in: layer count, width, Summary layout and tokenizer are all untouched.

Why does the 3:1 ratio not need changing?Because the two new layer types address two orthogonal wastes inside the hybrid structure: C-KSA makes the memory-saving layers cheaper still, and S-KSA makes the exact-access layer cheaper. The 3:1 ratio itself encodes an empirical question — "how thick does the accuracy safety net need to be" — and KSA V2 has no evidence to move it, so it does not. That is engineering restraint in the right place.

Section 9C-KSA part one: two-level aggregation, Equations (1)–(4)

What C-KSA does fits in one sentence: KSA already inserted Summaries into the text sequence; C-KSA aggregates the Summary sequence once more. It pools every $k_m$ consecutive Summary KV entries into a single Meta KV entry, so the compression factor for distant history goes from $k_s$ to $k_s k_m$, while nearby text stays directly readable.

There are two levels of aggregation here, pointing in completely different directions — do not mix them up:

Level one: Text → Summary (pre-existing in KSA)

Cut the text sequence into chunks of $k_s$ tokens and append one Summary token $S_c$ at the end of each chunk. All Summaries share the same learnable initial embedding and use exactly the same attention and FFN parameters as text tokens — a Summary is not a special side module, it is simply another kind of token in the sequence.

At each layer, $S_c$ attends to the text tokens inside its own chunk plus itself, aggregating chunk-level information from them. There is one positional detail: text tokens keep their original position indices, while $S_c$ uses the position of the last text token in its chunk.

Why does a Summary reuse its chunk's last position?Three reasons stack up: (1) it is causal — a Summary may only see its own chunk and earlier text, and the last position does not let it peek at the future; (2) it places the Summary right next to the content it summarizes in position space, consistent with the distance semantics used in Section 10; (3) reusing the position means no extra position bucket and no change to the position-embedding table. The cost is that a Summary shares a position with the last text token of its chunk, so the two can only be told apart by content rather than by position — which is exactly why Section 10 has to distinguish "local text KV" from "boundary Summary KV" as two separate classes of visible entry.

Level two: Summary → Meta (new in C-KSA)

Now the core of the paper. Inside each C-KSA layer, cut the Summary sequence into non-overlapping groups of $k_m$. For the $r$-th Summary in group $g$ ($0 \le r < k_m$), let its normalized layer input be $h_r \in \mathbb{R}^d$ ($d$ being the hidden size). Equation (1) computes three things at once:

$$ k_r = \mathrm{RMSNorm}(W_K h_r), \qquad v_r = W_V h_r, \qquad z_r = A h_r. \tag{1} $$

Take it term by term, because each term plays a different role:

One shape detail is worth noting: the RMSNorm is applied independently per attention head. That means the key scales of different heads do not interfere with one another, and aggregation weights can form separately within each head.

Equation (2) then turns these logits into weights:

$$ [\alpha_0, \ldots, \alpha_{k_m-1}] = \mathrm{softmax}_{\text{group}}\big[\, z_0 + B_0,\; \ldots,\; z_{k_m-1} + B_{k_m-1} \,\big]. \tag{2} $$

Three points:

  1. $B_r \in \mathbb{R}^{d_{KV}}$ is a new, learnable intra-group positional bias. It gives "the $r$-th Summary in the group" an identity — without it, pooling would be entirely symmetric with respect to order inside the group, whereas intra-group position does carry information (later Summaries cover more recent content).
  2. The softmax runs over the $k_m$ Summaries, so for each group $\sum_r \alpha_r = 1$ (coordinate-wise). It is a convex combination, so the output naturally lies inside the convex hull of the inputs and cannot blow up numerically through aggregation.
  3. The softmax is taken independently for each feature coordinate (the paper explicitly writes "independently for each feature coordinate"). This is counter-intuitive but important: $\alpha_r$ is not a scalar weight but a vector of width $d_{KV}$. Feature dimension 37 can prefer the second Summary in the group while dimension 38 prefers the fifth. This is what the paper calls dimension-wise aggregation (the same lineage as DeepSeek-V4 (DeepSeek-AI et al., 2026)), and it is why the equations below use element-wise multiplication rather than scalar weighting.

Equation (3) performs the pooling:

$$ \bar{k} = \sum_{r=0}^{k_m-1} \alpha_r \odot k_r, \qquad \bar{v} = \sum_{r=0}^{k_m-1} \alpha_r \odot v_r, \tag{3} $$

Here $\odot$ is element-wise multiplication. The same set of weights aggregates both key and value — a deliberate design choice: if two independent weight sets aggregated K and V, then $\bar{k}$ and $\bar{v}$ could come from different preferences over the Summaries in the group, K and V would no longer be "paired", and both the interpretability and the stability of attention would suffer. Sharing one set of weights guarantees that $\bar{k}$ and $\bar{v}$ describe the same aggregated object.

Finally, Equation (4) attaches position information to the pooled result:

$$ M_g = \big(\mathrm{RoPE}(\bar{k},\, p_g),\; \bar{v}\big). \tag{4} $$

Here $p_g$ is the position of the last Summary in the group. Two deliberate choices live here:

Meta is used only inside its own layer and is not passed forward

Right after Equation (4), the paper nails down the foundation the whole method rests on:

Meta entries are used only inside the layer that constructs them; the original Summary states continue to propagate across layers. Therefore $k_m$ can vary freely across C-KSA layers without changing the shared Summary token layout.

That sentence explains how bottleneck (i) from Section 4 is dissolved. Look back: the reason raising $k_s$ is dangerous in KSA is that the Summary is passed forward, so coarsening pollutes every later layer. C-KSA makes the compression product $M_g$ private to its layer — it is a read-only view that is discarded after use, never entering the hidden-state sequence. Consequently:

Now the cost side, which deserves the same clarity. A Meta that is not passed forward is not a "better representation", only a "cheaper read view": what this layer reads from the Meta cannot be inherited directly by the next layer, which must re-compress from the Summaries handed down to it. In addition, the parameters $A$ and $\{B_r\}$ are per-layer ("specific to each layer") but shared across groups ("shared across groups") — a layer has one set of aggregation rules used by all Meta groups, so the parameter overhead is $O(d \cdot d_{KV} + k_m d_{KV})$ rather than multiplied by the number of groups.

Compressed KSA with ks=4 and km=2
Figure 3: Compressed KSA with $k_s = 4$ and $k_m = 2$. Complete remote Summary groups are compressed into Meta KV, while boundary Summary KV and local text KV remain directly accessible. This figure states "who can be seen" most clearly. The sequence is laid out with one chunk per 4 text tokens, and $k_m=2$ means two Summaries per group. In the Remote region on the left, $S_0,S_1$ form a complete group and are compressed into $M_0$, while $S_2,S_3$ become $M_1$ — for the current query they appear only in Meta form. In the Local region on the right, the most recent $S_4$ still appears as a raw Summary (it is a boundary Summary, because its group is not yet full), and the current chunk's text tokens are visible as original text. The line at the bottom, $a_{tj}=q_t^\top k_j/\sqrt{d} + \mathbb{1}_{j \in \mathrm{Meta}}\log k_m$, is the correction term from Section 10 — for now it is enough to remember "add a constant to Meta". Report p.4

Section 10C-KSA part two: three classes of visible KV and attention-mass correction

Three classes of visible KV: one softmax, three sources

For each text query, C-KSA's visible set is assembled from three parts:

  1. local text — the causal prefix of the current chunk, plus the original text KV of up to $W$ complete preceding chunks. This part is full-resolution and lossless.
  2. boundary Summary — the Summaries immediately preceding the local window that have not yet filled a group (fewer than $k_m$ of them). They remain individually visible until their whole group falls outside the window.
  3. remote Meta — every complete $k_m$-group outside the window, represented by one Meta KV entry.
All three classes participate in the same attention softmax.The paper is careful to stress "All three types of entries participate in a single attention softmax" — it is not three attention passes concatenated or blended with weights, but one unified softmax denominator holding entries at three different granularities: local text, boundary Summaries and Meta. That design makes the relative weight between granularities learnable and constrained by a single normalization, with no hand-set mixing coefficient. The price is the problem below.

The problem: compression steals attention mass from the far end

Replacing $k_m$ entries with 1 entry has a purely statistical side effect: the softmax denominator has fewer terms. Even with local logits completely unchanged, the total mass the far end receives after normalization drops — because $k_m$ entries used to contribute $e^{s_i}$ each, and now only one contributes $e^{s}$.

The paper names this phenomenon attention-mass correction, and handles it by adding $\log k_m$ to every Meta logit before normalization:

$$ \exp\big(s + \log k_m\big) = k_m \exp(s). \tag{*} $$

The derivation is one line, but why this particular term is worth spelling out:

What this term does and does not do.It does not try to recover the intra-group detail lost to pooling (that is information loss, and a constant cannot buy it back); it only corrects the normalization bias introduced by having fewer entries. In one sentence: $\log k_m$ keeps the "remote versus local" share of attention from drifting systematically because of compression. Whether the far end's internal detail is remembered clearly depends on how well the aggregation module learns. The term $+\,\mathbb{1}_{j\in\mathrm{Meta}}\log k_m$ in Figure 3 is exactly this indicator-function form of the correction.

Two implementation details remain:

Section 11S-KSA: using Summaries as the router and reading only selected original blocks

S-KSA replaces the full attention layer. It has exactly one question to answer: given a text query, which original blocks should I read? Its answer is "let the Summaries work it out for me". The pipeline has three steps: block representation → block scoring → sparse read.

Step one: Summary-guided block aggregation, Equations (5)–(6)

Cut each chunk further into blocks of $b$ consecutive text tokens ($b$ divides $k_s$). For a block $u$, let its normalized layer inputs be $h_1,\ldots,h_b \in \mathbb{R}^d$ and the normalized input of its chunk's Summary be $h_S \in \mathbb{R}^d$. Using one auxiliary attention head of width $d_A$ (head subscripts omitted):

$$ q_S = \mathrm{RoPE}\big(\mathrm{RMSNorm}(W_{Q_A} h_S),\, p_S\big), \qquad k_i = \mathrm{RoPE}\big(\mathrm{RMSNorm}(W_{K_A} h_i),\, p_i\big), \qquad v_i = W_{V_A} h_i. \tag{5} $$

Here $W_{Q_A}, W_{K_A}, W_{V_A} \in \mathbb{R}^{d_A \times d}$ are auxiliary projections private to each S-KSA layer and completely independent of the backbone's attention projections. The positions $p_S$ and $p_i$ follow the original sequence positions, with a Summary still sharing the position of its chunk's last text token.

$$ \hat{z}_u = V^A\, \mathrm{softmax}\!\left(\frac{(K^A)^\top q_S}{\sqrt{d_A}}\right), \qquad K^A = [k_1,\ldots,k_b],\;\; V^A = [v_1,\ldots,v_b]. \tag{6} $$

The direction of Equation (6) deserves a long look, because it is the most counter-intuitive step in S-KSA:

Step two: block scoring, Equation (7)

With block representations in hand, a cheap scorer is needed to rank blocks. S-KSA adapts the Lightning Indexer (DeepSeek-AI et al., 2025):

$$ \rho_u = \sum_{h=1}^{H_I} w_h\, \mathrm{ReLU}\!\left(\frac{(q_h^I)^\top k_u^I}{\sqrt{d_I}}\right). \tag{7} $$

Step three: sparse access, Equation (8)

Given block scores $\{\rho_u\}$, S-KSA selects at most $K/b$ remote blocks ($K$ being the remote budget in original text tokens), and then:

$$ O_t = \mathrm{Attn}\big(q_t,\; [K_{\mathcal{L}_t}, K_{\mathcal{R}_t}],\; [V_{\mathcal{L}_t}, V_{\mathcal{R}_t}]\big), \tag{8} $$

Square brackets denote concatenation along the sequence dimension, $\mathcal{L}_t$ is the set of local positions and $\mathcal{R}_t$ the set of selected remote positions. Three constraints must hold simultaneously, or causality breaks or budget is wasted:

Attention is then computed by the backbone's original Q/K/V, with a single softmax over local and remote tokens in each head. In other words, the routing score $\rho_u$ is used only to select blocks and does not participate in the attention weighting — inside a selected block, everything is scored by the real q·k as usual. That distinction matters: it makes the main attention numerically identical to dense attention on the selected set.

The cost ledger: where $O(N^2/b)$ comes from

For $N$ text tokens, S-KSA builds about $N/b$ index keys, so there are $b$ times fewer candidate comparisons than a token-level index; the routing cost during prefill is $O(N^2/b)$, while the main attention reads only the in-budget original blocks for each query.

One line of derivation: $N$ queries, each compared against about $N/b$ block keys, computed per head → $O(N \cdot N/b) = O(N^2/b)$. Against the $O(N^2)$ of token-level DSA, that saves exactly one factor of $b$ — which is why the choice of $b$ (Section 12) is the trade-off point between retrieval quality and routing cost.

Sparse KSA with ks=4 and b=2
Figure 4: Sparse KSA with $k_s = 4$ and $b = 2$. The left half is the two-level information flow: text tokens inside a block go through $W_K/W_V$ to produce block representations $\hat{z}_4,\hat{z}_5$, while the chunk's Summary $S_2$ supplies the query through $W_Q$; the two paths meet in the "Block indexer" to pick block indices by Top-K. The top right is the key point — the auxiliary attention head and the main attention use independent QKV projections (the "Independent projections" branch in the figure), and what the auxiliary head computes is only an index; the main attention uses the original Q to read the original text KV of Sink + selected blocks + Local, producing $O_t$. Note that the figure uses $b=2$ and $k_s=4$, so each chunk has 2 blocks, and the selected blocks (Block 4, Block 5) participate in attention as original text. Report p.5

Section 12Putting the configuration on concrete numbers: a countable walkthrough

Everything so far has been symbols. This section turns them into integers you can count — the most effective thing a reader can do with a technical report is to work through its configuration table by hand. The configuration comes from Table 2. Look at the figure first, then do the arithmetic.

Table 2: Configurations of the selected 1.9B and 4B models
Table 2: Configurations of the selected 1.9B and 4B models. Module settings apply where the corresponding modules are used. The top part is the shared backbone, the middle the C-KSA configuration and the bottom the S-KSA configuration. When working through it, focus on these rows: layer count, the 3:1 hybrid ratio, $k_s$, the Summary-to-Meta group size $k_m$, the block size $b$, the remote token budget $K$, the local window length and the sink tokens. Two comparisons are especially interesting: 1.9B uses $k_m=128$ while 4B uses $k_m=32$ (with a larger hidden size and more layers, 4B chose the more conservative compression granularity), whereas $K$, $b$, the local window and the sink are identical between 1.9B and 4B, marking them as engineering constants fixed across scales. Report p.13

Take 1.9B as the example: 24 layers, 3:1 hybrid ratio, $k_s=8$, $k_m=128$, $b=4$, $K=4096$, local window 1024, sink 8.

Walkthrough 1: how many layers of each kind in 24 layers

3:1 means "three C-KSA layers followed by one S-KSA layer" is one cycle of 4 layers. Direct integer division:

$24 \div 4 = 6$ complete cycles, hence C-KSA layers $= 6 \times 3 = \mathbf{18}$ and S-KSA layers $= 6 \times 1 = \mathbf{6}$. Check: $18+6=24$, matching the layer count in Table 2. ([estimated]: obtained by dividing Table 2's layer count by the hybrid ratio.)

That number immediately earns its keep: of the 24 layers in the whole model, only 6 need to store original-text KV; the other 18 all take the compressed path. When Section 13 asks "where does the remaining cost sit", it is pointing at these 6 layers.

Walkthrough 2: how many Meta entries a C-KSA layer holds at 128K

Work forwards:

  1. Number of text tokens $N = 128\text{K} = 131072$.
  2. Each Summary covers $k_s=8$ text tokens, so the number of Summaries is $N/k_s = 131072/8 = \mathbf{16384}$. ([estimated]: direct division using $k_s=8$, not counting each chunk's extra Summary position itself.)
  3. Every $k_m=128$ Summaries compress into one Meta, so the number of Meta entries is $16384/128 = \mathbf{128}$.
At 128K context, one C-KSA layer holds only about 128 Meta entries to represent all of distant history.The paper uses this to explain why $k_m=128$ is enough: since at 128K only about 128 entries remain, raising $k_m$ further saves very little cache, so the larger compression factors are left for million-token contexts. It is also a neat example of configuration choice meeting diminishing returns — once the entry count is already the same order as a constant, stop.

Walkthrough 3: the remote compression factor $k_s k_m$ and per-token width

The sequence-dimension compression factor for distant history is the product of the two levels:

$k_s \times k_m = 8 \times 128 = \mathbf{1024}$. ([estimated]: product of the two compression factors.) In other words, distant history is compressed 1024-fold along the sequence dimension.

Translate that into "how much KV width each original token occupies", using Table 1's example settings $H=128$, $d_h=128$, $H_{KV}=8$:

([estimated]: applies the paper's Table 1 formulas $2 N H d_h /(k_s k_m)$ and $2 N H_{KV} d_h /(k_s k_m)$ with the widths and compression factor above. Note that $H=128$, $d_h=128$ here are Table 1's example settings and not the 1.9B configuration — 1.9B actually has 16 Q/KV heads with head dim 128.)

Walkthrough 4: converting $K$ and $b$ into blocks, and the routing candidate count

$K=4096$ is a remote budget measured in original text tokens, with block size $b=4$, so:

Selectable remote blocks: $K/b = 4096/4 = \mathbf{1024}$ blocks. ([estimated]: $K$ is defined in tokens, so dividing by the block size gives the block count.)

The size of the index space can also be counted: at $N=128\text{K}$ the total number of blocks is $N/b = 131072/4 = 32768$, whereas a token-level index would have 131072 candidates. Block-level routing therefore reduces each query's comparison set from 131072 to 32768, exactly a factor of $b=4$. ([estimated]: direct division from the definition of the candidate count.) This is the concrete origin of the $b$ in Section 11's $O(N^2/b)$.

One more conversion is easy to miss: the 8 sink tokens are already included inside $K=4096$, while the 1024-token local window is retained separately and does not draw on that budget. So a query at 128K context actually reads at most about $4096 + 1024 = 5120$ text tokens, i.e. about 3.9% of 131072. ([estimated]: $5120/131072 \approx 3.91\%$, consistent with the "about 3.9% of positions" the paper reports in the oracle experiment.) That 3.9% is the scale at which Section 4's $O(N^2)$ gets cut down — the paper's insight (attention is highly concentrated) and its configuration ($K$, local window) balance their books here.

Walkthrough 5: added parameters and a budget self-check

Table 2 also gives the added parameter counts: for 1.9B, 80.2M on the C-KSA side and 86.6M on the S-KSA side; for 4B, 71.7M and 163.0M respectively. The checkable part of C-KSA is the aggregation projection $A$ and the positional bias $\{B_r\}$:

What this set of numbers suggests:the aggregation module itself is "light" (single-digit millions), so C-KSA is a cheap architectural change in parameter terms; what really drives cost is that it changes the read/write width and the entry count of the KV. That is good news for an engineer — retrofitting a trained model requires very little new learning, while the payoff (cache and bandwidth) is large.

Section 13KV cache layout, memory analysis, and mechanism comparison

Whether a method can ship ultimately depends on how the cache is laid out and updated. C-KSA's cache design has one hard requirement: every text query must be able to read all of its visible KV entries with a single contiguous slice, avoiding the need to stitch several cache segments together at each step. That requirement determines the entire layout.

12.1 Structure: two components

Each C-KSA layer maintains two parts:

  1. Attention KV Cache — key and value live in two tensors but with identical layouts, ordered along the sequence dimension as: the current chunk, the local text ring, remote history, and finally free slots.
  2. Summary Ring Buffer — holds the Summary KV of the local chunks plus the auxiliary state needed for compression.

On sizes: the current chunk reserves $k_s$ text slots, the local ring reserves $k_s W$ slots (corresponding to $W$ complete preceding chunks), and remote history holds Meta entries plus the Summaries that have not yet filled a $k_m$ group and are waiting to be compressed. The two rings share the same pointer, pointing at the next chunk slot to be replaced.

One rule is easy to overlook but central to understanding the behavior: as long as a chunk is still inside the local window, text queries read its original text KV, not its Summary KV. Only when the chunk is pushed out of the window does its Summary KV enter remote history.

12.2 The five-step update flow (panels a–e of Figure 5)

The paper walks the whole update through a small example with $k_s=2$, $W=4$, $k_m=4$. Panel by panel:

C-KSA cache layout and decoding updates
Figure 5: C-KSA cache layout and decoding updates with $k_s = 2$, $W = 4$, and $k_m = 4$. Gray ($T$), orange ($S$), and purple ($M$) denote text, Summary, and Meta KV. Blue marks indicate reads or writes. The five panels are one continuous event sequence and are best read a→e. (a) is the static layout: the blue outline circles one contiguous visible KV cache (assembled from the local text ring, the Meta entries of remote history, and some Summaries), with the Summary Ring Buffer below, the two linked by the same pointer. (b)(c) are writes: text KV fills the current chunk region right-to-left, and a new Summary attends only to its own chunk's text KV plus itself. (d) is the ring replacement: a new chunk evicts the oldest chunk, and the evicted $S_7$ moves into remote history. (e) is compression: the four Summaries $S_4$–$S_7$ merge into $M_1$, written back into the group's first slot, with the other three slots freed. Report p.7

Step by step:

The clever part of the design is in (e):compression is not "move four entries somewhere new and free four slots" but "write the result in place into the first slot and free the other three". The cost is having to guarantee that a Meta entry's position is still ordered in sequence semantics (the history it represents really does sit around there); the benefit is that the visible region always remains a single contiguous block of memory. This is also why the decode path can use plain SDPA without a gather kernel — Section 13 comes back to that point.

12.3 Memory analysis: Equations (9)–(10)

Let $N$ be the text length, $H$ and $H_{KV}$ the query / KV head counts, $d_h$ the head width, and $w$ the local text window. KSA's main cache term is $2 N H_{KV} d_h / k_s$; C-KSA replaces it, following the compression rules of Section 9, with:

$$ M_{\text{C-KSA}} = 2 H_{KV} d_h \left[\frac{N}{k_s k_m} + O\!\left(\frac{k_s}{W} + W + k_m\right)\right]. \tag{9} $$

Read this expression in two blocks, because their magnitudes are entirely different:

The one thing to remember from this analysis:1024× is only the nominal compression factor for distant history; the local and auxiliary terms still exist. At a fixed compression factor the cache is still linear in $N$ — what KSA V2 does is shrink the slope, not turn growth into a constant. Any retelling that claims "the cache no longer grows" has misread it.

Another property is orthogonality: C-KSA preserves KSA's orthogonal relationship with per-position compression (GQA / MLA) — the extra $k_m$ factor simply multiplies the sequence compression, changing neither the number of KV heads nor the representation width. So combinations such as C-KSA+GQA and C-KSA+MLA can be written down directly.

Finally, the overall saving of the hybrid model has a compact expression. Let $f$ be the full-layer fraction; when layer counts and KV widths match:

$$ \frac{M_{\text{C-KSA+Full}}}{M_{\text{Hybrid KSA}}} \simeq \frac{f + (1-f)/(k_s k_m)}{f + (1-f)/k_s}. \tag{10} $$

Substituting $f = 1/4$ (the 3:1 layout) exposes an important structural fact: $f$ remains in both numerator and denominator, so the Full layers cap how much the whole model can save. In plain language — however hard the KSA layers compress, as long as a quarter of the layers still run dense full attention, that slice of cache saves nothing. This is precisely why S-KSA exists: without removing the last dense layer, the numerator of Equation (10) is forever propped up by $f$. ([estimated] example: substituting $f=1/4$, $k_s=8$, $k_m=128$ into (10) gives a ratio $\approx 0.73$, i.e. whole-model cache falls to about 73% — the same direction as the paper's measured 40.4% reduction; the difference comes from the measured basis also including the indexer, auxiliary state and workspace, and from the Full layer's own larger KV width. The 0.73 here and the 40.4% are not the same basis and must not be compared by subtraction.)

The gap between "nominally 73%" and "measured 40.4%" above is not a typo; it is the key to reading the paper's efficiency claim, and it deserves a ledger of its own. The paper's 1024× compression is a nominal figure for remote-history KV (Table 1, §2.3.2), whereas the headline "40.4% lower" is a measured figure for 128K resident cache (Figure 11a, §3.6) — two orders of magnitude apart. The chart below puts the two bases side by side — nothing in the paper does this (Figure 6 plots cache against sequence length, Figure 11a plots measured bars for three models), so this page adds it:

Self-drawn: KV cache under two accounting bases — nominal remote-history share versus measured 128K resident cache share
Self-drawn:1024× is the ledger for remote history, not for whole-model cache — the gap between the same set of models under two bases: "nominal compression rate" and "measured 128K resident cache". How to read it: two rows per model — light gray is the nominal remote-history KV as a share of Full, dark is the measured 128K resident cache as a share of Full. All data comes from the paper only: the nominal basis is taken from the Compression Rate column of Table 1 and the $1/(k_s k_m)$ of §2.3.2; the measured basis is taken from Figure 11(a) and the three absolute values in §3.6 (Full 24.00 GiB, Hybrid KSA 10.59 GiB, C-KSA+S-KSA 6.31 GiB), with the shares [estimated] by this page using 24.00 as the denominator (44.1%, 26.3%) rather than given directly by the paper. The gap to look at: C-KSA's nominal remote history is only 0.098% of Full, yet the measured resident cache is still 26.3% of Full — two orders of magnitude apart. The paper explains where the difference comes from: §2.3.2 notes that $k_m$ acts only on the "growing history term", whereas the local window ($O(k_s W)$), sinks, index keys, auxiliary state and resident workspace are all bounded but do not shrink with $k_m$. So the headline "40.4% lower" is a measured figure against Full and cannot be mixed with "1024×". Compiled from Table 1 (Report p.8), §2.3.2 (Report p.9), Figure 11a and §3.6 (Report p.18); shares are [estimated]

12.4 Table 1: mechanism comparison, and how two compressions multiply

Table 1: KV-cache cost comparison for a sequence of N text tokens
Table 1: KV-cache cost comparison for a sequence of $N$ text tokens. Example settings use $k_s = 8$, $k_m = 128$, $H = 128$, $d_h = 128$, $H_{KV} = 8$, $d_c = 512$, and $d_r = 64$. Compression rates are relative to MHA. The value of this table is that it splits "effective context" and "compression rate" into two columns, and the two columns do not say the same thing. Look at the GDN and SWA rows: both have a compression rate marked ≈0%, yet their Effective Context column reads ambiguous and $w$ (exactly) — meaning they are not "keeping all positions but storing them more cheaply", they no longer keep all positions at all (a recurrent state cannot be read back position by position, and a sliding window simply cannot see past its edge). The 0% on the right does not mean they save no memory; it means "this compression rate is computed against MHA's KV entry count, and they are no longer in that coordinate system". The KSA row, by contrast, reads $N$ (summarized): positions are replaced by summaries but remain individually addressable entries. Further down, the C-KSA row moves the compression rate from $1/k_s$ to $1/(k_s k_m)$ — that is what "two compressions multiplying" looks like concretely. Report p.8

Reading the compression column top to bottom reveals a clear lineage (under the example settings, relative to MHA):

Why "orthogonality" matters.If two compressions interfered with each other (say sequence compression broke GQA's assumption of shared KV heads), the combined numbers would be meaningless. C-KSA's orthogonality rests on a clean fact: it reduces only the number of entries along the sequence dimension, leaving the KV head count and per-entry width completely untouched. The two optimizations therefore act independently and can be multiplied directly. That is also the property engineering wants most — you can add GQA first and C-KSA second, and the two gains stack instead of eating into each other.

12.5 Figure 6: how to read the curves

KV cache size comparison across mechanisms as sequence length grows
Figure 6: KV cache size comparison across different mechanisms as sequence length grows. The inset uses a logarithmic vertical axis to separate the low-cache curves and labels C-KSA values at 128K. The main plot has a linear vertical axis and answers "who explodes at what length": the MHA curve climbs steeply past 400 GiB while the C-KSA family stays far below. The inset switches to a logarithmic vertical axis, otherwise the low-cache curves would smear into a single line in the main plot — note this is a reading technique: on a log axis the slope of a curve represents its exponent, and the C-KSA curves still rise linearly on the log axis, visually confirming §12.3's claim that "the growth term is still $O(N)$, just with a slope 1024 times smaller". The values labelled at 128K in the inset: C-KSA 4.22 GiB, C-KSA+GQA 0.264 GiB, C-KSA+MLA 0.074 GiB. The figure is set at 60 layers, batch=1, BF16, local window 1024 tokens. The conclusion to draw from this figure is not "C-KSA is smallest" but that the two compressions stack on the curves while neither breaks the basic rule of linear growth. Report p.9

Section 14Kernel design: turning the saved FLOPs into actual time

Saving FLOPs algorithmically is not the same as being faster on the wall clock — if the memory access pattern gets worse, or extra gather/scatter is needed, the saved compute is eaten by memory traffic. This section of the paper is about avoiding exactly that.

13.1 The shared execution skeleton: tiled prefill + online softmax

Both C-KSA and S-KSA follow FlashAttention's tiled execution and online softmax (Dao et al., 2022). Let a group of text queries be arranged into $Q_B$ (one or more query tiles), with corresponding output $O_B$. Each box in these matrices represents one token vector: in the query–key grid, blue cells are visible pairs and white cells are masked pairs. The key optimization is that each loaded KV tile $(K_j, V_j)$ is reused on chip across the whole query group, while a per-query mask enforces each query's own visible set.

The significance of this skeleton is that it hands "visibility" entirely to the mask, while KV tile loading is shared and independent of any particular query. As a result, the difference between C-KSA and S-KSA is compressed into two things — how KV addresses are computed, and how the tile visit order is scheduled. Everything else is reused.

13.2 C-KSA: direct mapping from logical intervals to physical addresses, Equations (11)–(12)

C-KSA's layout is regular, so the kernel can work out which KV each query needs with pure arithmetic — no dense mask, and no block-index table held in memory. The approach treats text, Summary and Meta as three separate zero-based index spaces (logical segments): during prefill the text and Summary Q/K/V are interleaved, while the precomputed Meta K/V sit in a separate buffer.

For a text query at position $t$, first define two quantities:

$$ a = \max\!\left(0,\; \left\lfloor t/k_s \right\rfloor - W\right), \qquad g = \left\lfloor a/k_m \right\rfloor. $$

Here $a$ is the first chunk in the local window and $g$ is the number of complete Meta groups before that window. With these two numbers the three logical intervals are closed-form:

$$ I_T(t) = [\,k_s a,\; t+1\,), \qquad I_S(t) = [\,k_m g,\; a\,), \qquad I_M(t) = [\,0,\; g\,). \tag{11} $$

The three intervals correspond exactly to the three classes of visible KV from Section 10. Read them out: $I_T$ is the causal local text (from the window's start to $t$ itself); $I_S$ is the boundary Summaries (from the last complete group before the window up to the window start $a$ — the remainder that has not yet filled a group); $I_M$ is the complete remote Meta groups (from 0 to $g$).

Next comes the mapping to physical positions. For a text index $i$ and a Summary index $j$:

$$ \phi_T(i) = i + \left\lfloor \frac{i}{k_s} \right\rfloor, \qquad \phi_S(j) = j\,(k_s+1) + k_s. \tag{12} $$

These two expressions are two ways of writing the same intuition:

Panel (a) of the figure below draws this mapping for $k_s=2$, $k_m=2$, $W=1$, with a blue outline marking the entries visible to $T_9$:

Kernel design for C-KSA and S-KSA
Figure 7: Kernel design for C-KSA and S-KSA: (a) direct KV addressing, (b) fused block scoring and selection under a $K$-token budget, and (c) shared tiled prefill with KV reuse. (a) is the address mapping: the top shows the logical intervals $I_S=[2,3)$, $I_T=[6,10)$, $I_M=[0,1)$; the middle row gives their physical landing spots (such as $\phi_S(2)=8$, $\phi_T(6)=9$, and Meta index 0); only the bottom row is the actually interleaved physical storage sequence — keeping logical index and physical offset separate is what makes the absence of an index table understandable. (b) is S-KSA's fused scoring: $Q_I$ multiplies the shared block keys $K_I$ to produce a grayscale "query × candidate block" score matrix, and Top-$K$ block selection happens inside the same kernel; on the right, each row of the blue IDs matrix is the list of block indices chosen by one query (every query selects independently). (c) is the shared tiled prefill: each cell of $Q_B$/$O_B$ is one token vector, blue cells are visible pairs and white cells masked ones, and the KV tiles $K_j,V_j$ are reused on chip after being loaded once per visit, with a per-query mask completing online softmax. Report p.10

Once the mapping is done, each query tile knows which KV tile ranges it must visit, and a position-based mask then excludes entries outside that query's visible set. The paper stresses that these intervals and masks are all computed on the fly inside the kernel and occupy no memory — no dense attention mask needs to be stored, and no block-index table either.

13.3 C-KSA: prefill integration and decode

During prefill, the text-query kernel carries each query's online-softmax state continuously across the text, Summary and Meta segments (the implementation counterpart of the three entry classes sharing one softmax), and applies the $\log k_m$ correction to Meta logits only. A separate local kernel makes each Summary query attend over its own chunk's text and its self-KV. Both kernels write their outputs straight back into the interleaved physical positions.

The decode stage needs almost nothing special: the cache layout of Section 13 has already placed the visible KV in one contiguous region, so standard scaled dot-product attention (SDPA) works directly, with no gather.

Equations (11)–(12) and the layout of Section 13 are two faces of the same thing.The layout guarantees "the visible KV is contiguous"; the mapping formulas guarantee "it can be found arithmetically". Neither suffices alone: with only the former, the kernel still has to scan for boundaries; with only the latter, the fast path degrades into repeated non-contiguous reads. This is the tightest instance in the whole paper of algorithm, layout and kernel working together.

13.4 S-KSA: fused scoring plus sparse tile scheduling

Fused block scoring. If one kernel computed the dot products and another did the multi-head aggregation, the intermediate scores would have to make a round trip through memory. To cut that traffic, S-KSA uses a fused kernel that does the dot product and the weighted multi-head score merge on chip in one pass. In Figure 7b, $Q_I$ is the stacked query matrix of the indexer heads and $K_I$ their shared block keys (the superscript $I$ denotes the indexer); in the grayscale matrix rows are queries and columns are candidate blocks, darker meaning higher score; selection then happens within one kernel: under a budget of $K$ tokens (i.e. at most $K/b$ blocks), remote blocks are chosen independently for each query, and each row of the blue matrix on the right is one query's block-index list.

What does "fused" save here?It saves the write and read-back of that $Q \times \text{number of blocks}$ intermediate score matrix. At 128K with 32768 blocks that matrix is substantial even at reduced precision — and it is a pure intermediate, so writing it out and reading it back contributes nothing to the result. After fusion the scores are produced on chip, aggregated on chip, and Top-$K$ is done on chip; only the final block indices need to land in memory.

KV-tile scheduling. For each group of queries, the selected remote blocks and the local window are mapped onto KV tiles to build a conservative schedule. The schedule skips KV tiles that nobody accesses, while block selection, local visibility and causality are all handled by the per-query mask inside the tiles that are scheduled. The schedule and the mask are handed directly to FlashAttention's forward kernel, which runs the tiled prefill.

A custom sparse kernel for decode. During decode, first gathering the selected KV entries into a temporary buffer and then computing attention would pay an extra round of reads plus a round of writes. To sidestep that cost, S-KSA uses a custom sparse kernel that reads directly from the KV cache according to the selected block indices.

Regrouping the three items in this section by "what they save" makes it clearer:
• Fused scoring saves the memory round trip of intermediate scores (bandwidth).
• Tile scheduling saves the compute and loads spent on empty tiles (compute + bandwidth).
• The custom sparse kernel saves the extra reads and writes that gathering would cost (bandwidth).
None of the three reduces the "mathematical number of multiplications"; all three reduce movement. That is exactly where long-context inference ends up bottlenecked, and why this section deserves to exist on its own.

Finally, putting Sections 13 and 14 together leaves one qualitative conclusion worth remembering: KSA V2's remaining main cost is the original-text KV kept by the sparse layers — the incarnation, under the new architecture, of the $f$ term in Equation (10). The paper names it in the conclusion as a natural next direction.

Section 15Experimental setup and the adaptation protocol: converting an existing model into KSA V2

The experimental section states its problem setting clearly from the start: it does not train a new architecture but asks a retrofit question — can continued pretraining adapt an existing Hybrid KSA to more aggressive KV compression and sparse original-text access while preserving its original capabilities. The route is to validate C-KSA with Full attention first, then layer S-KSA onto the compressed backbone, and finally evaluate along three lines — retrieval, general capability and inference efficiency — with additional ablations on compression granularity, block size, teacher pooling, routing scheme and backbone choice. Unless stated otherwise, all experiments and analyses run on the 1.9B model.

The starting point is the 128K checkpoints of 1.9B and 4B Hybrid KSA from the KSA report. The 1.9B backbone is 24 layers of MHA; the 4B backbone is 36 layers of GQA with 32 query heads and 8 KV heads. Both use the 3:1 interleaving of three KSA layers to one Full layer, and both insert one Summary every $k_s = 8$ text tokens. Two variants are evaluated: C-KSA+Full compresses the remote Summary KV into Meta entries inside the KSA layers; C-KSA+S-KSA goes further and replaces the Full layer with S-KSA, i.e. block-sparse original-text attention. Notably, C-KSA supports per-layer compression configurations in the method, but the paper explicitly states that every evaluated configuration uses a uniform $k_m$ across C-KSA layers — a point that returns in the "worth testing next" list below.

Evaluation follows the KSA report's protocol: long context uses RULER at sequence lengths from 4K to 128K; general capability covers knowledge (MMLU, CMMLU, C-Eval, MMLU-Pro), mathematics (GSM8K, CMATH, MATH) and code generation (MBPP, HumanEval, reporting pass@1), nine benchmarks in total. Baselines reuse KSA's from-scratch results (1.9B) and continued-pretraining results (4B), including Full, Hybrid SWA, Hybrid SCA, Pure KSA and Hybrid KSA, with Hybrid GDN added at 1.9B and Hybrid Linear at 4B. Hybrid KSA is positioned as the parent model for "capability preservation", and Full as the dense-attention reference; training data follows KSA's corpus and mixture, with the context length fixed at 128K.

On the reference point, the paper does something important: it specifically tests whether continued pretraining of the parent model can serve as a stronger control. See the Table 11 discussion at the end of this section — under the tested recipe and data budget, continued pretraining of the unmodified Hybrid KSA brings no consistent RULER improvement, so the paper is entitled to use the original checkpoint as the quality reference. The argument is not glamorous, but it closes off the objection that "you trained more, so you got better".

Start with the backbone and module configuration at the two scales (the full configuration is in Table 2 in Section 12 and is not repeated here). 1.9B is a 24-layer MHA with hidden 2048 and intermediate 6144, 16 query heads and 16 KV heads; 4B is a 36-layer GQA with hidden 2560 and intermediate 9728, 32 query heads and 8 KV heads. Both have head dimension 128, a 3:1 ratio and $k_s$ of 8. The largest divergence is in the C-KSA and S-KSA module configuration: 1.9B uses $k_m = 128$ with KV width $d_{KV} = 2048$, while 4B uses $k_m = 32$ with $d_{KV} = 1024$.

Looking at the stage budgets in Table 3 shows how "cheap" this conversion is. C-KSA's added parameters are the aggregation projection and positional bias at each scale, 80.2M for 1.9B and 71.7M for 4B; S-KSA's auxiliary attention, Indexer and routing-related parameters are 86.6M for 1.9B and 163.0M for 4B. Against the backbone sizes of 1.9B and 4B these are single-digit-percentage increments, and the inference payoff shows up in the efficiency section later.

Table 3: Adaptation hyperparameters and token budgets for the selected models
Table 3: Adaptation hyperparameters and token budgets for the selected models. The trainable scope and token budget of each of the three stages. 1.9B: C-KSA module-only on 6.7B tokens, then full-parameter on 3.4B tokens, then S-KSA module-only on 18.5B tokens; 4B: C-KSA module-only on 6.7B + full-parameter on 15.9B, then S-KSA module-only on 4.2B. The three stages target learning rates of $10^{-4}$, $10^{-4}$ and $10^{-3}$, all starting from $10^{-6}$ with warmup followed by a constant phase, AdamW $(\beta_1, \beta_2) = (0.9, 0.95)$, weight decay 0.01, gradient clipping 1.0, sequence length 128K, global batch 32. The paper notes in particular that the optimizer and learning-rate schedule are re-initialized at every stage switch — a side effect of "align first, then open up" below: stage boundaries are hard boundaries rather than continuous decay. Report p.14

The adaptation route above is drawn as a pipeline in Figure 8. Start with the module setting — "module settings apply where the corresponding modules are used" is not a throwaway phrase: during the module-only stage only the newly introduced aggregation projection $A$ and positional bias $\{B_r\}$ are trained (and in the S-KSA stage, the new aggregation module and Indexer), with every inherited parameter frozen; the full-parameter stage is what opens up the whole model. C-KSA goes "module-only → full-parameter", whereas the S-KSA stage is module-only only.

Figure 8: Sequential adaptation and parameter selection for KSA V2 at 1.9B
Figure 8: Sequential adaptation and parameter selection for KSA V2 at 1.9B. The sequential adaptation route at 1.9B: starting from Hybrid KSA, 6.7B tokens of module-only followed by 3.4B tokens of full-parameter yields C-KSA+Full, sweeping $k_m \in \{4, 8, 16, 32, 64, 128\}$ along the way and settling on $k_m = 128$; starting from that checkpoint, 18.5B tokens of module-only yields C-KSA+S-KSA, sweeping $b \in \{2, 4, 8\}$ and settling on $b = 4$. Note the dependency "pick the compression granularity first, then pick the sparsity scheme": the sparsity stage must start from an already-chosen compression checkpoint, so this figure is both a process description and the causal ordering of the experimental design. Report p.13

The whole route condenses into one sentence: each adaptation segment solves only for one newly introduced module, and each hyperparameter sweep happens after the previous step is fixed. The cost is more experiment rounds (6 compression granularities × 3 sparsity settings); the benefit is that conclusions from different steps do not contaminate one another.

Section 16The two-stage loss: align the outputs first, then open up the whole model

The greatest fear when adapting a pretrained model is "open it up and everything previously learned gets washed away". KSA V2's answer is to split into two stages: first let the new modules align their outputs with the uncompressed version, and only once alignment is achieved open all parameters for ordinary language modeling. This passage is worth reading equation by equation.

The module-only stage trains the aggregation projection $A$ and the positional bias $\{B_r\}$, with all inherited parameters frozen. The new parameters are initialized to zero, so at initialization the aggregation weights are uniform (which is also why an alignment loss is needed: uniform aggregation cannot reproduce the information of so many Summary entries). Let $O^{C}_{l,t,d}$ and $O^{K}_{l,t,d}$ be the attention outputs of C-KSA and uncompressed KSA at layer $l$, text position $t$ and coordinate $d$, both computed from the same input at the same layer and both taken before the output projection. The alignment loss is a per-coordinate squared error (clipped, then averaged):

$$ \mathcal{L}_{\text{align}} = \frac{1}{|\mathcal{I}_C|\,|\mathcal{T}|\,D} \sum_{l \in \mathcal{I}_C} \sum_{t \in \mathcal{T}} \sum_{d=1}^{D} \min\!\left( \left( O^{C}_{l,t,d} - \mathrm{sg}\!\left( O^{K}_{l,t,d} \right) \right)^2,\ 0.1 \right) $$

Here $\mathcal{I}_C$ is the set of C-KSA layers, $\mathcal{T}$ the text positions in a minibatch, $D$ the concatenated attention width, and $\mathrm{sg}(\cdot)$ denotes stop-gradient. Three design details are all practical: the error is measured per coordinate rather than per vector, so no norm-scale choice is involved; each error is clipped at an upper bound of $0.1$, preventing individual outlier coordinates from dominating the gradient; and the stop-gradient on the reference side ensures gradients flow only back into the new modules and never drag the frozen KSA side along.

After alignment completes, the full-parameter stage begins and the objective falls back to plain language modeling:

$$ \mathcal{L}_{\text{comp}} = \begin{cases} \mathcal{L}_{\text{CE}} + \lambda_{\text{align}} \mathcal{L}_{\text{align}}, & \text{module-only adaptation}, \\ \mathcal{L}_{\text{CE}}, & \text{full-parameter adaptation}, \end{cases} \qquad \lambda_{\text{align}} = 5 $$

In other words, the alignment loss exists only during the module-only stage, with weight 5; once the whole model is opened up it is dropped entirely, leaving only cross-entropy. Why this order rather than joint training from the start? One direct reading: if the whole model were opened up from the beginning with the alignment term applied, the frozen reference $O^{K}$ would itself be moving, making alignment a moving target, and the language-modeling gradient would immediately rewrite the KSA side's representations, leaving "alignment" without a well-defined reference point. Pulling the new modules to a point approximately equivalent to the original behavior first, and only then opening the model, is equivalent to continuing training from a point already close to the original model — minimal forgetting risk. This also dovetails with Table 3's "the optimizer and learning-rate schedule are re-initialized at every stage switch": stage boundaries are treated as fresh starts rather than one continuous annealing run.

The S-KSA stage has a different objective structure: it is a distillation problem rather than a regression one. During training the Full layer still keeps dense attention, and the probabilities it computes supervise block selection. For a query $t$, let $\mathcal{U}_t$ be all eligible remote blocks, $\mathcal{B}_u$ the text positions inside block $u$, and $a_{t,i}$ the dense causal attention probability after averaging across backbone heads. Then the block-level teacher distribution $p_t$, the Indexer distribution $\pi_t$ and the training objective are:

$$ p_{t,u} = \mathrm{sg}\!\left( \frac{\max_{i \in \mathcal{B}_u} a_{t,i}}{\sum_{v \in \mathcal{U}_t} \max_{j \in \mathcal{B}_v} a_{t,j}} \right), \qquad \pi_t = \mathrm{softmax}(\rho_t), \qquad \mathcal{L}_{\text{S-KSA}} = \mathbb{E}_{l,t}\!\left[ D_{\mathrm{KL}}(p_t \,\|\, \pi_t) \right] $$

Here $\rho_t$ is the Indexer score defined by Equation (7), taken over all blocks in $\mathcal{U}_t$, and $\mathrm{sg}(\cdot)$ is again stop-gradient. The loss is averaged over valid text queries within each adapted layer, then averaged across layers. Two points are worth calling out: first, the teacher takes the maximum within the block (max pooling) after averaging across heads, which the paper says follows QSA and which it contrasts against sum pooling in Section 3.7; second, $\pi_t$ exists only during training — at inference the trained Indexer selects blocks directly and the routing scores are never used as extra attention weights; the main attention still performs a single softmax over the selected original tokens and the local window.

Why align first and open up later [organized]:putting the two losses side by side shows the paper is decoupling two things that interfere with each other — "the new modules' outputs should resemble the old modules'" and "the whole model should keep learning language modeling". The former is a regression/distillation problem with a well-defined reference, well suited to fast convergence while the other parameters are frozen; the latter needs all parameters to cooperate and is best done without extra constraints. Doing them in stages staggers the two optimization problems instead of letting them pull against each other within the same batch of gradients.

There is one more practical difference that is easy to miss: the S-KSA stage has the largest token budget of the three — 18.5B tokens at 1.9B, whereas C-KSA's two stages together come to only 10.1B. In other words, the paper spends most of its adaptation budget teaching the Indexer how to select blocks, not on the compression module. That budget allocation alone says something about how hard sparse routing is.

Section 17Model quality: how much is preserved at 1.9B and 4B

Start with the conclusion, on Table 4: at 1.9B the six-length RULER mean of C-KSA+S-KSA is 72.39%, against 72.61% for the parent Hybrid KSA and 67.55% for Full; at 4B the numbers are 84.15%, 84.45% and 83.69%. In other words, the adapted model essentially preserves the parent's retrieval ability (0.22 percentage points behind at 1.9B, 0.30 at 4B) while staying clearly ahead of Full. But this is not "lossless" — the 128K point has both gains and losses, and general capability pays a measurable price. Take them one at a time.

Table 4: Long-context retrieval and general capabilities at 1.9B
Table 4: Long-context retrieval and general capabilities at 1.9B (%; pass@1 for code). Bold and underlined values mark the best and second-best scores, respectively, here and in subsequent tables. The full 1.9B table, with 8 baselines against 2 of ours. RULER over six lengths: C-KSA+S-KSA gives 81.48 / 72.42 / 75.67 / 70.78 / 68.99 / 65.01 with a mean of 72.39; Hybrid KSA gives 80.65 / 73.35 / 74.07 / 72.30 / 69.95 / 65.35 with a mean of 72.61; Full's mean is only 67.55, with 48.75 at 128K. C-KSA+Full has a mean of 72.68 and 66.31 at 128K, showing that compression alone costs almost nothing, and that the loss mainly appears once sparsity is layered on (128K drops from 66.31 to 65.01). Report p.15

Spreading RULER out length by length makes "what was preserved and what was lost" clearer. Relative to the parent Hybrid KSA, C-KSA+S-KSA is higher at 4K (81.48 vs 80.65) and 16K (75.67 vs 74.07), roughly level at 8K (72.42 vs 73.35, slightly lower), and lower by 1.52, 0.96 and 0.34 percentage points at the three long lengths 32K, 64K and 128K. That is, the loss is concentrated in the 32K–64K band, while 128K is actually held very tight. Against the pure Full attention reference its advantage is overwhelming: Full scores only 48.75 at 128K, 16.26 percentage points below C-KSA+S-KSA.

The C-KSA+Full column deserves its own paragraph (Figure 9(a) gives its recovery curve). It keeps the Full layers and only compresses the remote Summary from $k_s = 8$ to $k_s k_m = 1024$ inside the KSA layers; its mean of 72.68 is even slightly above the parent's 72.61, and its 128K score of 66.31 is above the parent's 65.35. That is a clean single-factor conclusion: 1024× compression of remote history by itself costs almost nothing in retrieval. The cost only appears when S-KSA is layered on — 128K falls from 66.31 to 65.01. And applying the same sparse adaptation to an uncompressed Hybrid KSA takes 128K from 65.35 down to 61.06 (Table 9(c)). Measured against their respective dense references, the drops are 1.30 and 4.29 percentage points: a compressed backbone is actually more resilient to sparse adaptation.

Figure 9: Mean RULER scores during compression and sparse adaptation
Figure 9: Mean RULER scores during compression and sparse adaptation. Circles mark the checkpoints reported in Table 4. (a) The three C-KSA + Full curves correspond to $k_m = 8, 32, 128$: retrieval scores keep recovering during the module-only stage (0–6.7B tokens), and the full-parameter stage (6.7–10.1B tokens) moves further toward the two reference lines of Hybrid KSA's 72.61 and Full's 67.55. (b) S-KSA on the selected $k_m = 128$ backbone, comparing $b = 2, 4, 8$ and token-level DSA, where $b = 4$ approaches the parent's level at around 18.5B tokens. The value of this figure is that it is not "train and look at the result" but a plot of the recovery process: the module stage already closes most of the gap, and the full-parameter stage is the finishing touch. Report p.16

Reading Figure 9 together with the budgets in Table 3 reveals something counter-intuitive: the module-only stage (training only 80.2M new parameters) already pulls retrieval scores back substantially from the low point introduced by compression, and the later full-parameter stage contributes "approaching" rather than "turning things around". This echoes the oracle experiment in Section 3.7 — if the selection is accurate enough, the backbone does not even need updating.

On general capability the paper's wording is "broadly comparable": relative to Hybrid KSA, C-KSA+S-KSA is higher on three of the nine items (MMLU 47.09 vs 46.83, MMLU-Pro 22.83 vs 22.52, CMATH 63.50 vs 61.83) and lower on the rest, with the largest drop being 2.81 percentage points on GSM8K, and MBPP and HumanEval lower by 1.20 and 1.83 points respectively. Against C-KSA+Full, adding S-KSA changes every item by no more than 1.83 percentage points, with gains and losses both present, indicating that sparse adaptation is not the cause of a systematic decline. Against Full it wins eight of the nine items, the only exception being C-Eval (42.94 vs 44.28).

1.9B summary:the "compression" step is close to free (mean +0.07, 128K +0.96 relative to the parent — both gains), while the "sparsity" step costs a little retrieval (128K −1.30), with one- or two-point fluctuations on general capability. Every cost appears after the Full layer is also replaced, not from compression itself.

The 4B experiments (Table 5) answer a different question: does this conversion transfer to a GQA backbone with shared KV heads? The configuration is $k_m = 32$ and $b = 4$; with $k_s = 8$, C-KSA compresses remote KV 8 × 32 = 256-fold along the sequence dimension while keeping GQA's shared KV heads. The token budget is 6.7B module-only + 15.9B full-parameter, followed by 4.2B of S-KSA module-only; the remote budget, local window and sink settings match 1.9B; the only architectural difference is that 4B's Indexer additionally normalizes the projected query/key.

Table 5: Long-context retrieval and general capabilities at 4B
Table 5: Long-context retrieval and general capabilities at 4B (%; pass@1 for code). Baselines are from the KSA report (Chu et al., 2026). The full 4B table. Across six RULER lengths C-KSA+S-KSA gives 93.38 / 87.78 / 85.45 / 83.60 / 80.28 / 74.41 with a mean of 84.15; the parent Hybrid KSA has a mean of 84.45, C-KSA+Full 83.72, and Full 83.69. The brightest spot is the single 128K point: 74.41 is 2.74 percentage points above the parent's 71.67, 8.55 above Full's 65.86, and also above its own C-KSA+Full starting point of 73.92. At the larger scale, sparse adaptation does not lose 128K at all — it gains. Report p.17

The 4B reversal at 128K is worth noting. At 1.9B, adding S-KSA takes 128K from 66.31 down to 65.01; at 4B the same action takes 128K from 73.92 up to 74.41. "Sparsity always costs points" is not a general rule — it is decided together with the backbone, the data budget and the Indexer configuration. The mean row, however, still slips slightly (84.15 vs 84.45), with the drag coming mainly from 8K, 16K and 32K (87.78 / 85.45 / 83.60, against the parent's 90.53 / 88.86 / 86.65), while both 4K (93.38 vs 92.97) and 64K (80.28 vs 76.04) rise.

On general capability the paper's figures are: C-KSA+S-KSA stays within 0.40 percentage points of C-KSA+Full, and 0.50–2.58 points below Hybrid KSA. C-KSA+Full is itself already somewhat below the parent (for example MMLU 68.79 vs 70.50), so this loss comes more from the full-parameter training of the compression stage than from the sparsity stage.

Then there is the setting that was "only added afterwards" — Indexer Q/K normalization. The paper candidly reports a controlled comparison: without Q/K normalization, 4B's Indexer loss stays high, and even after 21.8B adaptation tokens RULER remains below its C-KSA+Full parent; under the same adaptation setup, normalizing the projected query/key recovers to near the parent with only 4.2B tokens. The paper's explanation is that feature-scale differences between pretrained backbones affect the magnitude and optimization of index logits, and RMSNorm reduces that scale sensitivity. Even more worth recording is the boundary the paper draws itself: 1.9B keeps the original setting and was not re-run through the full experimental suite with this change; whether normalization would similarly reduce the adaptation data needed at 1.9B is explicitly left as an open question. That is an honest gap and a very concrete reproduction risk.

Finally, the choice of compression granularity at 4B. Table 6 compares $k_m \in \{8, 16, 32, 64, 128\}$ under one identical budget (6.7B module-only + 15.9B full-parameter for every configuration).

Table 6: RULER scores of 4B C-KSA+Full with different compression granularities
Table 6: RULER scores (%) of 4B C-KSA+Full with different compression granularities. $k_m = 8$ has a mean of 83.94 and $k_m = 32$ a mean of 83.72, only 0.22 percentage points apart, yet $k_m = 32$ reduces the number of remote Meta entries by a further 4× — hence the choice of $k_m = 32$. The other settings: 16 gives 82.89, 64 gives 82.46, 128 gives 82.66, all below those two. Length by length, $k_m = 32$ scores 73.92 at 128K, above most settings other than $k_m = 8$'s 74.58 (16 gives 69.56, 64 gives 70.93, 128 gives 71.90), showing that finer is not necessarily better, and that the 128K column is actually friendlier to coarse granularity. Report p.17

Read Table 6 together with Table 9(a) and the difference in granularity sensitivity between the two scales is plain: at 1.9B, sweeping $k_m$ from 4 to 128 moves the RULER mean only within 71.92–72.74, with no systematic decline; at 4B, sweeping from 8 to 128 gives means between 82.46 and 83.94, with the optimum at $k_m = 8$. The paper offers a conjectural explanation for the 1.9B insensitivity: the Full layers can still read the original-text detail lost in compression, so the effect of compression granularity is diluted. On the 4B side, the reason for choosing $k_m = 32$ is the benefit/cost ratio — four times more compression for almost no loss.

Section 18Long-context retrieval analysis and inference efficiency

Mean scores hide differences along the position dimension, so the paper adds a NIAH grid (Figure 10) and a paired 128K subtask table (Table 7). Start with the grid: across six context lengths (4K to 128K) × eleven insertion depths (0% to 100%), it compares the models on identical inputs.

Figure 10: Single-needle retrieval across context lengths and needle depths
Figure 10: Single-needle retrieval across context lengths and needle depths. C-KSA+S-KSA maintains high accuracy across the grid, averaging 97.88% over all depths at 128K. Left is Hybrid KSA and right is C-KSA+S-KSA: a single-needle retrieval grid over six context lengths (4K–128K) × eleven insertion depths (0%–100%). Both hold very high accuracy across the whole grid, and C-KSA+S-KSA averages 97.88% across all depths at 128K. This figure answers the worry "would sparse block selection systematically fail at some depth" — the grid shows no depth band collapsing wholesale. Report p.18

Beyond the grid, Table 7 makes a paired comparison on six RULER-128K subtasks. There is both good news and clear bad news here.

Table 7: RULER-128K subtask scores comparing Hybrid KSA and C-KSA+S-KSA
Table 7: RULER-128K subtask scores (%). C-KSA+S-KSA exceeds Hybrid KSA on Single, Multiquery, and SQuAD. Six paired results: NIAH-Single 93.33 → 98.33, NIAH-Multiquery 91.25 → 96.25, and SQuAD 30.00 → 35.00 all rise; NIAH-Multikey 85.00 → 83.33 and NIAH-Multivalue 91.25 → 88.75 fall slightly; and FWE (frequent word extraction) falls from 45.00 to 26.67, the largest degradation in the whole comparison. The first five are all retrieval-type tasks that locate one or several needles and read them out; the last is an aggregation-type task that requires counting over the context. Report p.18
Failure mode (recorded honestly):FWE's 45.00 → 26.67 is an absolute drop of 18.33 percentage points, close to a halving, and it is not noise-level fluctuation. The paper mentions it in two places: the contributions section writes that "aggregation-heavy tasks such as frequent-word extraction degrade under block selection", and the Failure mode discussion in Section 3.7 gives the quantitative form — "the largest 128K subtask drop is frequent-word extraction, from 45.00% to 26.67%, which is an aggregation task". So the paper identifies the phenomenon and attaches a causal label (aggregation task), but offers no mechanism-level explanation and no fix for this class of task. Combined with the direction of the other five items in Table 7, a reasonable reading ([organized] on this page, not a paper conclusion) is that block-level sparse selection picks "a few high-weight positions", which is inherently unfavourable to tasks that require a statistical accumulation over the whole context, since aggregation needs information spread more diffusely. This thread is also worth connecting to the entropy-corrected chunk weights of HiLS-Attention in Section 20 — that work is precisely about applying an entropy correction to block weights.

At the same time, fairness requires saying this: FWE's absolute level was already low (the parent scores only 45.00), and on VT both models sit around 25 (25.00 → 23.00). Both are hard tasks at 128K for both models, so the correct reading of this table is "sparse adaptation is a net gain on retrieval-type tasks and needs extra care on aggregation-type tasks", not "degradation overall".

Next is efficiency (Figure 11), which is also KSA V2's main selling point. The measurement basis must be stated first: a 1.9B model, BF16, batch size 1, a single NVIDIA H800, sequence length from 16K to 128K, with C-KSA+S-KSA using $k_m = 128$ and $b = 4$. The cache measurement includes the indexer, auxiliary state, KV storage and resident workspace.

Figure 11: Inference cache size and throughput of 1.9B Full, Hybrid KSA, and C-KSA+S-KSA
Figure 11: Inference cache size and throughput of 1.9B Full, Hybrid KSA, and C-KSA+S-KSA ($k_m = 128$, $b = 4$). The three panels are (a) resident KV cache size, (b) prefill throughput and (c) decode throughput, each spanning 16K/32K/64K/128K. (a): at 128K C-KSA+S-KSA is 6.31 GiB, Hybrid KSA 10.59 GiB and Full 24.00 GiB; finer ticks show Full rising from 3.00 GiB at 16K to 24.00 GiB, while C-KSA+S-KSA goes from 1.40 GiB to 6.31 GiB with a visibly gentler slope. In (c) the 128K decode rate is 198.9 tok/s (C-KSA+S-KSA) against 157.0 (Hybrid KSA); Full has no comparable value in that panel. Report p.18

Cache. At 128K the resident cache of C-KSA+S-KSA is 6.31 GiB, against 10.59 GiB for Hybrid KSA and 24.00 GiB for Full, reductions of 40.4% and 73.7% respectively. The 40.4% figure is the same basis as the abstract's "reduces resident cache size by 40.4%". One caution: the 6.31 GiB here is not a purely theoretical value — it includes the indexer, the auxiliary compression state and the resident workspace, i.e. the net result after C-KSA's extra overhead has been counted in.

Prefill. At 128K C-KSA+S-KSA reaches 44,971 tokens/s, against 29,837 for Hybrid KSA and 20,830 for Full, equivalent to 2.16× Full. The gain over Hybrid KSA grows with length: 1.23× at 16K, widening to 1.51× at 128K. That shape is reasonable — the payoff of sparse access naturally amplifies as sequences get longer.

Decode. C-KSA+S-KSA reaches 215.50 tokens/s at 16K and 198.85 tokens/s at 128K, against 162.87 and 157.02 for Hybrid KSA; across the four sequence lengths the speedup range is 1.23–1.32×. The abstract's figure of "1.27× decode throughput" falls inside that range. Separately, the overall basis given in Figure 1 is per-token inference FLOPs and cache size lower by 2.3× and 2.9× (relative to the reference set), consistent in direction with this section but on a different basis — do not mix the two when quoting.

The paper also gives a finer compute ledger: at 128K, C-KSA+S-KSA's estimated matrix FLOPs per text token is 6.38 times lower than Full and 2.76 times lower than Hybrid KSA; the BF16 KV cache and index-key cache are smaller by 3.86 times and 1.35 times respectively. That last 1.35 is worth noting — the index-key cache is itself a non-trivial size, not zero. In addition, under the same settings as Table 7, C-KSA raises the remote-history compression rate from $k_s = 8$ to $k_s k_m = 1024$.

Efficiency summary:the 40.4% resident cache reduction, 1.51× prefill and 1.23–1.32× decode at 128K were all measured under the same 1.9B / BF16 / batch=1 / single-H800 basis. That basis is also the boundary of these numbers: batch size 1 means continuous batching is not covered, which Section 21 lists as something worth testing next.

Section 19Analysis and ablations: hierarchical compression, routing choices, and the oracle experiment

This is the densest section of the paper. It answers four questions: is hierarchical compression better than simply enlarging the chunk? How large should $k_m$ be? How should the sparsity scheme and teacher pooling be chosen? And the most important one — if selection is accurate enough, does the backbone need changing at all?

Question one: direct coarse granularity versus hierarchical compression. To reach 1024× remote compression, a simpler route is to set the Summary chunk straight to $k_s = 1024$. Table 8 compares that one-step route with C-KSA's two-level compression, all retaining the Full layer; the large-chunk model is trained from scratch, while C-KSA is built on a $k_s = 8$ Hybrid KSA.

Table 8: RULER performance of direct and hierarchical compression with Full attention retained
Table 8: RULER performance of direct and hierarchical compression with Full attention retained. Three rows: Hybrid KSA at $k_s = 8$ (reference) with a mean of 72.61; direct enlargement to $k_s = 1024$ with a mean of only 70.63; and C-KSA+Full ($k_s = 8$, $k_m = 128$) with a mean of 72.68. That is, at the same 1024× remote compression rate, hierarchical compression is 2.05 percentage points above direct coarse granularity and matches the small-chunk reference. The clearest gap is at 4K: 75.65 versus 81.52. Report p.19

The paper's explanation for the gap is "extra computation": C-KSA uses a summary chunk of 8, which introduces more tokens at the input sequence level, and the compressed KV then passes through an additional module, effectively performing a two-step summary. The paper also notes this agrees with the 4B conclusion in the KSA report — raising $k_s$ from 8 to 64 drops the 4K–64K RULER mean from 82.97 to 77.79. Putting this in the experimental section is valuable: it shows that "compressing harder" and "compressing in one step" are not the same thing, and that keeping a fine-grained intermediate representation pays off.

Question two: how large should $k_m$ be. Table 9(a) sweeps $k_m \in \{4, 8, 16, 32, 64, 128\}$ on C-KSA+Full, with the six-length RULER mean landing between 71.92 and 72.74 and no systematic decline as compression increases. The paper's conjecture is that the Full layers still provide access to the original-text detail that compression removes. The reason for choosing $k_m = 128$ is marginal return: at 128K with $k_m = 128$ each layer holds only about 128 Meta entries, and compressing further saves little cache, so higher compression ratios are left for million-token contexts.

Table 9: Ablations of compression and sparse attention
Table 9: Ablations of compression and sparse attention. Dashes indicate unreported scores since the sequence length is not enough to activate sparse mechanism. Three panels: (a) $k_m$ granularity, six settings with means from 71.92 to 72.74; (b) sparsity scheme and teacher pooling, all on the same $k_m = 128$ C-KSA+Full backbone, including token-level DSA, QSA ($b=4$, max), S-KSA with $b \in \{2,4,8\}$ and an S-KSA sum variant; (c) backbone choice — the same S-KSA adaptation applied to KSA and to C-KSA respectively. In panel (b), S-KSA with $b = 8$ is the clear outlier (mean 69.79, only 57.62 at 128K), showing that too few candidate blocks hurts retrieval; in panel (c) the 128K comparison is 65.01 versus 61.06. Report p.20

Question three: block size and routing scheme. Panel (b) compares S-KSA with $b \in \{2, 4, 8\}$, token-level DSA, and Qwen Sparse Attention (QSA) on the same backbone. QSA offers a simpler alternative: average the projected token-level index keys within each block. The paper aligns QSA with its own settings by using $b = 4$ and 8 indexer heads, following Qwen's QSA indexer design. The result: $b = 4$ matches $b = 2$ and token-level DSA in mean score while having half and a quarter of their routing candidates respectively, and it beats QSA at the same block size (mean 72.39 vs 71.34, 128K 65.01 vs 61.39). Pushing on to $b = 8$ reduces candidates further but degrades retrieval noticeably, with 128K at only 57.62. So $b = 4$ is the compromise between retrieval quality and routing cost.

Also, in this panel the paper reports RULER only, for a reason it states plainly: most general-capability sequences already fall within the combined remote-plus-local budget, so they discriminate poorly between routing qualities. That is a methodologically defensible choice, but it also means this table cannot be used to infer general capability.

Teacher pooling. With $k_m = 128$ and $b = 4$, the paper contrasts the max-pooled teacher of Equation (15) (following QSA) against a sum-pooled teacher (using $\sum_{i \in \mathcal{B}_u} a_{t,i}$ as the block weight), with the two training runs differing only in pooling: max pooling lifts the mean from 71.49% to 72.39% and 128K from 61.68% to 65.01%. The paper's explanation is that retrieval depends on a few salient tokens whereas sum pooling dilutes them with diffuse attention, and the result also confirms that QSA's choice holds on a KSA backbone.

Question four: does the backbone need changing. Table 9(c) compares the same S-KSA adaptation ($b = 4$, max-pooled teacher, 18.5B tokens module-only, identical remote budget / local window / sink) applied on Hybrid KSA and on C-KSA+Full: C-KSA+S-KSA gives a mean of 72.39 and 65.01 at 128K, while KSA+S-KSA gives 71.84 and 61.06. Against their respective dense references, the 128K drop is 1.30 percentage points on the C-KSA side and 4.29 on the Hybrid KSA side. Figure 12(c) offers a complementary observation: at the same token budget, oracle block selection retains slightly more decode attention mass on C-KSA than on Hybrid KSA (including local context and sinks), consistent with the smaller retrieval loss after sparse adaptation.

Figure 12 and Table 10 record the most persuasive experiment of all: freeze every parameter and select using Full attention probabilities directly. Token selection ranks by individual probabilities; block selection takes the maximum probability within each $b = 4$ token block, matching the Indexer's teacher pooling rule. The paper calls this oracle selection and compares it against the unmodified Full layer on the same backbone. The remote budget $K$ includes 8 sink tokens, and a 1024-token local window is retained separately.

Figure 12: Oracle selection at 128K with frozen Hybrid KSA and C-KSA+Full
Figure 12: Oracle selection at 128K with frozen Hybrid KSA (blue) and C-KSA+Full ($k_m = 128$, red). (a,b) RULER scores. (c) Decode attention mass retained by token and block selection ($b = 4$), including local context and sinks before sparse renormalization. The horizontal axis is the remote token budget $K$, from 8 all the way to 8K, and the vertical axis is the RULER score; in (a)(b) the three lines are Dense, Token oracle and Block-4 oracle. (c) is the decode attention mass retained at different $K$. The key reading: scores collapse at very small budgets but recover rapidly as $K$ rises — on C-KSA, block-level selection already reaches 64.71 at $K = 512$, and by $K = 4096$ it is essentially touching the dense reference. Report p.21
Table 10: Dense and oracle RULER results with frozen backbones
Table 10: Dense and oracle RULER results with frozen backbones. Oracle selection uses $K = 4096$; Mean averages all six context lengths (4K–128K). Five backbones × three selection modes (Dense / Token oracle / Block-4 oracle), with Mean and 128K in each cell. Take C-KSA+Full ($k_m = 128$) as the example: Dense 72.68 / 66.31, Token oracle 72.84 / 66.67, Block-4 oracle 72.66 / 66.24. Across all five backbones, both oracle selections land within 0.51 percentage points of the dense reference on the mean — and the parameters of those five backbones were frozen, never updated at all. Report p.21

The argumentative force of these numbers comes from how cleanly they cut: if the selection is accurate enough, not even backbone adaptation is needed, and retrieval performance recovers essentially to dense levels. Two conclusions follow: first, accurate selection alone recovers near-dense RULER without any backbone update, including on a model already adapted to C-KSA; second, full-parameter sparse continued training brings no clear RULER improvement under the recipe and budget the paper tested. Together they support concentrating sparse-adaptation effort on the aggregation module and the Indexer rather than on changing the backbone.

The attention-mass part is more intuitive: at $K = 4096$, the selected remote tokens plus the 1024-token local window cover only about 3.9% of a 128K context, yet retain 82.83% of decode attention mass, with a corresponding RULER of 66.24 against dense attention's 66.31 — a gap of 0.07 percentage points. At the same budget Hybrid KSA retains 81.71%. The paper adds a key qualification: local context and sinks alone already retain a considerable share of attention mass, yet retrieval performance is poor, which in turn shows that "selecting the relevant remote content" is what makes sparse attention viable, not the retained-mass number itself.

The last set of visualizations grounds all of this in a concrete example. Figure 13 compares per-layer attention and block selection between Hybrid KSA and the main model C-KSA+S-KSA on the same 16K NIAH sample (the latter with $k_m = 128$, $b = 4$, $K = 4096$); both retrieve the answer correctly from outside the local window.

Figure 13: Per-layer attention and block selection on a shared 16K NIAH example
Figure 13: Per-layer attention and block selection on a shared 16K NIAH example for Hybrid KSA (left) and C-KSA+S-KSA (right). Teal strips mark selected remote blocks, dashed lines mark the answer, and gray shading denotes the local window. The left and right columns each show four layers from the shallow group (L0–L3), the middle group (L12–L15) and the deep group (L20–L23); the horizontal axis is the original-text position (0–16K tokens), and colors distinguish Summary KV / Meta KV / Text KV. The paper's key points: in the shallow layers shown, Meta entries receive only 7.7–13.7% of C-KSA's attention mass, whereas in the middle and deep layers they receive 73.1–87.8%, showing that compressed remote memory is used substantially; and in all three displayed S-KSA layers the selected blocks cover the answer span, retaining 87.6–97.3% of the dense attention mass together with local context while accessing only 31.5% of the original-text positions. Report p.22

The "shallow versus middle-and-deep" difference in Figure 13 is interesting ([organized] on this page): Meta entries are barely used in the shallow layers (7.7–13.7%) and only become dominant in the middle and deep layers (73.1–87.8%). This agrees with the common observation that shallow layers rely more on local, fine-grained information while deep layers do coarse integration, and it hints that using the same $k_m$ at every layer may not be optimal — but the paper runs no per-layer-$k_m$ experiment on that basis, which is left to Section 21.

Finally there is the control experiment that establishes the legitimacy of the reference point (Table 11). Because the adapted models receive more training than the baselines, the paper needs to rule out the "more training is just better" explanation, so it performs full-parameter continued pretraining of the unmodified Hybrid KSA from the same 128K checkpoint (global batch 256, peak learning rate $4 \times 10^{-4}$, warmup–stable–decay schedule).

Table 11: RULER scores after continued pretraining of Hybrid KSA
Table 11: RULER scores after continued pretraining of Hybrid KSA. The five evaluated checkpoints cover 5.7–51.3B additional tokens. The original checkpoint (0) has a mean of 72.60 and 65.27 at 128K; after additional training the means are 70.84 (5.7B), 70.77 (17.1B), 71.86 (28.5B), 69.74 (39.9B) and 71.95 (51.3B), all below the original 72.60; at 128K only the 28.5B checkpoint rises, to 66.76, and later checkpoints fall back (63.62 at 51.3B). Report p.23

The paper's conclusion is that under the tested recipe and data budget, continued pretraining does not give Hybrid KSA a consistent RULER improvement, so using the original checkpoint as the quality reference is justified. That argument is crucial to the credibility of the whole paper — it turns the most easily challenged point, "you trained more", into a testable control, and it honestly reports the result that additional training slightly hurts.

Key points of this section:(1) at the same 1024× compression rate, hierarchical compression at 72.68 beats direct coarse granularity at 70.63; (2) $k_m$ is insensitive at 1.9B (71.92–72.74), and 128 is chosen for marginal cache benefit; (3) $b = 4$ is the quality/cost compromise and $b = 8$ is clearly worse (69.79); (4) max pooling beats sum pooling (128K 65.01 vs 61.68); (5) the oracle experiment proves that "selecting accurately" alone approaches dense performance (66.24 vs 66.31) and the backbone need not change; (6) the 3.9% of positions → 82.83% of attention mass figure is the core of why S-KSA is viable.

Section 20Lineage of each component: where every piece comes from

KSA V2 is not an architecture grown from nothing; it grafts two modifications onto an existing hybrid backbone, each drawing on several existing lines of research. The paper marks every such borrowing explicitly, and this section collects those marks so it is clear what is inherited and what is this generation's own choice.

Start with the positioning of the main line. The Summary token mechanism itself comes from KSA (Chu et al., 2026), and Hybrid KSA's 3:1 layer interleaving comes from the same paper; KSA V2 leaves the layer structure alone and changes two components — C-KSA further compresses the Summary KV of distant history, and S-KSA replaces dense attention over original text with Summary-guided block sparsity. So the table below reads: "Upstream" is the provenance the paper itself labels, and "This generation's change" is what KSA V2 does differently from that provenance. The second column is [organized] by this page from the paper's method and Related Work sections, not the paper's own wording.

Upstream attribution the paper labels for each KSA V2 component, against this generation's change
ComponentUpstream, as labelled by the paperThis generation's change
Summary token mechanism (the overall backbone) KSA (Chu et al., 2026) Keeps KSA's Summary layout and 3:1 layer interleaving unchanged, and uses the same Summaries in two roles at once: compressible memory and routing index. The granularity of the Summary sequence itself is not coarsened.
C-KSA's dimension-wise aggregation Compressed Sparse Attention (CSA) and Heavily Compressed Attention (HCA) in DeepSeek-V4 (DeepSeek-AI et al., 2026) Upstream performs learned dimension-wise aggregation over the KV of text tokens and uses different compression granularities in the CSA/HCA tiers; C-KSA applies dimension-wise aggregation to Summary KV, and the resulting Meta entry is used only inside the layer that constructs it, never entering the hidden-state sequence, and never coarsening the Summaries passed between layers.
S-KSA's Lightning Indexer routing DeepSeek Sparse Attention / DSA (DeepSeek-AI et al., 2025) Upstream's Lightning Indexer selects individual tokens; S-KSA drops selection to block granularity ($b$ tokens per candidate, with $b$ times fewer candidate comparisons) and builds index keys from Summary-guided block representations. It also differs from CSA in that S-KSA's main attention never reads compressed text, only the original KV of the selected blocks.
Block-level max-pool teacher QSA (Qiu et al., 2026) Adopts QSA's "average across heads, then take the block maximum" as the teacher distribution and trains the Indexer by KL distillation; the paper additionally runs a sum-pooling control confirming max pooling is better (128K 65.01 vs 61.68). QSA itself averages the projected token-level index keys within a block and appears here as a same-block-size comparison method.
The meta-gist style of hierarchical compression H-SSA (Mao et al., 2026) Upstream inserts meta-gist tokens to summarize a group of gist tokens and support coarse-to-fine retrieval; C-KSA adds no tokens and instead compresses $k_m$ Summary KV entries in place into one Meta entry that is private to the layer.
Using memory tokens as a retrieval interface Landmark Attention (Mohtashami and Jaggi, 2023) Upstream introduces a landmark token per context block and learns block retrieval by attending to the landmark; S-KSA reuses the existing Summary (every chunk already has one) for that interface role rather than inserting an extra landmark token.
Tiled execution FlashAttention (Dao et al., 2022) Adopts its tiled execution and online softmax; C-KSA and S-KSA share one tiled prefill execution path, with KV-tile scheduling and prefix masks implementing block selection, local visibility and causality, plus a custom sparse decode kernel that reads the KV cache directly by selected block index.
The analogy of Summary-guided pooling HiLS-Attention (Hu et al., 2026) Upstream uses a landmark query to pool token keys and then merges intra-block attention outputs with entropy-corrected chunk weights; S-KSA is similar in pooling tokens within a block using a query, but it reuses an existing Summary as that query rather than inserting a landmark token, and its routing scores are used only for block selection, not as extra attention weights — the main attention performs a single softmax over the selected original text and the local context.

The "Upstream, as labelled by the paper" column is taken from inline attributions in the paper's body and Related Work; the "This generation's change" column is [organized] on this page, summarized from the paper's Method and Related Work rather than quoted from it. Citations follow the paper's own inline attribution; this page has not checked each reference entry.

Read the table vertically and two fairly clear lines of difference emerge.

The first: no new tokens. H-SSA adds meta-gist tokens, Landmark Attention adds landmark tokens, HiLS-Attention adds landmark queries — all of these upstream schemes insert new structure into the sequence. Both C-KSA and S-KSA in KSA V2 reuse existing Summaries: a Meta entry exists only inside the layer that constructs it and is never passed forward, and the routing block representations are computed on the fly from existing Summaries and block tokens. The direct benefit is that the Summary layout is unchanged, so the conversion retrofits onto an already-pretrained Hybrid KSA without touching sequence length — which is the technical basis for the paper listing "retrofit-friendly" as a selling point.

The second: routing scores do not enter attention. NSA uses learned block compression to guide fine-grained selection and fuses compressed, selected and local attention paths; HiLS-Attention merges intra-block outputs with entropy-corrected chunk weights; SAS learns context ranking inside the attention normalization. All of these let the routing signal participate in weighting the final output. S-KSA separates the two: the Indexer's scores decide only which blocks to read, and the main attention then performs one softmax over the selected original tokens and the local context. The paper states this explicitly in Related Work, and it is one of the preconditions for S-KSA and C-KSA coexisting on the same tiled execution path.

A note on provenance:this section only collects the citation relationships the paper itself labels. Whether the upstream methods mentioned match the versions cited, and whether the paper's descriptions of each upstream method are accurate, have not been checked item by item on this page. To judge the boundary of novelty from this table, go to the original references.

Also worth noting is the paper's own positioning: in Related Work it takes care to distinguish itself from DeepSeek-V4's CSA (the main attention never reads compressed text) and from DSA (routing drops to block granularity rather than token granularity). These two differences are not rhetoric; they correspond to two observable results in Section 19 — reading original text in the main attention is the precondition for RULER to approach the dense reference, and block-granularity routing is the source of a 4× reduction in candidates with no loss in the mean.

Section 21Commentary: strengths, limits, and the gaps worth testing next

This is a strongly engineering-oriented technical report: it proposes no new attention mechanism, but separately removes two bottlenecks of an existing hybrid architecture (the compression rate welded to chunk size, and the Full layers still paying quadratic cost), and treats "did the conversion damage existing capability" as a first-class question. Below are strengths and limits, followed by a separate list of "not disclosed, worth testing next".

Strengths

1. Retrofit-friendly, with quantifiable cost.Both new components reuse existing Summaries, add no tokens and change no Summary layout, so they attach directly to a pretrained Hybrid KSA. The price is stated concretely: C-KSA adds 80.2M parameters at 1.9B and 71.7M at 4B; S-KSA adds 86.6M and 163.0M respectively; the adaptation token budget at 1.9B is 6.7B + 3.4B + 18.5B. That is a list you can budget against directly, far more useful than an adjective like "lightweight adaptation".

2. One set of Summary tokens reused in two roles, without increasing input length.As memory it is compressed into layer-local Meta entries; as an index it is used to build block-level routing representations. The paper states this modestly, but it really is the most elegant design choice in the paper — because no tokens are added, the two conversion routes stack on each other without conflict and can coexist on the same tiled prefill execution path.

3. Hierarchical compression beats directly enlarging the chunk, and the paper provides the control.Table 8 compares "one step" against "two levels" at the same 1024× remote compression rate: 70.63 vs 72.68, a gap of 2.05 percentage points. That conclusion is directly useful to anyone working on KV compression — it shows the shape of the compression path (how many levels, how coarse each one) is itself a design variable to tune, not just the final ratio. The paper also offers a plausible explanation: a two-step summary preserves a fine-grained intermediate representation.

4. S-KSA is more resilient on a compressed backbone, and the paper cuts the causality with an oracle experiment.Relative to their respective dense references, the 128K drop is 1.30 on the C-KSA side and 4.29 on the Hybrid KSA side. More important is Table 10: with every parameter frozen and oracle block selection driven by Full attention probabilities, the mean on all five backbones is within 0.51 percentage points of the dense reference, and on C-KSA ($k_m=128$) 128K is 66.24 against dense's 66.31. This experiment cleanly removes the confound of "is the selection not good enough, or was the backbone damaged", and concludes that the former bottleneck can be solved by training while the latter need not be touched at all. It is the most convincing piece of argumentation in the paper.

5. It handles the "you trained more, so you are better" objection honestly.Table 11 runs continued pretraining of the unmodified Hybrid KSA, and the mean of all five checkpoints (5.7–51.3B tokens) is below the original checkpoint's 72.60. Rather than hiding a result unfavourable to its own recipe, the paper uses it to argue that the original checkpoint is a legitimate reference. Turning an adverse result into support for the argument deserves credit.

Limits

1. Evaluation stops at 128K.The longest long-context experiment is 128K, and one of the reasons given for $k_m = 128$ is precisely that "at 128K each layer holds only about 128 Meta entries, and compressing further saves little". The paper leaves higher compression ratios to "million-token contexts", but runs no million-scale experiment. The extrapolation range of "compressing harder is lossless at some lengths" has in fact never been tested.

2. At 4B only RULER is validated; neither general capability nor efficiency is measured.The conclusion says this directly: "General-capability evaluations and efficiency measurements are limited to 1.9B; the 4B validation covers RULER retrieval." That is, the paper has no answer to either "how much general capability does 4B lose" or "how much cache does 4B save and how much faster is it". And 4B is the scale closer to real deployment — all those impressive efficiency numbers in Section 18 (6.31 GiB, 44,971 tok/s) come from 1.9B.

3. Aggregation tasks such as FWE clearly degrade.RULER-128K frequent-word extraction falls from 45.00 to 26.67, a drop of 18.33 percentage points, close to half; VT also falls from 25.00 to 23.00. The paper flags the phenomenon in both the contributions section and the Failure mode discussion in Section 3.7, classifies it as "aggregation-heavy tasks such as frequent-word extraction degrade under block selection", and lists it alongside "the remaining cache is mainly original-text KV in the exact-access layers" as a principal cost. But the paper gives no mechanism-level explanation — why aggregation tasks degrade under block selection, and whether it can be mitigated. This is not a negligible corner: block-level sparsity inherently favours "a few high-weight positions", while aggregation tasks need information spread more diffusely, a structural tension between the two. The paper puts the RULER mean of 72.39 in a prominent place, but a reader must find Table 7 on their own to see the scale of this failure mode.

4. The remaining cost is concentrated in the sparse layers' original-text KV.The paper itself concedes in the conclusion that "The remaining cost lies mainly in the original-text KV stored by the sparse layers". There is a shadow of this in the numbers too: at 128K the index-key cache is only 3.86× smaller (KV cache) and 1.35× smaller (index-key cache), the latter showing that the index side does not disappear along with compression. C-KSA compresses the remote Summary, but the KV of selected original-text blocks must still be kept and read in full — a cost item that has not been touched.

5. The measurement basis for the efficiency data is narrow.It comes from 1.9B, BF16, batch size 1, a single H800. Batch=1 is the latency-oriented extreme, whereas real serving is usually throughput-oriented under continuous batching. The paper provides no data at large batch or under continuous batching.

Not disclosed, worth testing next

The following questions remain open after reading the paper. Each was checked against the paper first to confirm no answer is given, and is then phrased as an open question.

  1. The per-layer distribution of attention/information on Meta entries.The paper gives the qualitative observation of Figure 13: Meta entries take only 7.7–13.7% of attention mass in the shallow layers shown, but 73.1–87.8% in the middle and deep layers. That is, however, a visualization of one 16K NIAH sample and one query; the paper does not disclose cross-sample, cross-length per-layer statistics (such as per-layer curves of attention entropy or information content). An aggregate statistic would be worth producing, to establish whether "shallow layers use Meta less" is a reproducible general rule.
  2. Experiments with a different $k_m$ per layer.Section 3.1 explicitly says C-KSA supports layer-specific compression, but immediately states that every evaluated configuration uses a uniform $k_m$ across C-KSA layers, and puts "how to allocate compression across layers" into future work. Since item 1 above shows layers differ greatly in their reliance on Meta, it would be worth a set of experiments with heterogeneous per-layer $k_m$, to see whether better retrieval scores can be obtained at the same average compression rate.
  3. How the sparse decode kernel behaves at large batch / under continuous batching.The decode path the paper describes is "a custom sparse kernel reading the KV cache directly by selected block index", and the efficiency measurements are explicitly at batch size 1. Sparse access at batch=1 is almost purely memory-bandwidth bound; to be verified: as batch grows and different requests select different blocks, producing irregular memory access, does the kernel keep its relative advantage? This directly determines whether these speedups transfer to production serving.
  4. Efficiency numbers and general capability at 4B.The paper's conclusion already concedes that efficiency measurement and general-capability evaluation are limited to 1.9B, with 4B covering only RULER. Worth measuring: 4B's resident cache, prefill/decode throughput at 128K, and the nine general benchmarks — after all, 4B's added S-KSA parameters (163.0M) are nearly twice 1.9B's (86.6M), so its cost structure need not have the same shape.
  5. The effect of Indexer Q/K RMSNorm at 1.9B has not been reproduced.The paper reports that at 4B, without Q/K normalization, even 21.8B tokens of training stays below the C-KSA+Full parent, whereas with normalization 4.2B tokens are enough to recover to near the parent. But it states explicitly that 1.9B keeps the original setting and was not re-run through the full experimental suite with this change, and writes "whether normalization can similarly reduce the adaptation data needed at 1.9B" as an open question. This is the most concrete reproduction gap in the paper, and it bears directly on whether the "4.2B tokens is enough" figure transfers at 4B.

An overall assessment

If the report had to be summed up in one sentence: it does "converting an existing hybrid attention model" with unusual discipline — every modification has a single-factor control (the compression-path shape in Table 8, $k_m$ in Table 9(a), the sparsity scheme and teacher pooling in Table 9(b), the backbone choice in Table 9(c)), every key claim has reproducible numbers behind it, and the most challengeable point, "you trained more so you got better", is handled head-on by Table 11. The oracle experiment in Table 10 is the highlight: it first proves that "reading only 3.9% of positions retains 82.83% of attention mass", then proves that "if the selection is good, the backbone need not even change", thereby narrowing the problem precisely down to "how do we train a good Indexer".

Its boundaries are equally clear and must be acknowledged: evaluation stops at 128K, 4B covers retrieval only, the efficiency data is a single batch=1 measurement, and there is an obvious degradation on aggregation tasks that is recorded but unexplained (FWE 45.00 → 26.67). For a reader who wants to reproduce or adopt this scheme, the most valuable first step is probably to reproduce the oracle curve of Table 10 — it is the cheapest experiment that tells you whether your own backbone has the kind of attention concentration that makes sparsity viable; whether to go on to the full S-KSA adaptation then depends on whether your workload contains long-context tasks like FWE that require global aggregation.

One-line conclusion:at 1.9B, KSA V2 trades a 40.4% reduction in resident cache, 1.51× prefill and 1.23–1.32× decode for RULER essentially level with the parent model (72.39 vs 72.61); the trade pays off on retrieval-type tasks, is discounted on aggregation-type tasks, and has not yet been validated beyond 128K, at 4B efficiency, or under batching.
Glossary

Glossary (look things up while reading)

Abbreviations underlined with a dotted line in the prose show their definition on hover; the table below is a one-page reference.

Glossary for this KSA V2 reading, following the paper's own terminology
Abbrev. / symbolFull nameOne-line explanation
KSAKwai Summary AttentionThe Summary-token hybrid architecture from Kuaishou: one Summary inserted every $k_s$ text tokens, with 3 KSA layers to 1 Full layer. The starting point of this paper (Chu et al., 2026).
C-KSACompressed KSAOne of this paper's modules. At storage time it pools every $k_m$ consecutive Summary KV entries into a layer-private Meta KV entry.
S-KSASparse KSAOne of this paper's modules. It uses existing Summaries as routing queries to score each $b$-token text block, and the main attention reads only the original KV of the selected blocks.
Meta KVMeta Key/Value entryThe second-level compression product of C-KSA. Obtained by dimension-wise weighted pooling of a group of Summary KV entries; used only in its own layer and never passed forward.
Summary tokenSummary tokenA learnable token appended after every $k_s$-token chunk that aggregates that chunk's information; its hidden state flows across layers.
$k_s$Summary chunk sizeHow many text tokens one Summary covers. 8 at both 1.9B and 4B.
$k_m$Summary-to-Meta group sizeHow many Summaries aggregate into one Meta entry. 128 at 1.9B, 32 at 4B.
$b$block sizeThe smallest unit of S-KSA routing: how many text tokens count as one block. Set to 4.
$K$remote token budgetThe remote token budget of a sparse layer (in original text tokens). Set to 4096, including 8 sink tokens.
$W$sliding chunk numberHow many complete chunks the local window covers. Set to 128, corresponding to 1024 text tokens.
$N$text lengthThe length of the text sequence.
MHAMulti-Head AttentionEach head has independent Q/K/V projections. The 1.9B backbone uses 16-head MHA.
GQAGrouped-Query AttentionSeveral query heads share one set of KV heads, reducing KV width. The 4B backbone is 32 Q / 8 KV.
MLAMulti-head Latent AttentionStores each token's KV as a compressed low-rank latent state (DeepSeek-AI et al., 2024).
DSADeepSeek Sparse AttentionSparse attention that uses the Lightning Indexer for token-level selection (DeepSeek-AI et al., 2025).
QSAQwen Sparse AttentionA block-level sparse scheme that average-pools token-level index keys within a micro-block (Qiu et al., 2026).
Lightning IndexerLightning IndexerThe lightweight scorer introduced by DSA: several indexer heads emit weighted ReLU scores used to pick top blocks.
RULERRULER benchmarkA long-context retrieval benchmark suite; this paper reports scores at six lengths from 4K to 128K (Hsieh et al., 2024).
NIAHNeedle-in-a-HaystackInsert one "needle" into a long text and ask about it, testing retrieval (Kamradt, 2023).
FWEFrequent Word ExtractionRULER's frequent-word extraction subtask — the one task this paper clearly degrades (45.00 → 26.67).
VTVariable TrackingRULER's variable-tracking subtask, one that requires aggregation across positions.
prefillprefillThe stage that processes the input prompt; its attention is quadratic and dominates total time at long context.
decodedecodeThe token-by-token generation stage; it reads the KV cache once per step and is mainly bandwidth bound.
attention massattention massThe total share of attention probability falling on a given set of positions. Used here to measure how much dense attention a sparse selection retains.
oracle selectionoracle selectionSelecting blocks/tokens directly from dense attention probabilities (a god's-eye view), as the performance upper bound of a sparse selector.
FLOPsfloating point operationsFloating point operation count. In this paper, the estimated matrix FLOPs per text token.
retrofitretrofitConverting a pretrained model into a new architecture by adding modules and continuing training, without changing its token layout.
module-only
adaptation
module-only adaptationAn adaptation stage that trains only the newly added parameters and freezes all inherited ones.
full-parameter
adaptation
full-parameter adaptationAn adaptation stage that unfreezes all parameters and trains them together.