Prior Knowledge-Guided Prototypical Network for Few-Shot Relation Extraction
Wanyuan Gong, Qifeng Zhou, Yangjian WuFew-Shot Relation Extraction (FSRE) aims to identify relationships between entities in sentences using only a few training instances. Prototypical networks, which learn class-specific prototype vectors, are the dominant approach for FSRE. However, existing approaches mainly generate instance-driven prototype vectors, leading to shallow semantic understanding and limited inter-class discrimination. Some recent work includes external knowledge as auxiliary inputs or rule-based constraints to enrich instance representations. Yet, capturing subtle inter-class distinctions remains challenging. To address this, we propose PKFew, a novel Prior Knowledge-guided prototypical network for FSRE. Unlike previous approaches, PKFew employs a top-down knowledge guidance mechanism. It leverages class-specific prior knowledge to augment instance representations and achieve deeper semantic understanding. Specifically, we design an external knowledge attention module that extracts prior knowledge to selectively filter and amplify relevant contextual features for each instance. A feedback loop then continuously injects prior knowledge into the attention network, guiding the model toward discriminative features during training. This process enhances the model’s representational capacity and produces more discriminative inter-class prototype vectors. Experiments on FewRel 1.0 and NYT-25 benchmark datasets validate the effectiveness of our approach, particularly in 1-shot settings.