Font Size: a A A

Research On Few-shot Relation Classification Method Based On Metric Learning

Posted on:2022-12-18Degree:MasterType:Thesis
Country:ChinaCandidate:Y X ZhangFull Text:PDF
GTID:2518306758491714Subject:Automation Technology
Abstract/Summary:PDF Full Text Request
Faced with the massive information from different industries,the way to obtain critical and streamlined information from it effectively has become an urgent need for people.The direction of research on computer information processing is to convert unstructured data into structured data which can be processed by computer.As an important task in natural language processing,relation classification is used to classify the semantic relation between entity pairs in a sentence.Through the training of labeled data,the information extracted from unstructured data could be structured.Traditional classification methods are based on feature vectors and kernel functions.With the development of deep learning,the current mainstream methods in relation classification tasks has gradually become methods based on deep learning.To reduce the burden of manually labeling data in supervised learning,distant supervision was derived.But the relationships in the real scene have a long-tailed distribution.Therefore,the classification method that requires large-scale data support is difficult to solve the long-tailed problem.Aiming at the long-tailed problem,we conduct a research on relation classification method based on few-shot learning in this paper,and realize the classification of unknown relation classes by learning a small number of samples in known relation classes.We solve the problem of lack of samples based on prototypical network of metric learning in this paper.The model constructs word vectors by combining word embedding and position embedding,and extracts instance features with convolutional neural network.The prototypical network compute a prototype for each class as the representation of class in support set,and comparing the distances between the query instance and the prototype of each class to realize relation classification.In order to reduce the deviation in the calculation of the prototype caused by the special data of support set,and it also takes into account that the impact on support set training for the classification of different query instances,the relational siamese network is added to the model proposed in this paper to compute the similarity scores of support instances and query instances.The weights of support instances are assigned through the similarity scores of the query instance and support instances,and the calculation of prototype is adjusted from the traditional mean calculation method to the weighted sum of the support instances in the class.A cross fusion layer is also added to the model to combine the semantic information of the query instance and the prototype to obtain a more targeted feature vector under the influence of each other,and improve the distinction of each class for different query instance.In the optimization part of training,based on the optimization of the distance between the query instance and the prototype of each class in the prototypical network,the optimization of the distance between the support instances is added.The optimization layer is added to reduce the distance between the support instances of the same class and expand the relationship between the support instances from different classes,which could increase the degree of aggregation of instances in a class,and also improve the degree of dispersion between classes.Experimental results show that the model we proposed improves the accuracy of relation classification when compared with the baseline model under several fewshot learning settings,indicating that the model proposed in this paper can achieve better results on relation classification tasks.
Keywords/Search Tags:relation classification, few-shot learning, metric learning, prototypical network, relation siamese network
PDF Full Text Request
Related items