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 deterministic probabilistic Turing machine (PTM) with rationally weighted transitions. 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)的语言模型(LM)的计算表达能力。Siegelmann与Sontag(1992)曾著名地证明,具有有理权重、隐藏状态以及无限计算时间的RNN具有图灵完备性。然而,语言模型除了定义(不加权的)语言成员关系外,还对字符串赋予权重,因此对RNN语言模型(RLM)计算能力的分析应反映这一点。我们将图灵完备性结果扩展到概率情形,展示了具有有理权重的RLM在无限计算时间下如何模拟任何具有有理权重转移的确定性概率图灵机(PTM)。鉴于实践中RLM以实时方式运行——每个时间步处理一个符号——我们将上述结果视为RLM表达能力的上界。同时,通过展示在实时计算限制下此类模型可模拟确定性实时有理PTM,我们为其提供了下界。