Saturated Transformers are Constant-Depth Threshold Circuits

Author:

Merrill William12,Sabharwal Ashish3,Smith Noah A.45

Affiliation:

1. Allen Institute for AI, USA. willm@nyu.edu

2. New York University, USA

3. Allen Institute for AI, USA. ashishs@allenai.org

4. Allen Institute for AI, USA. noah@allenai.org

5. University of Washington, USA

Abstract

Abstract Transformers have become a standard neural network architecture for many NLP problems, motivating theoretical analysis of their power in terms of formal languages. Recent work has shown that transformers with hard attention are quite limited in power (Hahn, 2020), as they can be simulated by constant-depth AND/OR circuits (Hao et al., 2022). However, hard attention is a strong assumption, which may complicate the relevance of these results in practice. In this work, we analyze the circuit complexity of transformers with saturated attention: a generalization of hard attention that more closely captures the attention patterns learnable in practical transformers. We first show that saturated transformers transcend the known limitations of hard-attention transformers. We then prove saturated transformers with floating-point values can be simulated by constant-depth threshold circuits, giving the class TC0 as an upper bound on the formal languages they recognize.

Publisher

MIT Press

Subject

Artificial Intelligence,Computer Science Applications,Linguistics and Language,Human-Computer Interaction,Communication

Reference26 articles.

1. Computational Complexity

2. Layer normalization;Ba;ArXiv,2016

3. On the ability and limitations of transformers to recognize formal languages;Bhattamishra,2020

4. Liliana Cojocaru . 2016. Advanced Studies on the Complexity of Formal Languages. Ph.D. thesis, University of Tampere.

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Improved Linear Decomposition of Majority and Threshold Boolean Functions;IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems;2023-11

2. A Pragmatic Approach to Syntax Repair;Companion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity;2023-10-22

3. The Parallelism Tradeoff: Limitations of Log-Precision Transformers;Transactions of the Association for Computational Linguistics;2023

4. Formal Languages and the NLP Black Box;Developments in Language Theory;2023

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3