{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,30]],"date-time":"2026-10-30T02:31:57Z","timestamp":1793327517067,"version":"4.5.0"},"reference-count":10,"publisher":"MIT Press","license":[{"start":{"date-parts":[[2022,8,1]],"date-time":"2022-08-01T00:00:00Z","timestamp":1659312000000},"content-version":"vor","delay-in-days":212,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["direct.mit.edu"],"crossmark-restriction":true},"short-container-title":[],"published-print":{"date-parts":[[2022,7,27]]},"abstract":"<jats:title>Abstract<\/jats:title>\n               <jats:p>This paper analyzes three formal models of Transformer encoders that differ in the form of their self-attention mechanism: unique hard attention (UHAT); generalized unique hard attention (GUHAT), which generalizes UHAT; and averaging hard attention (AHAT). We show that UHAT and GUHAT Transformers, viewed as string acceptors, can only recognize formal languages in the complexity class AC0, the class of languages recognizable by families of Boolean circuits of constant depth and polynomial size. This upper bound subsumes Hahn\u2019s (2020) results that GUHAT cannot recognize the DYCK languages or the PARITY language, since those languages are outside AC0 (Furst et al., 1984). In contrast, the non-AC0 languages MAJORITY and DYCK-1 are recognizable by AHAT networks, implying that AHAT can recognize languages that UHAT and GUHAT cannot.<\/jats:p>","DOI":"10.1162\/tacl_a_00490","type":"journal-article","created":{"date-parts":[[2022,8,1]],"date-time":"2022-08-01T13:45:03Z","timestamp":1659361503000},"page":"800-810","update-policy":"https:\/\/doi.org\/10.1162\/mitpressjournals.corrections.policy","source":"Crossref","is-referenced-by-count":22,"title":["Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexity"],"prefix":"10.1162","volume":"10","author":[{"given":"Yiding","family":"Hao","sequence":"first","affiliation":[{"name":"Yale University, New Haven, CT, USA. yiding.hao@yale.edu"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Dana","family":"Angluin","sequence":"additional","affiliation":[{"name":"Yale University, New Haven, CT, USA. dana.angluin@yale.edu"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Robert","family":"Frank","sequence":"additional","affiliation":[{"name":"Yale University, New Haven, CT, USA. robert.frank@yale.edu"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"281","published-online":{"date-parts":[[2022,7,27]]},"reference":[{"key":"2022080113445100600_bib1","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511804090","volume-title":"Computational Complexity: A Modern Approach","author":"Arora","year":"2009"},{"key":"2022080113445100600_bib2","doi-asserted-by":"publisher","first-page":"7096","DOI":"10.18653\/v1\/2020.emnlp-main.576","article-title":"On the ability and limitations of transformers to recognize formal languages","volume-title":"Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)","author":"Bhattamishra","year":"2020"},{"issue":"1","key":"2022080113445100600_bib3","doi-asserted-by":"publisher","first-page":"13","DOI":"10.1007\/BF01744431","article-title":"Parity, circuits, and the polynomial- time hierarchy","volume":"17","author":"Furst","year":"1984","journal-title":"Mathematical Systems Theory"},{"key":"2022080113445100600_bib4","doi-asserted-by":"publisher","first-page":"156","DOI":"10.1162\/tacl_a_00306","article-title":"Theoretical limitations of self-attention in neural sequence models","volume":"8","author":"Hahn","year":"2020","journal-title":"Transactions of the Association for Computational Linguistics"},{"key":"2022080113445100600_bib5","doi-asserted-by":"publisher","first-page":"1412","DOI":"10.18653\/v1\/D15-1166","article-title":"Effective approaches to attention-based neural machine translation","volume-title":"Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing","author":"Luong","year":"2015"},{"key":"2022080113445100600_bib6","article-title":"Saturated transformers are constant-depth threshold circuits","author":"Merrill","year":"2022","journal-title":"Computing Research Repository"},{"key":"2022080113445100600_bib7","article-title":"On the Turing completeness of modern neural network architectures","volume-title":"ICLR 2019 Conference Track","author":"P\u00e9rez","year":"2019"},{"key":"2022080113445100600_bib8","first-page":"5998","article-title":"Attention is all you need","volume-title":"Advances in Neural Information Processing Systems 30","author":"Vaswani","year":"2017"},{"key":"2022080113445100600_bib9","doi-asserted-by":"publisher","first-page":"3770","DOI":"10.18653\/v1\/2021.acl-long.292","article-title":"Self-attention networks can process bounded hierarchical languages","volume-title":"Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing","author":"Yao","year":"2021"},{"key":"2022080113445100600_bib10","article-title":"Are Transformers universal approximators of sequence-to-sequence functions?","volume-title":"ICLR 2020 Conference Track","author":"Yun","year":"2020"}],"container-title":["Transactions of the Association for Computational Linguistics"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/direct.mit.edu\/tacl\/article-pdf\/doi\/10.1162\/tacl_a_00490\/2037124\/tacl_a_00490.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/direct.mit.edu\/tacl\/article-pdf\/doi\/10.1162\/tacl_a_00490\/2037124\/tacl_a_00490.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,8,1]],"date-time":"2022-08-01T13:45:09Z","timestamp":1659361509000},"score":1,"resource":{"primary":{"URL":"https:\/\/direct.mit.edu\/tacl\/article\/doi\/10.1162\/tacl_a_00490\/112496\/Formal-Language-Recognition-by-Hard-Attention"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022]]},"references-count":10,"URL":"https:\/\/doi.org\/10.1162\/tacl_a_00490","relation":{},"ISSN":["2307-387X"],"issn-type":[{"value":"2307-387X","type":"electronic"}],"subject":[],"published-other":{"date-parts":[[2022]]},"published":{"date-parts":[[2022]]}}}