1. Home
  2. Blog
  3. StateBench

Artificial intelligence · 9 min read

A long contextdoes not hold state.

StateBench (Ai2, November 3, 2026) measures a skill every RAG pipeline assumes: following values that change across a document. Frontier models drop to 13% accuracy on the longest dependency chains. The production lesson is not “swap the model”, it is “stop storing state in the prompt”.

By Kaleido LabPublished

In short

  • StateBench splits state tracking into four levels: immutable value, plain reassignment, cumulative update (x = x + 5), then assignment by reference (x = y). The first three pass; the fourth breaks.
  • Gemini 3.8 Flash, Claude Opus 5.5 and GPT-6 Sol and Luna stay strong on the two easy levels, then fall to 13% or lower on the longest sequences at the hardest level. Open-weight Olmo 3 and Olmo Hybrid show the same pattern.
  • Two results are directly actionable: the task format moves the score (a hybrid model goes from ceiling to chance depending on how the task is framed), and models trained on the task generalize 250x beyond their training length — the limit sits in the data, not only in the architecture.

State tracking, the blind spot of long context

An agent reading a customer file, a parser tracking variables across code, a RAG pipeline reconciling three versions of the same contract: all of them ask the model for the same thing. Not to retrieve a passage — to follow a value that changes and return its final state.

That is a different skill from long-context retrieval, and a more fragile one. If the document says “x = 4” and, three hundred tokens later, “x = 2”, taking the last assignment is enough. If it says “x = x + 5”, the value has to be carried forward. If an update references another variable stored further up — “the knife was in John's backpack, John gave his backpack to Mary” — one missed step corrupts the final answer, and nothing in the output flags it.

That is exactly the use case sold with 200k to 1M token windows: “put the whole document in, the model will connect the dots”. StateBench, published by Ai2 on November 3, 2026, puts a number on that assumption — and the number is bad.

The benchmark rests on Krohn–Rhodes theory: state-tracking problems decompose into algebraic primitives, and each level of the benchmark corresponds to a different set of primitives. This is not a handful of tasks picked to look good in a table. The hierarchy is motivated by the known theoretical limits of transformers on long dependency chains.

Four levels, not one score

The four levels are explained through variable assignment. For each sequence, the authors derive four comparable versions: same number of variables, same distinct values, assignments at the same positions. Only the type of assignment changes. That is what makes the gaps interpretable.

LevelOperationCode analogyBusiness case
R-trivialImmutable assignmentlet x = 4Date of birth, product reference
AperiodicReassignment by valuex = 4 … x = 2Latest status of an order
SolubleSelf-referential updatex = x + 5Balance, counter, billing total
General finiteAssignment by referencex = y, swapOwnership transfer, entity permutation

The “general finite” level matters most in production because it covers transfers: a field's content moving from one record to another, a value following an entity as it changes owner. That is routine in an HR file, a financial audit or a supply chain — and it is precisely the level theory predicts transformers cannot handle.

What the models actually do

Four frontier models were tested: Gemini 3.8 Flash, Claude Opus 5.5, and GPT-6 Sol and Luna. They read the sequence of assignments and must output the final value of every variable.

The result: all four do well on the r-trivial and aperiodic levels. On the soluble and general finite levels, accuracy falls sharply as input length grows, down to 13% or lower on the longest general finite sequences. The authors offer a plausible explanation: at those levels, far more steps can affect the final answer, so a single missed update breaks the result. Sensitivity to any slip grows with length.

The same pattern shows up on open pretrained models, with a tighter protocol since training data and context lengths are documented: Olmo 3 (a transformer) and Olmo Hybrid (which adds Gated DeltaNet layers), two 7-billion-parameter models, plus 275-million and 2.7-billion variants, all pretrained on the same data and none beyond 64,000 tokens of context. Almost all handle r-trivial, lose accuracy on aperiodic as inputs grow, and stay at chance on general finite.

The detail that mattersThe small hybrid and Gated DeltaNet models score near the ceiling on r-trivial problems in a RULER-style format — and near chance on the very same problems framed as spreadsheet edits. Task format moves the score by tens of points.

That is the most useful conclusion for an engineer, and it goes well beyond StateBench: a benchmark that dresses a task a certain way also measures the dressing. If your internal eval asks the model to “read a table” instead of “read assignments”, you are not measuring the same skill. Before concluding a model is better on your case, check that it did not simply adapt to your format.

A second, more encouraging result: the authors trained 275-million-parameter models from scratch on the task, on sequences up to 256 assignments, then tested them on sequences up to 64,000 assignments — 250 times the training length. Gated DeltaNet and hybrid models generalized almost perfectly on r-trivial, aperiodic and soluble out to tens of thousands of assignments. Transformers learned the easy levels but degraded on longer sequences, and never learned general finite. The Gated DeltaNet variant with the most flexible memory update stayed near perfect out to roughly ten times the training length on the hardest level.

Read it this way: for recurrent and hybrid architectures, the gap with pretrained models comes mostly from data and training, not from an architectural impossibility. For transformers, part of the limit is structural — trained directly, the transformer still fails the general finite level. That does not mean retraining a model for your product; it means a model that fails these tasks today can succeed after targeted training, which changes the math on fine-tuning for state-tracking work.

The production pattern: state in code, not in the prompt

This benchmark does not ask you to change vendor. It confirms a rule I apply on every pipeline that touches data that changes: the model proposes transitions, the code holds the state. A final value should never be computed by the model from twenty updates read in the context; it should be the deterministic result of transitions the model extracted one at a time.

The pattern has three parts:

  1. Extraction, not aggregation. The model returns one structured object per event: {"op": "set"|"add"|"alias", "target": "balance", "source": "balance", "value": 120}. One decision per call, over a short passage, against a strict JSON schema. That is the part models do well, including at the hard levels.
  2. Deterministic application. A Python reducer applies transitions in order and owns the state. It is unit-testable, replayable, and it fails loudly when a transition references an unknown variable — instead of quietly returning a plausible value.
  3. Differential verification. On a sample, ask the model for the final value again and compare against the reducer. Every mismatch is an extraction bug to investigate, not an opinion to average. That is your own StateBench, on your own documents.

The cost is a bit of code and one extra call per event; the gain is that reliability stops depending on context length. It is the same trade-off as agent guardrails: you do not ask the model to remember the rule, you put the rule in the runtime.

When the pattern is overkill: if the question is about a single passage (“what is the invoice total?”), a one-shot extraction is enough and a reducer adds complexity for nothing. And it does not replace a genuine reasoning gap: StateBench measures state tracking, not the ability to decide what to do with the state.

What the benchmark does not sayStateBench assumes a fixed number of variables. A real agent sees new entities appear mid-conversation, and the framework does not cover that case yet. Do not read the 13% as “agents score 13%”. Read it as “state tracking over long chains is not a given”.

Production checklist

  1. Test the format, not just the model. Replay your eval set with two framings of the same task (table vs event list). If the gap is large, your benchmark is measuring the format and your model decisions are fragile.
  2. Measure per difficulty level. Separate “what is the latest value”, “what is the running total” and “who owns what after the transfers”. A single average hides exactly the level that breaks.
  3. Move state out of the prompt. Structured extraction per event, application in a reducer, state stored and versioned in the application. The context goes back to being what it is: a source of information, not a database.
  4. Make failures visible. A transition referencing an unknown variable must raise, not invent. A silent default turns a state-tracking error into a wrong number in production.
  5. Look at hybrid architectures for self-hosting. If you host a small model for state tracking over long streams, the recurrent and hybrid literature is more promising than piling up context — to validate on your data, not on a blog post.

Need help designing reliable AI workflows, auditing an LLM architecture, or training your engineering team? Explore how we work at Kaleido-Lab.

FAQ

Another question? Write to me.

Is a 200k-token context enough to track state across a document?

No, and StateBench puts a number on it: all four frontier models tested (Gemini 3.8 Flash, Claude Opus 5.5, GPT-6 Sol and Luna) stay strong on simple assignments but fall to 13% or lower on the longest sequences at the hardest level. Context length is not the limiting factor; the number of steps the final answer depends on is.

Should you change model architecture?

Not for a product calling an API. On open models though, recurrent and hybrid architectures (Gated DeltaNet) generalize far beyond transformers when trained on the task: close to 10x the training length on the hardest level, where the transformer fails outright on that same level.

How do you test your own pipeline for this risk?

Take 50 production documents, extract the ordered list of updates, and compare the final value the model produces in one call against a deterministic reducer. Then replay the same task with two different formats: the gap between them tells you whether you are measuring the skill or the packaging.

Does StateBench measure agent reliability?

No. The benchmark assumes a fixed number of variables, while an agent sees new entities appear as a conversation unfolds, and the authors state that case is not covered. It is a long-context state-tracking test, not an end-to-end agent evaluation.

A context window that loses track of your data?

Comparing models, or measuring the cost and reliability of an LLM pipeline on your own tasks? Describe your context, and I will reply with a first opinion and the next steps, with no commitment.

Read next