Ark (Part-2)

Results — Hybrid Quality at a Fraction of the Memory

Ark Series  —  ← Part 1: Not Every Token Deserves Softmax  |  Part 2: Results  |  Part 3: Kernels and Systems →

In Part 1 we built Ark: a single block in which a learned router sends each entry (one token, in one KV group, of one layer) either to a KV cache read with the exponential kernel, or to a fixed-size recurrent state read with the linear kernel. Ark retains only about 10% of entries in the KV cache, so the central question is simple:

Does storing so little cost quality?

Short answer: not much. At every scale from 400M to 2B, Ark is competitive with Transformers and with strong hybrids on recall while storing about a tenth of a Transformer’s memory and 25–53% less than the hybrids.

Setup

We train Ark at ~400M, ~800M and ~2B parameters (on 15B, 32B and 200B tokens), keeping about 10% of entries in the KV cache. We compare it with Transformers (RoPE, NoPE, FoX, and MLA at the smaller scales) and with hybrids that interleave NoPE softmax layers with GLA or Gated DeltaNet (GDN) layers, where \(1{:}x\) means one softmax block per \(x\) recurrent blocks. Memory is counted as stored elements, recurrent state plus KV cache, at 8K context, so very different architectures share one axis.

Language Modeling

Before recall, the basics. On zero-shot language-modeling and commonsense benchmarks at 2B, Ark averages 53.4 on the five commonsense tasks (PIQA, HellaSwag, WinoGrande, ARC-e, ARC-c), inside the range of both the Transformers (49.7–53.9) and the hybrids (51.5–54.4). The clearest gap is LAMBADA, which predicts the last word of a passage from its context: Ark reaches a perplexity of 11.1 and an accuracy of 51.3, against 9.4 and 54.5 for the RoPE Transformer.

Recall with Less Memory

Single-fact recall. We start at all three scales: extracting a value from a document (SWDE, FDA), answering reading-comprehension questions (SQuAD), and finding a needle in a haystack at 2K–8K context (NIAH-1 to NIAH-3, the hardest with a UUID as the needle).

Ark keeps pace with the best hybrids while storing 25–53% less. At 2B it ties GDN 1:6 on FDA (79.5 each) and leads on SQuAD (51.9 vs. 50.4), but trails on SWDE (78.0 vs. 81.2); at 800M it beats GDN 1:6 on all three. It is also the model to beat on the hardest needle, a UUID hidden at 4K context: at both 400M and 800M Ark finds it best, while several baselines collapse.

Ark’s main gap is on long-context needles. At 2B it trails GDN 1:6 on the UUID needle at every length (92.2 / 88.4 / 71.4 vs. 100 / 99.2 / 94.0 at 2K / 4K / 8K), and at 800M the 8K gaps are larger (NIAH-2: 17.8 vs. 81.6; NIAH-3: 10.2 vs. 39.2). Our hypothesis, which we have not tested, is that the recurrence is the bottleneck rather than the routing: we gave Ark the simplest and cheapest decay, a single scalar per step, while GDN’s delta rule can also erase along the incoming key. The router does not depend on what recurrence sits underneath, so a richer one could be swapped in to test this.

Long-context RULER tasks. RULER’s basic single-needle tasks (NIAH-1 to NIAH-3) are already in the recall tables above. The extended 2B suite from RULER and BABILong goes beyond one fact per query, with variable tracking, word aggregation, multi-hop QA and multi-item retrieval at 2K–8K context.

With the smallest memory of any model in the suite, Ark leads every model at every length on frequent-word extraction (FWE), SQuAD-based QA and BABILong, and beats every hybrid on multi-key NIAH with a single target. It does not lead everywhere: GDN 1:6 is ahead on common-word extraction (CWE) at every length and on HotpotQA at 8K (31.6 vs. 30.4).

Its limit shows when one query needs many tokens back exactly: multiple queries, the harder multi-key variants, and multiple values at 8K. There the strongest hybrids and Transformers pull ahead. Ark retains only about 10% of its entries exactly, so those tokens compete for the same space; a budget that adapts to the input is the natural next step.

Learning What to Keep

Ark decides during training which entries to retain. Is that better than the simpler alternatives?

Against KV eviction. There is another way to get a small cache: train a full Transformer and evict entries at inference time. We compare Ark against four training-free policies, StreamingLLM, H2O, SnapKV and AdaKV, applied to RoPE, NoPE and FoX Transformers. To make the baseline as strong as possible, we take the best score in each column separately over all eleven combinationsFoX omits AdaKV because per-head retained sets are incompatible with its GPU decoding kernel., a baseline stronger than any real eviction policy, and give it at least as much memory as Ark.

Against content-agnostic routing. Does the router’s choice of which entries to retain matter, or only the size of the cache? We replace the learned router with two allocations that ignore content: random, which retains each entry independently with the target probability, and periodic, which retains an evenly spaced fraction.

At equal memory, Ark outperforms even this per-task best policy on nearly every task, often by a wide margin. At 800M, it nearly doubles FDA accuracy (81.3 vs. 41.9), and it keeps near-perfect UUID retrieval at 4K, where eviction collapses. The difference is when the choice is made. An evicting model is trained expecting to see every token and only loses some at inference. Ark is trained with the choice built in: it learns which tokens deserve the cache, and the ones it lets go still live on, compressed, in the recurrent state.

At a matched ~10% budget, the learned router improves extraction accuracy 1.8–4.7×, and it is the only policy that reliably finds the UUID needle. Even with 4.6× as many KV entries, random routing recovers the easier needles but still trails the learned router on the UUID needle and extraction.

The recall comes from choosing the right tokens, not from the size of the cache.

Ablations

How many teacher queries?

The approximation loss from Part 1 compares the routed attention distribution against the softmax teacher on \(\lvert\mathcal Q\rvert\) sampled query positions per sequence, at cost \(O(\lvert\mathcal Q\rvert T)\) per head. How many do we need?

\(\lvert\mathcal Q\rvert\) 0 1 5 10 20 60 200
Realized compression (%) 99.76 89.42 89.57 89.66 89.34 89.25 89.55
Val. PPL ↓ 13.86 12.64 12.63 12.65 12.65 12.63 12.65
SWDE 11.2 51.6 50.9 53.8 49.0 53.9 50.9
FDA 2.0 68.8 66.6 71.9 69.9 63.2 63.5
SQuAD 19.3 29.8 32.1 30.5 33.6 34.0 31.9

With \(\lvert\mathcal Q\rvert=0\) the budget is the only signal, and the router collapses to compressing nearly every entry (99.76%), which hurts both perplexity and recall. A single sampled query per sequence prevents the collapse. More queries help only mildly, mainly on SQuAD, so we use 10 and supervision stays cheap.

Architecture choices

The Ark block uses (i) a \(1+\mathrm{elu}\) feature map, the best of those we tried (\(\exp\) is the weakest); (ii) QK-RMSNorm in each branch, worth 14 points of mean recall; (iii) LoRA only on the linear branch, before the norm; (iv) no short convolution, which hurts recall wherever we place it; and (v) decay in every layer, since NoPE layers help some retrieval tasks but hurt others.

Choice (iv) might be seen as against common practice, since almost every modern linear model relies on a short convolution as a crutch for retrieval. But a model that stores exact tokens can retrieve them directly: attention never needed a convolution, and neither does Raven, our earlier recurrent model whose state is a set of slots that a learned router writes to selectively. The same goes for Ark, which retains the tokens that matter exactly.

How Ark Uses Its Two Memories

Ark is trained to retain retrieval-relevant entries in the KV cache. But does the trained model actually rely on them? We override the routing of a trained 400M model at inference time, without changing any weights.

Experiment 1: force every entry into one memory, either all into the KV cache or all into the recurrent state.

Experiment 2: move only the answer tokens. We locate every occurrence of the answer in the context and force just those tokens to the linear kernel, in every layer and KV group. Everything else keeps its learned routing decision.

The ~10% of entries in the KV cache carry nearly all of the model’s retrieval ability. With everything in the recurrent state, commonsense tasks barely notice, while retrieval and long-range prediction collapse, down to 0% on FDA. This matches what we found in Transformers: retrieval runs through exact attention on only a few positions.

Retaining everything in the KV cache does not help either: it makes retrieval worse, roughly halving FDA (35.7 vs. 71.9) and SWDE (27.8 vs. 53.8). Part of this drop may come from a mismatch rather than from the recurrent state doing essential work: the model was trained with about 10% retention and never saw all-KV routing. What the experiment does show is that the trained model is tuned to its learned split, using the KV cache for retained entries and the recurrent state for the rest.

In Experiment 2, mean accuracy drops from 52.1% to 8.4%. Retrieval fails not because the cache got smaller, but because the specific entries it needed are gone. It’s the same lesson as the routing ablation, seen from the other side: what matters is which tokens are retained.

What Does the Router Keep?

Below is one KV group of a trained Ark model: blue tokens are retained in the KV cache and orange tokens are compressed into the recurrent state. Only about 13% of tokens are retained, and most of them are punctuation marks at sentence boundaries, along with fragments of the codes hidden in the text. We suspect that by retaining the punctuation, Ark learns a coarser abstraction of the input on its own: the sentence rather than the single token, close in spirit to H-Net, where the model learns from data how large a unit of input to abstract over and store. A direct test would be to move only the sentence-end tokens to the linear kernel, as in Experiment 2, and check whether questions about a sentence’s content get harder.

The periods surprised us. We expected every layer to spend its cache on retrieval. Instead, some heads cache the end of each sentence, probably condensing what the sentence said into that one token, while other heads do the retrieval. In hindsight this mirrors the gather heads of gather-and-aggregate, which condense a span into a single token that other heads can later retrieve.

In the NIAH task below an 8K-token prompt streams through one router (layer 20, KV group 3), and its score is plotted as each token arrives. Across the haystack the score stays low and almost everything goes to the recurrent state; when the needle arrives, the score jumps above the threshold and the needle’s tokens are retained in the KV cache.

No one told the router what a needle is. It learned, from the softmax teacher and a budget (Part 1), that a few positions carry information the recurrent state cannot hold, and it spends its cache there. Experiment 2 confirms it: without those tokens in the KV cache, retrieval collapses.

Up Next

A smaller footprint only matters if it turns into speed. In Part 3 we walk through the algorithms behind both branches, a packed-attention kernel for the exponential branch and a log-space chunked recurrence for the linear branch, and how Ark ends up decoding 3.35× faster than FlashAttention and 1.60× faster than a GLA hybrid from a 64K-token prompt (2B models, batch 8, one H100).