Recurrent Neural Language Models as Probabilistic Finite-state Automata
Anej Svete, Ryan Cotterell
Abstract
Studying language models (LMs) in terms of well-understood formalisms allows us to precisely characterize their abilities and limitations. Previous work has investigated the representational capacity of recurrent neural network (RNN) LMs in terms of their capacity to recognize unweighted formal languages. However, LMs do not describe unweighted formal languages-rather, they define probability distributions over strings. In this work, we study what classes of such probability distributions RNN LMs can represent, which allows us to make more direct statements about their capabilities. We show that simple RNNs are equivalent to a subclass of probabilistic finitestate automata, and can thus model a strict subset of probability distributions expressible by finite-state models. Furthermore, we study the space complexity of representing finite-state LMs with RNNs. We show that, to represent an arbitrary deterministic finite-state LM with N states over an alphabet Σ, an RNN requires Ω pN |Σ|q neurons. These results present a first step towards characterizing the classes of distributions RNN LMs can represent and thus help us understand their capabilities and limitations. https://github.com/rycolab/ weighted-minsky
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 263b868a-e711-4319-ac76-313e7a2662d4Cited by top-tier papers7
- Latent Thinking Optimization: Your Latent Reasoning Language Model Secretly Encodes Reward Signals in Its Latent ThoughtsHanwen Du, Yuxin Dong, Xia NingICLR 2026 · 20 citations
- Transformers are Inherently SuccinctPascal Bergsträßer, Ryan Cotterell, Anthony W. LinICLR 2026 · 5 citations
- Codified Finite-state Machines for Role-playingLetian Peng, Yupeng Hou, Kun Zhou, Jingbo ShangICLR 2026 · 1 citation
- On the Representational Capacity of Recurrent Neural Language ModelsFranz Nowak, Anej Svete, Li Du, Ryan CotterellEMNLP 2023
- On the Representational Capacity of Neural Language Models with Chain-of-Thought ReasoningFranz Nowak, Anej Svete, Alexandra Butoi, Ryan CotterellACL 2024
Builds on8
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- Language Models can Solve Computer TasksGeunwoo Kim, Pierre Baldi, Stephen McAleerNeurIPS 2023 · 539 citations
- Neural Networks and the Chomsky HierarchyGrégoire Delétang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein et al.ICLR 2023 · 45 citations
- A Measure-Theoretic Characterization of Tight Language ModelsLi Du, Lucas Torroba Hennigen, Tiago Pimentel, Clara Meister et al.ACL 2023 · 8 citations
Related papers
- What Languages are Easy to Language-Model? A Perspective from Learning Probabilistic Regular LanguagesNadav Borenstein, Anej Svete, Robin Chan, Josef Valvoda et al.ACL 2024
- A Formal Hierarchy of RNN ArchitecturesWilliam Merrill, Gail Weiss, Yoav Goldberg, Roy Schwartz et al.ACL 2020 · 6 citations
- An Algebraic View of the Expressivity of Recurrent Language ModelsFranz Nowak, Ryan Cotterell, Reda BoumasmoudICML 2026 · 1 citation
- Decision-Guided Weighted Automata Extraction from Recurrent Neural NetworksXiyue Zhang, Xiaoning Du, Xiaofei Xie, Lei Ma et al.AAAI 2021 · 25 citations
- Learning Useful Representations of Recurrent Neural Network Weight MatricesVincent Herrmann, Francesco Faccio, Jürgen SchmidhuberICML 2024 · 12 citations
