作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (4): 129-136. doi: 10.19678/j.issn.1000-3428.0068855

• 人工智能与模式识别 • 上一篇    下一篇

基于知识增强自适应原型网络的小样本关系分类

张河萍1, 方志军1,*(), 卢俊鑫2, 高永彬1   

  1. 1. 上海工程技术大学电子电气工程学院, 上海 201620
    2. 华东师范大学计算机科学与技术学院, 上海 200241
  • 收稿日期:2023-11-16 出版日期:2025-04-15 发布日期:2024-06-03
  • 通讯作者: 方志军
  • 基金资助:
    科技创新2030—“新一代人工智能”重大项目(2020AAA0109300)

Few-Shot Relation Classification Based on Knowledge-Enhanced Adaptive Prototype Networks

ZHANG Heping1, FANG Zhijun1,*(), LU Junxin2, GAO Yongbin1   

  1. 1. School of Electronics and Electrical Engineering, Shanghai University of Engineering Science, Shanghai 201620, China
    2. School of Computer Science and Technology, East China Normal University, Shanghai 200241, China
  • Received:2023-11-16 Online:2025-04-15 Published:2024-06-03
  • Contact: FANG Zhijun

摘要:

小样本关系分类(FSRC)是指在任务中使用少量标注实例对各种关系进行分类, 可快速适用于对全新的类别进行归类。然而, 当测试域与训练域之间存在分布差异时, 现有的小样本分类算法泛化能力有限, 导致分类性能下降。针对该问题, 提出一种适用于领域适应任务的知识增强自适应原型网络。通过探索实例之间的联系以提高模型的鲁棒性, 同时学习关于关系的先验知识和内在语义以获得可解释原型。通过引入交互注意力机制来捕捉支持实例与查询实例之间的相关性, 突出关键实例, 并生成交互实例。同时, 自适应原型融合机制以关系信息为锚点生成自适应混合系数, 通过特征融合将实例与关系信息相结合, 从而生成混合原型。在公开数据集FewRel 1.0和FewRel 2.0上的实验结果验证了该网络的有效性。实验结果表明, 与基线模型相比, 所提网络模型的分类准确率取得了显著提升, 具有更好的分类效果与稳定性。

关键词: 关系分类, 小样本学习, 小样本关系分类, 原型网络, 知识增强

Abstract:

Few-Shot Relation Classification (FSRC) refers to the use of a small number of labeled instances to classify various relations within a task, and it can be quickly applied to categorize completely new classes. However, existing few-shot classification algorithms show limited generalization capabilities when distributional differences exist between the test and training domains, which leads to significant performance degradation. Therefore, a knowledge-enhanced adaptive prototyping network is proposed for domain adaptation tasks, which helps improve the robustness of the model by exploring connections between instances while learning a priori knowledge about relations and intrinsic semantics to obtain interpretable prototypes. Specifically, the correlations between supporting and query instances are captured by introducing an interactive attention mechanism to highlight key instances and generate interactive instances. The adaptive prototype fusion mechanism generates adaptive hybrid coefficients using relational information as anchors and combines instances with relational information through feature fusion to generate hybrid prototypes. Experiments are conducted on FewRel 1.0 and FewRel 2.0 datasets, and the effectiveness of the method is demonstrated. The experimental results show that the classification accuracy of the proposed network model is significantly higher compared to that of the baseline model. The proposed model has better classification performance and stability.

Key words: Relation Classification (RC), few-shot learning, Few-Shot Relation Classification (FSRC), prototype networks, knowledge-enhanced