Density-Aware Prototypical Network for Few-Shot Relation Classification (2023)

Abstract: In recent years, few-shot relation classification has evoked many research interests. Yet a more challenging problem, i.e. none-of-the-above (NOTA), is under-explored. Existing works mainly regard NOTA as an extra class and treat it the same as known relations. However, such a solution ignores the overall instance distribution, where NOTA instances are actually outliers and distributed unnaturally compared with known ones. In this paper, we propose a density-aware prototypical network (D-Proto) to treat various instances distinctly. Specifically, we design unique training objectives to separate known instances and isolate NOTA instances, respectively. This produces an ideal instance distribution, where known instances are dense yet NOTAs have a small density. Moreover, we propose a NOTA detection module to further enlarge the density of known samples, and discriminate NOTA and known samples accurately. Experimental results demonstrate that the proposed method outperforms strong baselines with robustness towards various NOTA rates. The code will be made public after the paper is accepted.

## introduction relation classification is a fundamental task in natural language processing field, aiming to recognize the relation between two entities in a given sentence. recently, many works formulate this task in the few-shot learning scenario @xcite @xcite . they focus on obtaining fast adaptation with a few samples by learning multiple episodes. usually, each episode is composed of a support set and a query set, where the support set has n -way kshot instances. as an example shown in california is a state in the united states. ## related work previous works @xcite @xcite @xcite @xcite for relation classification usually train models on a labeled dataset with a fixed number of classes, which cannot deal with unseen relations. thus few-shot scenario has drawn much attention recently. by training on multiple episodes, models can learn transferrable knowledge for unseen testing episodes @xcite . although many efforts @xcite @xcite @xcite @xcite have been devoted to the fewshot relation classification. however, a real-world issue that has been proposed is the nota challenge @xcite . this issue breaks the assumption of the traditional n -way k-shot setting. therefore, detecting nota instances during inference needs to be explored. promising works have been proposed to detect nota instances in few-shot relation classification. one approach that has been widely adopted is the n + 1 classification. this approach has been proposed by several works. one work is to use a sentence-pair model for classification, as proposed by @xcite in their work on few-shot learning. another work, @xcite in their work on revisiting nota challenge, is to compute the distance between learnable vectors. the third one, proposed by @xcite , adopts the pretraining fine-tuning paradigm and selects the correct relation from a set of options that includes nota. the above three methods, by considering nota instances as an additional class, are able to learn the boundary between the known relations and the nota instances, allowing the model to learn a more comprehensive representation of the data. ## conclusion in this paper, we propose d-proto, a density-aware prototypical network for few-shot relation classification. we focus on the overall instance distribution and design special training objectives for distinct samples. for the known samples, intraclass becomes well-clustered and inter-class is wellseparated. the nota ones are isolated as outliers. we further propose a nota detection module, which considers the local density and distance property, to distinguish both types of instances. and we use prototypes and degenerative prototypes to enhance the density of known instances to better identify nota. experiments on a popular dataset demonstrate that d-proto outperforms strong baselines. we also provide score analysis and visualization to verify the effectiveness of our method.