DiSAN: Directional Self-Attention Network for RNN/CNN-Free Language Understanding
Centre of Artificial Intelligence, FEIT, University of Technology Sydney(悉尼科技大学工程与信息技术学院人工智能中心);Paul G. Allen School of Computer Science & Engineering, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院)
Recurrent neural nets (RNN) and convolutional neural nets (CNN) are widely used on NLP tasks to capture the long-term and local dependencies, respectively. Attention mechanisms have recently attracted enormous interest due to their highly parallelizable computation, significantly less training time, and flexibility in modeling dependencies. We propose a novel attention mechanism in which the attention between elements from input sequence(s) is directional and multi-dimensional (i.e., feature-wise). A light-weight neural net, "Directional Self-Attention Network (DiSAN)", is then proposed to learn sentence embedding, based solely on the proposed attention without any RNN/CNN structure. DiSAN is only composed of a directional self-attention with temporal order encoded, followed by a multi-dimensional attention that compresses the sequence into a vector representation. Despite its simple form, DiSAN outperforms complicated RNN models on both prediction quality and time efficiency. It achieves the best test accuracy among all sentence encoding methods and improves the most recent best result by 1.02% on the Stanford Natural Language Inference (SNLI) dataset, and shows state-of-the-art test accuracy on the Stanford Sentiment Treebank (SST), Multi-Genre natural language inference (MultiNLI), Sentences Involving Compositional Knowledge (SICK), Customer Review, MPQA, TREC question-type classification and Subjectivity (SUBJ) datasets.
Distance-based Self-Attention Network for Natural Language Inference
Seoul National University(首尔大学)
注意力机制已经被用作辅助手段来帮助RNN或CNN。然而,Transformer(Vaswani等人,2017年)最近记录了机器翻译的最新性能,仅使用注意力就大大减少了训练时间。受Transformer的启发,定向自注意网络(Shen et al.,2017年),一个完全基于注意力的句子编码器,被提出。通过使用句子中的前向和后向信息,它在各种数据下都表现出良好的性能。但在他们的研究中,根本没有考虑单词之间的距离,这是学习局部依赖以帮助理解输入文本上下文的重要特征。我们提出了基于距离的自注意力网络,它通过使用一个简单的距离掩码来考虑词的距离,以便在不失去注意力固有的全局依赖建模能力的情况下对局部依赖进行建模。我们的模型在NLI数据上表现出了良好的性能,并记录了SNLI数据的最新结果。此外,我们还证明了我们的模型在长句或文档中具有优势。
Investigating how well contextual features are captured by bi-directional recurrent neural network models
Adobe Research, Big Data Experience Lab(Adobe 研究院大数据体验实验室);National Center for Text Mining, The University of Manchester(曼彻斯特大学国家文本挖掘中心);IIT Guwahati(印度理工学院古瓦哈提分校)