Enhancing the Prototype Network with Local-to-Global Optimization for Few-Shot Relation Extraction

Hui Sun, Rongxin ChenNAACL 2025

Abstract

Few-Shot Relation Extraction (FSRE) aims to identify semantic relationships between entities using minimal labeled data. While Prototypical Networks are a standard approach, they often suffer from information redundancy, where overlapping features between classes obscure discriminative details. This paper introduces LoToG (Local-To-Global optimization), a framework that treats relation descriptions as global anchors. By optimizing prototypes through their local components—entities and relations—LoToG mitigates noise and achieves state-of-the-art performance on the FewRel benchmarks.

Introduction

Relation Extraction (RE) is fundamental to knowledge graph construction and natural language understanding. In the few-shot setting, models must generalize to new relations from only a few examples. Traditional Prototypical Networks represent each relation as a single prototype vector. However, these models often struggle with "information redundancy." When similarity evaluation and contrastive learning are applied directly to global prototypes, the model can become distracted by shared features across different classes, leading to a cluttered embedding space.

Comparison of standard prototypical networks versus the proposed LoToG approach, highlighting the use of relation prototypes as anchors.

As illustrated in the figure above, standard networks often fail to distinguish between similar relations because they lack a stable reference point. LoToG addresses this by shifting the focus from global prototype optimization to a "Local-to-Global" strategy using fixed anchors derived from relation descriptions.

Methodology

The LoToG framework consists of four primary components designed to refine the embedding space and reduce redundancy:

  1. Information Alignment: Utilizing a BERT encoder, the model aligns head and tail entity representations with relational information from text descriptions, ensuring a unified embedding space.
  2. Local Contrastive Learning: Instead of comparing entire prototypes, the model treats the relation prototype as a global anchor. Contrastive learning is performed on "local" entity prototypes, forcing them closer to their specific relation anchor while pushing dissimilar ones away.
  3. Local Adaptive Focal Loss ($L_{LAF}$): This modified focal loss uses the similarity between entity prototypes and the relation anchor as a balancing factor. It prioritizes "hard" instances that are difficult to classify while ignoring redundant noise.
  4. Hybrid Prototypes: The final prototype is a composite of the relation anchor and the entity prototype, ensuring the representation captures both general definitions and specific instance nuances.
The LoToG architecture, showing the flow from support and query sets through the sentence encoder to the local-to-global optimization modules.

Experimental Results

The model was evaluated on two major benchmarks: FewRel 1.0 (Wikipedia-based) and FewRel 2.0 (Cross-domain biomedical data).

  • FewRel 1.0: LoToG achieved state-of-the-art accuracy, reaching 95.28% in 5-way 1-shot tasks and 96.71% in 5-way 5-shot tasks, outperforming previous benchmarks like HCRP.
  • FewRel 2.0: The model demonstrated significant robustness in cross-domain scenarios, achieving 84.38% accuracy on the 5-way 5-shot biomedical test set.

Visual analysis using t-SNE confirmed that LoToG produces tighter, more distinct clusters for similar relations (e.g., "mother" vs. "spouse") compared to standard BERT-based Prototypical Networks, effectively solving the redundancy problem.

Conclusion and Future Work

LoToG demonstrates that indirect optimization via local components and global anchors is a powerful strategy for FSRE. By breaking down prototypes into constituent parts, the model avoids the pitfalls of feature overlap. Future research will focus on reducing the dependency on high-quality relation descriptions and exploring finer-grained entity features to further enhance discriminative power.

Summary updated

BibTeX
@inproceedings{sun2025enhancing,
  author = {Hui Sun and Rongxin Chen},
  title = {{Enhancing the Prototype Network with Local-to-Global Optimization for Few-Shot Relation Extraction}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.findings-naacl.145},
}
Figure