Meta-learning methods have been widely used in few-shot named entity recognition (NER), especially prototype-based methods. However, the Other(O) class is difficult to be represented by a prototype vector because there are generally a large number of samples in the class that have miscellaneous semantics. To solve the problem, we propose MeTNet, which generates prototype vectors for entity types only but not O-class. We design an improved triplet network to map samples and prototype vectors into a low-dimensional space that is easier to be classified and propose an adaptive margin for each entity type. The margin plays as a radius and controls a region with adaptive size in the low-dimensional space. Based on the regions, we propose a new inference procedure to predict the label of a query instance. We conduct extensive experiments in both in-domain and cross-domain settings to show the superiority of MeTNet over other state-of-the-art methods. In particular, we release a Chinese few-shot NER dataset FEW-COMM extracted from a well-known e-commerce platform. To the best of our knowledge, this is the first Chinese few-shot NER dataset. All the datasets and codes are provided at https://github.com/hccngu/MeTNet.
翻译:元学习方法已广泛应用于小样本命名实体识别(NER),尤其是基于原型的方法。然而,其他类(O类)难以通过原型向量有效表示,因为该类通常包含大量语义杂乱的样本。为解决该问题,我们提出MeTNet模型,仅对实体类型(而非O类)生成原型向量。我们设计了改进的三元组网络,将样本和原型向量映射到更易分类的低维空间,并为每种实体类型提出自适应间隔。该间隔作为半径,在低维空间中控制一个自适应大小的区域。基于这些区域,我们提出新的推理流程来预测查询实例的标签。在域内和跨域设置下的大量实验表明,MeTNet优于现有最先进方法。特别地,我们基于知名电商平台构建并发布了首个中文小样本NER数据集FEW-COMM。据我们所知,这是首个中文小样本NER数据集。所有数据集和代码均公布于 https://github.com/hccngu/MeTNet。