arXiv:2607.26988cs.FLcs.LG2026-07

解析因果掩码Transformer在有限精度下的计算能力边界

A Compositional Theory of Causally Masked Transformers

论文配图:A Compositional Theory of Causally Masked Transformers
图 1 · 摘自论文原文
  • 从注意力动态出发构建代数模型,用记忆状态分析可计算性
  • 不同注意力机制对应不同表达能力:从有限后缀到不可逆清单式状态
  • 揭示了浮点精度下模型表达力的层级结构,适合理论研究者

因果掩码、有限精度的Transformer能解决任意长度输入的哪些决策问题?现有答案多依赖理想算术,但在有限精度下,舍入和计算顺序会改变注意力保留的信息,从而影响模型计算能力。本文提出一种代数形式化方法,直接从模型实现的动力学推导表达能力。核心是记忆——由注意力计算出的有限内部状态,总结前缀信息供后续查询使用。每层注意力头独立更新状态,层间分层组合,统一从模型假设推导表达能力上限。对无位置编码的Transformer应用此方法,得到由注意力类型决定的表达能力层级,特定数值语义下:单宽滑动窗口注意力支持有界后缀记忆;改进的软注意力支持不可逆、清单式状态;两者结合产生相互作用。普通左右浮点软注意力可实现比上述任何一种更丰富的记忆操作。代数上,四类情况分别对应确定性、R-平凡、局部R-平凡和非周期半群。在显式自由连接假设下,四个界限均紧致。

原文摘要 · Abstract (English)

What types of decision problems can a causally masked, finite-precision transformer solve for inputs of arbitrary length? Existing answers often rely on idealized arithmetic, but under finite precision, rounding and evaluation order can change what information attention retains and therefore what the model can compute. We develop an algebraic formalization that derives expressivity directly from the model's implemented dynamics. Its central object is its memory; the finite internal state computed by attention that summarizes the information from the prefix available to all future queries. Each attention head updates its own state independently within a layer, while layers compose hierarchically, providing a uniform route from model assumptions to expressivity bounds. Applying this method to transformers without positional embeddings, we obtain an expressivity hierarchy governed by the attention type under specific numerical semantics. Width-one sliding-window attention supports bounded-suffix memory, while a modified form of soft attention supports irreversible, checklist-like state, and combining the two mechanisms provides an interplay of both. Ordinary left-to-right floating-point soft attention can realize more expressive memory operations than any of the above. Algebraically, the four cases correspond to definite, R-trivial, locally R-trivial, and aperiodic semigroups. Under an explicit free-wiring assumption, all four bounds are tight.

Transformer表达能力代数理论有限精度

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