Skip to main content
QUICK REVIEW

[Paper Review] LabelPrompt: Effective Prompt-based Learning for Relation Classification

Wenjie Zhang, Xiaoning Song|arXiv (Cornell University)|Feb 16, 2023
Topic ModelingComputer Science7 citations
TL;DR

LabelPrompt introduces label tokens and an entity-aware, attention-strategy framework to improve prompt-based relation classification, especially in few-shot settings.

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.

Motivation & Objective

  • Bridge the gap between pretraining objectives and relation classification tasks.
  • Enable prompt-based learning to handle complex relation labels beyond single-word vocab items.
  • Mitigate misalignment between given entities and predicted relations through an entity-aware module.
  • Differentiate prompt tokens from sentence tokens to preserve sentence semantics while utilizing label prompts.
  • Demonstrate strong performance gains in few-shot and full-data settings on standard RC benchmarks.

Proposed method

  • Extend the vocabulary with relation label tokens initialized from semantic label texts.
  • Use a prompt template that directly inserts label tokens into the input alongside subject and object entities.
  • Introduce a relation-align module to reinforce semantic meaning of label tokens in the model head.
  • Add an entity-aware module that uses a contrastive loss on entity-relation triplets to ground predictions in entity context.
  • Adopt an attention query strategy in self-attention to use separate query mappings for prompt–prompt, prompt–sentence, sentence–prompt, and sentence–sentence interactions.

Experimental results

Research questions

  • RQ1How can label tokens and prompt templates be designed to better map masked outputs to complex relation labels?
  • RQ2Can an entity-aware, contrastive training signal improve relation understanding between specific entity pairs?
  • RQ3Does differentiating prompt tokens from sentence tokens via tailored attention improve RC performance, especially with limited data?
  • RQ4What are the gains of LabelPrompt compared with fine-tuning and existing prompt-based RC methods on standard benchmarks?

Key findings

  • LabelPrompt achieves higher micro F1 than baselines in few-shot settings across TACRED, TACREV, ReTACRED, and SemEval.
  • In 8-shot, 16-shot, and 32-shot scenarios, LabelPrompt outperforms prior prompt-based methods and often fine-tuning baselines on several datasets.
  • LabelPrompt consistently improves performance relative to KnowPrompt and PTR in few-shot and full-data evaluations.
  • On full-data with no extra data, LabelPrompt reaches 73.1 on TACRED, 82.5 on TACREV, 91.6 on ReTACRED, and 91.3 on SemEval, outperforming several baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.