Grasping the Essentials: Tailoring Large Language Models for Zero-Shot Relation Extraction

Sizhe Zhou, Yu Meng, Bowen Jin, Jiawei Han

Introduction

Relation Extraction (RE) is a fundamental task in natural language processing, focused on identifying semantic links between entities in text. While critical for building knowledge graphs and enhancing question-answering systems, traditional RE models rely on vast amounts of human-labeled data. This dependency creates a bottleneck when scaling to new or niche relations. Recent "low-resource" methods attempt to mitigate this using a few "seed" examples, but these examples are often biased and fail to capture the full semantic breadth of a relation. For instance, a "location" relation seeded only with city examples might cause a model to overlook buildings or geographic landmarks.

The REPAL Framework

To address these limitations, the authors propose REPAL, an iterative framework that shifts the focus from biased examples to rich natural language definitions. REPAL leverages the complementary strengths of Large Language Models (LLMs) for synthesis and Small Language Models (SLMs) for efficient inference.

The REPAL framework overview, illustrating the iterative feedback loop between the LLM and SLM.

The framework operates in three distinct stages:

  1. Definition-Based Seed Construction: Instead of relying on gold-standard examples, REPAL starts with a natural language definition of the target relation. An LLM generates initial positive instances reflecting diverse linguistic patterns (e.g., explicit vs. implicit mentions), while negative instances are sampled from an unlabeled corpus.
  2. Pattern Learning with a Specialized SLM: A RoBERTa-based Natural Language Inference (NLI) model is fine-tuned on these initial seeds. This SLM acts as an efficient classifier, determining whether a sentence entails the target relation.
  3. Feedback-Driven Iterative Refinement: This core innovation involves a multi-turn dialogue between the SLM and the LLM. The SLM identifies "confusing" instances from an unlabeled corpus—cases where it is uncertain or likely incorrect. These are fed back to the LLM, which analyzes the errors, identifies pattern coverage bias, and generates "near-miss" negative examples to refine the SLM’s decision boundaries.

Experimental Evaluation

REPAL was evaluated on two benchmarks adapted for definition-only settings: DefOn-FewRel (80 relations) and DefOn-Wiki-ZSL (a noisier dataset based on distant supervision). The researchers used a Wikipedia-based unlabeled corpus of approximately 10,000 instances to simulate real-world conditions.

Results and Discussion

REPAL demonstrates significant performance gains over existing zero-shot baselines. On the DefOn-FewRel dataset, REPAL powered by GPT-4o achieved a Macro-F1 score of 91.71%, substantially outperforming the standard RoBERTa NLI baseline (55.07%) and specialized models like RE-Matching (75.11%).

Performance comparison of REPAL against zero-shot and fully-supervised baselines on DefOn-FewRel and DefOn-Wiki-ZSL datasets.

Beyond accuracy, the framework is remarkably cost-effective. While using an LLM for direct inference on a large scale would cost hundreds of dollars, REPAL’s synthesis-based approach costs approximately $3.70 to train a high-performing SLM. Furthermore, the framework remains robust even when using smaller models like GPT-4o mini, suggesting that the iterative logic is the primary driver of success.

Conclusion

The REPAL framework proves that natural language definitions, when combined with an iterative feedback loop, provide a superior foundation for zero-shot Relation Extraction compared to traditional few-shot examples. By using SLMs as "scouts" to identify knowledge gaps for LLMs to fill, REPAL achieves state-of-the-art performance while maintaining computational and financial efficiency. Future work will explore the framework's applicability to more complex N-ary relations and its performance with open-source LLMs.

Summary updated

BibTeX
@inproceedings{zhou2024grasping,
  author = {Sizhe Zhou and Yu Meng and Bowen Jin and Jiawei Han},
  title = {{Grasping the Essentials: Tailoring Large Language Models for Zero-Shot Relation Extraction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.747},
}
Figure