Bridging Generative and Discriminative Learning: Few-Shot Relation Extraction via Two-Stage Knowledge-Guided Pre-training

Quanjiang Guo, Jinchuan Zhang, Sijie Wang, Ling Tian, Zhao Kang +2 more
5/18/2025
cs.CLcs.AIcs.LG

Official code: UESTC-GQJ/TKRE (7 stars, last commit 2025-12-02).

Abstract

Few-Shot Relation Extraction (FSRE) remains a challenging task due to the scarcity of annotated data and the limited generalization capabilities of existing models. Although large language models (LLMs) have demonstrated potential in FSRE through in-context learning (ICL), their general-purpose training objectives often result in suboptimal performance for task-specific relation extraction. To overcome these challenges, we propose TKRE (Two-Stage Knowledge-Guided Pre-training for Relation Extraction), a novel framework that synergistically integrates LLMs with traditional relation extraction models, bridging generative and discriminative learning paradigms. TKRE introduces two key innovations: (1) leveraging LLMs to generate explanation-driven knowledge and schema-constrained synthetic data, addressing the issue of data scarcity; and (2) a two-stage pre-training strategy combining Masked Span Language Modeling (MSLM) and Span-Level Contrastive Learning (SCL) to enhance relational reasoning and generalization. Together, these components enable TKRE to effectively tackle FSRE tasks. Comprehensive experiments on benchmark datasets demonstrate the efficacy of TKRE, achieving new state-of-the-art performance in FSRE and underscoring its potential for broader application in low-resource scenarios. \footnote{The code and data are released on https://github.com/UESTC-GQJ/TKRE.

View on arXivView PDF

Code Implementations(1)

UESTC-GQJ/TKREOfficial100%

This is the source code of IJCAI 2025 paper "Bridging Generative and Discriminative Learning: Few-Shot Relation Extraction via Two-Stage Knowledge-Guided Pre-training".

70Shell, PythonMay 12, 202510 months ago

Similar Papers

Cite this paper

@article{guo2025bridging,
  title  = {Bridging Generative and Discriminative Learning: Few-Shot Relation Extraction via Two-Stage Knowledge-Guided Pre-training},
  author = {Quanjiang Guo and Jinchuan Zhang and Sijie Wang and Ling Tian and Zhao Kang and Bin Yan and Weidong Xiao},
  year   = {2025},
  eprint = {2505.12236},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.12236v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.12236.svg)](https://codeofpaper.com/paper/2505.12236)

Discussion