TL;DR
This paper bridges the gap between classical computation theory and modern probabilistic language modeling. The authors prove that Recurrent Neural Language Models (RLMs) with rational weights are equivalent to Probabilistic Turing Machines when allowed extra computation time, and they establish a lower bound for the more realistic "real-time" setting where models process one symbol per step.
What Problem Does This Paper Address?
For decades, we’ve known that Recurrent Neural Networks (RNNs) are "Turing complete"—meaning they can, in theory, compute anything a standard computer can. However, this classic result from Siegelmann and Sontag (1992) only applies to RNNs as language recognizers (deciding if a string is "in" or "out" of a set).
Modern AI uses RNNs as Language Models (LMs), which don't just recognize strings; they assign probabilities to them. The authors argue that treating LMs as simple recognizers is a "category error." We need to understand their expressivity in terms of the probability distributions (specifically, semimeasures) they can represent. This paper seeks to map out where different flavors of RNN-based LMs sit on the hierarchy of probabilistic computational models.
Methods
The authors use formal proofs to link RLMs to well-understood models of computation. Their roadmap (illustrated in Figure 1) involves several key steps:
- Formalizing the Models: They define Rational-valued Probabilistic Turing Machines (QPTMs) and Probabilistic Two-Stack Pushdown Automata (2PDA). A 2PDA is essentially a machine that uses two stacks to simulate the infinite tape of a Turing machine (see Figure 2).
- Extending Classical Constructions: They adapt the Siegelmann and Sontag construction to the probabilistic case. This involves showing how an RNN's hidden state can encode the contents of two stacks using rational numbers and how the RNN's transition function can simulate the 2PDA's logic.
- Handling Computation Time: They distinguish between two settings:
- Unbounded Time ($\epsilon$RLM): The model can output "empty" symbols ($\epsilon$), effectively taking extra internal computation steps before producing the next word.
- Real-Time (RLM): The model must produce exactly one symbol (or the end-of-string token) at every time step, which is how they are typically used in practice.
Datasets
Not discussed in the paper. This work is entirely theoretical and does not involve empirical training or evaluation on specific datasets.
Key Insights and Ideas
- The Power of $\epsilon$: The ability to perform "hidden" computation steps is what grants RLMs full Turing power in the probabilistic domain. Without these $\epsilon$-transitions, the model's expressivity is strictly limited.
- Rational Weights as a Proxy: While real-world computers use finite-precision floats, the authors use rational-valued weights. This is a standard theoretical idealization that allows for infinite precision while remaining "computable."
- Hidden State as Memory: The paper provides a detailed schematic (Figure 3) of how an RNN hidden state vector $h$ can be partitioned to store stack contents, the current state of the automaton, and the readout mechanisms needed to calculate the next symbol's probability.
Key Results
- Upper Bound: The authors prove that for every $\Sigma$-deterministic probabilistic 2PDA, there is a strongly equivalent $\epsilon$RLM. This means that with unbounded time, these models can represent any enumerable semimeasure.
- Lower Bound: In the real-time setting, they show that RLMs can simulate Real-time Deterministic QPTMs (RD-QPTMs).
- Equivalence: They establish that QPTMs and 2PDAs are strongly equivalent, providing a solid theoretical foundation for comparing neural models to classical automata.
Limitations and Future Work
- Precision: The results rely on rational weights and states. In practice, RNNs use 16-bit or 32-bit floats. It remains an open question how much this limited precision restricts the models from learning complex algorithmic tasks.
- Training vs. Capability: The paper shows what RNNs are capable of representing, not what they actually learn via gradient descent. A model might be theoretically Turing complete but practically impossible to train to perform long-chain reasoning.
- Tightness of the Lower Bound: The authors acknowledge that their real-time lower bound might not be "tight"—there may be even more expressive models that real-time RLMs can simulate.
- Beyond RNNs: A natural next step is applying this rigorous framework to Transformers, which have largely replaced RNNs in state-of-the-art systems.
Summary updated