Evaluating the Ability of LSTMs to Learn Context-Free Grammars
Not on the map. Why?
Abstract (arXiv)
While long short-term memory (LSTM) neural net architectures are designed to capture sequence information, human language is generally composed of hierarchical structures. This raises the question as to whether LSTMs can learn hierarchical structures. We explore this question with a well-formed bracket prediction task using two types of brackets modeled by an LSTM. Demonstrating that such a system is learnable by an LSTM is the first step in demonstrating that the entire class of CFLs is also learnable. We observe that the model requires exponential memory in terms of the number of characters and embedded depth, where a sub-linear memory should suffice. Still, the model does more than memorize the training input. It learns how to distinguish between relevant and irrelevant information. On the other hand, we also observe that the model does not generalize well. We conclude that LSTMs do not learn the relevant underlying context-free rules, suggesting the good overall performance is attained rather by an efficient way of evaluating nuisance variables. LSTMs are a way to quickly reach good results for many natural language tasks, but to understand and generate natural language one has to investigate other concepts that can make more direct use of natural language's structural nature.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Nov 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 6; 2022: 5; 2023: 3; 2024: 2.
16 papers.
Sort:
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2021Thinking Like Transformerscited by 182
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
- 2023Feature Interactions Reveal Linguistic Structure in Language Modelscited by 8
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languagescited by 7
- 2022What do Large Language Models Learn beyond Language?cited by 3
- 2022Can recurrent neural networks learn process model structure?cited by 3
- 2023State space models can express n-gram languagescited by 3
- 2024Stability Analysis of Various Symbolic Rule Extraction Methods from Recurrent Neural Networkcited by 3
- 2021Synthesizing Context-free Grammars from Recurrent Neural Networks (Extended Version)cited by 2
4 more
- 2021Are Transformers a Modern Version of ELIZA? Observations on French Object Verb Agreementcited by 2
- 2022Assessing the Unitary RNN as an End-to-End Compositional Model of Syntaxcited by 2
- 2021Enhancing Reinforcement Learning with discrete interfaces to learn the Dyck Languagecited by 0
- 2024Exploring Learnability in Memory-Augmented Recurrent Neural Networks: Precision, Stability, and Empirical Insightscited by 0
- 2024Exploring Learnability in Memory-Augmented Recurrent Neural Networks: Precision, Stability, and Empirical Insights4 Oct 2024
- 2024Stability Analysis of Various Symbolic Rule Extraction Methods from Recurrent Neural Network4 Feb 2024
- 2023Feature Interactions Reveal Linguistic Structure in Language Models21 Jun 2023
- 2023State space models can express n-gram languages20 Jun 2023
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languages16 Apr 2023
- 2022Can recurrent neural networks learn process model structure?13 Dec 2022
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functions22 Nov 2022
- 2022What do Large Language Models Learn beyond Language?21 Oct 2022
- 2022Assessing the Unitary RNN as an End-to-End Compositional Model of Syntax11 Aug 2022
- 2022Neural Networks and the Chomsky Hierarchy5 Jul 2022
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanations16 Dec 2021
- 2021Enhancing Reinforcement Learning with discrete interfaces to learn the Dyck Language27 Oct 2021
4 more
- 2021Are Transformers a Modern Version of ELIZA? Observations on French Object Verb Agreement21 Sep 2021
- 2021Thinking Like Transformers13 Jun 2021
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languages24 May 2021
- 2021Synthesizing Context-free Grammars from Recurrent Neural Networks (Extended Version)20 Jan 2021
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2021Thinking Like Transformerscited by 182
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
- 2023Feature Interactions Reveal Linguistic Structure in Language Modelscited by 8
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languagescited by 7
- 2022What do Large Language Models Learn beyond Language?cited by 3
- 2022Can recurrent neural networks learn process model structure?cited by 3
- 2023State space models can express n-gram languagescited by 3
- 2024Stability Analysis of Various Symbolic Rule Extraction Methods from Recurrent Neural Networkcited by 3
- 2021Synthesizing Context-free Grammars from Recurrent Neural Networks (Extended Version)cited by 2
12 most cited of 16 All 16 (JSON)
- 2024Exploring Learnability in Memory-Augmented Recurrent Neural Networks: Precision, Stability, and Empirical Insights4 Oct 2024
- 2024Stability Analysis of Various Symbolic Rule Extraction Methods from Recurrent Neural Network4 Feb 2024
- 2023Feature Interactions Reveal Linguistic Structure in Language Models21 Jun 2023
- 2023State space models can express n-gram languages20 Jun 2023
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languages16 Apr 2023
- 2022Can recurrent neural networks learn process model structure?13 Dec 2022
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functions22 Nov 2022
- 2022What do Large Language Models Learn beyond Language?21 Oct 2022
- 2022Assessing the Unitary RNN as an End-to-End Compositional Model of Syntax11 Aug 2022
- 2022Neural Networks and the Chomsky Hierarchy5 Jul 2022
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanations16 Dec 2021
- 2021Enhancing Reinforcement Learning with discrete interfaces to learn the Dyck Language27 Oct 2021
12 newest of 16 All 16 (JSON)