mlsanityData to 7 Oct 2026

On the Practical Ability of Recurrent Neural Networks to Recognize Hierarchical Languages

arXiv 2011.03965 ↗First posted 8 Nov 2020cs.CL cs.LGcited by 22

Not on the map. Why?

Abstract (arXiv)

While recurrent models have been effective in NLP tasks, their performance on context-free languages (CFLs) has been found to be quite weak. Given that CFLs are believed to capture important phenomena such as hierarchical structure in natural languages, this discrepancy in performance calls for an explanation. We study the performance of recurrent models on Dyck-n languages, a particularly important and well-studied class of CFLs. We find that while recurrent models generalize nearly perfectly if the lengths of the training and test strings are from the same range, they perform poorly if the test strings are longer. At the same time, we observe that recurrent models are expressive enough to recognize Dyck words of arbitrary lengths in finite precision if their depths are bounded. Hence, we evaluate our models on samples generated from Dyck languages with bounded depth and find that they are indeed able to generalize to much higher lengths. Since natural language datasets have nested dependencies of bounded depth, this may help explain why they perform well in modeling hierarchical dependencies in natural language data despite prior works indicating poor generalization performance on Dyck languages. We perform probing studies to support our results and provide comparisons with Transformers.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Nov 2020.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 1; 2022: 3; 2023: 3; 2024: 2; 2025: 7; 2026: 6.

22 papers.

Sort:

By area:

  1. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  2. 2022A Review on Language Models as Knowledge Basescited by 156
  3. 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
  4. 2023Understanding In-Context Learning in Transformers and LLMs by Learning to Learn Discrete Functionscited by 62
  5. 2025How Linguistics Learned to Stop Worrying and Love the Language Modelscited by 50
  6. 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
  7. 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
  8. 2022Benchmarking Compositionality with Formal Languagescited by 12
  9. 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
  10. 2023Recurrent Neural Language Models as Probabilistic Finite-state Automatacited by 6
  11. 2026A Provable Expressiveness Hierarchy in Hybrid Linear-Full Attentioncited by 1
  12. 2025Learning Model Successorscited by 0
10 more
  1. 2025MapFormer: Self-Supervised Learning of Cognitive Maps with Input-Dependent Positional Embeddingscited by 0
  2. 2025Language models as tools for investigating the distinction between possible and impossible natural languagescited by 0
  3. 2025Large language models have learned to use languagecited by 0
  4. 2025Large language models are not about natural languagecited by 0
  5. 2025Linguists should learn to love speech-based deep learning modelscited by 0
  6. 2026Are Language Models Models?cited by 0
  7. 2026Across the Levels of Analysis: Explaining Predictive Processing in Humans Requires More Than Machine-Estimated Probabilitiescited by 0
  8. 2026You Can't Fight in Here! This is BBS!cited by 0
  9. 2026Not-So-Strange Love: Language Models and Generative Linguistic Theories are More Compatible than They Appearcited by 0
  10. 2026Causally Evaluating the Learnability of Formal Language Taskscited by 0