The UNDO Flip-Flop: A Controlled Probe for Reversible Semantic State Management in State Space Model
Not on the map. Why?
Abstract (arXiv)
State space models (SSMs) have been shown to possess the theoretical capacity to model both star-free sequential tasks and bounded hierarchical structures Sarrof et al. (2024). However, formal expressivity results do not guarantee that gradient-based optimisation will reliably discover the corresponding solutions. Existing benchmarks probe either monotonic state tracking, as in the standard Flip-Flop task, or structural nesting, as in the Dyck languages, but neither isolates reversible semantic state retrieval. We introduce the UNDO Flip-Flop task to fill this gap. By extending the standard Flip-Flop with an UNDO, the task requires a model to maintain an implicit bounded stack and recover historical states under non-monotonic update sequences. We evaluate one-layer and two-layer Mamba-2 under this framework. Both variants fail to acquire the provably expressible stack-based rollback mechanism, converging instead on a local toggle heuristic that inverts the current state rather than retrieving stored history. Under an adversarial retraction pressure test held within the training length distribution, the two-layer model collapses to 41.10% accuracy, which is below random chance. The results confirm systematic rather than incidental failure. Causal ablation shows that the bottleneck lies in retrieval, not storage. These results draw a clear line between what an architecture can in principle represent and what gradient descent reliably learns, a distinction that theoretical expressivity analyses alone cannot capture.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 13 of its 16 references that are in the map. First posted on arXiv 7 Apr 2026.
Builds on
13 of 16 references.
References · 13
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2020Shortcut Learning in Deep Neural Networkscited by 1,928
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 864
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2024The Illusion of State in State-Space Modelscited by 181
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2020RNNs can generate bounded hierarchical languages with optimal memorycited by 59
- 2019Non-Monotonic Sequential Text Generationcited by 55
1 more
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026The Immutable Past: Formalizing State Mutability and Conflict Resolution in Mutable RAG
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothing
- 2026Naju: A Native Discrete State-Space Model with Independent Retention and Writing for Long-Sequence Memory
- 2026StatePlane: A Cognitive State Plane for Long-Horizon AI Systems Under Bounded Context
- 2026State commitment learning: training language models to distinguish computation from memory
- 2026Residual Streams Read, Recurrent States Remember: The Global Workspace in Mamba Models
- 2026CHASE: Cache-Hole-Adapted Skip Exit for Looped State-Space Language Models
- 2025Understanding the Skill Gap in Recurrent Language Models: The Role of the Gather-and-Aggregate Mechanism