Skip to main navigation Skip to search Skip to main content

Interactive attention and contrastive learning for few-shot relation extraction

  • School of Computer Science and Technology, Harbin Institute of Technology
  • Harbin Institute of Technology

Research output: Contribution to journalArticlepeer-review

Abstract

Relation extraction is a critical task in natural language processing, often challenged by the problem of insufficient samples in real world scenarios. Therefore, studying few-shot relation extraction is of great significance. Currently, prototype networks and meta-learning-based parameter optimization are the mainstream methods to study this kind of problem. However, these methods still face sample confusion during classification, and the trained models are prone to overfitting. To solve these problems, this paper proposes a few-shot relation extraction method based on interactive attention. During the model training stage, we introduce two contrastive learning approaches to better capture sample features and reduce sample confusion. Contrastive learning strengthens the connections between instances and their corresponding relationship descriptions, thus improving relation extraction. In the testing phase, the model employs an attention mechanism to calculate the attention scores between the query set and the support set and employs a new classification layer to mitigate overfitting. We conducted experiments on two real-world few-shot relation extraction datasets, and the results demonstrate that our method achieved superior performance on both in-domain and cross-domain datasets, proving the effectiveness of the proposed approach. The code is available at https://github.com/xyzew/IACL.git.

Original languageEnglish
Article number131551
JournalNeurocomputing
Volume658
DOIs
StatePublished - 28 Dec 2025

Keywords

  • Attention module
  • Contrastive learning
  • Few-shot learning
  • Meta-learning
  • Relation extraction

Fingerprint

Dive into the research topics of 'Interactive attention and contrastive learning for few-shot relation extraction'. Together they form a unique fingerprint.

Cite this