arXiv:2411.07602cs.LGcs.AI2024-11EMNLP被引 33

证明了基于旋转位置编码的Transformer存在理论表达极限。

Circuit Complexity Bounds for RoPE-based Transformer Architecture

  • 从电路复杂度角度分析RoPE-Transformer的表达能力
  • 在多项式精度、固定层数下无法解决公式求值问题
  • 揭示其虽有实证优势但存在根本性计算限制

理解Transformer架构的表达能力对其容量上限和缩放规律至关重要。尽管近期研究已给出类似Transformer架构的电路复杂度边界,而旋转位置编码(RoPE)作为现代大语言模型中的关键技术,相较于传统位置嵌入在捕捉位置信息方面表现更优,尤其在长上下文场景中潜力巨大。实证证据也表明,基于RoPE的Transformer模型相比传统模型具备更强的泛化能力。本文首次建立了含RoPE注意力机制的Transformer的电路复杂度边界。核心贡献在于:除非TC⁰ = NC¹,否则具有多项式精度、常数层、隐藏维度d ≤ O(n)的RoPE-Transformer无法求解算术公式评估问题或布尔公式值问题。该结果显著揭示了此类架构在表达能力上的根本局限,尽管其在实践中表现出色。本理论成果不仅确立了复杂度边界,也可能为后续关于RoPE-Transformer的研究提供指导。

原文摘要 · Abstract (English)

Characterizing the express power of the Transformer architecture is critical to understanding its capacity limits and scaling law. Recent works provide the circuit complexity bounds to Transformer-like architecture. On the other hand, Rotary Position Embedding ($\mathsf{RoPE}$) has emerged as a crucial technique in modern large language models, offering superior performance in capturing positional information compared to traditional position embeddings, which shows great potential in application prospects, particularly for the long context scenario. Empirical evidence also suggests that $\mathsf{RoPE}$-based Transformer architectures demonstrate greater generalization capabilities compared to conventional Transformer models. In this work, we establish a circuit complexity bound for Transformers with $\mathsf{RoPE}$ attention. Our key contribution is that we show that unless $\mathsf{TC}^0 = \mathsf{NC}^1$, a $\mathsf{RoPE}$-based Transformer with $\mathrm{poly}(n)$-precision, $O(1)$ layers, hidden dimension $d \leq O(n)$ cannot solve the Arithmetic formula evaluation problem or the Boolean formula value problem. This result significantly demonstrates the fundamental limitation of the expressivity of the $\mathsf{RoPE}$-based Transformer architecture, although it achieves giant empirical success. Our theoretical result not only establishes the complexity bound but also may instruct further work on the $\mathsf{RoPE}$-based Transformer.

TransformerRoPE复杂度理论表达能力

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。