We present a bi-encoder framework for named entity recognition (NER), which applies contrastive learning to map candidate text spans and entity types into the same vector representation space. Prior work predominantly approaches NER as sequence labeling or span classification. We instead frame NER as a representation learning problem that maximizes the similarity between the vector representations of an entity mention and its type. This makes it easy to handle nested and flat NER alike, and can better leverage noisy self-supervision signals. A major challenge to this bi-encoder formulation for NER lies in separating non-entity spans from entity mentions. Instead of explicitly labeling all non-entity spans as the same class $\texttt{Outside}$ ($\texttt{O}$) as in most prior methods, we introduce a novel dynamic thresholding loss. Experiments show that our method performs well in both supervised and distantly supervised settings, for nested and flat NER alike, establishing new state of the art across standard datasets in the general domain (e.g., ACE2004, ACE2005) and high-value verticals such as biomedicine (e.g., GENIA, NCBI, BC5CDR, JNLPBA). We release the code at github.com/microsoft/binder.
翻译:我们提出了一种用于命名实体识别(NER)的双编码器框架,该框架应用对比学习将候选文本片段和实体类型映射到相同的向量表示空间中。以往的工作主要将NER视为序列标注或片段分类问题。我们则将其重构为一个表示学习问题,最大化实体提及与其类型的向量表示之间的相似性。这使得嵌套NER和扁平NER都能得到简便处理,并且能够更好地利用有噪声的自我监督信号。这种双编码器公式在NER中的一个主要挑战在于区分非实体片段与实体提及。与大多数先前方法中将所有非实体片段显式标记为同一类别$\texttt{Outside}$($\texttt{O}$)不同,我们引入了一种新颖的动态阈值损失函数。实验表明,我们的方法在监督和远程监督设置下,对于嵌套NER和扁平NER均表现优异,在通用领域(如ACE2004、ACE2005)和生物医学等高价值垂直领域(如GENIA、NCBI、BC5CDR、JNLPBA)的标准数据集上均达到了新最优水平。我们已在github.com/microsoft/binder上发布代码。