College of Software, Xinjiang University, Urumqi, China.
Xinjiang Multilingual Information Technology Laboratory, Xinjiang University, Urumqi, China.
PLoS One. 2023 Jun 8;18(6):e0286915. doi: 10.1371/journal.pone.0286915. eCollection 2023.
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.
少量样本关系分类通过在少量标记样本上进行训练,识别非结构化自然语言文本中目标实体对之间的关系。最近基于原型网络的研究主要集中在通过整合外部知识来增强模型的原型表示能力。然而,这些工作中的大多数通过复杂的网络结构(如多注意机制、图神经网络和对比学习)隐式地约束类原型的表示,从而限制了模型的泛化能力。此外,大多数具有三元组损失的模型在模型训练过程中忽略了类内紧致性,从而限制了模型处理具有低语义相似性的异常样本的能力。因此,本文提出了一种非加权原型增强模块,该模块使用原型和关系信息之间的特征级相似度作为门来过滤和完成特征。同时,我们设计了一种类簇损失,可以对困难的正例和负例进行采样,并显式地约束类内紧致性和类间可分离性,以学习具有高可区分性的度量空间。在公开数据集 FewRel 1.0 和 2.0 上进行了广泛的实验,结果表明了所提出模型的有效性。