Skip to main content
QUICK REVIEW

[论文解读] Why Self-Attention? A Targeted Evaluation of Neural Machine Translation Architectures

Gongbo Tang, Matthias Müller|arXiv (Cornell University)|Aug 27, 2018
Topic Modeling参考文献 19被引用 36
一句话总结

本文通过测试其建模长距离依赖关系(通过主谓一致)和提取语义特征(通过词义消歧)的能力,评估了RNN、CNN和Transformer在神经机器翻译中的表现。结果表明,Transformer和CNN在长距离依赖建模方面并未表现出相对于RNN的实证优势,但Transformer在语义特征提取方面显著优于其他模型,表明其优势在于语义理解而非路径长度更短。

ABSTRACT

Recently, non-recurrent architectures (convolutional, self-attentional) have outperformed RNNs in neural machine translation. CNNs and self-attentional networks can connect distant words via shorter network paths than RNNs, and it has been speculated that this improves their ability to model long-range dependencies. However, this theoretical argument has not been tested empirically, nor have alternative explanations for their strong performance been explored in-depth. We hypothesize that the strong performance of CNNs and self-attentional networks could also be due to their ability to extract semantic features from the source text, and we evaluate RNNs, CNNs and self-attention networks on two tasks: subject-verb agreement (where capturing long-range dependencies is required) and word sense disambiguation (where semantic feature extraction is required). Our experimental results show that: 1) self-attentional networks and CNNs do not outperform RNNs in modeling subject-verb agreement over long distances; 2) self-attentional networks perform distinctly better than RNNs and CNNs on word sense disambiguation.

研究动机与目标

  • 通过实证检验理论主张:CNN和Transformer中更短的网络路径可改善长距离依赖建模,相比RNN更具优势。
  • 探究非循环模型在神经机器翻译中表现优越的原因是否源于更好的语义特征提取,而非路径长度优势。
  • 评估多头注意力对Transformer建模长距离现象的影响。
  • 在两个对比性自然语言处理任务(主谓一致与词义消歧)上,比较RNN、CNN和Transformer的性能。
  • 通过使用共享配置最小化模型间的差异,以隔离架构效应。

提出的方法

  • 研究采用对比性测试集:Lingual97用于主谓一致,ContraWSD用于词义消歧。
  • 在不断增加的距离上训练并评估主谓一致任务,以衡量长距离依赖建模能力。
  • 通过ContraWSD数据集上的准确率评估词义消歧,以衡量语义特征提取能力。
  • 对循环、卷积和自注意力模型进行重新训练,使用相同的配置(6层编码器/解码器、多头注意力、层归一化),以最小化架构差异。
  • 通过消融研究改变注意力头数量,分析其对Transformer的影响。
  • 报告BLEU分数、困惑度和任务特定准确率,以比较不同架构下的模型性能。

实验结果

研究问题

  • RQ1根据更短路径长度理论,Transformer和CNN是否在长距离依赖建模方面优于RNN?
  • RQ2Transformer在神经机器翻译中表现强劲,是否是由于其语义特征提取能力优于RNN,而非路径长度优势?
  • RQ3多头注意力中的注意力头数量如何影响Transformer建模长距离依赖的能力?
  • RQ4多头注意力、残差连接等架构组件是否解释了词义消歧任务中性能差距的部分原因?
  • RQ5通过最小化架构差异,能否揭示RNN、CNN和Transformer的真实优势与劣势?

主要发现

  • Transformer和CNN在长距离主谓一致任务中并未优于RNN,与理论上的路径长度假设相矛盾。
  • 重新训练的RNN模型在长距离主谓一致任务中达到96.9%的准确率,优于相同设置下的CNN和Transformer模型。
  • Transformer在词义消歧任务中显著优于RNN和CNN,在ContraWSD基准上取得最高准确率。
  • 多头注意力中的注意力头数量对建模长距离依赖至关重要;头数不足会损害性能。
  • 多头注意力、层归一化和前馈缩放等架构组件对词义消歧性能差距有贡献,但即使在最小化差异的情况下,Transformer仍优于其他模型。
  • 本研究结论认为,仅靠BLEU分数不足以理解架构优势,必须考虑依赖建模与语义特征提取之间的权衡。

更好的研究,从现在开始

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

无需绑定信用卡

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