Neural models have achieved remarkable success on relation extraction (RE) benchmarks. However, there is no clear understanding which type of information affects existing RE models to make decisions and how to further improve the performance of these models. To this end, we empirically study the effect of two main information sources in text: textual context and entity mentions (names). We find that (i) while context is the main source to support the predictions, RE models also heavily rely on the information from entity mentions, most of which is type information, and (ii) existing datasets may leak shallow heuristics via entity mentions and thus contribute to the high performance on RE benchmarks. Based on the analyses, we propose an entity-masked contrastive pre-training framework for RE to gain a deeper understanding on both textual context and type information while avoiding rote memorization of entities or use of superficial cues in mentions. We carry out extensive experiments to support our views, and show that our framework can improve the effectiveness and robustness of neural models in different RE scenarios. All the code and datasets are released at https://github.com/thunlp/RE-Context-or-Names.
翻译:在关系提取(RE)基准方面,神经模型取得了显著的成功,然而,对于哪些类型的信息影响现有的可再生能源模型,以便作出决定,以及如何进一步改进这些模型的绩效,还缺乏明确的了解。为此目的,我们实证地研究了文本中两个主要信息来源的影响:文本背景和实体提到(名称),我们发现:(一)虽然背景是支持预测的主要来源,但RE模型也在很大程度上依赖实体提到的信息,其中大部分是类型信息,以及(二)现有数据集可能通过实体的提及而泄漏浅层超常,从而有助于RE基准的高性能。根据分析,我们提出了一个实体制成的对比性培训前框架,以便RE能够加深对文本背景和类型信息的了解,同时避免实体的循环记忆化或使用上面提到的表面提示。我们进行了广泛的实验,以支持我们的观点,并表明我们的框架可以提高神经模型在不同RE情景中的有效性和稳健性。所有代码和数据集都在 https://github.com/thunp/reg-text-res-stext-regres)