Skip to main content
QUICK REVIEW

[论文解读] LabelPrompt: Effective Prompt-based Learning for Relation Classification

Wenjie Zhang, Xiaoning Song|arXiv (Cornell University)|Feb 16, 2023
Topic Modeling被引用 7
一句话总结

LabelPrompt 引入标签标记与实体感知的注意力策略框架,以提升提示式关系分类,特别是在少样本场景下。

ABSTRACT

Recently, prompt-based learning has gained popularity across many natural language processing (NLP) tasks by reformulating them into a cloze-style format to better align pre-trained language models (PLMs) with downstream tasks. However, applying this approach to relation classification poses unique challenges. Specifically, associating natural language words that fill the masked token with semantic relation labels ( extit{e.g.} extit{``org:founded\_by}'') is difficult. To address this challenge, this paper presents a novel prompt-based learning method, namely LabelPrompt, for the relation classification task. Motivated by the intuition to ``GIVE MODEL CHOICES!'', we first define additional tokens to represent relation labels, which regard these tokens as the verbaliser with semantic initialisation and explicitly construct them with a prompt template method. Then, to mitigate inconsistency between predicted relations and given entities, we implement an entity-aware module with contrastive learning. Last, we conduct an attention query strategy within the self-attention layer to differentiates prompt tokens and sequence tokens. Together, these strategies enhance the adaptability of prompt-based learning, especially when only small labelled datasets is available. Comprehensive experiments on benchmark datasets demonstrate the superiority of our method, particularly in the few-shot scenario.

研究动机与目标

  • 弥合预训练目标与关系分类任务之间的差距。
  • 使提示学习能够处理超出单词级词汇项的复杂关系标签。
  • 通过实体感知模块缓解给定实体与预测关系之间的错位。
  • 将提示标记与句子标记区分开来,在利用标签提示的同时保持句子语义。
  • 在标准关系分类基准上,在少样本和全数据设置下展示显著的性能提升。

提出的方法

  • 用从语义标签文本初始化的关系标签标记扩展词汇表。
  • 使用一个提示模板,将标签标记直接与主语和宾语实体一起插入输入。
  • 引入关系对齐模块以强化模型头部对标签标记的语义含义。
  • 增加一个实体感知模块,对实体-关系三元组应用对比损失,将预测锚定在实体上下文。
  • 在自注意力中采用注意力查询策略,为提示–提示、提示–句子、句子–提示、句子–句子交互使用分离的查询映射。

实验结果

研究问题

  • RQ1如何设计标签标记和提示模板,使掩码输出能够更好地映射到复杂的关系标签?
  • RQ2实体感知的对比学习信号是否能提升特定实体对之间的关系理解?
  • RQ3通过定制化注意力将提示标记与句子标记区分开,是否能在数据有限时提升关系分类性能?
  • RQ4在标准基准上,LabelPrompt 相对于微调和现有提示式关系分类方法的提升是多少?

主要发现

k-shotMethodTACREDTACREVReTACREDSemEval
8Fine-tuning12.213.528.541.3
8GDPNet11.812.329.042.0
8PTR28.128.751.570.5
8KnowPrompt32.032.155.374.3
8LabelPrompt33.934.861.577.0
16Fine-tuning21.522.349.565.2
16GDPNet22.523.850.067.5
16PTR30.731.456.281.3
16KnowPrompt35.433.163.382.9
16LabelPrompt34.435.464.581.7
32Fine-tuning28.028.256.080.1
32GDPNet28.829.156.581.2
32PTR32.132.462.184.2
32KnowPrompt36.534.765.084.8
32LabelPrompt35.436.866.784.6
  • LabelPrompt 在 TACRED、TACREV、ReTACRED 与 SemEval 的少样本设置下,微观 F1 指标高于基线方法。
  • 在 8、16、32 样本情境中,LabelPrompt 在多份数据集上优于先前的提示方法,且在若干数据集上常常超越微调基线。
  • LabelPrompt 在少样本和全数据评估中相较于 KnowPrompt 和 PTR 呈现持续的性能提升。
  • 在全数据且无额外数据时,LabelPrompt 在 TACRED、TACREV、ReTACRED、SemEval 上分别达到 73.1、82.5、91.6、91.3,优于若干基线。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。