Length-Independent State Tracking Under a Parallel Scan
Julien Brandoit, Arthur Fyon, Thomas Braipson, Tom Clara, Florent De Geeter, Pierre Sacré, Damien Ernst, Guillaume Drion
Abstract
Learning robust and scalable finite-state tracking is fundamental to sequence processing. While linear recurrent neural networks (RNNs), linear attention, and state space models enable scalable parallel training through affine recurrences, their theoretical expressivity guarantees assume idealized arithmetic and do not extend to finite precision, where the parallel scan that makes them fast is itself a source of perturbation. We formalize finite-state tracking at finite precision and characterize length independence: tracking that stays correct at every sequence length, at a precision cost that does not grow with the length. We show that length-independent state tracking requires two competing dynamics within a single map: contraction to suppress numerical perturbations and separation to keep distinct states apart. We prove that affine recurrences, which offer a single rate at each step to serve both roles, realize at most definite automata at finite precision. Instead of treating scan compatibility as a restriction on the update map, we reinterpret it as a computational budget and introduce the Neural Finite-State Machine (NFSM): a nonaffine, scan-compatible RNN built for length-independent finite-state tracking. On synthetic benchmarks spanning abelian and nonabelian groups, noninvertible monoids, and textual state-tracking tasks, affine baselines fail on every nondefinite task, most of them within a few hundred steps. A single NFSM layer instead learns the exact transition tables of every algebraic task, which certifies correctness beyond the tested lengths, and a stack of NFSMs keeps perfect accuracy on the textual tasks at every tested length.
Create a lesson
Metadata
- Comments
- https://julienbrandoit.github.io/length-independent-state-tracking/
Related papers
Critical Sequence Length: A Note on How Document Structure Bounds Gradient-Noise Reduction
Shared title terminologycs.LGSunny Guha
Multi-Signal Internal-State Online Quality Monitoring for LLM Serving
Shared title terminologycs.LGYibo Zhao, Nengneng Yu, Sixian Xiong et al.
Shorter Sequences, Faster Models: Sequence Length Compression as a Stackable Primitive for LLM Training and Inference
Shared title terminologycs.LGMarc Neumann
Compressing Gated DeltaNet States with a Shared Value Basis and an Adaptive Residual
Shared title terminologycs.LGIvan Krivorotov, Egor Maximov, Aleksei Merkelov et al.
BlockDTW: Efficient, Parallel and Differentiable Time-Series Alignment for Neural Learning Systems
Shared title terminologycs.LGAlberto Zancanaro, Leonardo Badia, Giulia Cisotto
Robust LLM-based User Simulation With Trained Latent-State Dynamics
Shared title terminologycs.LGMartin Mladenov, Jihwan Jeong, Hubert Pham et al.