Due to its effectiveness and performance, the Transformer translation model has attracted wide attention, most recently in terms of probing-based approaches. Previous work focuses on using or probing source linguistic features in the encoder. To date, the way word translation evolves in Transformer layers has not yet been investigated. Naively, one might assume that encoder layers capture source information while decoder layers translate. In this work, we show that this is not quite the case: translation already happens progressively in encoder layers and even in the input embeddings. More surprisingly, we find that some of the lower decoder layers do not actually do that much decoding. We show all of this in terms of a probing approach where we project representations of the layer analyzed to the final trained and frozen classifier level of the Transformer decoder to measure word translation accuracy. Our findings motivate and explain a Transformer configuration change: if translation already happens in the encoder layers, perhaps we can increase the number of encoder layers, while decreasing the number of decoder layers, boosting decoding speed, without loss in translation quality? Our experiments show that this is indeed the case: we can increase speed by up to a factor 2.3 with small gains in translation quality, while an 18-4 deep encoder configuration boosts translation quality by +1.42 BLEU (En-De) at a speed-up of 1.4.
翻译:由于其有效性和性能, 变换器的翻译模式吸引了广泛的关注, 最近的是基于测试的方法。 先前的工作重点是在编码器中使用或检测源语言特征。 到目前为止, 变换器层的文字翻译方式还没有被调查。 表面上, 人们可能假设编码器层捕获源信息, 而解码器层翻译。 在这项工作中, 我们发现, 翻译已经发生在编码器层中, 甚至输入嵌入层中。 更令人惊讶的是, 我们发现, 一些更低的解码器层实际上没有做那么多解码工作。 我们用一个测试方法来展示所有这一切, 我们用对变换器解码器解译层进行最后的、 冷化的分类水平来测量文字翻译准确性。 我们的发现激励并解释了变换器配置的变化: 如果在编码器层中翻译已经发生, 也许我们可以增加编码层的数量, 同时减少解码层的数量, 提高解码速度, 提高欧盟4级层的解码速度, 而不是降低欧盟4级1 质量的升级? 我们的实验确实显示, 提高B 质量, 提高速度, 提高B 提高 质量的翻译质量。