Recent work describes what transformers can and cannot compute through connections to boolean circuits, but existing results lack exact characterizations and are sensitive to modeling choices. Padded transformers -- to whose input filler symbols such as ``...'' are appended -- emerge as a useful gadget for establishing equivalences to circuit classes by providing polynomial space for adaptive parallel computation. However, only a limited set of padded transformer idealizations has been studied, leaving open how robustly these equivalences hold under changes to attention type, model width, and uniformity. We find that, under practical assumptions, padded transformers are surprisingly robust to all of these, and identify numeric precision and model depth as the main factors affecting expressivity. Concretely, we prove that polynomially padded $\text{L-uniform}$ constant-precision transformers are equivalent to $\text{L-uniform AC}^0$, while growing-precision ones achieve $\text{L-uniform TC}^0$ regardless of width. Furthermore, looping enables sequential processing analogous to circuits: $\log^d N$-looped constant-precision transformers reach $\text{FO-uniform AC}^d$, and growing-precision ones reach $\text{FO-uniform TC}^d$. Interestingly, growing width or precision beyond logarithmic does not increase expressivity, and all our results hold for both softmax and average hard attention transformers.


翻译:近期研究通过将Transformer与布尔电路关联描述了其能计算和不能计算的内容,但现有结果缺乏精确刻画且对建模选择敏感。填充型Transformer——在其输入中附加如“...”等填充符号——通过为自适应并行计算提供多项式空间,成为建立与电路类等价关系的有用工具。然而,目前仅研究了有限几种填充型Transformer的理想化模型,尚不清楚这些等价关系在注意力类型、模型宽度和均匀性变化下的鲁棒性。我们发现,在实际假设下,填充型Transformer对所有这些变化表现出令人惊讶的鲁棒性,并确定了数值精度和模型深度是影响表达能力的主要因素。具体而言,我们证明多项式填充的$\text{L-uniform}$常数精度Transformer等价于$\text{L-uniform AC}^0$,而增长精度Transformer无论宽度如何都能达到$\text{L-uniform TC}^0$。此外,循环机制实现了类似于电路的顺序处理:$\log^d N$次循环的常数精度Transformer达到$\text{FO-uniform AC}^d$,增长精度Transformer达到$\text{FO-uniform TC}^d$。有趣的是,宽度或精度增长超过对数并不会提升表达能力,且我们所有结果对softmax和平均硬注意力Transformer均成立。

0
下载
关闭预览

相关内容

非Transformer不可?最新《状态空间模型(SSM)》综述
专知会员服务
75+阅读 · 2024年4月16日
结构保持图transformer综述
专知会员服务
42+阅读 · 2024年2月19日
【ICML2023】Transformer编码器表达能力的更严格界限
专知会员服务
31+阅读 · 2023年4月27日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
从头开始了解Transformer
AI科技评论
25+阅读 · 2019年8月28日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员