Learning from Context or Names? An Empirical Study on Neural Relation Extraction
About
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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Relation Extraction | TACRED (test) | -- | 194 | |
| Relation Extraction | TACRED | Micro F169.5 | 97 | |
| Relation Extraction | SemEval | Micro-F187.6 | 63 | |
| Relation Extraction | Wiki80 | Accuracy0.922 | 51 | |
| Relation Extraction | ChemProt | Micro F180.6 | 40 | |
| Few-shot Relation Classification | FewRel 1.0 (test) | Accuracy0.971 | 36 | |
| Few-shot Relation Extraction | FewRel Biomedical domain 2.0 (test) | Accuracy84.9 | 36 | |
| Relation Extraction | DocRED human-annotated (test) | Micro F155.2 | 36 | |
| Sentence-level Relation Extraction | SemEval (test) | F1 (micro)0.885 | 24 | |
| Relation Extraction | SemEval 2010 (test) | Precision88.6 | 10 |