Learning from Context or Names? An Empirical Study on Neural Relation Extraction

Hao Peng, Tianyu Gao, Xu Han, Yankai Lin, Peng Li +3 more
10/5/2020
cs.CL

Official code: thunlp/RE-Context-or-Names (103 stars, Python, PyTorch, last commit 2022-06-01).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

PyTorch

Bert-based models(BERT, MTB, CP) for relation extraction.

10321Python, Jupyter NotebookSep 21, 20204 years ago
bertcontrastive-learningpretrainpytorchrelation-extraction

Similar Papers

Cite this paper

@article{peng2020learning,
  title  = {Learning from Context or Names? An Empirical Study on Neural Relation Extraction},
  author = {Hao Peng and Tianyu Gao and Xu Han and Yankai Lin and Peng Li and Zhiyuan Liu and Maosong Sun and Jie Zhou},
  year   = {2020},
  eprint = {2010.01923},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2010.01923}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2010.01923.svg)](https://codeofpaper.com/paper/2010.01923)

Discussion