为什么位置编码对于深度自回归 Transformer 是非必要的?重温旧迹
Why Are Positional Encodings Nonessential for Deep Autoregressive Transformers? Revisiting a Petroglyph
AI总结:
本文重温并解释了为何多层自回归 Transformer 无需显式位置编码即可区分序列顺序,指出该特性早在 GPT-2 时期已被发现但未获广泛传播,旨在将其重新确立为常识。
摘要:
自回归 Transformer 语言模型是否需要显式位置编码(PEs)?答案是“不需要”,前提是它们拥有不止一层——它们无需显式 PEs 即可区分包含排列后 token 的序列。这是因为一系列(排列不变的)集合处理器在自回归场景中能够共同展现出对序列敏感的行为。这一特性自早期采用 Transformer 进行语言建模的努力(与 GPT-2 同期)起就已为人所知。然而,这一结果似乎并未得到广泛传播,导致了近期的重新发现。这可能部分归因于 GPT-2/3 问世后语言建模社区的突然增长,但也可能是因为先前工作缺乏清晰的解释,尽管过去从业者普遍理解这一点。在此,我们回顾了早已被遗忘的解释,即为什么显式 PEs 对于多层自回归 Transformer 是非必要的(相比之下,单层模型需要 PEs 来识别其输入的顺序信息),以及该结果的起源,并希望将其重新确立为常识。
英文摘要:
Do autoregressive Transformer language models require explicit positional encodings (PEs)? The answer is 'no' provided they have more than one layer -- they can distinguish sequences with permuted tokens without the need for explicit PEs. This follows from the fact that a cascade of (permutation invariant) set processors can collectively exhibit sequence-sensitive behavior in the autoregressive setting. This property has been known since early efforts (contemporary with GPT-2) adopting the Transformer for language modeling. However, this result does not appear to have been well disseminated, leading to recent rediscoveries. This may be partially due to a sudden growth of the language modeling community after the advent of GPT-2/3, but perhaps also due to the lack of a clear explanation in prior work, despite being commonly understood by practitioners in the past. Here we review the long-forgotten explanation why explicit PEs are nonessential for multi-layer autoregressive Transformers (in contrast, one-layer models require PEs to discern order information of their inputs), as well as the origin of this result, and hope to re-establish it as a common knowledge.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。