Skip to main content
QUICK REVIEW

[Paper Review] OpenNRE: An Open and Extensible Toolkit for Neural Relation Extraction

Xu Han, Tianyu Gao|ArXiv.org|Sep 28, 2019
Topic ModelingComputer Science26 references7 citations
TL;DR

OpenNRE is an open-source, extensible toolkit built on TensorFlow and PyTorch that provides a unified framework for training, validating, and deploying neural relation extraction (NRE) models across multiple settings, including sentence-level, bag-level, and few-shot RE. It supports end-to-end pipeline tasks like NER and entity linking, and includes a real-time online system for Wikidata-aligned fact extraction, achieving performance comparable to or better than original models on benchmark datasets such as SemEval-2010, NYT10, and FewRel.

ABSTRACT

OpenNRE is an open-source and extensible toolkit that provides a unified framework to implement neural models for relation extraction (RE). Specifically, by implementing typical RE methods, OpenNRE not only allows developers to train custom models to extract structured relational facts from the plain text but also supports quick model validation for researchers. Besides, OpenNRE provides various functional RE modules based on both TensorFlow and PyTorch to maintain sufficient modularity and extensibility, making it becomes easy to incorporate new models into the framework. Besides the toolkit, we also release an online system to meet real-time extraction without any training and deploying. Meanwhile, the online system can extract facts in various scenarios as well as aligning the extracted facts to Wikidata, which may benefit various downstream knowledge-driven applications (e.g., information retrieval and question answering). More details of the toolkit and online system can be obtained from http://github.com/thunlp/OpenNRE.

Motivation & Objective

  • To address the lack of a unified, extensible, and efficient toolkit for training and evaluating neural relation extraction (NRE) models across diverse paradigms such as supervised, distantly supervised, and few-shot learning.
  • To enable researchers and developers to easily implement, train, and validate custom NRE models without writing extensive glue code.
  • To provide a production-ready online system for real-time, zero-training relation extraction with Wikidata entity alignment.
  • To maintain long-term extensibility and modularity by supporting both TensorFlow and PyTorch, and enabling plug-in integration of new models.
  • To support end-to-end knowledge mining pipelines by integrating named entity recognition (NER) and entity linking (EL) modules.

Proposed method

  • The toolkit provides a unified framework for data processing, model training, and evaluation across sentence-level, bag-level, and few-shot relation extraction tasks.
  • It implements multiple NRE models, including CNN-based, BERT-based, and prototype networks, with support for entity markers and [CLS] or span-based output representations.
  • The system supports two deep learning backbones: CNN with word and position embeddings, and BERT fine-tuned with entity markers for improved contextual representation.
  • For distantly supervised learning, it implements attention-based, adversarial, and reinforcement learning-based models using instance-level attention mechanisms.
  • An online system is deployed using a pre-trained model that enables real-time extraction and aligns extracted entities to Wikidata via TagMe.
  • The toolkit is modular and extensible, allowing developers to plug in new models with minimal code changes, and is maintained via GitHub with long-term support.

Experimental results

Research questions

  • RQ1Can a unified, open-source toolkit be built to streamline the implementation, training, and evaluation of diverse neural relation extraction models across multiple learning paradigms?
  • RQ2To what extent can OpenNRE achieve performance comparable to or better than original models on standard benchmarks like SemEval-2010, NYT10, and FewRel?
  • RQ3How effective is the integration of NER and entity linking modules within the OpenNRE pipeline for end-to-end knowledge mining?
  • RQ4Can a real-time, zero-training online system with Wikidata alignment be effectively deployed using OpenNRE?
  • RQ5How well does OpenNRE support extensibility and modularity for future model integration and long-term maintenance?

Key findings

  • BERT-based models in OpenNRE achieve state-of-the-art performance on SemEval-2010 Task-8, with a test F1 score of 88.4, outperforming the CNN baseline.
  • On the Wiki80 few-shot benchmark, the BERT-PAIR model achieves an F1 score of 93.2 under the 5-way 1-shot setting, surpassing the original result of 92.8.
  • The CNN-ATT, CNN-ADV, and CNN-RL models on NYT10 achieve AUC scores of 0.333, 0.337, and 0.276, respectively, matching or exceeding original results from Lin et al. (2016) and Feng et al. (2018).
  • The OpenNRE implementation of Prototypical Networks with BERT achieves an F1 score of 89.6 under 5-way 1-shot, outperforming the original result of 88.4 reported by Han et al. (2018c).
  • The online system enables real-time relation extraction with fast inference and seamless Wikidata alignment, supporting deployment without model retraining.
  • The toolkit demonstrates strong extensibility and modularity, enabling efficient integration of new models and long-term maintenance through community contributions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.