Journal of Frontiers of Computer Science and Technology

• Science Researches •     Next Articles

Prompt Labels Collaboration for Relation Extraction

RAN Zheyu, CHEN Yanping, WANG Kai, HUANG Ruizhang, QIN Yongbin   

  1. 1. Engineering Research Center of Text Computing & Cognitive Intelligence, Ministry of Education, Guizhou Uni-versity, Guiyang 550025, China
    2. State Key Laboratory of Public Big Data Guizhou University, Guiyang 550025, China
    3. College of Computer Science and Technology Guizhou University, Guiyang 550025, China

基于提示标签协同的关系抽取方法

冉哲宇, 陈艳平, 王凯, 黄瑞章, 秦永彬   

  1. 1. 贵州大学 文本计算与认知智能教育部工程研究中心,贵阳 550025
    2. 贵州大学 公共大数据国家重点实验室,贵阳 550025
    3. 贵州大学 计算机科学与技术学院,贵阳 550025

Abstract: Prompt learning can transform downstream tasks into pre-training-style masked prediction tasks. However, when applied to relation extraction tasks, the masking output being semantic vector representations of label catego-ries tends to result in an excessively large generation space, leading to insufficient mask semantic resolution. To address this issue, this paper proposes a method for relation extraction based on collaborative prompt labels. Spe-cifically, for each relation class, two sets of synonymous tags are constructed: one set is used to learn the mask rep-resentation, while the other serves to reinforce label semantics. Subsequently, a constraint layer is introduced with-in the masked language model to impose bidirectional constraints on the mask representation, thereby integrating the implicitly differing semantics and prior knowledge between the two sets of synonymous tags into the relational representation. This approach enhances the model's understanding of label semantics while optimizing mask repre-sentations, thereby improving the model's ability to semantically parse masks. Experimental results show that this method outperforms comparative approaches significantly on three public datasets under three standard and few-shot settings, substantiating its effectiveness.

Key words: prompt learning, prompt labels, masked language model

摘要: 提示学习可以将下游任务转换为预训练任务形式的掩码预测任务。然而,将提示学习应用于关系抽取任务时,由于掩码的输出是标签类别的语义向量表示,容易导致生成空间过大而对掩码语义解析度不足。针对这一问题,本文提出了一种基于提示标签协同的关系抽取方法。具体而言,通过为每个关系类构建两组同义词标签。其中一组用于学习掩码表示,另一组用于强化标签语义。然后,在掩码语言模型中引入约束层以对掩码表示进行双向约束。使得两组同义词标签间隐含差异的语义和先验知识能够融入到关系表示中。同时,由于同义词标签是基于知识初始化的,它们在潜在变量空间中可能不是最优的,应该与周围的上下文相关联。因此,在训练过程中,同义词标签表示会与掩码共同参与优化。本文提出的方法能够提高模型对标签语义的认知能力,同时优化掩码表示,从而提升模型对掩码的语义解析能力。实验结果表明,该方法在标准和小样本设置的三个公共数据集上均明显优于对比的方法,证明了该方法的有效性。

关键词: 提示学习, 标签协同, 掩码语言模型