Relation extraction (RE) has achieved remarkable progress with the help of pre-trained language models. However, existing RE models are usually incapable of handling two situations: implicit expressions and long-tail relation types, caused by language complexity and data sparsity. In this paper, we introduce a simple enhancement of RE using $k$ nearest neighbors ($k$NN-RE). $k$NN-RE allows the model to consult training relations at test time through a nearest-neighbor search and provides a simple yet effective means to tackle the two issues above. Additionally, we observe that $k$NN-RE serves as an effective way to leverage distant supervision (DS) data for RE. Experimental results show that the proposed $k$NN-RE achieves state-of-the-art performances on a variety of supervised RE datasets, i.e., ACE05, SciERC, and Wiki80, along with outperforming the best model to date on the i2b2 and Wiki80 datasets in the setting of allowing using DS. Our code and models are available at: https://github.com/YukinoWan/kNN-RE.
翻译:在经过事先培训的语言模型的帮助下,关系提取(RE)取得了显著进展,但是,现有的RE模型通常无法处理两种情况:语言复杂和数据宽度造成的隐含表达和长尾关系类型。在本文件中,我们采用简单的增强,使用最接近邻居的美元($KNN-RE)来增加RE。 $k$NN-RE使得该模型能够通过最近的邻居搜索在测试时间咨询培训关系,并提供解决上述两个问题的简单而有效的手段。此外,我们注意到,$k$NNN-RE是利用远程监督(DS)数据为RE提供的有效方法。实验结果表明,拟议的$k$NNNN-RE在各种受监督的RE数据集(即ACE05、SciERC和Wiki80)上实现了最先进的表现,同时在i2b2和Wiki80数据集中超过了迄今的最佳模型。我们的代码和模型可以在以下网址上查到:https://githhubub.com/YukWan/Wikon。