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

Abstract

DeepKE is a comprehensive, open-source toolkit designed to streamline Knowledge Extraction (KE) for populating knowledge bases. Unlike previous tools that focus on single tasks, DeepKE provides a unified, extensible framework for Named Entity Recognition (NER), Relation Extraction (RE), and Attribute Extraction (AE) across challenging real-world scenarios, including low-resource, document-level, and multimodal settings.

1. Introduction

Knowledge Bases (KBs) are the backbone of modern AI, powering everything from recommendation engines to commonsense reasoning. However, KBs are perpetually incomplete because new entities and relations emerge constantly. While Information Extraction (IE) is the standard solution for "Knowledge Base Population," existing toolkits often fall short in three areas: task silos (supporting only one task), data scarcity (performance drops in low-resource settings), and complexity (handling document-level or multimodal data).

DeepKE aims to be a "one-stop shop" that handles these complexities within a single, modular architecture.

2. Methodology

The authors designed DeepKE around a Unified Framework consisting of three core modules: the Data Module for preprocessing, the Model Module containing a library of neural architectures (CNNs, RNNs, Transformers, and pre-trained models like BERT), and the Core Module for managing training pipelines.

2.1 Specialized Extraction Scenarios

The toolkit stands out by integrating state-of-the-art research methods for specific scenarios:

  • Low-resource Extraction: DeepKE utilizes prompt-tuning (specifically the KnowPrompt and LightNER methods) to achieve high performance with minimal training examples. By framing extraction as a "fill-in-the-blank" task, it significantly outperforms traditional fine-tuning when only a few dozen samples are available.
DeepKE optimizes performance for low-resource data scenarios through prompt-tuning.
  • Document-level Extraction: It implements DocuNet, which can extract relations between entities that appear in different sentences within the same document.
  • Multimodal Extraction: It introduces IFAformer, a Transformer-based model that uses prefix-based attention to align textual features with visual objects in images at every layer, rather than simple concatenation.
Multimodal extraction aligns textual features with visual objects in images.

3. Key Results and Insights

DeepKE delivers competitive, often state-of-the-art (SOTA) results across a diverse array of benchmarks:

  • Standard NER/RE: Achieved an F1 score of 94.73% on CoNLL-2003 and 96.74% on DuIE.
  • Few-shot NER: In a 100-shot setting on CoNLL-2003, DeepKE (LightNER) achieved a 78.97% F1, outperforming standard BERT-based baselines by over 10 points.
  • Document-level RE: On the DocRED dataset, DeepKE reached a 64.55% F1, surpassing previous benchmarks like ATLOP.
  • Multimodal: IFAformer set new high bars on Twitter17 (87.39% F1) and MNRE (81.67% F1).

One of the primary technical advantages of DeepKE is its modularity via the Hydra configuration framework, allowing researchers to swap models or tweak hyperparameters in .yaml files without modifying the underlying code.

4. Conclusion and Future Work

DeepKE provides a robust framework for Knowledge Base Population. While the current online demo is restricted to a pre-defined schema (cnSchema), future work involves expanding the toolkit to support event extraction and providing more "off-the-shelf" models for various languages beyond English and Chinese. The team plans to maintain the project long-term, offering technical support and tutorials for the community.

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