arXiv:2509.24125cs.LGcs.AI2025-09被引 2

证明解码器型Transformer无法学习逆序排列还原,揭示其推理能力局限。

The Impossibility of Inverse Permutation Learning in Transformer Models

  • 通过反例证明任意深度的解码器模型无法还原排列后的字符串
  • 引入填充占位符可使逆序还原成为可能,突破原有限制
  • 为思维链提示机制提供新解释,暗示中间符号可激活推理

本文研究解码器仅用Transformer进行逆序排列学习的问题。给定一个排列及其作用于字符串后的结果,模型需恢复原始(“标准”)字符串。该任务模拟了长上下文检索、多选问答和上下文学习等多种推理任务中的自然鲁棒性特性。主要贡献是提出一个不可能性结果:任意深度的解码器仅用Transformer无法学习此任务。这一结论涉及解码器仅用Transformer的表达能力,与训练动态或样本复杂度无关。我们提出了两种替代构造,在其中逆序排列学习是可行的。第一种强调因果注意力掩码的根本作用,揭示编码器-解码器架构与更流行的解码器仅用架构之间的表达能力差距。第二种结果更为意外:仅在输入中添加“占位符”即可使逆序排列学习成为可能。我们推测这可能暗示一种新机制,即思维链提示或更一般的中间‘思考’标记能激发大语言模型的推理能力,即使这些标记不携带有意义的语义信息(如中间计算结果)。

原文摘要 · Abstract (English)

In this technical note, we study the problem of inverse permutation learning in decoder-only transformers. Given a permutation and a string to which that permutation has been applied, the model is tasked with producing the original (``canonical'') string. We argue that this task models a natural robustness property across a variety of reasoning tasks, including long-context retrieval, multiple choice QA and in-context learning. Our primary contribution is an impossibility result: we show that an arbitrary depth, decoder-only transformer cannot learn this task. This result concerns the expressive capacity of decoder-only transformer models and is agnostic to training dynamics or sample complexity. We give a pair of alternative constructions under which inverse permutation learning is feasible. The first of these highlights the fundamental role of the causal attention mask, and reveals a gap between the expressivity of encoder-decoder transformers and the more popular decoder-only architecture. The latter result is more surprising: we show that simply padding the input with ``scratch tokens" yields a construction under which inverse permutation learning is possible. We conjecture that this may suggest an alternative mechanism by which chain-of-thought prompting or, more generally, intermediate ``thinking'' tokens can enable reasoning in large language models, even when these tokens encode no meaningful semantic information (e.g., the results of intermediate computations).

Transformer推理能力逆序学习提示工程

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