Font Size: a A A

Research And System Implementation Of Natrual Language Inference Based On Deeplearning

Posted on:2021-05-20Degree:MasterType:Thesis
Country:ChinaCandidate:W ZhaoFull Text:PDF
GTID:2428330632962915Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Natural language inference(NLI)is one of the basic tasks for testing natural language understanding.Its task is mainly to input the provided pairs of sentences(premise and hypothesis)and output the semantic relationship between sentences(implication,neutrality,contradiction).At present,there are two important research directions of natural language inference:the introduction of external knowledge and structural semantic understanding.However,there are some problems in these two directions that need to be solved urgently.On the one hand,the external knowledge mechanism introduced is insufficient and inflexible.The previous methods only introduced the triples in the knowledge graph,while the triple is a simple component in the knowledge graph.Moreover,the introduced external knowledge method is not a separate network layer,which requires a lot of preprocessing and model transformation,which limits its application to other existing inference models to a certain extent.On the other hand,the natural language inference model has inadequate ability to understand the structural semantics.In the past,natural language inference models have not performed well in the test samples with high requirements for structural semantic ability.Finally,it is also a challenge to apply the semantic inference algorithm to the real situation.(1)Aiming at the problem that the introduction of external knowledge mechanism is not sufficient and flexible,this paper proposes a new framework called EDGEGAT to provide external knowledge for NLI model.In this framework,graph attention network is used to learn the network structure information of external knowledge subgraphs,and the inference model and graph network are jointly trained to introduce external knowledge into the realization of inference model.At the same time,this paper improves the graph attention network,i.e.increasing the importance of edge attributes.It is verified that EDGEGAT performs better than the previous external knowledge introduction mechanisms on the relevant natural language processing data sets,and can flexibly improve the effect of multiple NLI models to be introduced with external knowledge.(2)In view of the lack of structural semantic understanding ability of models in the field of natural inference,this paper proposes a new network called DTreeTrans.We adopts the idea that adjacency matrix based on dependency syntax tree is used as mask matrix of transformer network to actively enhance the syntactic features of Transformer.The specific method is:when the BERT pre-trained language model is fine-tuned,all the Transformer in it is replaced with DTreeTrans,so that the pre-trained language model can perceive the structural semantic information in the sentence pairs.The pre-trained language model enhanced by DTreeTrans has a significant improvement in the accuracy of the structural semantic test data sets and the comprehensive semantic understanding ability.(3)Aiming at the challenge of applying natural language inference algorithms to practical scenarios,this paper builds a platform for demonstrating natural language inference algorithms.The platform provides the functions of data preprocessing,model training,model prediction and result visualization.For users,the platform supports the choice of EDGEGAT and DtreeTrans for calculation.The platform can also support developers to introduce external knowledge for specific inference models or enhance the structural semantic understanding ability.At the same time,developers can call a certain functional module of the system according to specific development needs.The callable modules include data storage module,data preprocessing module,inference model module,output module,back-end service module and front-end display module.
Keywords/Search Tags:Deep Learning, Natural Language Inference, Graph Attention Network, Dependency Syntax Tree, Language Model
PDF Full Text Request
Related items