Few-shot Open Relation Extraction with Gaussian Prototype and Adaptive Margin

Tianlin Guo, Lingling Zhang, Jiaxin Wang, Yuokuo Lei, Yifei Li, Haofen Wang, Jun Liu · DOI

Abstract

Relation Extraction (RE) is a critical task for transforming unstructured text into structured knowledge. However, real-world applications face two significant challenges: the scarcity of labeled data (Few-Shot) and the presence of unknown relations (Open-Set/None-of-the-Above). This paper introduces GPAM (Gaussian Prototype and Adaptive Margin), a framework that models relation classes as Gaussian distributions and employs an adaptive margin to robustly identify "None-of-the-Above" (NOTA) instances. GPAM demonstrates state-of-the-art performance, even surpassing large language models like GPT-4o in open-set scenarios.

Introduction

Traditional Relation Extraction models often struggle when encountering entity pairs that do not fit into pre-defined categories. In few-shot settings, where only a few examples per relation are available, standard "prototype" methods—which represent a category as a single point—are prone to overfitting and bias. These models frequently misclassify unknown relations as known ones because they lack a well-defined boundary for what constitutes "none of the above."

Methodology: The GPAM Framework

The GPAM framework addresses these limitations through three integrated modules: Semi-Factual Representation, GMM-Prototype Metric Learning, and Decision Boundary Learning.

Overview of the GPAM framework, illustrating the three main modules: Semi-Factual Representation, GMM-Prototype Metric Learning, and Decision Boundary Learning.

1. Semi-Factual Representation (SFR)

To mitigate model bias toward specific entities or context words, GPAM generates four distinct "views" for each sentence:

  • Main View: The original sentence.
  • Head/Tail Debiased Views: Replacing entities with their general categories (e.g., replacing "Tennen Mountains" with "[Mountain]").
  • Context Debiased View: Replacing context words with synonyms. This multi-view approach ensures the model learns the underlying relational patterns rather than memorizing specific entity names.

2. GMM-Prototype Metric Learning

Unlike traditional models that use Euclidean distance to a single point, GPAM treats each category as a Gaussian distribution. By estimating both the mean and variance (the "spread") of the few-shot examples, the model uses Mahalanobis distance for classification. This accounts for the inherent diversity within different types of relations.

3. Decision Boundary Learning

The "secret sauce" for handling the NOTA problem lies in defining clear boundaries. GPAM learns a Prototype Range ($R_c$) for known classes and an Adaptive Margin ($M_c$).

Detailed view of Decision Boundary Learning, showing how known classes are clustered and separated from the NOTA space using adaptive margins.

To further sharpen these boundaries, the model employs Pseudo Negative Sampling (PNS), generating synthetic negative examples near the edges of known classes. This trains the model to distinguish between a known relation and the "void" of unknown relations.

Experimental Evaluation

GPAM was evaluated on the FewRel benchmark, adapted to include NOTA instances at rates ranging from 15% to 50%. This setup simulates realistic open-set conditions where many relations are unknown.

Key Results and Insights

  • State-of-the-Art Performance: In a 5-way 1-shot setting with 15% NOTA, GPAM achieved 91.58% accuracy, significantly outperforming previous models like MCMN.
  • Outperforming LLMs: GPAM notably surpassed GPT-4o and GLM-4 in NOTA detection. While LLMs excel at general reasoning, they often lack the precise boundary-setting capabilities required for stable open-set extraction as the NOTA rate increases.
  • Robustness: GPAM maintained stable performance even as the NOTA rate increased to 50%, whereas traditional point-based models saw sharp declines.

Conclusion and Future Work

GPAM demonstrates that modeling variance and learning adaptive margins are critical for few-shot open relation extraction. While currently using BERT as a backbone, future work could explore integrating GPAM's logic with the broad knowledge of Large Language Models. Additionally, improving the quality of automated synonym replacement for technical domains remains an area for refinement.

Paper Citation: Guo, T., Zhang, L., et al. (2024). Few-shot Open Relation Extraction with Gaussian Prototype and Adaptive Margin. Preprint submitted to Pattern Recognition. arXiv:2410.20320v1.

Summary updated

BibTeX
@misc{guo2024few,
  author = {Tianlin Guo and Lingling Zhang and Jiaxin Wang and Yuokuo Lei and Yifei Li and Haofen Wang and Jun Liu},
  title = {{Few-shot Open Relation Extraction with Gaussian Prototype and Adaptive Margin}},
  year = {2024},
  eprint = {2410.20320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.20320},
}
Figure