# A Fine-Grained Hierarchy and Benchmark for State Tracking in Language Models

Four-level state tracking hierarchy reveals what recurrent architectures can actually track

Jackson Petty, William Merrill, Ashish Sabharwal · arXiv · 2026-11-2

- **Problem** Prior work on state tracking in language models has focused on the hardest case, the S5 word problem. Intermediate difficulty levels, which may better match real tasks and explain observed architecture differences, have received much less attention.
- **Method** The authors sort state tracking into four levels using the Krohn–Rhodes decomposition of finite monoids.
- **Results** The authors prove that a fixed-precision GDN+ solves the word problem over every aperiodic monoid. Pretrained models, including Olmo-3 and Olmo-3-Hybrid, do not robustly solve even soluble state tracking.

## Why the hardest case hides the middle

Long-context state tracking matters for reading discourse, documents, and source code. Prior work treats state tracking as a word problem over finite monoids and asks which neural architectures can solve it. Most of that work concentrates on the S5 word problem, which is the hardest class of state-tracking problems. Intermediate levels of difficulty get much less attention, even though they may be more representative of real-world state-tracking tasks.

Those intermediate levels might also explain the performance differences already observed across architectures.

The authors split state tracking into four hierarchical levels, ordered from r-trivial through aperiodic and soluble to general finite. They motivate these levels with the classical Krohn–Rhodes decomposition for finite monoids. The general finite level involves arbitrary transpositions of variables, while the r-trivial level involves constant registers that can only be written to once.

The authors then evaluate both theoretical expressivity and empirical performance of language model architectures across these levels.

Transformers are thought to length-generalize only on a narrow class of these problems. Because of this gap, the middle levels are where architectural differences can be measured most finely.

## Four levels defined by kinds of variable update

The paper ranks state tracking by the kind of variable update a problem allows, from the simplest to the most general. Immutable writes, such as defining a constant with let x = 4, are the simplest case. Mutable writes redefine a variable with a new value, as in var x = 4 followed by x = 2. Self-referential writes increment a variable, such as x += 3, and referential writes swap two variables.

Each kind of update maps onto one of the building blocks of finite monoids.

A sequence of updates is a word over a monoid, and the word problem asks for the element that the whole sequence produces. The Krohn–Rhodes theorem decomposes every finite monoid into an iterated wreath product of irreducible factors. The factors are the two-element semilattice U1, the flip-flop monoid U2, the cyclic group Zp for a prime p, or a non-commutative finite simple group.

U1 corresponds to immutable writes, U2 to mutable writes by value, and Zp to self-referential writes. Each level of the hierarchy is then defined by which factor types appear in the decomposition.

A finite monoid is r-trivial when distinct elements generate distinct right ideals, which is the strictest of the three conditions. A monoid is aperiodic when every element reaches some power n with x^n equal to x^(n+1). A monoid is soluble when every subgroup of it is soluble. Proposition 1 restates these conditions in terms of factor types, with r-trivial monoids using only U1 factors.

Aperiodic monoids use only U2 factors, and soluble monoids allow U2 or Zp factors for some prime p. The classes nest as Rtrv inside Aprd inside Sol inside Fin, so each level adds difficulty. General finite includes the S5 word problem, while r-trivial covers only immutable writes.

## Which architectures reach which levels of the hierarchy

Softmax attention, averaging hard attention and Gated DeltaNet each sit at a different place in the hierarchy, and the paper compares all three. Gated DeltaNet runs a linear recurrence over a matrix-valued state, with a gate alpha\_t in \[0, 1\] and a write strength beta\_t. The write strength sets the eigenvalues of the transition, which are 1 and 1 minus beta\_t.

GDN+ keeps beta\_t in \[0, 1\], so its eigenvalues are nonnegative, while GDN± lets beta\_t reach 2, so its eigenvalues fall in \[-1, 1\]. Precision also matters, since fixed, log and mixed precision give different capacity.

Fixed-precision softmax attention, written SMATf, solves exactly the r-trivial word problems, a result from Li & Cotterell and Jerad et al. Mixed-precision softmax attention, written SMATm, stays a strict subset of the aperiodic class. Log-precision transformers and AHAT lie inside TC0, and under TC0 not equal to NC1 their regular languages are exactly the soluble ones.

Grazzi et al. showed that GDN+ cannot represent (aa)\*, but they assumed exact arithmetic, and the paper's fixed-precision model allows rounding. Merrill et al. showed that a fixed-precision GDN± covers every finite monoid.

Theorem 1 says a fixed-precision GDN+ solves the word problem over every aperiodic monoid and over some periodic soluble monoids. The proof decomposes each aperiodic monoid into flip-flops, and a one-layer GDN+ gadget implements each flip-flop. This does not contradict the exact-arithmetic result, because Lemma 3 depends on rounding in the computation of A\_h and A\_h'.

Theorem 2 says a log-precision AHAT solves the word problem over every soluble monoid. Corollary 1 makes the log-precision AHAT class exactly the soluble class, assuming TC0 is not equal to NC1. For GDN, the capability is controlled by the eigenvalues, not gating, so GDN+ stays limited to aperiodic problems. Proposition 2 shows that a hybrid of a mod gadget, GDN+f and SMATℓ covers all soluble monoids.

## Building the four StateBench tiers from one source

StateBench problems are monoid word problems over m variables, updated with n assignments. Each assignment is one of four kinds: a swap of two variables, a self-increment, a reassignment by value, or a constant assignment. The authors start from a general finite source task that mixes swaps, implemented with a temporary variable, with aperiodic assignments to new constant values.

The soluble sample replaces every swap with a self-increment, x←x+δ mod N, for some max value N. The aperiodic sample replaces each swap with the value it would have copied, x←K. The r-trivial sample replaces every assignment with the variable's initial value, x←x0.

The static evaluation set holds r-trivial, aperiodic, soluble and finite samples with 8 to 64,000 assignments. The same generated data then feeds the direct-training experiments, where six architectures are trained from scratch.

## Direct training and length generalization

The question is whether models trained directly on StateBench show the ordering that the theory predicts. Each of the six architectures starts from random initialization as a 275M-parameter model. Training lengths n range from 8 to 256 assignments, and evaluation reaches 64,000 assignments. That evaluation length is 250 times the longest training length, which tests generalization far beyond the training data.

The authors check generalization up to 4 times the training length and all the way to 64,000. GDN models generalize perfectly on r-trivial, aperiodic and soluble data, as Figure 3 shows. GDN+ models, by contrast, degrade immediately beyond the training cutoff on general finite data.

![Figure 3: Direct Training: GDNs generalize perfectly on r-trivial, aperiodic, and soluble data, and partially on general finite data; Transformers fail to gene…](https://refivu.com/papers/cd3daf60-866c-48b4-9114-bda9fdde8e0c/figures/figure-270d67f96ff78ade89130fa7b38f9c9a.png?thumb=512)

**Figure 3** : Direct Training: GDNs generalize perfectly on r-trivial, aperiodic, and soluble data, and partially on general finite data; Transformers fail to generalize beyond their training distribution on r-trivial, aperiodic, and soluble data and fail to even learn in-distribution general finite data. Error bars show Wilson confidence intervals.

[Original paper](https://arxiv.org/abs/2611.03094v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Jackson Petty, William Merrill, Ashish Sabharwal · A Fine-Grained Hierarchy and Benchmark for State Tracking in Language Models · Original paper figure · Extracted the figure area from page 7 of the original PDF.

Transformers learn in-distribution r-trivial and aperiodic data well but don't generalize perfectly past training. Transformers don't even fully learn the in-distribution general finite data. This fits the theory, because the paper places softmax transformers at the r-trivial and aperiodic levels and log-precision ones inside Sol.

Hybrid± models generalize longer than Hybrid+ models on general finite data.

## Why general finite data is harder: sensitivity

Sensitivity measures how much perturbing a function's input changes its output, and the authors use it to explain why general finite samples are hard. Theory says monoid word problems have o(n) sensitivity when they are aperiodic, and Ω(n) otherwise. For their own samples, the authors count the steps at which modifying a variable's value could change the final output.

They apply the same measure to CruxEval, a code-understanding benchmark of Python methods with canonical inputs and expected outputs.

R-trivial and aperiodic samples have low average sensitivity, with a median of 0.05 for both. Soluble samples have a median of 0.76, and general finite samples have a median of 0.73. Because sensitivity tracks periodicity, the authors suggest that periodic state tracking matters for evaluating natural code.

![Figure 4: Sensitivity Analysis: Histograms of sample sensitivities in(left)the four complexity distributions in StateBench and(right)code samples from CruxEval](https://refivu.com/papers/cd3daf60-866c-48b4-9114-bda9fdde8e0c/figures/figure-a7451ac247e2f28bda5087224a9b5242.png?thumb=512)

**Figure 4** : Sensitivity Analysis: Histograms of sample sensitivities in(left)the four complexity distributions in StateBench and(right)code samples from CruxEval.

[Original paper](https://arxiv.org/abs/2611.03094v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Among general finite samples, higher sensitivity makes accuracy drop, even for models that learn the training data in-distribution. To test whether a curriculum helps, they trained on randomly shuffled general finite sequences and on the same data ordered by ascending sensitivity. Ordering by ascending sensitivity had negligible effects on GDN and Hybrid models and on NoPE Transformers.

It gave only a weak positive effect on RoPE Transformers on in-distribution general finite sequences, so the curriculum doesn't solve the problem.

## Pretrained and frontier models on StateBench

Pretrained models are the harder test here, since the authors don't train them on StateBench at all. They study two 7B models, Olmo-3 and Olmo-3-Hybrid, plus a family of smaller custom models at 275M and 2.7B parameters. The reported accuracy is the maximum value a model reaches on any of those six formats.

Almost every pretrained model does well on r-trivial data, the exception being the 275M transformer. On aperiodic data, the 7B models attain only about 90% accuracy, below what theory suggests. All models show some degradation within the pretraining length window and drop noticeably after it. On general finite data, every pretrained model stays at chance for all sequence lengths.

The authors find that Krohn–Rhodes complexity, sample length, and model size are the dominant factors in accuracy.

![Figure 5: Pretrained models underperform theoretical expectations and direct-training results, show- ing consistent performance degradation on aperiodic data a…](https://refivu.com/papers/cd3daf60-866c-48b4-9114-bda9fdde8e0c/figures/figure-0935ceb32f8899280737f0e70bdba958.png?thumb=512)

**Figure 5** : Pretrained models underperform theoretical expectations and direct-training results, show- ing consistent performance degradation on aperiodic data and completely failing on general finite data. Error bars show Wilson confidence intervals.

[Original paper](https://arxiv.org/abs/2611.03094v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Format matters a lot for these models, so the same underlying sequences can score very differently. RULER-formatted samples are much easier than the same sequences rendered as manipulations of named spreadsheet cells. Small models reach near-ceiling accuracy on RULER-formatted r-trivial data, but they sit near chance on spreadsheet-formatted data.

Even 7B models generalize better to longer sequences when the input follows the RULER format. The authors conclude that evaluations of pretrained models should cover a variety of formats.

![Figure 6: Frontier LLMs struggle on long-horizon soluble and general finite state-tracking tasks. Error bars show Wilson confidence intervals](https://refivu.com/papers/cd3daf60-866c-48b4-9114-bda9fdde8e0c/figures/figure-a4283f184e0bfccce423ed455f1200e6.png?thumb=512)

**Figure 6** : Frontier LLMs struggle on long-horizon soluble and general finite state-tracking tasks. Error bars show Wilson confidence intervals.

[Original paper](https://arxiv.org/abs/2611.03094v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Four proprietary frontier models are tested in a generative setting, where they must output the final state rather than pick one of five answers. These models include Gemini 3.8 Flash, Claude Opus 5.5, and GPT-6 Sol and Luna. That drop appears when inputs reach between 10K and 64K tokens, as Figure 6 displays. The authors read this degradation as substantial headroom for better generalization on sensitive state-tracking problems.

## What the evidence leaves open

The exact placement of GDN+ in the hierarchy remains open for the authors. The authors show that GDN+ contains all aperiodic monoids and some periodic soluble ones. They also don't know how numerical precision or hybridization with attention layers would change that placement. Whether GDN+ with mixed or log precision stays inside aperiodic, or can implement the mod operation, is unresolved.

The log-precision AHAT characterization depends on a circuit complexity assumption. Under the assumption that TC0 differs from NC1, log-precision AHAT intersected with Fin equals Sol. Theorem 2 needs no such assumption, because it only shows that log-precision AHAT solves every soluble monoid. For SMAT, the authors leave open whether log precision fully realizes Sol.

The direct-training experiments used randomly initialized 275M-parameter models for each architecture. The authors didn't test larger direct-trained models, so scale effects remain unmeasured. Their claims about periodic state tracking therefore rest on models of this size. Whether periodic state tracking drives the gap between architectures in natural data is still an open question.

The sensitivity analysis of code suggests that general finite state tracking matters for code understanding.

Extending the hierarchy to unboundedly many variables would bring tasks such as arbitrary discourse tracking into the same framework. The authors present this extension as future work, not as a result they established.

## Paper info

- **Authors**: Jackson Petty, William Merrill, Ashish Sabharwal
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-2
- **Added**: 2026-11-4
- **Updated**: 2026-11-2
- **Version**: v1
- **arXiv**: 2611.03094
- **Category**: cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.03094v1) · [PDF ↗](https://arxiv.org/pdf/2611.03094v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Theoretical limitations of transformers on state tracking---the ability to track information about entities or variables over long contexts---have motivated new recurrent language modeling (LM) architectures such as Gated DeltaNet (GDN). These architectures have, in particular, been benchmarked against the $S\_5$ word problem, a theoretically hard state-tracking task that captures abilities such as code evaluation under arbitrary variable assignment. It, however, remains open whether other, simpler forms of state tracking might both be more relevant in practice and already explain observed differences between these architectures. We propose evaluating state tracking using a hierarchy of word problems with four increasing levels of difficulty: r-trivial, corresponding to immutable assignment to variables in programming; aperiodic, where assignments are mutable; soluble, where assignments are self-referential; and general finite state tracking. Theoretically, we show that the class of problems transformers are thought to length-generalize on does not even contain all aperiodic state tracking. On the other hand, we prove that GDN with positive eigenvalues expresses all aperiodic problems, and the regular languages recognized by certain transformers are precisely all soluble ones, thus providing a fine-grained picture of state tracking capabilities of various architectures. Taking these ideas to practice, we construct StateBench, a 4-tier long-horizon state-tracking benchmark. Our systematic direct training experiments across architectures largely align with theoretical expectation, albeit with interesting observations at very large scale length-generalization. Additionally, we also evaluate pretrained models---both open hybrid and closed frontier ones---on StateBench, finding that none of them robustly solves even soluble state tracking, suggesting a direction for future improvement.

## Quote from the paper

Jackson Petty, William Merrill, Ashish Sabharwal (2026). A Fine-Grained Hierarchy and Benchmark for State Tracking in Language Models. arXiv:2611.03094v1. https://arxiv.org/abs/2611.03094v1

**BibTeX**

```
@misc{petty2026fine,
  title = {{A Fine-Grained Hierarchy and Benchmark for State Tracking in Language Models}},
  author = {Jackson Petty and William Merrill and Ashish Sabharwal},
  year = {2026},
  eprint = {2611.03094},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.03094v1}
}
```

## Other paper commentary

- [Solver-Like Behavior in Large Language Models as Formalizers](https://refivu.com/en/papers/ab6953be-bd0f-4ed3-b15d-be5b58aaeb44-solver-like-behavior-in-large-language-models-as.md)
- [A Capitulation Direction Emerges With Scale and Is Causally Load-Bearing Where Validation Is Strong: Eight Models, Two Families, and Five Measurement Hazards](https://refivu.com/en/papers/62d926b5-3969-4869-9b24-cd2b36931cf4-a-capitulation-direction-emerges-with-scale-and-is.md)
- [InfAlign: Inference-aware language model alignment](https://refivu.com/en/papers/c8a29ed9-8ab2-4e59-9865-5055bb8ee487-infalign-inference-aware-language-model-alignment.md)
- [MixMin: Finding Data Mixtures via Convex Minimization](https://refivu.com/en/papers/1812a7ac-7070-4e11-93d3-514e69d7cf83-mixmin-finding-data-mixtures-via-convex-minimization.md)
- [The Geometry of Refusal in Large Language Models: Concept Cones and Representational Independence](https://refivu.com/en/papers/fd13f7d8-7e4a-4bc8-9f04-ace7e79ab349-the-geometry-of-refusal-in-large-language-models.md)
- [Evolution Strategies at the Hyperscale](https://refivu.com/en/papers/77d44b80-fbe4-419d-a33e-e5ab69fb2914-evolution-strategies-at-the-hyperscale.md)
- [DR Pixel: Page-Native Deep Research with Vision-Language Models](https://refivu.com/en/papers/3854c522-c5fc-40bc-aca5-3fd7d0dee531-dr-pixel-page-native-deep-research-with-vision.md)
- [InteractionBench: Measuring Timing, Task Accuracy, Whisper and Volume, and Grounding in Real-Time Voice Systems](https://refivu.com/en/papers/085cd9ce-06dc-450c-ab0d-d1178b2fba7a-interactionbench-measuring-timing-task-accuracy-whisper-and.md)
- [Harvesting SWE Benchmarks from Wild Vibe Coding Sessions](https://refivu.com/en/papers/f4872e20-10d1-40cf-b61b-44dcf0f4e3c5-harvesting-swe-benchmarks-from-wild-vibe-coding-sessions.md)
- [CellPlex: Benchmarking Single-Cell Spatial Proteomics Prediction from H&E](https://refivu.com/en/papers/1d1014e5-8838-4f95-8c2e-ec938999c814-cellplex-benchmarking-single-cell-spatial-proteomics.md)
- [A balloon effect: ban one channel and a hidden trait finds another](https://refivu.com/en/papers/2b0175b6-cf1a-420d-8315-35abd8bbf107-a-balloon-effect-ban-one-channel-and-a.md)
- [When Rewards Depend on the Group, GRPO Plays a Tournament](https://refivu.com/en/papers/a2b9f3f8-1578-44ec-a11c-495a5ef254da-when-rewards-depend-on-the-group-grpo-plays.md)

## Terms in this paper

- [Transformers](https://refivu.com/en/terms/ab75807099b0-transformers)
- [sensitivity](https://refivu.com/en/terms/74e665f56f15-sensitivity)
- [Gated DeltaNet](https://refivu.com/en/terms/867332aa385b-gated-deltanet)
- [softmax attention](https://refivu.com/en/terms/140344948263-softmax-attention)
- [CRUXEval](https://refivu.com/en/terms/f8061ad5f768-cruxeval)
- [frontier models](https://refivu.com/en/terms/ba5c6eba497e-frontier-models)
- [state tracking](https://refivu.com/en/terms/b2b2739264bd-state-tracking)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/cd3daf60-866c-48b4-9114-bda9fdde8e0c-a-fine-grained-hierarchy-and-benchmark-for-state)
