mlsanityData to 7 Oct 2026

LSTM Networks Can Perform Dynamic Counting

arXiv 1906.03648 ↗First posted 9 Jun 2019cs.CL cs.FL cs.LGcited by 45

Not on the map. Why?

Abstract (arXiv)

In this paper, we systematically assess the ability of standard recurrent networks to perform dynamic counting and to encode hierarchical representations. All the neural models in our experiments are designed to be small-sized networks both to prevent them from memorizing the training sets and to visualize and interpret their behaviour at test time. Our results demonstrate that the Long Short-Term Memory (LSTM) networks can learn to recognize the well-balanced parenthesis language (Dyck-1) and the shuffles of multiple Dyck-1 languages, each defined over different parenthesis-pairs, by emulating simple real-time k-counter machines. To the best of our knowledge, this work is the first study to introduce the shuffle languages to analyze the computational power of neural networks. We also show that a single-layer LSTM with only one hidden unit is practically sufficient for recognizing the Dyck-1 language. However, none of our recurrent networks was able to yield a good performance on the Dyck-2 language learning task, which requires a model to have a stack-like mechanism for recognition.

Key facts. Cited by 45 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Jun 2019.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 7; 2022: 7; 2023: 9; 2024: 9; 2025: 7; 2026: 6.

45 papers.

Sort:

By area:

  1. 2022Neural Networks and the Chomsky Hierarchycited by 214
  2. 2022Exploring Length Generalization in Large Language Modelscited by 204
  3. 2023What Formal Languages Can Transformers Express? A Surveycited by 120
  4. 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
  5. 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
  6. 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 68
  7. 2026When Models Manipulate Manifolds: The Geometry of a Counting Taskcited by 43
  8. 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 36
  9. 2023Foundation Metrics for Evaluating Effectiveness of Healthcare Conversations Powered by Generative AIcited by 32
  10. 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
  11. 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
  12. 2024Counting Ability of Large Language Models and Impact of Tokenizationcited by 29
33 more
  1. 2024Language Models Need Inductive Biases to Count Inductivelycited by 25
  2. 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
  3. 2023Practical Computational Power of Linear Transformers and Their Recurrent and Self-Referential Extensionscited by 20
  4. 2024What Languages are Easy to Language-Model? A Perspective from Learning Probabilistic Regular Languagescited by 20
  5. 2024Bridging the Empirical-Theoretical Gap in Neural Network Formal Language Learning Using Minimum Description Lengthcited by 14
  6. 2022Benchmarking Compositionality with Formal Languagescited by 12
  7. 2023Counting and Algorithmic Generalization with Transformerscited by 11
  8. 2021Can RNNs learn Recursive Nested Subject-Verb Agreements?cited by 9
  9. 2021Formal Language Theory Meets Modern NLPcited by 9
  10. 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limitscited by 9
  11. 2021Recognizing and Verifying Mathematical Equations using Multiplicative Differential Neural Unitscited by 8
  12. 2021As Easy as 1, 2, 3: Behavioural Testing of NMT Systems for Numerical Translationcited by 8
  13. 2025Meta-Learning Neural Mechanisms rather than Bayesian Priorscited by 8
  14. 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
  15. 2022Exploring the Long-Term Generalization of Counting Behavior in RNNscited by 7
  16. 2023Introducing Rhetorical Parallelism Detection: A New Task with Datasets, Metrics, and Baselinescited by 7
  17. 2021The Limitations of Limited Context for Constituency Parsingcited by 5
  18. 2022Implicit N-grams Induced by Recurrencecited by 4
  19. 2025Which Word Orders Facilitate Length Generalization in LMs? An Investigation with GCG-Based Artificial Languagescited by 4
  20. 2022What do Large Language Models Learn beyond Language?cited by 3
  21. 2023Theoretical Conditions and Empirical Failure of Bracket Counting on Long Sequences with Linear Recurrent Networkscited by 3
  22. 2023Benchmarking Neural Network Generalization for Grammar Inductioncited by 3
  23. 2024Stability Analysis of Various Symbolic Rule Extraction Methods from Recurrent Neural Networkcited by 3
  24. 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
  25. 2025Three tiers of computation in transformers and in brain architecturescited by 1
  26. 2025Searching for the Most Human-like Emergent Languagecited by 1
  27. 2024NUMCoT: Numerals and Units of Measurement in Chain-of-Thought Reasoning using Large Language Modelscited by 0
  28. 2024Precision, Stability, and Generalization: A Comprehensive Assessment of RNNs learnability capability for Classifying Counter and Dyck Languagescited by 0
  29. 2025Hardness of Learning Regular Languages in the Next Symbol Prediction Settingcited by 0
  30. 2026What Kind of Language is Easy to Language-Model Under Curriculum Learning?cited by 0
  31. 2026Rubato: Transcribing Piano Music with Timestampscited by 0
  32. 2026Refit the Probe: Single-Direction Ablation Is Not a Necessity Testcited by 0
  33. 2026Causally Evaluating the Learnability of Formal Language Taskscited by 0