Natural Language Inference is to infer the semantic logical relationship between two given sentences.In this paper,we propose a word-level granular interactive inference model based on external knowledge,an inference model based on Graph Convolution Network and an inference model based on Graph Attention Network.Aiming at the problem of insufficient information interaction and poor understanding of semantics in Natural Language Inference model,we compare the interactive algorithms with different granularity,different kinds of external knowledge and different methods of integrating external knowledge.We propose a word-level granular interactive algorithm with external knowledge such as contract antonym,which optimizes the process of information interaction and deepens the degree of semantic understanding.According to the hierarchy and association of human reasoning,we propose an interactive algorithm based on Graph Convolution Network.Semantic graphs of sentence pairs are formed by taking words as nodes,connecting related words based on the knowledge of semantic role,synonym and antonym.In order to treat the messages propagated from different edges differently,the way of aggregating node information is adjusted to obtain the key interactive features.The sequence features extracted by BiLSTM combined with the interactive features can effectively improve the accuracy of the Natural Language Inference model.In order to avoid the effect of Graph Neural Network being interfered by the flexible graph structure,an inference model based on Graph Attention Algorithm is further proposed.This method adapts to the semantic graphs of sentence pairs which are compact and flexible.The Graph Attention layer consists of node-to-node Attention and attribute-to-node Attention,and combines with BiLSTM to form inference model.This model achieves higher accuracy on both SNLI and MultiNLI,and is faster than the inference model based on Graph Convolution Network. |