Journal of Computer Applications ›› 2023, Vol. 43 ›› Issue (12): 3668-3675.DOI: 10.11772/j.issn.1001-9081.2022121869

• Artificial intelligence • Previous Articles     Next Articles

Zero-shot relation extraction model via multi-template fusion in Prompt

Liang XU(), Chun ZHANG, Ning ZHANG, Xuetao TIAN   

  1. School of Computer and Information Technology,Beijing Jiaotong University,Beijing 100044,China
  • Received:2022-12-22 Revised:2023-03-27 Accepted:2023-03-28 Online:2023-05-06 Published:2023-12-10
  • Contact: Liang XU
  • About author:ZHANG Chun, born in 1966, M. S., research fellow. Her research interests include railway information, intelligent information processing.
    ZHANG Ning, born in 1958, Ph. D., research fellow. His research interests include railway information, intelligent information processing, embedded system.
    TIAN Xuetao, born in 1995, Ph. D. His research interests include natural language processing.
  • Supported by:
    the National Key Research and Development Program of China(2019YFB1405202)

融合多Prompt模板的零样本关系抽取模型

许亮(), 张春, 张宁, 田雪涛   

  1. 北京交通大学 计算机与信息技术学院,北京 100044
  • 通讯作者: 许亮
  • 作者简介:许亮(1997—),男,安徽芜湖人,硕士研究生,主要研究方向:自然语言处理;Email:20120467@bjtu.edu.cn
    张春(1966—),女(满族),北京人,研究员,博士生导师,硕士,主要研究方向:铁路信息、智能信息处理
    张宁(1958—),男,北京人,研究员,博士生导师,博士,主要研究方向:铁路信息、智能信息处理、嵌入式系统
    田雪涛(1995—),男(蒙古族),内蒙古通辽人,博士,主要研究方向:自然语言处理。
  • 基金资助:
    国家重点研发计划项目(2019YFB1405202)

Abstract:

Prompt paradigm is widely used to zero-shot Natural Language Processing (NLP) tasks. However, the existing zero-shot Relation Extraction (RE) model based on Prompt paradigm suffers from the difficulty of constructing answer space mappings and dependence on manual template selection, which leads to suboptimal performance. To address these issues, a zero-shot RE model via multi-template fusion in Prompt was proposed. Firstly, the zero-shot RE task was defined as the Masked Language Model (MLM) task, where the construction of answer space mapping was abandoned. Instead, the words output by the template were compared with the relation description text in the word embedding space to determine the relation class. Then, the part of speech of the relation description text was introduced as a feature, and the weight between this feature and each template was learned. Finally, this weight was utilized to fuse the results output by multiple templates, thereby reducing the performance loss caused by the manual selection of Prompt templates. Experimental results on FewRel (Few-shot Relation extraction dataset) and TACRED (Text Analysis Conference Relation Extraction Dataset) show that, the proposed model significantly outperforms the current state-of-the-art model, RelationPrompt, in terms of F1 score under different data resource settings, with an increase of 1.48 to 19.84 percentage points and 15.27 to 15.75 percentage points, respectively. These results convincingly demonstrate the effectiveness of the proposed model for zero-shot RE tasks.

Key words: Relation Extraction (RE), information extraction, Zero-Shot Learning (ZSL), Prompt paradigm, pre-trained language model

摘要:

Prompt范式被广泛应用于零样本的自然语言处理(NLP)任务中,但是现有基于Prompt范式的零样本关系抽取(RE)模型存在答案空间映射难构造与模板选择依赖人工的问题,无法取得较好的效果。针对这些问题,提出一种融合多Prompt模板的零样本RE模型。首先,将零样本RE任务定义为掩码语言模型(MLM)任务,舍弃答案空间映射的构造,将模板输出的词与关系描述文本在词向量空间中进行比较,以此判断关系类别;其次,引入待抽取关系类别的描述文本的词性作为特征,学习该特征与各个模板之间的权重;最后,利用该权重融合多个模板输出的结果,以此减少人工选取的Prompt模板引起的性能损失。在FewRel(Few-shot Relation extraction dataset)和TACRED(Text Analysis Conference Relation Extraction Dataset)这两个数据集上的实验结果显示,与目前最优的模型RelationPrompt相比,所提模型在不同数据资源设置下,F1值分别提升了1.48~19.84个百分点和15.27~15.75个百分点。可见,所提模型在零样本RE任务上取得了显著的效果提升。

关键词: 关系抽取, 信息抽取, 零样本学习, Prompt范式, 预训练语言模型

CLC Number: