| Text is the main carrier for people to communicate,learn,express their opinions and convey information.It is the main source of information in the Internet.How to use these text data is an important topic in the data age.Information extraction is designed to convert unstructured text into structured data that can be analyzed and statistics.Relationship extraction is one of the core steps of information extraction.It aims to extract the relationship between two entities from sentences.Excellent relationship extraction strategy can save a lot of manpower and material resources.It is the focus and hot research direction in natural language processing.Currently,the commonly used relationship extraction strategies require a large number of label samples.Some scholars align entity relationships with text in the knowledge base to obtain large-scale data.This labeling method is also called remote monitoring,but entity and entity relationships have complex and diverse meanings.The relationship types labeled by remote monitoring are limited in the knowledge base,can not cover a variety of relationship types,and the number of samples in many fields is small.There is noise in the corpus labeled by the remote monitor.In this context,the few-shot relationship extraction has attracted researchers’ attention.The few-shot relationship extraction task requires the model to use a small amount of data to complete the relationship extraction of corpus,which brings new challenges to the relationship extraction task.Among the existing few-shot methods,the relationship extraction methods based on the representation of category characteristics have the advantages of simple ideas and small resource occupancy.These methods usually abstract the feature vectors representing this category in a small number of samples,and classify by measuring the distance between the unlabeled samples and the different category features.However,the class characteristics are represented by the mean of the sample vectors within the class.In a few-shot environment,the mean of a few sample vectors can hardly reflect all the characteristics of the class,and the learning experience of the class feature model is difficult to migrate effectively in the face of samples from different fields,which restricts the performance of the class feature method in the few-shot task.Based on the existing class feature methods,this paper studies the impact of different generation methods of class features on the few-shot relationship extraction model.The main contributions include:(1)Propose a Prototype Correction Network(PCNet),which uses an intra-domain Bias Correction(BCd)strategy to constrain the overall distribution of samples.In this strategy,ξ,ξis added to all query samples to represent the distance between the query set and the sample center of the supporting set.The BCd strategy can make the overall distribution of data more compact,and on this basis,the calculated class feature vectors are closer to the class center.PCNet improved accuracy by 1.4 on Few Rel 1.0’s 5-way-1-shot settings and by varying degrees on other few-shot task indicators,which proves that the intradomain bias correction strategy is effective.(2)Intra-class Bias Correction(BCc)strategy is proposed in PCNet.First,the basic class prototypes of each class are obtained by means of class mean,and the distance between the query sample and the basic prototype is calculated by cosine measurement.Then,pseudo labels are added to the query sample according to the distance score,and the first Z query samples with high confidence are selected to expand the support set.The class prototypes are recalculated based on the expanded support set,and each support sample is given an enhanced weight to reduce the noise impact caused by error labeling.Reduce the distance deviation between the base and expected prototype vectors.Experiments show that the prototype network based on intra-class bias correction has 5.94%and 7.29%increases on two few-shot settings,5-way-1-shot and 5-way-5-shot,respectively.(3)Adaptive Capsule Network(ACNet)is proposed.ACNet generates class features in two steps.First,on the basis of memory features,the supporting samples are adjusted to obtain the embedded vectors of the support set.The memory features come from the external memory module,which can effectively improve the experience loss problem of the model in different task switching.Then,the embedded vectors are aggregated on the basis of the query samples to get the class characteristics that contain the query information.Experiments show that the introduction of memory features can effectively preserve the model experience.ACNet improves the accuracy of domain adaptation tasks by 2.19 and has a strong ability of experience migration.(4)An adaptive inductive algorithm(SIA)is proposed.The SIA introduces NAS function based on dynamic routing and uses mean shift algorithm to optimize the NAS.The NAS function can evaluate the status information of the sample in the routing algorithm.The SIA judges whether the sample enters the next routing iteration based on the evaluation result.The introduction of SIA enables ACNet model to allocate routing parameters adaptively for different samples,and helps ACNet model to solve the problems of difficult aggregation and imperfect expression of class characteristics caused by sample diversity.Experiments on Few Rel,a few-shot relationship extraction dataset,verify the validity of the two class feature-based methods proposed in this paper,which have strong guiding significance and application value for the relationship extraction task in few-shot scenarios. |