This work investigates the computational expressivity of language models (LMs) based on recurrent neural networks (RNNs). Siegelmann and Sontag (1992) famously showed that RNNs with rational weights and hidden states and unbounded computation time are Turing complete. However, LMs define weightings over strings in addition to just (unweighted) language membership and the analysis of the computational power of RNN LMs (RLMs) should reflect this. We extend the Turing completeness result to the probabilistic case, showing how a rationally weighted RLM with unbounded computation time can simulate any probabilistic Turing machine (PTM). Since, in practice, RLMs work in real-time, processing a symbol at every time step, we treat the above result as an upper bound on the expressivity of RLMs. We also provide a lower bound by showing that under the restriction to real-time computation, such models can simulate deterministic real-time rational PTMs.
翻译:本研究探讨了基于循环神经网络(RNN)的语言模型的计算表达能力。Siegelmann和Sontag(1992)曾著名地证明,具有有理权重、隐藏状态及无界计算时间的RNN具有图灵完备性。然而,语言模型不仅定义(无加权的)语言成员关系,还定义字符串上的加权分布,因此对RNN语言模型计算能力的分析应反映这一特性。我们将图灵完备性结果扩展到概率情形,展示了一个具有有理权重和无界计算时间的RNN语言模型如何模拟任意概率图灵机。由于实践中RNN语言模型以实时方式运行(每个时间步处理一个符号),我们将上述结果视为该模型表达能力的上界。同时,我们通过证明在实时计算约束下此类模型可模拟确定性实时有理概率图灵机,给出了其表达能力的下界。