首次证明多层Transformer的理论极限,揭示深度与宽度的权衡关系。
Theoretical limitations of multi-layer Transformer
- 提出自回归通信模型,刻画解码器型Transformer的计算机制。
- 证明多层Transformer需多项式维度才能完成L步函数复合任务。
- 揭示链式思考的优势,适合研究模型表达能力的学者参考。
Transformer,尤其是仅解码器结构,是现代大语言模型的核心;然而我们对其表达能力的理解仍局限于单层情况。由于分析多层模型的困难,以往工作均依赖未证实的复杂性猜想来推导限制。本文首次给出无条件的下界证明:对任意常数层深L,L层解码器型Transformer需多项式规模模型维度(n^Ω(1))才能实现对长度为n token输入的L步函数序列组合。由此得出三方面结论:(1)首个多层Transformer的深度-宽度权衡,表明L层模型完成任务的难度比L+1层高指数级;(2)无条件分离编码器与解码器,存在解码器难以解决而编码器可更浅更小解决的任务;(3)链式思考具有可证明优势,某类任务在使用链式思考后指数级变易。技术上,我们提出多参与方自回归通信模型以捕捉解码器型Transformer的计算,并引入新证明技巧——迭代构造所有可能输入的不可区分分解,用于该模型的下界证明。我们认为该通信模型与证明方法将有助于进一步理解Transformer的计算能力。
原文摘要 · Abstract (English)
Transformers, especially the decoder-only variants, are the backbone of most modern large language models; yet we do not have much understanding of their expressive power except for the simple $1$-layer case. Due to the difficulty of analyzing multi-layer models, all previous work relies on unproven complexity conjectures to show limitations for multi-layer Transformers. In this work, we prove the first $\textit{unconditional}$ lower bound against multi-layer decoder-only transformers. For any constant $L$, we prove that any $L$-layer decoder-only transformer needs a polynomial model dimension ($n^{Ω(1)}$) to perform sequential composition of $L$ functions over an input of $n$ tokens. As a consequence, our results give: (1) the first depth-width trade-off for multi-layer transformers, exhibiting that the $L$-step composition task is exponentially harder for $L$-layer models compared to $(L+1)$-layer ones; (2) an unconditional separation between encoder and decoder, exhibiting a hard task for decoders that can be solved by an exponentially shallower and smaller encoder; (3) a provable advantage of chain-of-thought, exhibiting a task that becomes exponentially easier with chain-of-thought. On the technical side, we propose the multi-party $\textit{autoregressive}$ $\textit{communication}$ $\textit{model}$ that captures the computation of a decoder-only Transformer. We also introduce a new proof technique that finds a certain $\textit{indistinguishable}$ $\textit{decomposition}$ of all possible inputs iteratively for proving lower bounds in this model. We believe our new communication model and proof technique will be helpful to further understand the computational power of transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。