The Surprising Computational Power of Nondeterministic Stack RNNs
Not on the map. Why?
Abstract (arXiv)
Traditional recurrent neural networks (RNNs) have a fixed, finite number of memory cells. In theory (assuming bounded range and precision), this limits their formal language recognition power to regular languages, and in practice, RNNs have been shown to be unable to learn many context-free languages (CFLs). In order to expand the class of languages RNNs recognize, prior work has augmented RNNs with a nondeterministic stack data structure, putting them on par with pushdown automata and increasing their language recognition power to CFLs. Nondeterminism is needed for recognizing all CFLs (not just deterministic CFLs), but in this paper, we show that nondeterminism and the neural controller interact to produce two more unexpected abilities. First, the nondeterministic stack RNN can recognize not only CFLs, but also many non-context-free languages. Second, it can recognize languages with much larger alphabet sizes than one might expect given the size of its stack alphabet. Finally, to increase the information capacity in the stack and allow it to solve more complicated tasks with large alphabet sizes, we propose a new version of the nondeterministic stack that simulates stacks of vectors rather than discrete symbols. We demonstrate perplexity improvements with this new model on the Penn Treebank language modeling benchmark.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 11 of its 34 references that are in the map. First posted on arXiv 4 Oct 2022.
Builds on
11 of 34 references.
References · 11
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2014Neural Turing Machinescited by 630
- 2018On the Practical Computational Power of Finite Precision RNNs for Language Recognitioncited by 117
- 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
- 2015Learning to Transduce with Unbounded Memorycited by 54
- 2017Recurrent Neural Networks as Weighted Language Recognizerscited by 30
- 2018Rational Recurrencescited by 18
- 2021Learning Hierarchical Structures with Differentiable Nondeterministic Stackscited by 16
- 2020Learning Context-Free Languages with Nondeterministic Stack RNNscited by 15
- 2017The Neural Network Pushdown Automaton: Model, Stack and Learning Simulationscited by 10
- 2018SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machinescited by 8
Built on by
Citing papers per year: 2023: 1; 2024: 3; 2025: 1; 2026: 1.
6 papers.
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patternscited by 17
- 2024On Efficiently Representing Regular Languages as RNNscited by 1
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
- 2024Exploring Learnability in Memory-Augmented Recurrent Neural Networks: Precision, Stability, and Empirical Insightscited by 0
- 2026Typological Alignment of Stack-Based Language Models on Mildly Context-Sensitive Artificial Languagescited by 0
- 2026Typological Alignment of Stack-Based Language Models on Mildly Context-Sensitive Artificial Languages1 Oct 2026
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networks5 Nov 2025
- 2024Training Neural Networks as Recognizers of Formal Languages11 Nov 2024
- 2024Exploring Learnability in Memory-Augmented Recurrent Neural Networks: Precision, Stability, and Empirical Insights4 Oct 2024
- 2024On Efficiently Representing Regular Languages as RNNs24 Feb 2024
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns3 Oct 2023