Representing Formal Languages: A Comparison Between Finite Automata and Recurrent Neural Networks
Not on the map. Why?
Abstract (arXiv)
We investigate the internal representations that a recurrent neural network (RNN) uses while learning to recognize a regular formal language. Specifically, we train a RNN on positive and negative examples from a regular language, and ask if there is a simple decoding function that maps states of this RNN to states of the minimal deterministic finite automaton (MDFA) for the language. Our experiments show that such a decoding function indeed exists, and that it maps states of the RNN not to MDFA states, but to states of an em abstraction obtained by clustering small sets of MDFA states into "superstates". A qualitative analysis reveals that the abstraction often has a simple interpretation. Overall, the results suggest a strong structural relationship between internal representations used by RNNs and finite automata, and explain the well-known ability of RNNs to recognize formal grammatical structure.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 27 Feb 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 2; 2023: 3; 2024: 0; 2025: 1; 2026: 1.
9 papers.
- 2023Generative learning for nonlinear dynamicscited by 22
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
- 2022Understanding Robust Generalization in Learning Regular Languagescited by 3
- 2022Can deep neural networks learn process model structure? An assessment framework and analysiscited by 1
- 2023On the Dynamics of Learning Time-Aware Behavior with Recurrent Neural Networkscited by 1
- 2025Symbolic Feedforward Networks for Probabilistic Finite Automata: Exact Simulation and Learnabilitycited by 1
- 2021Integrating Regular Expressions with Neural Networks via DFAcited by 0
- 2023On the Relationship Between RNN Hidden State Vectors and Semantic Ground Truthcited by 0
- 2026When Does Reward Teach State? A Hidden-Automaton Instrument and a Group-Language Warning Signalcited by 0
- 2026When Does Reward Teach State? A Hidden-Automaton Instrument and a Group-Language Warning Signal11 Jul 2026
- 2025Symbolic Feedforward Networks for Probabilistic Finite Automata: Exact Simulation and Learnability12 Sep 2025
- 2023Generative learning for nonlinear dynamics7 Nov 2023
- 2023On the Relationship Between RNN Hidden State Vectors and Semantic Ground Truth29 Jun 2023
- 2023On the Dynamics of Learning Time-Aware Behavior with Recurrent Neural Networks12 Jun 2023
- 2022Can deep neural networks learn process model structure? An assessment framework and analysis24 Feb 2022
- 2022Understanding Robust Generalization in Learning Regular Languages20 Feb 2022
- 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanations16 Dec 2021
- 2021Integrating Regular Expressions with Neural Networks via DFA7 Sep 2021