[论文解读] Distance-based Self-Attention Network for Natural Language Inference
引入基于距离的自注意力网络,在多头注意力中加入距离掩码,以捕捉局部依赖同时保留全局上下文,在 SNLI 上达到最先进水平,在 MultiNLI 上取得强劲结果。
Attention mechanism has been used as an ancillary means to help RNN or CNN. However, the Transformer (Vaswani et al., 2017) recently recorded the state-of-the-art performance in machine translation with a dramatic reduction in training time by solely using attention. Motivated by the Transformer, Directional Self Attention Network (Shen et al., 2017), a fully attention-based sentence encoder, was proposed. It showed good performance with various data by using forward and backward directional information in a sentence. But in their study, not considered at all was the distance between words, an important feature when learning the local dependency to help understand the context of input text. We propose Distance-based Self-Attention Network, which considers the word distance by using a simple distance mask in order to model the local dependency without losing the ability of modeling global dependency which attention has inherent. Our model shows good performance with NLI data, and it records the new state-of-the-art result with SNLI data. Additionally, we show that our model has a strength in long sentences or documents.
研究动机与目标
- 通过捕捉局部词语依赖来提升自然语言推理的句子编码器的性能动机。
- 将词语距离信息并入一个完全基于注意力的编码器,同时不牺牲全局上下文。
- 在 SNLI 和 MultiNLI 数据集上评估所提距离基注意力。
- 提供分析,显示距离掩码在注意力和性能上的影响位置及方式。
提出的方法
- 在 Transformer 风格的注意力中扩展距离掩码以建模相对词语距离。
- 引入方向性掩码以编码前向和后向依赖。
- 引入一个融合门,将投影后的词嵌入与屏蔽的注意力输出进行融合。
- 在融合阶段之后使用带残差连接的逐点前馈网络。
- 通过多维自注意力的池化和最大池化来获得句子表示。
实验结果
研究问题
- RQ1在自注意力中添加距离掩码是否相较于先前的全注意力编码器能提升自然语言推理性能?
- RQ2距离掩码如何影响长句子与短句子的注意力模式?
- RQ3距离掩码对 SNLI 和 MultiNLI 基准测试有何影响?
- RQ4所提模型如何在局部依赖捕获与全局上下文建模之间取得平衡?
主要发现
- 在与完全基于注意力的编码器结合使用时,距离掩码在 SNLI 上达到最先进的结果。
- 距离掩码在较长句子上的性能提升尤为明显,且随平均句子长度的增加而 gains 增大。
- 消融实验表明,包含距离掩码可提升准确率且对模型大小或训练时间并无显著增加。
- 在 MultiNLI 上,该模型具有竞争力,相较于更深的 LSTM 基模型,提供了较简单的推断层但仍具强准确性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。