Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (11): 3555-3563.DOI: 10.11772/j.issn.1001-9081.2024111587

• Artificial intelligence • Previous Articles    

Zero-shot relation extraction model based on dual contrastive learning

Bingjie QIU1, Chaoqun ZHANG1,2(), Weidong TANG1, Bicheng LIANG1, Danyang CUI1, Haisheng LUO1, Qiming CHEN1   

  1. 1.School of Artificial Intelligence,Guangxi Minzu University,Nanning Guangxi 530006,China
    2.Guangxi Key Laboratory of Hybrid Computing and IC Design Analysis (Guangxi Minzu University),Nanning Guangxi 530006,China
  • Received:2024-11-11 Revised:2025-02-26 Accepted:2025-02-28 Online:2025-03-04 Published:2025-11-10
  • Contact: Chaoqun ZHANG
  • About author:QIU Bingjie, born in 2002, M. S. candidate. Her research interests include natural language processing.
    TANG Weidong, born in 1968, Ph. D., professor. His research interests include formal methods, rough data reasoning.
    LIANG Bicheng, born in 2000, M. S. candidate. His research interests include image processing.
    CUI Danyang, born in 1999, M. S. candidate. His research interests include natural language processing.
    LUO Haisheng, born in 2002, M. S. candidate. His research interests include natural language processing.
    CHEN Qiming, born in 1999, M. S. candidate. His research interests include natural language processing.
  • Supported by:
    This work is partially supported by National Natural Science Foundation of China(62062011)

基于双重对比学习的零样本关系抽取模型

邱冰婕1, 张超群1,2(), 汤卫东1, 梁弼诚1, 崔丹阳1, 罗海升1, 陈启明1   

  1. 1.广西民族大学 人工智能学院,南宁 530006
    2.广西混杂计算与集成电路设计分析重点实验室(广西民族大学),南宁 530006
  • 通讯作者: 张超群
  • 作者简介:邱冰婕(2002—),女,湖南邵阳人,硕士研究生,主要研究方向:自然语言处理
    汤卫东(1968—),男,山东荣成人,教授,博士,主要研究方向:形式化方法、粗糙数据推理
    梁弼诚(2000—),男,辽宁朝阳人,硕士研究生,主要研究方向:图像处理
    崔丹阳(1999—),男,河南南阳人,硕士研究生,主要研究方向:自然语言处理
    罗海升(2002—),男,广东阳江人,硕士研究生,主要研究方向:自然语言处理
    陈启明(1999—),男,浙江温州人,硕士研究生,主要研究方向:自然语言处理。
  • 基金资助:
    国家自然科学基金资助项目(62062011)

Abstract:

To address the issues of overlapping relation representations and incorrect relation predictions in Zero-Shot Relation Extraction (ZSRE) caused by similar entities or relations, a Dual Contrastive Learning-based Zero-Shot Relation Extraction (DCL-ZSRE) model was proposed. Firstly, both instances and relation descriptions were encoded using pre-trained encoders to obtain their vector representations. Secondly, a dual contrastive learning was designed to enhance the distinguishability of relation representations: Instance-level Contrastive Learning (ICL) was used to learn mutual information between instances, then the representations of instances and relation descriptions were concatenated; and Matching-level Contrastive Learning (MCL) was applied to learn the associations between instances and relation descriptions, thereby resolving the problem of overlapping relation representations. Finally, the learned representations from contrastive learning were utilized in the classification module to predict unseen relations. Experimental results on FewRel and Wiki-ZSL datasets demonstrate that DCL-ZSRE model significantly outperforms eight state-of-the-art models in terms of precision, recall, and F1-score, especially with the large number of unseen relation categories. With 15 unseen relations, DCL-ZSRE achieves improvements of 4.76, 4.63 and 4.69 percentage points in three indicators over EMMA (Efficient Multi-grained Matching Approach) model on FewRel dataset, and also achieves improvements of 1.32, 2.20 and 1.76 percentage points on Wiki-ZSL dataset. These results confirm that DCL-ZSRE model effectively distinguishes overlapping relation representations, establishing an efficient and robust approach for ZSRE.

Key words: relation extraction, feature extraction, zero-shot learning, Contrastive Learning (CL), Pre-trained Language Model (PLM)

摘要:

针对零样本关系抽取(ZSRE)中因相似实体或关系导致的关系表示重叠及关系预测错误问题,提出一种基于双重对比学习的零样本关系抽取(DCL-ZSRE)模型。首先,通过预训练编码器对实例和关系描述进行编码,以得到相应的向量表示;其次,设计双重对比学习提高关系表示的可区分度,即通过实例级对比学习(ICL)学习实例之间的互信息,再将实例和关系描述的表示进行连接,并利用匹配级对比学习(MCL)学习实例与关系描述之间的联系,从而解决关系表示重叠问题;最后,根据对比学习中学习到的表示在分类模块对未见关系进行预测。在FewRel和Wiki-ZSL数据集上的实验结果表明,DCL-ZSRE在精确率、召回率和F1值上均明显优于8个先进的对比模型,尤其在未见关系类别较多时:当未见关系类别数为15时,相较于EMMA (Efficient Multi-grained Matching Approach)模型,DCL-ZSRE模型在FewRel数据集上的3项指标分别显著提高了4.76、4.63、4.69个百分点,在Wiki-ZSL数据集上也实现了1.32、2.20、1.76个百分点的增长。DCL-ZSRE模型能有效区分重叠的关系表示,可作为一种有效且鲁棒性强的零样本关系抽取方法。

关键词: 关系抽取, 特征抽取, 零样本学习, 对比学习, 预训练语言模型

CLC Number: