DeepKE: A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population

Ningyu Zhang, Xin Xu, Liankuan Tao, Haiyang Yu, Hongbin Ye, Shuofei Qiao, Xin Xie, Xiang Chen, Zhoubo Li, Lei Li

TL;DR

DeepKE is a new, open-source toolkit designed to simplify and standardize knowledge extraction (KE) for knowledge base population. It tackles complex scenarios like low-resource, document-level, and multimodal data, offering a unified framework for various KE tasks.

What Problem Does This Paper Address?

Building and maintaining large-scale Knowledge Bases (KBs) is crucial for many AI applications, but KBs are often incomplete due to the constant emergence of new information. Knowledge Extraction (KE) aims to fill these gaps by extracting entities, relations, and attributes from text. While existing toolkits exist, they often focus on single tasks, struggle with complex real-world scenarios (like limited labeled data, long documents, or mixed text/image data), and lack unified frameworks for customization. This limits their applicability and extensibility for researchers and developers.

Methods

DeepKE offers a unified framework for data processing, model training, and evaluation, aiming for modularity and extensibility. It supports three core KE tasks:

  • Named Entity Recognition (NER): Identifies and classifies mentions of entities (e.g., persons, locations, organizations).
  • Relation Extraction (RE): Identifies semantic relationships between pairs of entities.
  • Attribute Extraction (AE): Extracts specific attributes associated with entities.

What makes DeepKE stand out is its support for:

  • Standard Supervised Setting: Traditional KE tasks with ample labeled data.
  • Low-Resource Setting (Few-Shot): Enables KE with very limited labeled examples, crucial for practical scenarios.
  • Document-Level Setting: Extracts relations that span across multiple sentences within a document, going beyond single-sentence analysis.
  • Multimodal Setting: Integrates information from both text and images for KE.

DeepKE provides pre-trained models and allows for flexible training and hyperparameter tuning, including automatic tuning via Weight & Biases. It also offers an online system for real-time extraction.

Datasets

DeepKE was evaluated on several standard datasets:

  • NER: CoNLL-2003 (English), People's Daily (Chinese), Twitter-2017 (Multimodal).
  • RE: DuIE (Chinese), DocRED (Document-level), MNRE (Multimodal).
  • AE: An unspecified online Chinese dataset.
  • Few-Shot RE: SemEval 2010 Task-8.

The paper also mentions using MIT Movie Review, MIT Restaurant Review, and ATIS datasets for cross-domain few-shot NER.

Key Insights and Ideas

  • Unified Framework for Complexity: The most significant contribution is a single toolkit that can handle diverse and challenging KE scenarios (low-resource, document-level, multimodal) that are often treated separately.
  • Modularity and Extensibility: By organizing components into consistent frameworks, DeepKE makes it easier for users to customize datasets and models without deep diving into complex code.
  • Bridging the Gap to Real-World Applications: The focus on low-resource and document-level extraction directly addresses practical limitations of existing tools, making KE more accessible for real-world KB population.
  • Multimodal Integration: Incorporating visual information alongside text is a critical step towards more comprehensive knowledge extraction, reflecting the nature of modern data.

Key Results

DeepKE demonstrates competitive performance across various tasks and scenarios, often matching or exceeding state-of-the-art baselines.

  • Single-Sentence Supervised: Achieves comparable performance to strong baselines on CoNLL-2003 and People's Daily for NER, and on DuIE for RE.
  • Low-Resource: Outperforms other methods in both in-domain and cross-domain few-shot NER scenarios.
  • Document-Level: Shows comparable or better performance than existing models on the DocRED dataset for document-level RE.
  • Multimodal: Achieves improved performance on multimodal NER (Twitter-2017) and RE (MNRE) compared to baselines.

Limitations and Future Work

  • Pre-defined Schemas: The online system currently relies on pre-defined schemas, meaning it cannot extract knowledge outside of these defined categories.
  • Future Work: The authors plan to offer long-term maintenance, fix bugs, add new tasks, and improve documentation. They have also reserved interfaces for future application functions, suggesting a commitment to expanding the toolkit's capabilities.

Summary updated

BibTeX
@inproceedings{zhang2022deepke,
  author = {Ningyu Zhang and Xin Xu and Liankuan Tao and Haiyang Yu and Hongbin Ye and Shuofei Qiao and Xin Xie and Xiang Chen and Zhoubo Li and Lei Li},
  title = {{DeepKE: A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-demos.10},
}
Figure