| With the continuous development of global Internet technology,massive unstructured data has shown an explosive growth,which needs to be converted into structured knowledge using information extraction techniques.Among them,relation classification,as a key part of information extraction,aims to identify the relation between given entities from the context,which plays an important role in text semantic understanding and knowledge graph construction.However,current supervised learning-based relation classification models rely heavily on large-scale annotated data,and in reality,large-scale high-quality manually annotated data are difficult to obtain.Facing the above challenges,few-shot learning emerges as a promising solution to quickly identify new tasks with a small amount of labeled data.Therefore,this paper aims to explore the task of relation classification in small-sample scenarios,and conduct theoretical and experimental research on enhancing class prototype representation and instance feature representation discriminability.First,in order to further improve the classification accuracy of the model,from the perspective of how to enhance the discriminative representation of class prototypes,a class prototype enhancement method based on adaptive fusion of relation information(PE-AFRI)is proposed.This method first uses the instance-level attention module to interact with query instances and support set instances to obtain preliminary enhanced class prototype(QEProto);then,according to the current query instances and classification scenarios,QEProto and relation information are adaptively fused to obtain fused relation information class prototype(FRProto),in order to make it easier to distinguish between various relation categories.Secondly,in order to make the model learn a more discriminative instance representation to improve the classification performance of the model,on the basis of analyzing the deficiency of the cross-entropy loss function,a feature representation enhancement method based on joint loss optimization is proposed.This method introduces supervised contrastive learning into the task of few-shot relation classification,and jointly trains the model with cross-entropy loss and supervised contrastive loss.Among them,the cross-entropy loss function is used to calculate the classification loss of the model prediction results,and the supervised contrastive loss function is used to learn the feature representation of the instance.By sharing model parameters,the discriminative feature representation learned by supervised contrastive learning can supplement and strengthen the features of the relation classification task,which is conducive to making the different relation categories in the embedding space more dispersed,and the same relation category is more compact.Finally,on the basis of the above research,a few-shot relation classification model ARF-JLO-PN based on PE-AFRI and joint loss optimization is constructed,and various experiments are carried out on the Few Rel dataset to verify the performance superiority of the ARF-JLO-PN model compared to other models,and the effectiveness of the class prototype enhancement method based on the adaptive fusion of relation information and the feature representation enhancement method based on joint loss optimization for the performance improvement of the ARF-JLO-PN model. |