Abstract

Large language models built on full self-attention share six standing limitations: compute that grows quadratically with context length, hard context limits, degraded use of long contexts, weak tracking of changing state, dependence on added positional signals for word order, and heavy data and compute demands. We present Vitasta, a language-model architecture designed to change how models handle all six. Its backbone is a gated delta-rule recurrent layer that keeps a fixed-size associative state, updates it token by token, and gets word order from the recurrence itself. A few recall layers, which combine a local attention window with retrieval from a bounded chunk memory, give exact access to distant text.
We contribute a stability result for the write range, an order-sensitivity identity for the state, a multi-timescale forgetting scheme, and a cost analysis that gives the best chunk size in closed form. Testing an early version of the write-strength gate found no benefit over a simpler input-dependent rule. Testing the semantic chunk router found it reliable for topically coherent text but unable to find an isolated, thematically unrelated fact; we add a second, exact-match retrieval channel to close this gap. This is a design and analysis report. Overall progress: 25.3% on a defined validation ladder.
1. Introduction
Transformers built on full self-attention underlie nearly all current large language models. Their success comes with six recurring limitations, which are the design targets of this work:
- Quadratic cost. Self-attention compares every token with every other, so compute grows with the square of the context length n.
- Context limits. Models are trained at a fixed maximum length and degrade beyond it, and the key-value cache grows linearly with n.
- Context rot. Even inside the window, the use of information degrades as the context grows and depends on where the information sits.
- Poor dynamic state tracking. Tasks whose answer depends on an evolving state — counters, variables, permutations — are hard for fixed-depth attention.
- No inherent word order. Attention is order-blind and needs added positional signals such as rotary embeddings, which can limit length extrapolation.
- Data and resource hunger. Compute-optimal training of Transformers calls for token budgets that grow with model size.
2. Model Architecture
2.1 Overview
Vitasta is a stack of G identical groups. Each group contains k flow blocks followed by one recall block. A block has two sublayers — a mixer and a gated MLP — each with a residual connection and RMSNorm. The mixer is a flow layer in flow blocks and a recall layer in recall blocks. The input is a token embedding with no positional table.
2.2 Flow Layer
Each head of a flow layer keeps a matrix state St ∈ ℝdv×dk. Given unit-norm key and query kt, qt, and a value vt, computed from the layer input xt, the state is updated and read as:
Here αt ∈ (0, 1] decays old content and βt ∈ (0, 2) sets the write strength. The factor (I − βtktkt⊤) first erases the part of the state along the key, and the last term writes the new pair. This is the gated delta-rule form with the write range of [11].
2.3 Stability and State Tracking
Proposition 1. Let ‖kt‖ = 1, βt ∈ [0, 2] and αt ∈ (0, 1]. Then the update satisfies:
(6)At βt = 1 (and αt = 1) the old value stored at kt is replaced by vt. At βt = 2 it is replaced by 2vt − St−1kt, and with vt = 0 its sign flips — enough to count parity. The upper end of the range is the stability limit: for βt > 2 the factor |1 − βt| exceeds 1 and Proposition 1 no longer holds.
2.4 Multi-Timescale Forgetting
Head h ∈ {0, …, H − 1} decays with:
Base rates are set so that the half-life at Δ = 1 grows geometrically across heads:
(9)For H = 12, nmin = 16 and nmax = 65,536, half-lives run from 16 to 65,536 tokens and each head's is about 2.13× its predecessor's.
2.5 Order Without Positional Encodings
Order is not added to the input; it is a property of the state. Unrolling Eq. (1) gives:
(10)Proposition 2. For any two tokens a and b, the commutator of Pa and Pb is:
It vanishes only when the keys are orthogonal or parallel, or a write strength is zero. Swapping two tokens whose keys partially overlap therefore changes the state — the layer is order-sensitive without any positional signal.
2.6 Write-Strength Gating — A Tested Simplification
An earlier version scaled write strength by surprise. We tested this in isolation on three synthetic streams: clean, noisy, and one with an abrupt distribution shift. The surprise-gated rule was never the best option. On the noisy stream, its MSE was roughly 5× higher than a constant write strength, because sensor noise looks identical to genuine surprise. We adopt the simpler rule:
2.7 Recall Layer and Chunk Memory
A recall layer is causal attention over the last W tokens plus a set of retrieved chunks. Tokens leaving the window are grouped into chunks of C tokens and stored with their keys, values, and one summary key:
(13)A query scores the summaries:
(14)and attends, with an ordinary softmax, to the tokens of the top-k scoring chunks together with the window.
2.8 Exact-Match Retrieval
Mean-key routing is semantic. Testing with controlled topical coherence found: 96–100% retrieval for coherent chunks, but chance (~16%) for isolated facts regardless of training. We add an exact-match channel:
In the isolated-fact case that broke the semantic router, the query placed 61% of its attention mass on the correct earlier occurrence, versus 0% for the router alone.
2.9 Training Objective
The main loss is next-token prediction. Auxiliary heads predict tokens 2 to m positions ahead:
(17)The training context length follows a geometric curriculum from n0 to nmax over sw steps:
3. Complexity and Memory
| Layer type | Compute (training) | Inference memory |
|---|---|---|
| Self-attention | O(n²·d) | O(n·d) |
| Flow layer | O(n·d·dh) | O(d·dh) — fixed |
| Recall layer | O(n·d·(W + n/C + kC)) | O(M·C·d) capped |
The per-token cost of a recall layer is the sum of three terms:
The recall cost is minimized at:
(20)For n = 131,072 and k = 8, C* = 128. The flow state occupies H·dk·dv numbers per layer — for H = 16 and dk = dv = 64, that is 65,536 numbers or 128 KiB in bf16.
4. Validation Plan
- Synthetic tasks. Multi-query associative recall, state tracking (permutations and parity), and copying. The model should still work at lengths several times longer than in training.
- Small-scale scaling. Train three sizes (~125M, 350M and 1B parameters) and a same-compute Transformer baseline, and compare loss against FLOPs and wall-clock time.
- Long context. Needle-in-a-haystack and RULER at several times the training length, looking for sudden drops.
- Efficiency. Tokens per second and memory at 32k and 128k context, for training and inference.
- Ablations. Remove recall layers; compare write strength up to 1 vs up to 2; remove chunk memory; vary flow-to-recall ratio; remove multi-token prediction.
5. Progress
| Stage | Weight | Status |
|---|---|---|
| 1 — Specification of mechanisms | 15 | Complete |
| 2 — Analytical and numerical checks | 15 | Partly complete |
| 3 — Reference implementation | 15 | Not started |
| 4 — Synthetic-task validation | 20 | Not started |
| 5 — Scaling against a Transformer baseline | 20 | Not started |
| 6 — Long-context and efficiency evaluation | 15 | Not started |
Overall progress: 25.3%. This number measures how far the validation ladder has been climbed. It is not a measure of model quality, and no problem counts as solved until stages 4–6 are complete.

Semantic router vs exact-match retrieval — hit rate by condition
(high coherence)
(isolated fact)
(isolated fact)
The semantic router falls to chance on isolated facts regardless of training. The exact-match channel requires no training to be correct and closes this gap entirely.
6. Limitations and Risks
- Exact recall from far back is the known weakness of recurrent cores. Recall layers are tested on controlled synthetic data with encouraging results but not on a real trained model yet.
- The head spectrum is an untested proposal and may not help; the surprise gate it was paired with has already been tested and dropped.
- The write range up to 2 and the chunk memory need adapted or custom kernels.
- The architecture addresses data and resource hunger only in part.
- Retrieval cost still grows with length (though sub-quadratically).
References
- Vaswani et al. Attention is all you need. NeurIPS, 2017.
- Liu et al. Lost in the middle. TACL, 2024.
- Hsieh et al. RULER. arXiv:2404.06654, 2024.
- Merrill et al. The illusion of state in state-space models. ICML, 2024.
- Su et al. RoFormer. arXiv:2104.09864, 2021.
- Kazemnejad et al. Impact of positional encoding on length generalization. NeurIPS, 2023.
- Schlag et al. Linear transformers are secretly fast weight programmers. ICML, 2021.
- Yang et al. Parallelizing linear transformers with the delta rule. NeurIPS, 2024.
- Gu & Dao. Mamba. arXiv:2312.00752, 2023.
- Yang et al. Gated delta networks. ICLR, 2025.
- Grazzi et al. Unlocking state-tracking in linear RNNs. ICLR, 2025.
- Lieber et al. Jamba. arXiv:2403.19887, 2024.
- Jelassi et al. Repeat after me. ICML, 2024.
- Arora et al. Zoology. ICLR, 2024.
- Lu et al. MoBA. arXiv:2502.13189, 2025.
- Behrouz et al. Titans. arXiv:2501.00663, 2024.
- Gloeckle et al. Multi-token prediction. ICML, 2024.
- Robertson & Zaragoza. BM25 and beyond. FnTIR, 2009.
- Zhang & Sennrich. RMSNorm. NeurIPS, 2019.
- Shazeer. GLU variants. arXiv:2002.05202, 2020.
- Hoffmann et al. Compute-optimal LLMs. NeurIPS, 2022.