Case study on FewRel 1.0 validation set.
收藏资源简介:
Few-shot Relation Classification identifies the relation between target entity pairs in unstructured natural language texts by training on a small number of labeled samples. Recent prototype network-based studies have focused on enhancing the prototype representation capability of models by incorporating external knowledge. However, the majority of these works constrain the representation of class prototypes implicitly through complex network structures, such as multi-attention mechanisms, graph neural networks, and contrastive learning, which constrict the model’s ability to generalize. In addition, most models with triplet loss disregard intra-class compactness during model training, thereby limiting the model’s ability to handle outlier samples with low semantic similarity. Therefore, this paper proposes a non-weighted prototype enhancement module that uses the feature-level similarity between prototypes and relation information as a gate to filter and complete features. Meanwhile, we design a class cluster loss that samples difficult positive and negative samples and explicitly constrains both intra-class compactness and inter-class separability to learn a metric space with high discriminability. Extensive experiments were done on the publicly available dataset FewRel 1.0 and 2.0, and the results show the effectiveness of the proposed model.
少样本关系分类(Few-shot Relation Classification)指通过少量标注样本完成训练,进而识别非结构化自然语言文本中目标实体对之间语义关系的任务。近期基于原型网络(Prototype Network)的相关研究,多通过引入外部知识以提升模型的原型表征能力。然而,此类工作大多借助多注意力机制(Multi-Attention Mechanisms)、图神经网络(Graph Neural Networks)、对比学习(Contrastive Learning)等复杂网络结构,对类别原型的表征进行隐式约束,这反而限制了模型的泛化能力。此外,多数采用三元组损失(Triplet Loss)的模型在训练阶段忽视了类内紧致性,进而限制了模型处理语义相似度较低的异常样本(Outlier Samples)的能力。为此,本文提出一种非加权原型增强模块,以原型与关系信息间的特征级相似度作为门控机制,实现特征的筛选与补全;同时设计了类别聚类损失,通过采样难分正负样本,显式约束类内紧致性与类间可分性,以学习具备高判别性的度量空间。本文在公开数据集FewRel 1.0与FewRel 2.0上开展了大量实验,实验结果验证了所提模型的有效性。



