Lune

ICLR2023Top-tier venue

The Surprising Computational Power of Nondeterministic Stack RNNs

Brian DuSell, David Chiang

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns cites Learning Hierarchical Structures with Differentiable Nondeterministic Stacks
  • Training Neural Networks as Recognizers of Formal Languages cites Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns
  • Training Neural Networks as Recognizers of Formal Languages cites Learning Hierarchical Structures with Differentiable Nondeterministic Stacks
  • Algorithms for Weighted Pushdown Automata cites Learning Hierarchical Structures with Differentiable Nondeterministic Stacks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Stack Attention: Improving the Ability of Transformers to Model Hierarchical PatternsBrian DuSell, David ChiangICLR 2024 · 15 citations
  2. Training Neural Networks as Recognizers of Formal LanguagesAlexandra Butoi, Ghazal Khalighinejad, Anej Svete, Josef Valvoda et al.ICLR 2025

Builds on2

  1. Learning Hierarchical Structures with Differentiable Nondeterministic StacksBrian DuSell, David ChiangICLR 2022 · 19 citations
  2. Algorithms for Weighted Pushdown AutomataAlexandra Butoi, Brian DuSell, Tim Vieira, Ryan Cotterell et al.EMNLP 2022 · 2 citations

Related papers

  1. On Efficiently Representing Regular Languages as RNNsAnej Svete, Robin Chan, Ryan CotterellACL Findings 2024 · 1 citation
  2. Recurrent Neural Language Models as Probabilistic Finite-state AutomataAnej Svete, Ryan CotterellEMNLP 2023 · 1 citation
  3. Push, Pop, Parallelize: Stack-Augmented Linear Attention via the Delta RuleAnh T Nguyen, Saleh Momeni, Ashutosh Chaubey, Changnan Xiao et al.ICML 2026
  4. Recursive Transformer: Boosting Reasoning Ability with State StackKechi Zhang, Ge Li, Jia Li, Huangzhao Zhang et al.NeurIPS 2025 · 1 citation
  5. Approximating Stacked and Bidirectional Recurrent Architectures with the Delayed Recurrent Neural NetworkJavier Turek, Shailee Jain, Vy A. Vo, Mihai Capota et al.ICML 2020 · 13 citations
Dusk over the sea between two cliffs drawn in fine vertical lines