---
title: "On the Practical Computational Power of Finite — Weiss 2018"
description: "Classic proofs that RNNs are Turing complete depend on unlimited state precision and unbounded computation time, which do not match how RNNs are used in…"
authors: ["Gail Weiss", "Yoav Goldberg", "Eran Yahav"]
year: 2018
venue: "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)"
source: "https://aclanthology.org/P18-2117/"
doi: "10.18653/v1/p18-2117"
arxiv: "1805.04908"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/weiss-2018-practical-computational-power-finite-precision/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/weiss-2018-practical-computational-power-finite-precision/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2018](https://md.research.elamur.ai/free/en/papers/2018/page/2/) / On the Practical Computational Power of Finite Precision RNNs for Language Recognition

# On the Practical Computational Power of Finite Precision RNNs for Language Recognition

**Authors:** Gail Weiss, [Yoav Goldberg](https://md.research.elamur.ai/free/en/authors/yoav-goldberg/), Eran Yahav · **Institutions:** [Bar-Ilan University](https://md.research.elamur.ai/free/en/universities/bar-ilan-university/) · [Technion – Israel Institute of Technology](https://md.research.elamur.ai/free/en/universities/technion-israel-institute-of-technology/) · **Year:** 2018 · **Venue:** Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/P18-2117/) · [PDF](https://aclanthology.org/P18-2117.pdf) · [DOI 10.18653/v1/p18-2117](https://doi.org/10.18653/v1/p18-2117) · [arXiv 1805.04908](https://arxiv.org/abs/1805.04908) · [OpenAlex](https://openalex.org/W2798579706)

**Citations:** 217 citations (OpenAlex, 2026-10-14) · [93](https://md.research.elamur.ai/free/en/papers/weiss-2018-practical-computational-power-finite-precision/cited-by/) in our library, of the 140884 papers whose bibliographies we read

## Summary
Classic proofs that RNNs are Turing complete depend on unlimited state precision and unbounded computation time, which do not match how RNNs are used in NLP. This paper asks what different recurrent architectures can compute when states have finite precision and the network performs one update per input symbol (input-bound, finite-precision RNNs, or IBFP-RNNs). The authors compare four architectures: the Elman SRNN with squashing activation, the ReLU-based IRNN, the GRU and the LSTM. They relate each to a simplified k-counter machine (SKCM).

Their analysis finds that the LSTM and IRNN can maintain unbounded counters in dedicated dimensions. The SRNN and GRU cannot, because their state values are confined to a bounded range, so they recognize only regular languages. Experiments on aⁿbⁿ and aⁿbⁿcⁿ support this. Trained LSTMs develop interpretable counting dimensions and generalize well past the training lengths, while GRUs do neither.

The work shows that the LSTM and GRU, often treated as interchangeable, differ in practical expressive power. This may explain why LSTMs are preferred for tasks requiring bracket counting, such as processing linearized parse trees.

## Key points
- **Theoretical claim:** under finite precision and real-time computation, the LSTM and IRNN can do everything SKCMs can, and their expressive power strictly exceeds that of both the SRNN and the GRU. The GRU's interpolation between the previous state and a tanh-bounded proposal prevents unbounded counting.
- **Setup:** 10-dimensional, single-layer LSTM and GRU networks were implemented in DyNet and trained with SGD. Training lengths went up to n = 100 for aⁿbⁿ and n = 50 for aⁿbⁿcⁿ.
- **Generalization:** the LSTM handled aⁿbⁿ correctly up to n = 256 and aⁿbⁿcⁿ up to n = 100. The GRU erred even inside its training range, for example by accepting aⁿbⁿ⁺¹ for n > 38.
- **Test accuracy (1000-sample random test sets):** the LSTM scored 100% on aⁿbⁿ and 98.6% on aⁿbⁿcⁿ, against 87.0% and 86.9% for the GRU.
- **Counter imprecision:** the LSTM's counters were slightly inexact, for instance stepping up by about 0.99 but down by about 0.98, because its gates did not fully saturate. This drift explains its eventual failures at very large n.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

Fields: [Natural language processing](https://md.research.elamur.ai/free/en/shelves/nlp/)

## Cite

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{weiss2018practical,
  title = {{On the Practical Computational Power of Finite Precision RNNs for Language Recognition}},
  author = {Weiss, Gail and Goldberg, Yoav and Yahav, Eran},
  booktitle = {Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)},
  year = {2018},
  doi = {10.18653/v1/p18-2117},
  eprint = {1805.04908},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/p18-2117}
}
```

- [← previous Measuring the Evolution of a Scientific Field through Citation Frames](https://md.research.elamur.ai/free/en/papers/jurgens-2018-measuring-evolution-scientific-field-through/)
- [next → Generating Wikipedia by Summarizing Long Sequences](https://md.research.elamur.ai/free/en/papers/liu-2018-generating-wikipedia-summarizing-long-sequences/)
- [↑ back to papers of 2018](https://md.research.elamur.ai/free/en/papers/2018/page/2/)

## References

19 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. 2016. Binarized neural networks. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 4107–4115. Curran Associates, Inc. [find](https://scholar.google.com/scholar?q=Itay+Hubara%2C+Matthieu+Courbariaux%2C+Daniel+Soudry%2C+Ran+El%2DYaniv%2C+and+Yoshua+Bengio%2E+2016%2E+Binarized+neural+networks%2E+In+D%2E+D%2E+Lee%2C+M%2E+Sugiyama%2C+U%2E+V%2E+Luxburg%2C+I%2E+Guyon%2C+and+R%2E+Garnett%2C+editors%2C+Advance)
2. Roee Aharoni and Yoav Goldberg. 2017. Towards string-to-tree neural machine translation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 132–140, Vancouver, Canada. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Roee+Aharoni+and+Yoav+Goldberg%2E+2017%2E+Towards+string%2Dto%2Dtree+neural+machine+translation%2E+In+Proceedings+of+the+55th+Annual+Meeting+of+the+Association+for+Computational+Linguistics+%28Volume+2%3A+Short+Pap) [our card](https://md.research.elamur.ai/free/en/papers/aharoni-2017-string-tree-neural-machine-translation/)
3. Quoc V. Le, Navdeep Jaitly, and Geoffrey E. Hinton. 2015. A Simple Way to Initialize Recurrent Networks of Rectified Linear Units. arXiv:1504.00941 [cs]. — [arXiv:1504.00941](https://arxiv.org/abs/1504.00941) [find](https://scholar.google.com/scholar?q=Quoc+V%2E+Le%2C+Navdeep+Jaitly%2C+and+Geoffrey+E%2E+Hinton%2E+2015%2E+A+Simple+Way+to+Initialize+Recurrent+Networks+of+Rectified+Linear+Units%2E+arXiv%3A1504%2E00941+%5Bcs%5D%2E+%E2%80%94+%5BarXiv%3A1504%2E00941%5D%28https%3A%2F%2Farxiv%2Eorg%2Fabs%2F150)
4. Yining Chen, Sorcha Gilroy, Kevin Knight, and Jonathan May. 2017. Recurrent neural networks as weighted language recognizers. CoRR, abs/1711.05408. [find](https://scholar.google.com/scholar?q=Yining+Chen%2C+Sorcha+Gilroy%2C+Kevin+Knight%2C+and+Jonathan+May%2E+2017%2E+Recurrent+neural+networks+as+weighted+language+recognizers%2E+CoRR%2C+abs%2F1711%2E05408%2E)
5. Hava Siegelmann. 1999. Neural Networks and Analog Computation: Beyond the Turing Limit, 1 edition. Birkhäuser Basel. [find](https://scholar.google.com/scholar?q=Hava+Siegelmann%2E+1999%2E+Neural+Networks+and+Analog+Computation%3A+Beyond+the+Turing+Limit%2C+1+edition%2E+Birkha%CC%88user+Basel%2E)
6. Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Langua… [find](https://scholar.google.com/scholar?q=Kyunghyun+Cho%2C+Bart+van+Merrienboer%2C+Caglar+Gulcehre%2C+Dzmitry+Bahdanau%2C+Fethi+Bougares%2C+Holger+Schwenk%2C+and+Yoshua+Bengio%2E+2014%2E+Learning+Phrase+Representations+using+RNN+Encoder%E2%80%93Decoder+for+Statistic)
7. Hava T. Siegelmann. 1996. Recurrent neural networks and finite automata. Computational Intelligence, 12:567–574. [find](https://scholar.google.com/scholar?q=Hava+T%2E+Siegelmann%2E+1996%2E+Recurrent+neural+networks+and+finite+automata%2E+Computational+Intelligence%2C+12%3A567%E2%80%93574%2E)
8. Hava T. Siegelmann and Eduardo D. Sontag. 1992. On the computational power of neural nets. In Proceedings of the Fifth Annual ACM Conference on Computational Learning Theory, COLT 1992, Pittsburgh, PA, USA, July 27-29, 1992., pages 440–449. [find](https://scholar.google.com/scholar?q=Hava+T%2E+Siegelmann+and+Eduardo+D%2E+Sontag%2E+1992%2E+On+the+computational+power+of+neural+nets%2E+In+Proceedings+of+the+Fifth+Annual+ACM+Conference+on+Computational+Learning+Theory%2C+COLT+1992%2C+Pittsburgh%2C+PA)
9. Do Kook Choe and Eugene Charniak. 2016. Parsing as language modeling. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2331–2336, Austin, Texas. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Do+Kook+Choe+and+Eugene+Charniak%2E+2016%2E+Parsing+as+language+modeling%2E+In+Proceedings+of+the+2016+Conference+on+Empirical+Methods+in+Natural+Language+Processing%2C+pages+2331%E2%80%932336%2C+Austin%2C+Texas%2E+Associa)
10. Hava T. Siegelmann and Eduardo D. Sontag. 1994. Analog computation via neural networks. Theor. Comput. Sci., 131(2):331–360. [find](https://scholar.google.com/scholar?q=Hava+T%2E+Siegelmann+and+Eduardo+D%2E+Sontag%2E+1994%2E+Analog+computation+via+neural+networks%2E+Theor%2E+Comput%2E+Sci%2E%2C+131%282%29%3A331%E2%80%93360%2E)
11. Oriol Vinyals, Lukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. 2015. Grammar as a foreign language. In Proceedings of the 28th International Conference on Neural Information Processing Systems - Volume 2, NIPS’15, pages 2773–2781, Cambridge, MA, USA. MIT Press. [find](https://scholar.google.com/scholar?q=Oriol+Vinyals%2C+Lukasz+Kaiser%2C+Terry+Koo%2C+Slav+Petrov%2C+Ilya+Sutskever%2C+and+Geoffrey+Hinton%2E+2015%2E+Grammar+as+a+foreign+language%2E+In+Proceedings+of+the+28th+International+Conference+on+Neural+Informatio)
12. Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv:1412.3555 [cs]. [find](https://scholar.google.com/scholar?q=Junyoung+Chung%2C+Caglar+Gulcehre%2C+KyungHyun+Cho%2C+and+Yoshua+Bengio%2E+2014%2E+Empirical+Evaluation+of+Gated+Recurrent+Neural+Networks+on+Sequence+Modeling%2E+arXiv%3A1412%2E3555+%5Bcs%5D%2E)
13. Jeffrey L. Elman. 1990. Finding Structure in Time. Cognitive Science, 14(2):179–211. [find](https://scholar.google.com/scholar?q=Jeffrey+L%2E+Elman%2E+1990%2E+Finding+Structure+in+Time%2E+Cognitive+Science%2C+14%282%29%3A179%E2%80%93211%2E)
14. Patrick C. Fischer, Albert R. Meyer, and Arnold L. Rosenberg. 1968. Counter machines and counter languages. Mathematical systems theory, 2(3):265– 283. [find](https://scholar.google.com/scholar?q=Patrick+C%2E+Fischer%2C+Albert+R%2E+Meyer%2C+and+Arnold+L%2E+Rosenberg%2E+1968%2E+Counter+machines+and+counter+languages%2E+Mathematical+systems+theory%2C+2%283%29%3A265%E2%80%93+283%2E)
15. F. A. Gers and E. Schmidhuber. 2001. Lstm recurrent networks learn simple context-free and context-sensitive languages. Transactions on Neural Networks, 12(6):1333–1340. [find](https://scholar.google.com/scholar?q=F%2E+A%2E+Gers+and+E%2E+Schmidhuber%2E+2001%2E+Lstm+recurrent+networks+learn+simple+context%2Dfree+and+context%2Dsensitive+languages%2E+Transactions+on+Neural+Networks%2C+12%286%29%3A1333%E2%80%931340%2E)
16. F. A. Gers and J. Schmidhuber. 2000. Recurrent nets that time and count. In Proceedings of the IEEE-INNS-ENNS International Joint Conference on Neural Networks. [find](https://scholar.google.com/scholar?q=F%2E+A%2E+Gers+and+J%2E+Schmidhuber%2E+2000%2E+Recurrent+nets+that+time+and+count%2E+In+Proceedings+of+the+IEEE%2DINNS%2DENNS+International+Joint+Conference+on+Neural+Networks%2E)
17. IJCNN 2000. Neural Computing: New Challenges and Perspectives for the New Millennium, volume 3, pages 189–194 vol.3. [find](https://scholar.google.com/scholar?q=IJCNN+2000%2E+Neural+Computing%3A+New+Challenges+and+Perspectives+for+the+New+Millennium%2C+volume+3%2C+pages+189%E2%80%93194+vol%2E3%2E)
18. K. Greff, R. K. Srivastava, J. Koutnk, B. R. Steunebrink, and J. Schmidhuber. 2017. Lstm: A search space odyssey. IEEE Transactions on Neural Networks and Learning Systems, 28(10):2222–2232. [find](https://scholar.google.com/scholar?q=K%2E+Greff%2C+R%2E+K%2E+Srivastava%2C+J%2E+Koutnk%2C+B%2E+R%2E+Steunebrink%2C+and+J%2E+Schmidhuber%2E+2017%2E+Lstm%3A+A+search+space+odyssey%2E+IEEE+Transactions+on+Neural+Networks+and+Learning+Systems%2C+28%2810%29%3A2222%E2%80%932232%2E)
19. Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. [find](https://scholar.google.com/scholar?q=Sepp+Hochreiter+and+Ju%CC%88rgen+Schmidhuber%2E+1997%2E+Long+short%2Dterm+memory%2E+Neural+computation%2C+9%288%29%3A1735%E2%80%931780%2E)
