BertNet: Harvesting Knowledge Graphs with Arbitrary Relations from Pretrained Language Models

Shibo Hao, Bowen Tan, Kaiwen Tang, Bin Ni, Xiyan Shao +3 more
6/28/2022
40 citations
cs.CL

Official code: tanyuqian/knowledge-harvest-from-lms (106 stars, Python, last commit 2024-07-01).

Abstract

It is crucial to automatically construct knowledge graphs (KGs) of diverse new relations to support knowledge discovery and broad applications. Previous KG construction methods, based on either crowdsourcing or text mining, are often limited to a small predefined set of relations due to manual cost or restrictions in text corpus.

Show full abstract

Recent research proposed to use pretrained language models (LMs) as implicit knowledge bases that accept knowledge queries with prompts. Yet, the implicit knowledge lacks many desirable properties of a full-scale symbolic KG, such as easy access, navigation, editing, and quality assurance. In this paper, we propose a new approach of harvesting massive KGs of arbitrary relations from pretrained LMs. With minimal input of a relation definition (a prompt and a few shot of example entity pairs), the approach efficiently searches in the vast entity pair space to extract diverse accurate knowledge of the desired relation. We develop an effective search-and-rescore mechanism for improved efficiency and accuracy. We deploy the approach to harvest KGs of over 400 new relations from different LMs. Extensive human and automatic evaluations show our approach manages to extract diverse accurate knowledge, including tuples of complex relations (e.g., "A is capable of but not good at B"). The resulting KGs as a symbolic interpretation of the source LMs also reveal new insights into the LMs' knowledge capacities.

View on arXivView PDF

Code Implementations(1)

ACL 2023 (Findings) - BertNet: Harvesting Knowledge Graphs from Pretrained Language Models

10617PythonMar 17, 20222 years ago
knowledge-discoveryknowledge-graphlarge-language-models

Similar Papers

Cite this paper

@article{hao2022bertnet,
  title  = {BertNet: Harvesting Knowledge Graphs with Arbitrary Relations from Pretrained Language Models},
  author = {Shibo Hao and Bowen Tan and Kaiwen Tang and Bin Ni and Xiyan Shao and Hengzhe Zhang and Eric P. Xing and Zhiting Hu},
  year   = {2022},
  eprint = {2206.14268},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.14268}
}

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/2206.14268.svg)](https://codeofpaper.com/paper/2206.14268)

Discussion