A novel few-shot relation extraction approach based on multi-granularity semantic interaction
摘要
Relation extraction is an important task in natural language processing, which aims to identify the semantic relationships between entities. This task is essential for enhancing applications such as digital humanities, legal document analysis, and biomedical information extraction. Although the existing models excel with large datasets, the performance suffers when dealing with few-shot scenarios due to limited samples. Consequently, these models struggle to fully capture the semantics of the given text. To address these challenges, this paper proposes the multi-granularity semantic interaction-based relation extraction model (MGSI). Our approach, inspired by prototype networks, facilitates comprehensive semantic interaction between support instances, query instances, and relation descriptions to obtain sentence-level and word-level prototypes with varying levels of semantic granularity. These prototypes are then fused to generate the final prototype. Furthermore, our framework incorporates a target adaptative module and a semantic contrastive module. These modules enhance the model's automatic adaptation and semantic understanding by capturing class-specific differences effectively. To validate the effectiveness of our proposed model, we conducted extensive experiments on the FewRel 1.0 and FewRel 2.0 public datasets. Our model achieves an accuracy of 94.51% in 5-way-1-shot tasks and 89.97% in 10-way-1-shot tasks on the FewRel 1.0 dataset, and delivers state-of-the-art results in the same tasks on the FewRel 2.0 dataset.