Knowledge-Enhanced Natural Language Inference Based on Knowledge Graphs (2020)

Abstract: Natural Language Inference (NLI) is a vital task in natural language processing. It aims to identify the logical relationship between two sentences. Most of the existing approaches make such inference based on semantic knowledge obtained through training corpus. The adoption of background knowledge is rarely seen or limited to a few specific types. In this paper, we propose a novel Knowledge Graph-enhanced NLI (KGNLI) model to leverage the usage of background knowledge stored in knowledge graphs in the field of NLI. KGNLI model consists of three components: a semantic-relation representation module, a knowledge-relation representation module, and a label prediction module. Different from previous methods, various kinds of background knowledge can be flexibly combined in the proposed KGNLI model. Experiments on four benchmarks, SNLI, MultiNLI, SciTail, and BNLI, validate the effectiveness of our model.

## introduction natural language inference (nli) is a fundamental yet challenging task for natural language understanding. nli aims to determine whether the logical relationship between a premise p and a hypothesis h is entailment, neutral, or contradiction. nli requires reasoning and inference abilities which are crucial for artificial intelligence system. recent years have witnessed a large improvement in nli models because of the release of several large-scale corpora, such as snli @xcite and multinli @xcite . these datasets enable various deep learning models to achieve state-of-the-art performances @xcite @xcite . most of the existing nli models are based on cross sentence attention @xcite . they learn alignments according to the attention between premises and hypotheses. the resulting alignments and semantic representations of sentences are aggregated and fed into a multilayer feed-forward neural network to judge logical relationships. however, only semantic knowledge between premises and hypotheses are utilized in most of these models. background knowledge can be utilized to facilitate inference as shown in fig. 1 . for the sentences located in the left part of fig. 1 , the logical relationship between the premise and the hypothsis largely depends on the relationship between "piano" and "music". however, the latter is not explicitly expressed in the sentences per se. the right part of fig. 1 is a part of a large knowledge graph, in which paths between "piano" and "music" represent background knowledge that can be utilized to determine the relationship of the sentence pair. previous work @xcite shows that nli models can benefit from leveraging external knowledge. but only restricted kinds of knowledge are considered in it. how to flexibly incorporate a variety of different background knowledge in nli is still a challenging task. in this paper, we propose a knowledge graph enhanced natural language inference (kgnli) model. kgnli enhances the performance of nli by introducing background knowledge stored in knowledge graphs. to be more specific, kgnli first extracts entities such as subjects, predicates, and objects from the given sentence pair, then learns a knowledge-relation representation based on a predetermined knowledge graph which contains these entities as nodes. besides it, kgnli also learns a semantic-relation representation between the given sentences by bi-directional long short-term memory (bilstm) network. finally, kgnli combines these two representations and feed it into a multilayer perceptron to determine the label of the relationship. in order to evaluate our model, we conduct experiments on four datasets: snli, multinli, scitail, and bnli. our model gets competitive results on all the four datasets. on dataset scitail and bnli, where knowledge is crucial for inference @xcite , our model achieves large improvements against baselines. we further conduct ablation tests to validate the effectiveness and necessity of each component in the proposed model. ## methodology given a pair of sentences, premise p and hypothesis h, the goal of nli is to predict a label y that indicates the logical relationship between sentences p and h. the set of labels includes entailment (h can be logically deduced from p), neutral (p and h do not have any logical relationship), and contradiction (p and h cannot be true simultaneously).