How Does Selective Mechanism Improve Self-Attention Networks?

Xinwei Geng, Longyue Wang, Xing Wang, Bing Qin, Ting Liu +1 more
5/3/2020
cs.CLcs.LG
transformer-attention

Official code: xwgeng/SSAN (29 stars, Python, TensorFlow, last commit 2021-03-16).

Abstract

Self-attention networks (SANs) with selective mechanism has produced substantial improvements in various NLP tasks by concentrating on a subset of input words. However, the underlying reasons for their strong performance have not been well explained.

Show full abstract

In this paper, we bridge the gap by assessing the strengths of selective SANs (SSANs), which are implemented with a flexible and universal Gumbel-Softmax. Experimental results on several representative NLP tasks, including natural language inference, semantic role labelling, and machine translation, show that SSANs consistently outperform the standard SANs. Through well-designed probing experiments, we empirically validate that the improvement of SSANs can be attributed in part to mitigating two commonly-cited weaknesses of SANs: word order encoding and structure modeling. Specifically, the selective mechanism improves SANs by paying more attention to content words that contribute to the meaning of the sentence. The code and data are released at https://github.com/xwgeng/SSAN.

View on arXivView PDF

Code Implementations(1)

xwgeng/SSANOfficial100%
TensorFlow

How Does Selective Mechanism Improve Self-attention Networks?

294Python, PerlMay 2, 20205 years ago
neural-machine-translationself-attention-networktensorflow

Similar Papers

Cite this paper

@article{geng2020does,
  title  = {How Does Selective Mechanism Improve Self-Attention Networks?},
  author = {Xinwei Geng and Longyue Wang and Xing Wang and Bing Qin and Ting Liu and Zhaopeng Tu},
  year   = {2020},
  eprint = {2005.00979},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.00979}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2005.00979.svg)](https://codeofpaper.com/paper/2005.00979)

Discussion