State space models can express n-gram languages
Not on the map. Why?
Abstract (arXiv)
Recent advancements in recurrent neural networks (RNNs) have reinvigorated interest in their application to natural language processing tasks, particularly with the development of more efficient and parallelizable variants known as state space models (SSMs), which have shown competitive performance against transformer models while maintaining a lower memory footprint. While RNNs and SSMs (e.g., Mamba) have been empirically more successful than rule-based systems based on n-gram models, a rigorous theoretical explanation for this success has not yet been developed, as it is unclear how these models encode the combinatorial rules that govern the next-word prediction task. In this paper, we construct state space language models that can solve the next-word prediction task for languages generated from n-gram rules, thereby showing that the former are more expressive. Our proof shows how SSMs can encode n-gram rules using new theoretical results on their memorization capacity, and demonstrates how their context window can be controlled by restricting the spectrum of the state transition matrix. We conduct experiments with a small dataset generated from n-gram rules to show how our framework can be applied to SSMs and RNNs obtained through gradient-based optimization.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 30 of its 57 references that are in the map. First posted on arXiv 20 Jun 2023.
Builds on
30 of 57 references.
References · 30
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,474
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2016Understanding deep learning requires rethinking generalizationcited by 1,674
- 2017A Closer Look at Memorization in Deep Networkscited by 942
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2018A Convergence Theory for Deep Learning via Over-Parameterizationcited by 787
- 2021Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layerscited by 608
18 more
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 449
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2015Visualizing and Understanding Recurrent Networkscited by 160
- 2018On the Convergence Rate of Training Recurrent Neural Networkscited by 82
- 2018Small ReLU networks are powerful memorizers: a tight analysis of memorization capacitycited by 78
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 66
- 2020How Can Self-Attention Networks Recognize Dyck-n Languages?cited by 51
- 2019On Generalization Bounds of a Family of Recurrent Neural Networkscited by 42
- 2023Memorization Capacity of Multi-Head Attention in Transformerscited by 40
- 2018Stabilizing Gradients for Deep Neural Networks via Efficient SVD Parameterizationcited by 35
- 2019Non-normal Recurrent Neural Network (nnRNN): learning long time dependencies while improving expressivity with transient dynamicscited by 29
- 2020A Survey of Neural Networks and Formal Languagescited by 17
- 2018Evaluating the Ability of LSTMs to Learn Context-Free Grammarscited by 16
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languagescited by 7
- 2017N-gram Language Modeling using Recurrent Neural Network Estimationcited by 6
- 2019Eigenvalue Normalized Recurrent Neural Networks for Short Term Memorycited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
- 2025Generalization Error Analysis for Selective State-Space Models Through the Lens of Attentioncited by 5
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammarscited by 1
- 2026A theoretical model for task routing in mixture-of-expert transformerscited by 0
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammars16 Jun 2026
- 2026A theoretical model for task routing in mixture-of-expert transformers12 Jun 2026
- 2025Generalization Error Analysis for Selective State-Space Models Through the Lens of Attention3 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2025Implicit Language Models are RNNs: Balancing Parallelization and Expressivity
- 2024Longhorn: State Space Models are Amortized Online Learners
- 2026On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models
- 2026M2RNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modeling
- 2025Characterizing Mamba's Selective Memory using Auto-Encoders
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspective
- 2023Resurrecting Recurrent Neural Networks for Long Sequences
- 2024LongSSM: On the Length Extension of State-space Models in Language Modelling