Font Size: a A A

Research On Relation Classification Based On Few-Shot Learning

Posted on:2024-02-02Degree:DoctorType:Dissertation
Country:ChinaCandidate:Y B LiFull Text:PDF
GTID:1528306941980109Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Relation classification is essential in natural language processing and constructing structured knowledge.Relation classification requires a large amount of labeled data in a supervised way.However,labeled data is scarce in many fields,making supervised classification difficult.Few-shot learning methods have recently been applied to classification and become a research hotspot.Few-shot learning relational classification aims to perform the classification task better with insufficient labeling data.The main goal of few-shot learning relation classification is to only need a few labeled data on new relations after learning certain relation data,thereby achieving the classification task.However,the generalization ability of existing models still needs to be further improved.Therefore,it is of great significance to find out the essential factors that affect the generalization ability of the model and improve the accuracy of classification.This thesis researches few-shot learning relationship classification and proposes new methods.Chapter 3 presents a sentence encoder that strengthens entity pair weights,dynamic generation of class prototypes,and confusion loss function methods.Chapter 4 proposes a sentence encoder that enhances the importance of entities and dependent words,an adaptive generation class prototype and query sentence representation method,and a new network structure.Chapter 5 proposes the fusion of relational descriptors and its self-attention method.Experimental results show that these methods improve the accuracy of model classification.Chapter 6 designs an intent recognition model based on few-shot learning based on application scenarios in Chinese medical information processing.The experimental results show the effectiveness of the proposed theoretical method in practical application scenarios.The main contributions of this thesis are as follows:1.Chapter 3 proposes the HACLF model of few-shot learning relation classification.First,the model designs a sentence encoder that strengthens the weight of entity pairs.The few-shot learning relation classification model of the prototypical network does not consider the importance of entity pairs.This thesis believes that entities are essential in the few-shot learning relation classification.To this end,we improved the BERT model,designed a word-level attention mechanism,strengthened the weight of entity words in sentence encoding,and proposed a new sentence encoder,BERT_FE.Secondly,the method of dynamically generating class prototypes is used in the model.A class prototype needs to be developed in the prototype network.It statically generates the class prototype based on the support set sentences.The weights of the support set sentences are the same.Whether the representation of the class prototype is accurate or not is directly related to the accuracy of model classification.This thesis believes that not all sentences in the support set contribute equally,and sentences similar to the query sentence should be assigned more weight.Therefore,a sentence-level attention mechanism is designed to generate class prototypes.Third,the model develops a confusion loss function.There may be a confusing relation between entities in a sentence.The confusion relation is very similar to the actual relation,making it difficult for the model to distinguish them.A loss function is designed based on KL divergence theory to help the model distinguish the two relationships as much as possible during the training process,thereby improving the model’s accuracy.Experimental results and ablation studies demonstrate that the proposed method is effective.2.Chapter 4 proposes the HAFN model of few-shot relation classification.First,the model designs a sentence encoder that strengthens the weight of entities and dependent words.A significant problem in few-shot learning is insufficient data,and data enhancement is a standard method.However,introducing external data sources for data enhancement may also introduce noise.How to fully mine existing sample information without introducing external data sources is of great significance to improving the model’s generalization.Entities play an essential role in relationship classification,so the dependency words of entities may also play a specific role.To fully explore the semantic features of the sentence,we perform syntactic dependency analysis on the sentence to find out the dependent words of the entity.We improve it based on the BERT model and design a word-level attention mechanism to strengthen the weight of entity words and their dependent words in sentence encoding.,a new sentence encoder FD_BERT is constructed.Second,the model uses an adaptive representation of class prototypes and query sentences.The closer the query sentence is to the actual class prototype and the farther it is from other class prototypes,the more conducive it is for the model to classify the relationship.To this end,a hybrid attention mechanism is designed to dynamically generate class prototypes based on the similarity between the query sentence and the support set sentences and then generate a new query sentence representation based on the similarity between the query sentence and the class prototype.Third,the model designs a new fusion network to improve the model convergence speed.In the prototypical network,Euclidean distance is used to determine the category of the query sentence.Due to the high dimension of the sentence,the amount of calculation is large,and the model converges slowly.A fusion network is designed to replace the Euclidean distance method.While ensuring that the model’s accuracy is not reduced,the convergence speed of model training is greatly improved.Experiments were conducted on two public data sets,and the results showed that the proposed HAFN model has a high classification accuracy and the convergence speed of model training is greatly accelerated.3.Chapter 5 proposes the FRLA model of few-shot relation classification.First,the model incorporates the relational descriptor method.For the N-way-l-shot task in the few-shot learning relationship classification,there is only one support set sentence and insufficient semantic information,resulting in an inaccurate representation of the class prototype.After the knowledge of the fused entities and their dependent words is still limited,there is room for improvement in model accuracy.To this end,a new sentence method is proposed that combines relational description words and sentences with concentrated support to form a new sentence.Through the combination of relational descriptors and the sentences of the support set,a new sentence is generated to replace the original sentence of the support set.Secondly,the model uses the self-attention mechanism method.Secondly,the model uses the self-attention mechanism method.To highlight the role of relational descriptors,a self-attention mechanism is proposed to improve the accuracy of class prototype representation.Experimental results demonstrate the effectiveness of the proposed method.Among them,two tasks on the HuffPost dataset achieved the best level.4.Chapter 6 designs a user intention recognition model based on few-shot learning.It is applied in Chinese medical information processing to verify the practical application effect of the relevant few-shot learning theory proposed in this article.First,based on the data set of the medical search word intent released by CBLUE and the relevant few-shot learning theory presented in this article,a few-shot learning relation classification model FSLRC_QIC was trained for user intent recognition.Secondly,a knowledge graph question-answering system for orthopedic medical care was constructed.The FSLRC_QIC model was migrated to a few manually annotated intent data to realize the intent recognition function of user questions.Among them,only five samples were manually labeled for each intention category.The experimental results verify the effectiveness of the proposed few-shot learning method in practical applications.
Keywords/Search Tags:Few-shot learning, Relation classification, Transfer learning, Encoder, Deep learning, Knowledge graph, Intent recognition, Natural language processing
PDF Full Text Request
Related items