Skip to main navigation Skip to search Skip to main content

Few-Shot Relation Extraction With Automatically Generated Prompts

  • Xiaoyan Zhao
  • , Min Yang*
  • , Qiang Qu
  • , Ruifeng Xu
  • *Corresponding author for this work
  • Chinese University of Hong Kong
  • Shenzhen Institute of Advanced Technology

Research output: Contribution to journalArticlepeer-review

Abstract

Relation extraction (RE) tends to struggle when the supervised training data is few and difficult to be collected. In this article, we elicit relational and factual knowledge from large pretrained language models (PLMs) for few-shot RE (FSRE) with prompting techniques. Concretely, we automatically generate a diverse set of natural language templates and modulate PLM’s behavior through these prompts for FSRE. To mitigate the template bias which leads to unstableness of few-shot learning, we propose a simple yet effective template regularization network (TRN) to prevent deep networks from over-fitting uncertain templates and thus stabilize the FSRE models. TRN alleviates the template bias with three mechanisms: 1) an attention mechanism over mini-batch to weight each template; 2) a ranking regularization mechanism to regularize the attention weights and constrain the importance of uncertain templates; and 3) a template calibration module with two calibrating techniques to modify the uncertain templates in the lowest-ranked group. Experimental results on two benchmark datasets (i.e., FewRel and NYT) show that our model has robust superiority over strong competitors. For reproducibility, we will release our code and data upon the publication of this article.

Original languageEnglish
Pages (from-to)4971-4983
Number of pages13
JournalIEEE Transactions on Neural Networks and Learning Systems
Volume36
Issue number3
DOIs
StatePublished - 2025

Keywords

  • Contrastive learning
  • few-shot relation extraction (FSRE)
  • prompt tuning
  • template regularization

Fingerprint

Dive into the research topics of 'Few-Shot Relation Extraction With Automatically Generated Prompts'. Together they form a unique fingerprint.

Cite this