Learning Hierarchical Structures with Differentiable Nondeterministic Stacks
Not on the map. Why?
Abstract (arXiv)
Learning hierarchical structures in sequential data -- from simple algorithmic patterns to natural language -- in a reliable, generalizable way remains a challenging problem for neural language models. Past work has shown that recurrent neural networks (RNNs) struggle to generalize on held-out algorithmic or syntactic patterns without supervision or some inductive bias. To remedy this, many papers have explored augmenting RNNs with various differentiable stacks, by analogy with finite automata and pushdown automata (PDAs). In this paper, we improve the performance of our recently proposed Nondeterministic Stack RNN (NS-RNN), which uses a differentiable data structure that simulates a nondeterministic PDA, with two important changes. First, the model now assigns unnormalized positive weights instead of probabilities to stack actions, and we provide an analysis of why this improves training. Second, the model can directly observe the state of the underlying PDA. Our model achieves lower cross-entropy than all previous stack RNNs on five context-free language modeling tasks (within 0.05 nats of the information-theoretic lower bound), including a task on which the NS-RNN previously failed to outperform a deterministic stack RNN baseline. Finally, we propose a restricted version of the NS-RNN that incrementally processes infinitely long sequences, and we present language modeling results on the Penn Treebank.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 20 of its 33 references that are in the map. First posted on arXiv 5 Sep 2021.
Builds on
20 of 33 references.
References · 20
- 2017Regularizing and Optimizing LSTM Language Modelscited by 205
- 2020A Systematic Assessment of Syntactic Generalization in Neural Language Modelscited by 163
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 128
- 2016Recurrent Neural Network Grammarscited by 109
- 2018Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networkscited by 101
- 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
- 2019Compound Probabilistic Context-Free Grammars for Grammar Inductioncited by 76
- 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
- 2015Learning to Transduce with Unbounded Memorycited by 54
- 2016A Fast Unified Model for Parsing and Sentence Understandingcited by 34
- 2019Memory-Augmented Recurrent Neural Networks Can Learn Generalized Dyck Languagescited by 31
- 2019Quantity doesn't buy quality syntax with neural language modelscited by 25
8 more
- 2015Tree-structured composition in neural networks without tree-structured architecturescited by 23
- 2016Recurrent Dropout without Memory Losscited by 22
- 2019Ordered Memorycited by 20
- 2020Learning Context-Free Languages with Nondeterministic Stack RNNscited by 15
- 2018Context-Free Transductions with Neural Stackscited by 14
- 2017The Neural Network Pushdown Automaton: Model, Stack and Learning Simulationscited by 10
- 2019Hierarchical Representation in Neural Language Models: Suppression and Recovery of Expectationscited by 8
- 2019Finding Syntactic Representations in Neural Stackscited by 4
Built on by
Citing papers per year: 2022: 3; 2023: 6; 2024: 3; 2025: 4.
16 papers.
Sort:
By area:
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structurescited by 83
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
- 2025Can Language Models Learn Typologically Implausible Languages?cited by 23
- 2023Pushdown Layers: Encoding Recursive Structure in Transformer Language Modelscited by 18
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patternscited by 17
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Modelscited by 7
- 2022The Surprising Computational Power of Nondeterministic Stack RNNscited by 6
- 2023Beam Tree Recursive Cellscited by 6
- 2023Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalabilitycited by 5
- 2023Efficient Beam Tree Recursioncited by 4
- 2024A Transformer with Stack Attentioncited by 2
4 more
- 2025A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networkscited by 2
- 2022Algorithms for Weighted Pushdown Automatacited by 1
- 2025A Systematic Study of Compositional Syntactic Transformer Language Modelscited by 1
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networkscited by 1
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networks5 Nov 2025
- 2025A Systematic Study of Compositional Syntactic Transformer Language Models28 Jun 2025
- 2025A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networks30 May 2025
- 2025Can Language Models Learn Typologically Implausible Languages?17 Feb 2025
- 2024Training Neural Networks as Recognizers of Formal Languages11 Nov 2024
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Models24 Jul 2024
- 2024A Transformer with Stack Attention7 May 2024
- 2023Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalability8 Nov 2023
- 2023Pushdown Layers: Encoding Recursive Structure in Transformer Language Models29 Oct 2023
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns3 Oct 2023
- 2023Efficient Beam Tree Recursion20 Jul 2023
- 2023Beam Tree Recursive Cells31 May 2023
4 more
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structures23 May 2023
- 2022Algorithms for Weighted Pushdown Automata13 Oct 2022
- 2022The Surprising Computational Power of Nondeterministic Stack RNNs4 Oct 2022
- 2022Neural Networks and the Chomsky Hierarchy5 Jul 2022
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
- 2024Training Neural Networks as Recognizers of Formal Languages11 Nov 2024
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structurescited by 83
- 2025Can Language Models Learn Typologically Implausible Languages?cited by 23
- 2023Pushdown Layers: Encoding Recursive Structure in Transformer Language Modelscited by 18
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patternscited by 17
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Modelscited by 7
- 2022The Surprising Computational Power of Nondeterministic Stack RNNscited by 6
- 2023Beam Tree Recursive Cellscited by 6
- 2023Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalabilitycited by 5
- 2023Efficient Beam Tree Recursioncited by 4
- 2024A Transformer with Stack Attentioncited by 2
- 2025A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networkscited by 2
12 most cited of 15 All 15 (JSON)
- 2025Bearing Syntactic Fruit with Stack-Augmented Neural Networks5 Nov 2025
- 2025A Systematic Study of Compositional Syntactic Transformer Language Models28 Jun 2025
- 2025A Constructive Framework for Nondeterministic Automata via Time-Shared, Depth-Unrolled Feedforward Networks30 May 2025
- 2025Can Language Models Learn Typologically Implausible Languages?17 Feb 2025
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Models24 Jul 2024
- 2024A Transformer with Stack Attention7 May 2024
- 2023Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalability8 Nov 2023
- 2023Pushdown Layers: Encoding Recursive Structure in Transformer Language Models29 Oct 2023
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns3 Oct 2023
- 2023Efficient Beam Tree Recursion20 Jul 2023
- 2023Beam Tree Recursive Cells31 May 2023
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structures23 May 2023
12 newest of 15 All 15 (JSON)