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 expressive power 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 finite-state 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 𝛺\left(N |𝛴|\right) 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.
Anthology ID:
2023.emnlp-main.502
Volume:
Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing
Month:
December
Year:
2023
Address:
Singapore
Editors:
Houda Bouamor, Juan Pino, Kalika Bali
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
8069–8086
Language:
URL:
https://aclanthology.org/2023.emnlp-main.502
DOI:
10.18653/v1/2023.emnlp-main.502
Bibkey:
Cite (ACL):
Anej Svete and Ryan Cotterell. 2023. Recurrent Neural Language Models as Probabilistic Finite-state Automata. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 8069–8086, Singapore. Association for Computational Linguistics.
Cite (Informal):
Recurrent Neural Language Models as Probabilistic Finite-state Automata (Svete & Cotterell, EMNLP 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.emnlp-main.502.pdf
Video:
 https://aclanthology.org/2023.emnlp-main.502.mp4