Skip to main content
QUICK REVIEW

[论文解读] Universal Transformers

Mostafa Dehghani, Stephan Gouws|arXiv (Cornell University)|Jul 10, 2018
Topic Modeling参考文献 15被引用 396
一句话总结

通用变换器通过增加时序并行递归和对每个位置的动态停顿来概括Transformer,在若干算法和语言任务上实现了最先进的结果,并显示出更强的泛化能力与表达能力。

ABSTRACT

Recurrent neural networks (RNNs) sequentially process data by updating their state with each new data point, and have long been the de facto choice for sequence modeling tasks. However, their inherently sequential computation makes them slow to train. Feed-forward and convolutional architectures have recently been shown to achieve superior results on some sequence modeling tasks such as machine translation, with the added advantage that they concurrently process all inputs in the sequence, leading to easy parallelization and faster training times. Despite these successes, however, popular feed-forward sequence models like the Transformer fail to generalize in many simple tasks that recurrent models handle with ease, e.g. copying strings or even simple logical inference when the string or formula lengths exceed those observed at training time. We propose the Universal Transformer (UT), a parallel-in-time self-attentive recurrent sequence model which can be cast as a generalization of the Transformer model and which addresses these issues. UTs combine the parallelizability and global receptive field of feed-forward sequence models like the Transformer with the recurrent inductive bias of RNNs. We also add a dynamic per-position halting mechanism and find that it improves accuracy on several tasks. In contrast to the standard Transformer, under certain assumptions, UTs can be shown to be Turing-complete. Our experiments show that UTs outperform standard Transformers on a wide range of algorithmic and language understanding tasks, including the challenging LAMBADA language modeling task where UTs achieve a new state of the art, and machine translation where UTs achieve a 0.9 BLEU improvement over Transformers on the WMT14 En-De dataset.

研究动机与目标

  • 激发需要将并行处理与序列建模的递归归纳偏置结合的模型的动机。
  • 介绍 Universal Transformer (UT) 作为 Transformer 的推广,它在并行地跨位置的深度上细化表示。
  • 证明在某些假设下 UT 可以是图灵完备的,并评估它们在各种任务上的经验表现。
  • 展示动态的逐位置停顿在若干任务上提升准确性,并分析其对性能和计算的影响。

提出的方法

  • UT 使用带自注意的编码器和解码器,以及在位置和时间步共享的递归转换函数。
  • 在每个递归步骤,UT 并行应用多头自注意力来修订表示,然后是转移函数(深度可分离卷积或逐位置前馈)和残差连接。
  • 从原则上,每个符号的深度是无限的,使通过 ACT 风格的停顿实现动态计算深度成为可能。
  • 添加位置和时间步编码以在每个深度步中提供处理信息。
  • 模型在类似 Transformer 的 编码器–解码器结构中训练,解码器采用教师强制。
  • UT 可以被视为权重绑定、深度展开的 Transformer 块,使得在深度上进行递归,而不是在序列长度上。

实验结果

研究问题

  • RQ1带有自注意力和共享转移函数的时序并行递归是否能在泛化和表达能力上超越标准 Transformer?
  • RQ2动态逐位置停顿(自适应计算时间)是否在算法和语言任务上提升性能?
  • RQ3相对于 Transformer,UT 在何种条件下具有计算通用性(图灵完备)?
  • RQ4与标准 Transformer 和 LSTM 相比,UT 在语言理解和大规模任务如机器翻译上的表现如何?
  • RQ5递归深度对需要长程推理和组合泛化的任务有何影响?

主要发现

  • UT 在多种算法和语言任务上优于标准 Transformer 和 LSTM。
  • 在 LAMBADA 语言建模上,UT 实现了最先进的结果。
  • 在 WMT14 英德翻译上,UT 采用全连接转移且无 ACT,相对于同等规模的 Transformer 提高 BLEU。
  • 动态停顿(ACT)在若干较小任务上提高了准确性,在需要时显示出更深的逐符号处理,起正则化作用。
  • UT 能在自适应深度下学习,对更难的输入执行更多步骤,对更容易的输入执行更少步骤,同时在序列位置上保持并行计算。
  • UT 框架在理论上比固定深度 Transformer 更强大,在某些参数设定下能够模仿神经 GPU 和神经取书机。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。