arXiv:2611.03094cs.AINov 2026

Manuscript Offprint

arXiv:2611.03094

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

Jackson Petty, William Merrill, Ashish Sabharwal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 S5S_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: rr-trivial, corresponding to immutable assignment to variables in programming; aperiodicaperiodic, 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, unlike prior work, 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.

1 INTRODUCTION

Tracking the state of the world across a long context is necessary for understanding discourse, documents, and code (Kamp, 1981; Kim & Schuster, 2023; Hsieh et al., 2024). Prior work has examined the difficulty of state-tracking tasks by viewing them as equivalent to word problems for finite monoids, and relating the algebraic properties of these structures to their computability by various neural architectures (Liu et al., 2023; Merrill et al., 2024). While much focus has been given to the hardest class of state-tracking problems, such as the S5S_5 word problem, less attention has been given to intermediate levels of problem difficulty, which may prove more representative of the kinds of real-world state-tracking tasks language models are expected to solve and might already explain observed performance differences across architectures.

To better understand finegrained state-tracking differences between architectures, we propose evaluating state tracking capabilities across four hierarchical levels naturally motivated by the classical Krohn–Rhodes decomposition for finite monoids (Krohn & Rhodes, 1965): general finite, involving arbitrary transpositions of variables; soluble, involving variable assignment by self-reference; aperiodic, involving the reassignment of variables to new values; and rr-trivial, involving constant registers which can only be written to once. We then evaluate the theoretical expressivity and empirical performance of various language model architectures across levels of this hierarchy.

tasksdataarchR-TRIVIALLTL [past]APERIODICLTL or FOSOLUBLEFO + MODGENERAL FINITEMSO
Immutableassignmentlet x = 4SMAT f_{f}Assignmentby valuevar x = 4SMAT m_{m}Assignment byself-referencevar x = x + 5GDN f+_{f}^{+}Assignment byreferencevar x = yGDN f±_{f}^{\pm}
AC 0^{0}TC 0^{0}NC 1^{1}

Figure 1: Placement of various language model architectures within the hierarchy of state-tracking (monoid word problem) complexity, along with examples of the kinds of tasks that fall into these categories. Areas below the long horizontal line indicate circuit complexity classes that, when restricted to regular languages, are equal to the monoid classes above them. The two log-precision architectures extend into TC 0^{0}. Dashed lines represent conjectured strict boundaries between classes.

We first theoretically explore the ability of Transformers (Vaswani et al., 2017) and Gated DeltaNet (GDN; Yang et al. 2024) models to represent state tracking problems across this hierarchy and the role of particular hyperparameters. Complementing existing results relating low-precision softmax transformers to r-trivial and aperiodic state tracking (Li & Cotterell, 2026; Yang et al., 2025), we show that the state tracking problems expressible by log-precision averaging hard-attention transformers, a well-studied theoretical model, are exactly the soluble ones. Next, whereas GDN with an extended eigenvalue spectrum can represent all state tracking tasks, we characterize the state tracking capabilities of GDN with positive eigenvalues as containing all aperiodic monoids and even some periodic (soluble) ones. Synthesizing prior work and our new results reveals fine-grained distinctions between the theoretical state tracking capabilities of transformers and GDN, as well as the role of precision and parameterization details on the state tracking expectations for each architecture.

Motivated by these theoretical results, we introduce StateBench, a long-context evaluation benchmark with state-tracking problems at varying levels of complexity and supporting evaluation of very large scale length-generalization (up to 64K state changes). We evaluate models trained directly on StateBench data, showing that models containing recurrent modules length-generalize fully on r-trivial, aperiodic, and soluble data and show limited generalization on general finite data, while transformers fail to generalize on r-trivial data and fail to learn even in-distribution general finite data. Surprisingly given prior work (Grazzi et al., 2025), we find that recurrent models with non-negative eigenvalues succeed on StateBench's soluble state tracking tasks, which we explore theoretically in Theorem 1. On open-source pretrained models including two Olmo 3 7B variants, we find that all architectures do well on r-trivial data, degrade meaningfully on aperiodic data, and fail completely on general finite data. We find that a variety of frontier proprietary Gemini, Claude, and GPT LLMs can solve r-trivial and aperiodic tasks well but exhibit strong degradation on soluble and general finite state tracking tasks as a function of sequence length, dropping to near-zero performance on the hardest problems in StateBench. Lastly, we contextualize these results by connecting monoid periodicity to the sensitivity of boolean functions, showing that proper understanding of many tasks involving real-world source code requires state-tracking capabilities beyond the expressivity and learned capacity of current language models.