PNPT: Prototypical Network with Prompt Template for Few-Shot Relation Extraction
摘要
Few-shot relation extraction involves predicting the relations between entity pairs in a sentence with a limited number of labeled instances for each specific relation. Prototypical network, which is based on the meta-learning framework, has been widely adopted for this task. Existing prototypical network-based approaches typically obtain the relation representation by concatenating the embeddings corresponding to start tokens of two entity mentions. While these methodologies have demonstrated commendable performance, we argue that the current relation representation fails to fully capture semantic nuances within complex scenes, where the identical entity pairs often convey diverse semantic relationship. In this paper, we propose an innovative relation representation approach that integrates textual context and entity mentions through a prompt template. Furthermore, we introduce a gate mechanism to selectively incorporate external relation knowledge into the origin relation prototype derived from support instances. Experimental results on two benchmark datasets demonstrate the effectiveness of our proposed approach.