Learning Natural Language Inference with LSTM
Shuohang Wang School of Information Systems Singapore Management University、Jing Jiang School of Information Systems Singapore Management University
Abstract
Natural language inference (NLI) is a fundamentally important task in natural language processing that has many applications. The recently released Stanford Natural Language Inference (SNLI) corpus has made it possible to develop and evaluate learning-centered methods such as deep neural networks for natural language inference (NLI). In this paper, we propose a special long short-term memory (LSTM) architecture for NLI. Our model builds on top of a recently proposed neural attention model for NLI but is based on a significantly different idea. Instead of deriving sentence embeddings for the premise and the hypothesis to be used for classification, our solution uses a match-LSTM to perform word-by-word matching of the hypothesis with the premise. This LSTM is able to place more emphasis on important word-level matching results. In particular, we observe that this LSTM remembers important mismatches that are critical for predicting the contradiction or the neutral relationship label. On the SNLI corpus, our model achieves an accuracy of 86.1%, outperforming the state of the art.
中文速览
自然语言推断(Natural Language Inference,NLI)要判断一个前提句子能否推出另一个假设句子,此前主流的深度学习方案都把两句话各自压缩成一个向量再做匹配,丢失了大量词级别的细节信息。本文提出一种叫做 match-LSTM(mLSTM)的新架构,让模型在逐词处理假设句的同时,用注意力机制(attention)动态对齐前提句中的相关部分,再用一个 LSTM 记住对最终判断真正关键的匹配或不匹配信号——比如主语不一致这种足以说明"矛盾"关系的线索,而忽略虚词匹配等无关信息。在斯坦福自然语言推断数据集(SNLI)上,该模型达到了 86.1% 的准确率,超越了此前的最优方法。这一工作表明,逐词细粒度匹配比句子级向量匹配更能捕捉语义关系,为后续大量基于交互式匹配的 NLI 模型奠定了重要基础。
原文 arXiv:1512.08849;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1512.08849v2