NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learn from Relation Information: Towards Prototype Representation Rectification for Few-Shot Relation Extraction

Yang Liu, Jinpeng Hu, Xiang Wan, Tsung-Hui ChangNAACL 2022

Introduction

Few-Shot Relation Extraction (FSRE) aims to identify semantic relationships between entities using only a handful of labeled examples. The prevailing approach, Prototype Networks, calculates a "prototype" as the mean vector of these examples. However, this method is highly sensitive to noise; if the few available samples are outliers, the resulting prototype deviates from the true class center, leading to poor generalization.

Conceptual illustration of prototype rectification: the original prototype is adjusted toward the true class center using global relation information.

While some models attempt to mitigate this by implicitly learning from relation labels, this paper proposes the Prototype Rectification Method (PRM). PRM explicitly utilizes relation names and descriptions to "rectify" the initial prototype, pulling it closer to the semantic truth of the relation class.

The Prototype Rectification Method (PRM)

The PRM framework functions as an explicit post-processing step for class prototypes. It consists of three main stages:

  1. Encoding: Sentences from the support set, query set, and relation descriptions are transformed into vector representations using a pre-trained encoder (e.g., BERT or contrastively pre-trained CP).
  2. Initial Prototype Calculation: An "Original Prototype" is formed by averaging the vectors of the support instances.
  3. Gated Rectification: The core innovation is a gating module inspired by Gated Recurrent Units (GRUs).
The architecture of the Prototype Rectification Module (PRM), showing the gated fusion of instance-based prototypes and semantic relation representations.

As shown in the architecture, PRM employs two specific gates:

  • Gate 1 ($r^i$): Controls the injection of global relation information (derived from descriptions) into the instance-based representation.
  • Gate 2 ($p^i$): Determines the balance between the original "local" prototype information and the newly integrated semantic features to produce the final "Rectified Prototype."

This mechanism allows the model to ground noisy sample data in stable, high-level semantic definitions. For "None-Of-The-Above" (NOTA) scenarios, the model introduces a virtual relation with a specific description to handle queries that do not match any provided support class.

Experimental Results

The PRM was evaluated on the FewRel 1.0 and 2.0 benchmarks. It achieved state-of-the-art (SOTA) results, particularly in 1-shot scenarios where the risk of sample noise is highest.

  • FewRel 1.0: Using the CP encoder, PRM reached 96.64% accuracy in 5-way 1-shot tasks, outperforming previous benchmarks like HCRP by nearly 2% in more complex 10-way settings.
  • FewRel 2.0 (NOTA): The model set a new SOTA on the CodaLab leaderboard, demonstrating superior performance in identifying when a query does not belong to any known class.
  • Domain Adaptation: While effective, the model showed slightly lower gains in biomedical tasks where only short relation names (rather than full descriptions) were available, highlighting the importance of rich semantic information for rectification.

Conclusion

The Prototype Rectification Method demonstrates that explicit semantic guidance is a powerful tool for few-shot learning. By blending local instance data with global relation definitions through a gated mechanism, PRM creates more robust and accurate class representations. This approach is lightweight, parameter-efficient, and offers a clear path for improving few-shot performance across various NLP tasks.

Summary updated

BibTeX
@inproceedings{liu2022learn,
  author = {Yang Liu and Jinpeng Hu and Xiang Wan and Tsung-Hui Chang},
  title = {{Learn from Relation Information: Towards Prototype Representation Rectification for Few-Shot Relation Extraction}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-naacl.139},
}
Figure